flexio_i2c_driver.h File Reference
#include <stddef.h>
#include <stdbool.h>
#include "device_registers.h"
#include "flexio.h"
#include "edma_driver.h"
#include "callbacks.h"

Go to the source code of this file.

Data Structures

struct  flexio_i2c_master_user_config_t
 Master configuration structure. More...
 
struct  flexio_i2c_master_state_t
 Master internal context structure. More...
 

Macros

#define FLEXIO_I2C_MAX_SIZE   (((uint32_t)((0xFFU - 1U) / 18U)) - 1U)
 Maximum size of a transfer. The restriction is that the total number of SCL edges must not exceed 8 bits, such that it can be programmed in the upper part of the timer compare register. There are 2 SCL edges per bit, 9 bits per byte (including ACK). The extra 1 is for the STOP condition. More...
 

Functions

FLEXIO_I2C Driver
status_t FLEXIO_I2C_DRV_MasterInit (uint32_t instance, const flexio_i2c_master_user_config_t *userConfigPtr, flexio_i2c_master_state_t *master)
 Initialize the FLEXIO_I2C master mode driver. More...
 
status_t FLEXIO_I2C_DRV_MasterDeinit (flexio_i2c_master_state_t *master)
 De-initialize the FLEXIO_I2C master mode driver. More...
 
status_t FLEXIO_I2C_DRV_MasterSetBaudRate (flexio_i2c_master_state_t *master, uint32_t baudRate)
 Set the baud rate for any subsequent I2C communication. More...
 
status_t FLEXIO_I2C_DRV_MasterGetBaudRate (flexio_i2c_master_state_t *master, uint32_t *baudRate)
 Get the currently configured baud rate. More...
 
status_t FLEXIO_I2C_DRV_MasterSetSlaveAddr (flexio_i2c_master_state_t *master, const uint16_t address)
 Set the slave address for any subsequent I2C communication. More...
 
status_t FLEXIO_I2C_DRV_MasterSendData (flexio_i2c_master_state_t *master, const uint8_t *txBuff, uint32_t txSize, bool sendStop)
 Perform a non-blocking send transaction on the I2C bus. More...
 
status_t FLEXIO_I2C_DRV_MasterSendDataBlocking (flexio_i2c_master_state_t *master, const uint8_t *txBuff, uint32_t txSize, bool sendStop, uint32_t timeout)
 Perform a blocking send transaction on the I2C bus. More...
 
status_t FLEXIO_I2C_DRV_MasterReceiveData (flexio_i2c_master_state_t *master, uint8_t *rxBuff, uint32_t rxSize, bool sendStop)
 Perform a non-blocking receive transaction on the I2C bus. More...
 
status_t FLEXIO_I2C_DRV_MasterReceiveDataBlocking (flexio_i2c_master_state_t *master, uint8_t *rxBuff, uint32_t rxSize, bool sendStop, uint32_t timeout)
 Perform a blocking receive transaction on the I2C bus. More...
 
status_t FLEXIO_I2C_DRV_MasterTransferAbort (flexio_i2c_master_state_t *master)
 Aborts a non-blocking I2C master transaction. More...
 
status_t FLEXIO_I2C_DRV_MasterGetStatus (flexio_i2c_master_state_t *master, uint32_t *bytesRemaining)
 Get the status of the current non-blocking I2C master transaction. More...