1 #ifndef EAGLE_EBOARD_HELPLIB_I2CINOUT 2 #define EAGLE_EBOARD_HELPLIB_I2CINOUT 18 #define DIGITAL_IN 0x0 19 #define DIGITAL_IN_INV 0x1 21 #define DIGITAL_IN_PULLUP 0x2 23 #define DIGITAL_IN_PULLUP_INV 0x3 25 #define DIGITAL_OUT 0x4 27 #define DIGITAL_OUT_INV 0x5 29 #define DIGITAL_OUT_LOW 0x6 31 #define DIGITAL_OUT_HIGH 0x7 33 #define ANALOG_IN_8_BIT 0x8 35 #define ANALOG_IN_10_BIT 0x9 37 #define ANALOG_IN_MEAN_8_BIT 0xA 39 #define ANALOG_IN_MEAN_10_BIT 0xB 41 #define COUNTER_8_BIT 0xC 43 #define COUNTER_16_BIT 0xD 45 #define COUNTER_RISE_8_BIT 0xE 47 #define COUNTER_RISE_16_BIT 0xF 57 #define COUNTER_B_DIR 0xC 59 #define COUNTER_B_DIR_PULLUP 0xD 61 #define COUNTER_MEAN_8_BIT 0xE 63 #define COUNTER_MEAN_16_BIT 0xF 104 #if EBOARD_USE_UTILITY > 0x0 105 inline void read(
void);
108 inline void changeAddress(
optVAL_t);
116 inline void write(
void);
134 this->
A=0x0;this->
B=0x0;this->
C=0x0;
136 #if EBOARD_USE_UTILITY > 0x0 137 void I2CInOut::read(
void) {}
138 void I2CInOut::changeAddress(
optVAL_t){}
void writePWM(optVAL_t val)
write a clamped pwm value to an output pin
optVAL_t C
storing value for C-pin [MOTOR SPE]
This is the SoccerBoard ghost struct :D.
void setPin(optVAL_t idx, optVAL_t mode=OUTPUT)
[COPY&PASTE] set a pin to a certain mode => checkPin() will return true then
void write(void)
this will write values stored in B and C
optVAL_t B
storing value for B-pin [MOTOR DIR]
I2CInOut(SoccerBoard &, optVAL_t, optVAL_t, optVAL_t, optVAL_t)
The constructor.
[COPY&PASTE] This is the I2CInOut ghost struct :D
optVAL_t A
storing value for A-pin ( I prevent errors!)