mbed library sources change for ST sensors and ST BLE
Fork of mbed-src by
Synchronous I2C Hardware Abstraction Layer for slave
Functions | |
| void | i2c_slave_mode (i2c_t *obj, int enable_slave) |
| Configure I2C as slave or master. | |
| int | i2c_slave_receive (i2c_t *obj) |
| Check to see if the I2C slave has been addressed. | |
| int | i2c_slave_read (i2c_t *obj, char *data, int length) |
| Configure I2C as slave or master. | |
| int | i2c_slave_write (i2c_t *obj, const char *data, int length) |
| Configure I2C as slave or master. | |
| void | i2c_slave_address (i2c_t *obj, int idx, uint32_t address, uint32_t mask) |
| Configure I2C address. | |
Function Documentation
| void i2c_slave_address | ( | i2c_t * | obj, |
| int | idx, | ||
| uint32_t | address, | ||
| uint32_t | mask | ||
| ) |
Configure I2C address.
- Parameters:
-
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.
- Parameters:
-
obj The I2C object
- Returns:
- non-zero if a value is available
| int i2c_slave_read | ( | i2c_t * | obj, |
| char * | data, | ||
| int | length | ||
| ) |
Configure I2C as slave or master.
- Parameters:
-
obj The I2C object
- Returns:
- non-zero if a value is available
| int i2c_slave_receive | ( | i2c_t * | obj ) |
Check to see if the I2C slave has been addressed.
- Parameters:
-
obj The I2C object
- Returns:
- The status - 1 - read addresses, 2 - write to all slaves, 3 write addressed, 0 - the slave has not been addressed
| int i2c_slave_write | ( | i2c_t * | obj, |
| const char * | data, | ||
| int | length | ||
| ) |
Configure I2C as slave or master.
- Parameters:
-
obj The I2C object
- Returns:
- non-zero if a value is available
Generated on Tue Jul 12 2022 19:15:38 by
1.7.2
