12 #ifndef FSL_I2C_MASTER_DRIVER_H_
13 #define FSL_I2C_MASTER_DRIVER_H_
75 #define I2C_PEX_WRITE_EVENT_SUCCESS (1)
76 #define I2C_PEX_WRITE_EVENT_ERROR (I2C_PEX_WRITE_EVENT_SUCCESS << 1)
77 #define I2C_PEX_READ_EVENT_SUCCESS (I2C_PEX_WRITE_EVENT_ERROR << 1)
78 #define I2C_PEX_READ_EVENT_ERROR (I2C_PEX_READ_EVENT_SUCCESS << 1)
85 #if defined(__cplusplus)
133 bool stopAfterTransfer,
135 size_t subaddressLength,
138 size_t * actualLengthTransferred,
139 uint32_t timeout_ms);
141 #if defined(__cplusplus)
enum I2CDirection i2c_direction_t
Constants for the direction of an I2C transfer.
LWEVENT_STRUCT i2cEventHandler
Information necessary to communicate with an I2C slave device.
void i2c_master_shutdown(i2c_master_t *master)
Shut down the driver.
Type for an synchronization object.
i2c_status_t i2c_master_configure_bus(i2c_master_t *master, const i2c_device_t *device)
Configure the I2C bus to access a device.
volatile uint8_t semCount
fsl_i2c_hal.h defines structures and types for the i2c master HAL layer.
Internal driver state information.
enum _i2c_status i2c_status_t
I2C status return codes.
_i2c_transfer_flags
Optional flags to control a transfer.
void i2c_master_init(uint32_t instance, i2c_master_t *master)
Initialize the I2C master mode driver.
LDD_I2C_TAddrType addrType
bool isTransferInProgress
i2c_status_t i2c_master_transfer(i2c_master_t *master, const i2c_device_t *device, i2c_direction_t direction, bool stopAfterTransfer, uint32_t subaddress, size_t subaddressLength, uint8_t *data, size_t dataLength, size_t *actualLengthTransferred, uint32_t timeout_ms)
Perform a blocking read or write transaction on the I2C bus.
struct I2CMasterState i2c_master_t
Internal driver state information.
LDD_TDeviceData * pDeviceHandle
I2CDirection
Constants for the direction of an I2C transfer.
uint32_t lastBaudRate_kbps
LDD_TUserData * pUserData
struct I2CDeviceInfo i2c_device_t
Information necessary to communicate with an I2C slave device.