Go to the source code of this file.
Classes | |
struct | _hal_i2c_master_config |
HAL I2C master user configuration. More... | |
struct | _hal_i2c_master_transfer |
HAL I2C master transfer structure. More... | |
struct | _hal_i2c_slave_config |
HAL I2C slave user configuration. More... | |
struct | _hal_i2c_slave_transfer |
HAL I2C slave transfer structure. More... | |
Macros | |
#define | HAL_I2C_MASTER_HANDLE_DEFINE(name) uint32_t name[(HAL_I2C_MASTER_HANDLE_SIZE + sizeof(uint32_t) - 1U) / sizeof(uint32_t)] |
Defines the I2C master handle. More... | |
#define | HAL_I2C_MASTER_HANDLE_SIZE (80U) |
HAL I2C master handle size. More... | |
#define | HAL_I2C_SLAVE_HANDLE_DEFINE(name) uint32_t name[(HAL_I2C_SLAVE_HANDLE_SIZE + sizeof(uint32_t) - 1U) / sizeof(uint32_t)] |
Defines the I2C slave handle. More... | |
#define | HAL_I2C_SLAVE_HANDLE_SIZE (88U) |
HAL I2C slave handle size. More... | |
Typedefs | |
typedef enum _hal_i2c_direction | hal_i2c_direction_t |
Direction of master and slave transfers. More... | |
typedef struct _hal_i2c_master_config | hal_i2c_master_config_t |
HAL I2C master user configuration. More... | |
typedef void * | hal_i2c_master_handle_t |
HAL I2C master handle. More... | |
typedef void(* | hal_i2c_master_transfer_callback_t) (hal_i2c_master_handle_t handle, hal_i2c_status_t completionStatus, void *callbackParam) |
Master completion callback function pointer type. More... | |
typedef enum _hal_i2c_master_transfer_flag | hal_i2c_master_transfer_flag_t |
I2C transfer control flag. More... | |
typedef struct _hal_i2c_master_transfer | hal_i2c_master_transfer_t |
HAL I2C master transfer structure. More... | |
typedef struct _hal_i2c_slave_config | hal_i2c_slave_config_t |
HAL I2C slave user configuration. More... | |
typedef void * | hal_i2c_slave_handle_t |
HAL I2C slave handle. More... | |
typedef void(* | hal_i2c_slave_transfer_callback_t) (hal_i2c_slave_handle_t handle, hal_i2c_slave_transfer_t *transfer, void *callbackParam) |
Slave event callback function pointer type. More... | |
typedef enum _hal_i2c_slave_transfer_event | hal_i2c_slave_transfer_event_t |
Set of events sent to the callback for nonblocking slave transfers. More... | |
typedef struct _hal_i2c_slave_transfer | hal_i2c_slave_transfer_t |
HAL I2C slave transfer structure. More... | |
typedef enum _hal_i2c_status | hal_i2c_status_t |
HAL I2C status. More... | |
Functions | |
Initialization and de-initialization | |
hal_i2c_status_t | HAL_I2cMasterDeinit (hal_i2c_master_handle_t handle) |
De-initializes the HAL I2C master peripheral. Call this API to gate the HAL I2C clock. The HAL I2C master module can't work unless the HAL_I2cMasterInit is called. More... | |
hal_i2c_status_t | HAL_I2cMasterInit (hal_i2c_master_handle_t handle, const hal_i2c_master_config_t *config) |
Initializes the HAL I2C master peripheral. More... | |
hal_i2c_status_t | HAL_I2cSlaveDeinit (hal_i2c_slave_handle_t handle) |
De-initializes the HAL I2C slave peripheral. Calling this API gates the HAL I2C clock. The HAL I2C slave module can't work unless the HAL_I2cSlaveInit is called to enable the clock. More... | |
hal_i2c_status_t | HAL_I2cSlaveInit (hal_i2c_slave_handle_t handle, const hal_i2c_slave_config_t *config) |
Initializes the HAL I2C peripheral. More... | |
Bus Operations | |
hal_i2c_status_t | HAL_I2cMasterReadBlocking (hal_i2c_master_handle_t handle, uint8_t *rxBuff, size_t rxSize, uint32_t flags) |
Performs a polling receive transaction on the HAL I2C bus. More... | |
hal_i2c_status_t | HAL_I2cMasterTransferBlocking (hal_i2c_master_handle_t handle, hal_i2c_master_transfer_t *xfer) |
Performs a master polling transfer on the HAL I2C bus. More... | |
hal_i2c_status_t | HAL_I2cMasterWriteBlocking (hal_i2c_master_handle_t handle, const uint8_t *txBuff, size_t txSize, uint32_t flags) |
Performs a polling send transaction on the HAL I2C bus. More... | |
hal_i2c_status_t | HAL_I2cSlaveReadBlocking (hal_i2c_slave_handle_t handle, uint8_t *rxBuff, size_t rxSize) |
Performs a polling receive transaction on the HAL I2C bus. More... | |
hal_i2c_status_t | HAL_I2cSlaveWriteBlocking (hal_i2c_slave_handle_t handle, const uint8_t *txBuff, size_t txSize) |
Performs a polling send transaction on the HAL I2C bus. More... | |
Transactional | |
hal_i2c_status_t | HAL_I2cMasterTransferAbort (hal_i2c_master_handle_t handle) |
Aborts an interrupt non-blocking transfer early. More... | |
hal_i2c_status_t | HAL_I2cMasterTransferGetCount (hal_i2c_master_handle_t handle, size_t *count) |
Gets the master transfer status during a interrupt non-blocking transfer. More... | |
hal_i2c_status_t | HAL_I2cMasterTransferInstallCallback (hal_i2c_master_handle_t handle, hal_i2c_master_transfer_callback_t callback, void *callbackParam) |
Installs a callback and callback parameter. More... | |
hal_i2c_status_t | HAL_I2cMasterTransferNonBlocking (hal_i2c_master_handle_t handle, hal_i2c_master_transfer_t *xfer) |
Performs a master interrupt non-blocking transfer on the HAL I2C bus. More... | |
hal_i2c_status_t | HAL_I2cSlaveTransferAbort (hal_i2c_slave_handle_t handle) |
Aborts the slave transfer. More... | |
hal_i2c_status_t | HAL_I2cSlaveTransferGetCount (hal_i2c_slave_handle_t handle, size_t *count) |
Gets the slave transfer remaining bytes during a interrupt non-blocking transfer. More... | |
hal_i2c_status_t | HAL_I2cSlaveTransferInstallCallback (hal_i2c_slave_handle_t handle, hal_i2c_slave_transfer_callback_t callback, void *callbackParam) |
Installs a callback and callback parameter. More... | |
hal_i2c_status_t | HAL_I2cSlaveTransferNonBlocking (hal_i2c_slave_handle_t handle, uint32_t eventMask) |
Starts accepting slave transfers. More... | |