Little-Wire
|
Inter IC communication functions. More...
Functions | |
void | i2c_init (littleWire *lwHandle) |
unsigned char | i2c_start (littleWire *lwHandle, unsigned char address7bit, unsigned char direction) |
void | i2c_write (littleWire *lwHandle, unsigned char *sendBuffer, unsigned char length, unsigned char endWithStop) |
void | i2c_read (littleWire *lwHandle, unsigned char *readBuffer, unsigned char length, unsigned char endWithStop) |
void | i2c_updateDelay (littleWire *lwHandle, unsigned int duration) |
Inter IC communication functions.
void i2c_init | ( | littleWire * | lwHandle) |
Initialize the I2C module on the Little-Wire
Definition at line 282 of file littleWire.c.
void i2c_read | ( | littleWire * | lwHandle, |
unsigned char * | readBuffer, | ||
unsigned char | length, | ||
unsigned char | endWithStop | ||
) |
Read byte(s) over i2c bus
lwHandle | littleWire device pointer |
readBuffer | Returned message array |
length | Message length -> Max = 8 |
endWithStop | Should we send a STOP condition after this buffer? ( END_WITH_STOP or NO_STOP ) |
Definition at line 303 of file littleWire.c.
unsigned char i2c_start | ( | littleWire * | lwHandle, |
unsigned char | address7bit, | ||
unsigned char | direction | ||
) |
Start the i2c communication
lwHandle | littleWire device pointer |
address | 7 bit slave address. |
direction | ( READ or WRITE ) |
Definition at line 287 of file littleWire.c.
void i2c_updateDelay | ( | littleWire * | lwHandle, |
unsigned int | duration | ||
) |
Update i2c signal delay amount. Tune if neccessary to fit your requirements.
lwHandle | littleWire device pointer |
duration | Delay amount |
Definition at line 320 of file littleWire.c.
void i2c_write | ( | littleWire * | lwHandle, |
unsigned char * | sendBuffer, | ||
unsigned char | length, | ||
unsigned char | endWithStop | ||
) |
Send byte(s) over i2c bus
lwHandle | littleWire device pointer |
sendBuffer | Message array to send |
length | Message length -> Max = 4 |
endWithStop | Should we send a STOP condition after this buffer? ( END_WITH_STOP or NO_STOP ) |
Definition at line 298 of file littleWire.c.