Synopsis
typedef struct {
CTL_STATUS_t (*transaction)(CTL_I2C_BUS_t *, CTL_I2C_REQUEST_t *);
CTL_STATUS_t (*set_speed)(CTL_I2C_BUS_t *, unsigned);
unsigned long __speed;
CTL_MUTEX_t *mutex;
} CTL_I2C_BUS_t;
Description
CTL_I2C_BUS_t defines the interface to the device-independent
I2C bus driver.
Structure
-
transaction
- Private method to execute an I/O transaction on the I2C bus.
-
set_speed
- Private method to set the operating speed of the I2C bus.
-
__speed
- Consider this a read-only variable that indicates the selected
speed of the I2C bus.
-
mutex
- If this mutex is non-zero, the I2C functions will acquire the mutex
before proceeding to use the I2C bus. For systems that do not share
the I2C bus between tasks, the mutex can be zero and it's the user's
responsibility to ensure mutual exclusion on the I2C bus.