eBoard ①⑧⑨
Written for SIA 2017/2018
eagle_I2C.h File Reference

this file contains cool stuff to access the I²C interface More...

+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

optVAL_t sendI2C (optVAL_t deviceID, byte *buf, byte buf_len)
 Sends a buffer of bytes to a certain I²C-Device. More...
 
optVAL_t sendI2C (optVAL_t deviceID, byte buf)
 Sends a byte to a certain I2C-Device. More...
 
void pingI2C (optVAL_t ret[], optVAL_t ret_len)
 Sends a byte to a certain I²C-Device. More...
 
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. More...
 

Detailed Description

this file contains cool stuff to access the I²C interface

Last Updated:

Version
3.2.5d

Definition in file eagle_I2C.h.

Function Documentation

◆ pingI2C()

void pingI2C ( optVAL_t  ret[],
optVAL_t  ret_len 
)

Sends a byte to a certain I²C-Device.

Note
Using I²C won't block the analog pins!
Parameters
retan array of optVAL_t
ret_lenthe length of the array

◆ readI2C()

void readI2C ( optVAL_t  deviceID,
optVAL_t  ret[],
optVAL_t  ret_len,
bool  blocking = true 
)
inline

Reads a special amount of bits from a certain I²C-Device.

Note
Using I²C won't block the analog pins!
Parameters
deviceIDthe target device
retthe buffer to send
ret_lensize of buffer
blockingshould the Arduino wait until there is Data?

◆ sendI2C() [1/2]

optVAL_t sendI2C ( optVAL_t  deviceID,
byte *  buf,
byte  buf_len 
)

Sends a buffer of bytes to a certain I²C-Device.

Note
Using I²C won't block the analog pins!
Parameters
deviceIDthe target device
bufthe buffer to send
buf_lensize of buffer
Returns
0 Transmission went well :D
1 ERROR: data too long for transmit buffer
2 ERROR: NACK transmitting address
3 ERROR: NACK transmitting data
4 ERROR: UNKNOWN

◆ sendI2C() [2/2]

optVAL_t sendI2C ( optVAL_t  deviceID,
byte  buf 
)

Sends a byte to a certain I2C-Device.

Note
Using I2C won't block the analog pins!
Parameters
deviceIDthe target device
bufthe buffer to send
Returns
0 Transmission went well :D
1 ERROR: data too long for transmit buffer
2 ERROR: NACK transmitting address
3 ERROR: NACK transmitting data
4 ERROR: UNKNOWN