![]() |
Ultibo API
C/C++ API for Ultibo Core
|
#include <i2c.h>
Data Fields | |
| DEVICE | device |
| The Device entry for this I2C. | |
| uint32_t | i2cid |
| Unique Id of this I2C in the I2C table. | |
| uint32_t | i2cstate |
| I2C state (eg I2C_STATE_ENABLED). | |
| i2c_device_start_proc | devicestart |
| A Device specific DeviceStart method implementing the standard I2C device interface (Mandatory). | |
| i2c_device_stop_proc | devicestop |
| A Device specific DeviceStop method implementing the standard I2C device interface (Mandatory). | |
| i2c_device_read_proc | deviceread |
| A Device specific DeviceRead method implementing the standard I2C device interface (Mandatory). | |
| i2c_device_write_proc | devicewrite |
| A Device specific DeviceWrite method implementing the standard I2C device interface (Mandatory). | |
| i2c_device_write_read_proc | devicewriteread |
| A Device specific DeviceWriteRead method implementing the standard I2C device interface (Or nil if the default method is suitable). | |
| i2c_device_write_write_proc | devicewritewrite |
| A Device specific DeviceWriteWrite method implementing the standard I2C device interface (Or nil if the default method is suitable). | |
| i2c_device_get_rate_proc | devicegetrate |
| A Device specific DeviceGetRate method implementing the standard I2C device interface (Or nil if the default method is suitable). | |
| i2c_device_set_rate_proc | devicesetrate |
| A Device specific DeviceSetRate method implementing the standard I2C device interface (Or nil if the default method is suitable). | |
| i2c_device_get_address_proc | devicegetaddress |
| A Device specific DeviceGetAddress method implementing the standard I2C device interface (Or nil if the default method is suitable). | |
| i2c_device_set_address_proc | devicesetaddress |
| A Device specific DeviceSetAddress method implementing the standard I2C device interface (Or nil if the default method is suitable). | |
| i2c_device_get_properties_proc | devicegetproperties |
| A Device specific DeviceGetProperties method implementing the standard I2C device interface (Or nil if the default method is suitable). | |
| uint32_t | readcount |
| uint32_t | writecount |
| uint32_t | readerrors |
| uint32_t | writeerrors |
| MUTEX_HANDLE | lock |
| Device lock. | |
| SEMAPHORE_HANDLE | wait |
| Read/Write wait event. | |
| uint32_t | clockrate |
| Clock rate (Hz). | |
| uint16_t | slaveaddress |
| Slave address. | |
| I2C_PROPERTIES | properties |
| Device properties. | |
| I2C_DEVICE * | prev |
| Previous entry in I2C table. | |
| I2C_DEVICE * | next |
| Next entry in I2C table. | |
| DEVICE device |
The Device entry for this I2C.
| uint32_t i2cid |
Unique Id of this I2C in the I2C table.
| uint32_t i2cstate |
I2C state (eg I2C_STATE_ENABLED).
| i2c_device_start_proc devicestart |
A Device specific DeviceStart method implementing the standard I2C device interface (Mandatory).
| i2c_device_stop_proc devicestop |
A Device specific DeviceStop method implementing the standard I2C device interface (Mandatory).
| i2c_device_read_proc deviceread |
A Device specific DeviceRead method implementing the standard I2C device interface (Mandatory).
| i2c_device_write_proc devicewrite |
A Device specific DeviceWrite method implementing the standard I2C device interface (Mandatory).
| i2c_device_write_read_proc devicewriteread |
A Device specific DeviceWriteRead method implementing the standard I2C device interface (Or nil if the default method is suitable).
| i2c_device_write_write_proc devicewritewrite |
A Device specific DeviceWriteWrite method implementing the standard I2C device interface (Or nil if the default method is suitable).
| i2c_device_get_rate_proc devicegetrate |
A Device specific DeviceGetRate method implementing the standard I2C device interface (Or nil if the default method is suitable).
| i2c_device_set_rate_proc devicesetrate |
A Device specific DeviceSetRate method implementing the standard I2C device interface (Or nil if the default method is suitable).
| i2c_device_get_address_proc devicegetaddress |
A Device specific DeviceGetAddress method implementing the standard I2C device interface (Or nil if the default method is suitable).
| i2c_device_set_address_proc devicesetaddress |
A Device specific DeviceSetAddress method implementing the standard I2C device interface (Or nil if the default method is suitable).
| i2c_device_get_properties_proc devicegetproperties |
A Device specific DeviceGetProperties method implementing the standard I2C device interface (Or nil if the default method is suitable).
| uint32_t readcount |
| uint32_t writecount |
| uint32_t readerrors |
| uint32_t writeerrors |
| MUTEX_HANDLE lock |
Device lock.
| SEMAPHORE_HANDLE wait |
Read/Write wait event.
| uint32_t clockrate |
Clock rate (Hz).
| uint16_t slaveaddress |
Slave address.
| I2C_PROPERTIES properties |
Device properties.
| I2C_DEVICE* prev |
Previous entry in I2C table.
| I2C_DEVICE* next |
Next entry in I2C table.