Functions | |
void | i2c_slave_mode (i2c_t *obj, int enable_slave) |
Configure I2C as slave or master. More... | |
int | i2c_slave_receive (i2c_t *obj) |
Check to see if the I2C slave has been addressed. More... | |
int | i2c_slave_read (i2c_t *obj, char *data, int length) |
Configure I2C as slave or master. More... | |
int | i2c_slave_write (i2c_t *obj, const char *data, int length) |
Configure I2C as slave or master. More... | |
void | i2c_slave_address (i2c_t *obj, int idx, uint32_t address, uint32_t mask) |
Configure I2C address. More... | |
void i2c_slave_address | ( | i2c_t * | obj, |
int | idx, | ||
uint32_t | address, | ||
uint32_t | mask | ||
) |
Configure I2C address.
obj | The I2C object |
idx | Currently not used |
address | The address to be set |
mask | Currently not used |
void i2c_slave_mode | ( | i2c_t * | obj, |
int | enable_slave | ||
) |
Configure I2C as slave or master.
obj | The I2C object |
enable_slave | Enable i2c hardware so you can receive events with i2c_slave_receive |
int i2c_slave_read | ( | i2c_t * | obj, |
char * | data, | ||
int | length | ||
) |
Configure I2C as slave or master.
obj | The I2C object |
data | The buffer for receiving |
length | Number of bytes to read |
int i2c_slave_receive | ( | i2c_t * | obj | ) |
Check to see if the I2C slave has been addressed.
obj | The I2C object |
int i2c_slave_write | ( | i2c_t * | obj, |
const char * | data, | ||
int | length | ||
) |
Configure I2C as slave or master.
obj | The I2C object |
data | The buffer for sending |
length | Number of bytes to write |