1 #ifndef EAGLE_EBOARD_HELPLIB_I2C 2 #define EAGLE_EBOARD_HELPLIB_I2C 92 for (byte i = 1; (i < 255 && !
STOP); i++) {
94 Wire.beginTransmission (i);
95 if (
Wire.endTransmission () == 0) {
96 if(count < ret_len) ret[count] = i;
104 Wire.beginTransmission(deviceID);
106 return Wire.endTransmission();
110 Wire.beginTransmission(deviceID);
112 return Wire.endTransmission();
116 for(
optVAL_t rect = 0x0; (
Wire.available() || (((blocking && (rect < ret_len))) && (!
STOP))); rect++)
117 ret[rect] =
Wire.read();
const unsigned char * buf[11]
to enable 'smooth' access (:
optVAL_t sendI2C(optVAL_t deviceID, byte *buf, byte buf_len)
Sends a buffer of bytes to a certain I²C-Device.
void readI2C(optVAL_t deviceID, optVAL_t ret[], optVAL_t ret_len, bool blocking=true)
Reads a special amount of bits from a certain I²C-Device.
TwoWire Wire
this is the well-known Arduino Wire Interface, just a little bit 'modified' ;P
void pingI2C(optVAL_t ret[], optVAL_t ret_len)
Sends a byte to a certain I²C-Device.