i2c_pal.h File Reference
#include "i2c_pal_cfg.h"
#include "i2c_pal_mapping.h"
#include "status.h"
#include "callbacks.h"

Go to the source code of this file.

Data Structures

struct  extension_flexio_for_i2c_t
 Defines the extension structure for the I2C over FLEXIO Implements : extension_flexio_for_i2c_t_Class. More...
 
struct  i2c_master_t
 Defines the configuration structure for I2C master Implements : i2c_master_t_Class. More...
 
struct  i2c_slave_t
 Defines the configuration structure for I2C slave Implements: i2c_slave_t_Class. More...
 

Enumerations

enum  i2c_pal_transfer_type_t { I2C_PAL_USING_DMA = 0U, I2C_PAL_USING_INTERRUPTS = 1U }
 Defines the mechanism to update the rx or tx buffers Implements : i2c_pal_transfer_type_t_Class. More...
 
enum  i2c_operating_mode_t {
  I2C_PAL_STANDARD_MODE = 0x0U, I2C_PAL_FAST_MODE = 0x1U, I2C_PAL_FASTPLUS_MODE = 0x2U, I2C_PAL_HIGHSPEED_MODE = 0x3U,
  I2C_PAL_ULTRAFAST_MODE = 0x4U
}
 Defines the operation mode of the i2c pal Implements : i2c_operating_mode_t_Class. More...
 

Functions

status_t I2C_MasterInit (const i2c_instance_t *const instance, const i2c_master_t *config)
 Initializes the I2C module in master mode. More...
 
status_t I2C_MasterSendData (const i2c_instance_t *const instance, const uint8_t *txBuff, uint32_t txSize, bool sendStop)
 Perform a non-blocking send transaction on the I2C bus. More...
 
status_t I2C_MasterSendDataBlocking (const i2c_instance_t *const instance, const uint8_t *txBuff, uint32_t txSize, bool sendStop, uint32_t timeout)
 Perform a blocking send transaction on the I2C bus. More...
 
status_t I2C_MasterReceiveData (const i2c_instance_t *const instance, uint8_t *rxBuff, uint32_t rxSize, bool sendStop)
 Perform a non-blocking receive transaction on the I2C bus. More...
 
status_t I2C_MasterReceiveDataBlocking (const i2c_instance_t *const instance, uint8_t *rxBuff, uint32_t rxSize, bool sendStop, uint32_t timeout)
 Perform a blocking receive transaction on the I2C bus. More...
 
status_t I2C_MasterSetSlaveAddress (const i2c_instance_t *const instance, const uint16_t address, const bool is10bitAddr)
 Set the slave address for the I2C communication. More...
 
status_t I2C_MasterDeinit (const i2c_instance_t *const instance)
 De-initializes the I2C master module. More...
 
status_t I2C_GetDefaultMasterConfig (i2c_master_t *config)
 Gets the default configuration structure for master. More...
 
status_t I2C_GetDefaultSlaveConfig (i2c_slave_t *config)
 Gets the default configuration structure for slave. More...
 
status_t I2C_SlaveInit (const i2c_instance_t *const instance, const i2c_slave_t *config)
 Initializes the I2C module in slave mode. More...
 
status_t I2C_SlaveSendData (const i2c_instance_t *const instance, const uint8_t *txBuff, uint32_t txSize)
 Perform a non-blocking send transaction on the I2C bus. More...
 
status_t I2C_SlaveSendDataBlocking (const i2c_instance_t *const instance, const uint8_t *txBuff, uint32_t txSize, uint32_t timeout)
 Perform a blocking send transaction on the I2C bus. More...
 
status_t I2C_SlaveReceiveData (const i2c_instance_t *const instance, uint8_t *rxBuff, uint32_t rxSize)
 Perform a non-blocking receive transaction on the I2C bus. More...
 
status_t I2C_SlaveReceiveDataBlocking (const i2c_instance_t *const instance, uint8_t *rxBuff, uint32_t rxSize, uint32_t timeout)
 Perform a blocking receive transaction on the I2C bus. More...
 
status_t I2C_SlaveSetRxBuffer (const i2c_instance_t *const instance, uint8_t *rxBuff, uint32_t rxSize)
 Provide a buffer for receiving data. More...
 
status_t I2C_SlaveSetTxBuffer (const i2c_instance_t *const instance, const uint8_t *txBuff, uint32_t txSize)
 Provide a buffer for transmitting data. More...
 
status_t I2C_SlaveDeinit (const i2c_instance_t *const instance)
 De-initializes the i2c slave module. More...
 
status_t I2C_MasterGetTransferStatus (const i2c_instance_t *const instance, uint32_t *bytesRemaining)
 Return the current status of the I2C master transfer. More...
 
status_t I2C_SlaveGetTransferStatus (const i2c_instance_t *const instance, uint32_t *bytesRemaining)
 Return the current status of the I2C slave transfer. More...
 
status_t I2C_MasterSetBaudRate (const i2c_instance_t *const instance, const i2c_master_t *config, uint32_t baudRate)
 Set the master baud rate for the I2C communication. More...
 
status_t I2C_MasterGetBaudRate (const i2c_instance_t *const instance, uint32_t *baudRate)
 Get the master baud rate for the I2C communication. More...
 
status_t I2C_MasterAbortTransfer (const i2c_instance_t *const instance)
 Abort a non-blocking I2C Master transmission or reception. More...
 
status_t I2C_SlaveAbortTransfer (const i2c_instance_t *const instance)
 Abort a non-blocking I2C slave transmission or reception. More...