Macros
Hardware I2C macros. More...
Macros | |
#define | I2C_FLAG_HEXIFY ( 1 << I2C_FLAG_HEXIFY_SHIFT ) |
Convert input hex string to binary, output binary to hex string. More... | |
#define | I2C_MSG_WRITE (1 << I2C_MSG_READ_WRITE_SHIFT) |
Write data to slave. More... | |
#define | I2C_MSG_READ (0 << I2C_MSG_READ_WRITE_SHIFT) |
Read data from slave. More... | |
#define | I2C_MSG_NO_STOP_SEQ (1 << I2C_MSG_NO_STOP_SEQ_SHIFT) |
Don't issue stop sequence after message. More... | |
#define | I2C_MSG_READ_AFTER_WRITE (1 << I2C_MSG_READ_AFTER_WRITE_SHIFT) |
Read data after a write message (e.g. More... | |
#define | I2C_MSG_NO_START_SEQ (1 << I2C_MSG_NO_START_SEQ_SHIFT) |
Don't issue start sequence before message data. More... | |
#define | I2C_CLOCK_LOW_SPEED (10*1000) |
Low clock speed (10kHz) | |
#define | I2C_CLOCK_STANDARD_SPEED (100*1000) |
Standard clock speed (100kHz) | |
#define | I2C_CLOCK_HIGH_SPEED (400*1000) |
High clock speed (400kHz) | |
Detailed Description
Hardware I2C macros.
Macro Definition Documentation
#define I2C_FLAG_HEXIFY ( 1 << I2C_FLAG_HEXIFY_SHIFT ) |
Convert input hex string to binary, output binary to hex string.
- Note
- Only used by 'stream' APIs, see zn_i2c_stream_configure()
- Examples:
- sensors/io_expander/platform.c.
#define I2C_MSG_NO_START_SEQ (1 << I2C_MSG_NO_START_SEQ_SHIFT) |
Don't issue start sequence before message data.
- Note
- Only used by direct APIs
#define I2C_MSG_NO_STOP_SEQ (1 << I2C_MSG_NO_STOP_SEQ_SHIFT) |
Don't issue stop sequence after message.
- Note
- Only used by direct APIs
#define I2C_MSG_READ (0 << I2C_MSG_READ_WRITE_SHIFT) |
Read data from slave.
- Note
- Only used by direct APIs
#define I2C_MSG_READ_AFTER_WRITE (1 << I2C_MSG_READ_AFTER_WRITE_SHIFT) |
Read data after a write message (e.g.
write register address then read register value)
- Note
- Only used by direct APIs
#define I2C_MSG_WRITE (1 << I2C_MSG_READ_WRITE_SHIFT) |
Write data to slave.
- Note
- Only used by direct APIs