RTEMS
5.0.0
|
RTEMS port of Linux I2C user-space API. More...
Files | |
file | i2c-dev.h |
RTEMS Port of Linux I2C Device API. | |
file | i2c.h |
RTEMS Port of Linux I2C API. | |
Data Structures | |
struct | i2c_smbus_ioctl_data |
Argument type for I2C_SMBUS IO control call. More... | |
struct | i2c_rdwr_ioctl_data |
Argument type for I2C_RDWR IO control call. More... | |
struct | i2c_msg |
I2C transfer message. More... | |
union | i2c_smbus_data |
SMBus data. More... | |
Macros | |
#define | I2C_RDRW_IOCTL_MAX_MSGS 42 |
Maximum count of messages for one IO control call. | |
#define | I2C_SMBUS_BLOCK_MAX 32 |
Maximum SMBus data block count. | |
I2C IO Control Commands | |
#define | I2C_RETRIES 0x701 |
Sets the count of transfer retries in case a slave device does not acknowledge a transaction. More... | |
#define | I2C_TIMEOUT 0x702 |
Sets the transfer timeout in 10ms units. More... | |
#define | I2C_SLAVE 0x703 |
Sets the slave address. More... | |
#define | I2C_SLAVE_FORCE 0x706 |
Forces setting the slave address. More... | |
#define | I2C_TENBIT 0x704 |
Enables 10-bit addresses if argument is non-zero, otherwise disables 10-bit addresses. More... | |
#define | I2C_FUNCS 0x705 |
Gets the I2C controller functionality information. More... | |
#define | I2C_RDWR 0x707 |
Performs a combined read/write transfer. More... | |
#define | I2C_PEC 0x708 |
Enables System Management Bus (SMBus) Packet Error Checking (PEC) if argument is non-zero, otherwise disables PEC. More... | |
#define | I2C_SMBUS 0x720 |
Performs an SMBus transfer. More... | |
I2C Message Flags | |
#define | I2C_M_TEN 0x0010 |
I2C message flag to indicate a 10-bit address. More... | |
#define | I2C_M_RD 0x0001 |
I2C message flag to indicate a read transfer (from slave to master). More... | |
#define | I2C_M_STOP 0x8000 |
I2C message flag to signal a stop condition even if this is not the last message. More... | |
#define | I2C_M_NOSTART 0x4000 |
I2C message flag to omit start condition and slave address. More... | |
#define | I2C_M_REV_DIR_ADDR 0x2000 |
I2C message flag to reverse the direction flag. More... | |
#define | I2C_M_IGNORE_NAK 0x1000 |
I2C message flag to ignore a non-acknowledge. More... | |
#define | I2C_M_NO_RD_ACK 0x0800 |
I2C message flag to omit a master acknowledge/non-acknowledge in a read transfer. More... | |
#define | I2C_M_RECV_LEN 0x0400 |
I2C message flag to indicate that the message data length is the first received byte. More... | |
SMBus Transfer Read and Write Markers | |
#define | I2C_SMBUS_READ 1 |
#define | I2C_SMBUS_WRITE 0 |
RTEMS port of Linux I2C user-space API.
Additional documentation is available through the Linux sources, see:
#define I2C_FUNC_SMBUS_EMUL |
#define I2C_FUNCS 0x705 |
Gets the I2C controller functionality information.
The argument type is a pointer to an unsigned long.
#define I2C_M_IGNORE_NAK 0x1000 |
I2C message flag to ignore a non-acknowledge.
The controller must support this as indicated by the I2C_FUNC_PROTOCOL_MANGLING functionality.
#define I2C_M_NO_RD_ACK 0x0800 |
I2C message flag to omit a master acknowledge/non-acknowledge in a read transfer.
The controller must support this as indicated by the I2C_FUNC_PROTOCOL_MANGLING functionality.
#define I2C_M_NOSTART 0x4000 |
I2C message flag to omit start condition and slave address.
The controller must support this as indicated by the I2C_FUNC_NOSTART functionality.
#define I2C_M_RD 0x0001 |
I2C message flag to indicate a read transfer (from slave to master).
#define I2C_M_RECV_LEN 0x0400 |
I2C message flag to indicate that the message data length is the first received byte.
The message data buffer must be large enough to store up to 32 bytes, the initial length byte and the SMBus PEC (if used). Initialize the message length to one. The message length is incremented by the count of received data bytes.
#define I2C_M_REV_DIR_ADDR 0x2000 |
I2C message flag to reverse the direction flag.
The controller must support this as indicated by the I2C_FUNC_PROTOCOL_MANGLING functionality.
#define I2C_M_STOP 0x8000 |
I2C message flag to signal a stop condition even if this is not the last message.
The controller must support this as indicated by the I2C_FUNC_PROTOCOL_MANGLING functionality.
#define I2C_M_TEN 0x0010 |
I2C message flag to indicate a 10-bit address.
The controller must support this as indicated by the I2C_FUNC_10BIT_ADDR functionality.
#define I2C_PEC 0x708 |
Enables System Management Bus (SMBus) Packet Error Checking (PEC) if argument is non-zero, otherwise disables PEC.
The argument type is unsigned long.
#define I2C_RDWR 0x707 |
Performs a combined read/write transfer.
Only one stop condition is signalled.
The argument type is a pointer to struct i2c_rdwr_ioctl_data.
#define I2C_RETRIES 0x701 |
Sets the count of transfer retries in case a slave device does not acknowledge a transaction.
The argument type is unsigned long.
#define I2C_SLAVE 0x703 |
Sets the slave address.
It is an error to set a slave address already used by another slave device.
The argument type is unsigned long.
#define I2C_SLAVE_FORCE 0x706 |
Forces setting the slave address.
The argument type is unsigned long.
#define I2C_SMBUS 0x720 |
Performs an SMBus transfer.
The argument type is a pointer to struct i2c_smbus_ioctl_data.
#define I2C_TENBIT 0x704 |
Enables 10-bit addresses if argument is non-zero, otherwise disables 10-bit addresses.
The argument type is unsigned long.
#define I2C_TIMEOUT 0x702 |
Sets the transfer timeout in 10ms units.
The argument type is unsigned long.