![]() |
RTEMS 6.3
|
I2C bus control. More...
#include <i2c.h>
Data Fields | |
| int(*) | transfer (i2c_bus *bus, i2c_msg *msgs, uint32_t msg_count) |
| Transfers I2C messages. | |
| int(*) | set_clock (i2c_bus *bus, unsigned long clock) |
| Sets the bus clock. | |
| void(*) | destroy (i2c_bus *bus) |
| Destroys the bus. | |
| rtems_recursive_mutex | mutex |
| Mutex to protect the bus access. | |
| uint16_t | default_address |
| Default slave device address. | |
| bool | ten_bit_address |
| Use 10-bit addresses. | |
| bool | use_pec |
| Use SMBus PEC. | |
| unsigned long | retries |
| Transfer retry count. | |
| rtems_interval | timeout |
| Transaction timeout in ticks. | |
| unsigned long | functionality |
| Controller functionality. | |
I2C bus control.
| void(*) i2c_bus::destroy(i2c_bus *bus) |
Destroys the bus.
| [in] | bus | The bus control. |
| int(*) i2c_bus::set_clock(i2c_bus *bus, unsigned long clock) |
Sets the bus clock.
| [in] | bus | The bus control. |
| [in] | clock | The desired bus clock in Hz. |
| 0 | Successful operation. |
| negative | Negative error number in case of an error. |
Transfers I2C messages.
| [in] | bus | The bus control. |
| [in] | msgs | The messages to transfer. |
| [in] | msg_count | The count of messages to transfer. It must be positive. |
| 0 | Successful operation. |
| negative | Negative error number in case of an error. |