32 uint32_t subaddress,
size_t subaddressLength,
33 uint8_t * data,
size_t dataLength,
35 #define I2C_WRITE_BUFF_SIZE_MAX 0x32
107 size_t subaddressLength,
110 size_t * actualLengthTransferred,
114 if((master == NULL) || (device == NULL) || (data == NULL)
123 return i2c_master_driver_send_receive(master, device, direction, flag, subaddress, subaddressLength, data, dataLength, timeout_ms );
133 uint32_t subaddress,
size_t subaddressLength,
134 uint8_t * data,
size_t dataLength,
140 if(subaddressLength){
151 flag = LDD_I2C_SEND_STOP;
160 || (LWEVENT_WAIT_TIMEOUT == event)){
169 buffer[0] = (
uint8)subaddress;
unsigned char uint8
This defines uint8 as unsigned char.
This structure contains i2c LLD function pointers.
enum I2CDirection i2c_direction_t
Constants for the direction of an I2C transfer.
fsl_i2c_master_driver.h defines structures and types for the i2c master driver.
LWEVENT_STRUCT i2cEventHandler
#define I2C_PEX_WRITE_EVENT_SUCCESS
#define I2C_PEX_WRITE_EVENT_ERROR
fnI2CDeint_t fnI2CLLDDeint
Information necessary to communicate with an I2C slave device.
void i2c_master_shutdown(i2c_master_t *master)
Shut down the driver.
fnI2CWrite_t fnI2CLLDWrite
i2c_status_t i2c_master_configure_bus(i2c_master_t *master, const i2c_device_t *device)
Configure the I2C bus to access a device.
The isf_util.h file contains the utility method declarations and macros.
void isf_mem_copy(void *src, void *dest, uint32 size)
memory copy
Internal driver state information.
enum _i2c_status i2c_status_t
I2C status return codes.
#define I2C_PEX_READ_EVENT_SUCCESS
#define I2C_PEX_READ_EVENT_ERROR
i2c_instance_PEx i2c_instance_tbl[]
Lookup table for the LLD instance.
void i2c_master_init(uint32_t instance, i2c_master_t *master)
Initialize the I2C master mode driver.
LDD_I2C_TAddrType addrType
i2c_status_t i2c_master_transfer(i2c_master_t *master, const i2c_device_t *device, i2c_direction_t direction, bool flag, 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.
LDD_TDeviceData * pDeviceHandle
LDD_TUserData * pUserData
fnI2CDeviceSelect_t fnI2CLLDDeviceSelect
#define I2C_WRITE_BUFF_SIZE_MAX