Classes | Typedefs | Functions | Variables
lpi2c_adapter.c File Reference
#include "fsl_common.h"
#include "fsl_lpi2c.h"
#include "i2c.h"
Include dependency graph for lpi2c_adapter.c:

Go to the source code of this file.

Classes

struct  _hal_i2c_master
 i2c master state structure. More...
 
struct  _hal_i2c_slave
 i2c slave state structure. More...
 

Typedefs

typedef struct _hal_i2c_master hal_i2c_master_t
 i2c master state structure. More...
 
typedef struct _hal_i2c_slave hal_i2c_slave_t
 i2c slave state structure. More...
 

Functions

static hal_i2c_status_t HAL_I2cGetStatus (status_t status)
 
static void HAL_I2cMasterCallback (LPI2C_Type *base, lpi2c_master_handle_t *handle, status_t status, void *callbackParam)
 
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_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_I2cMasterTransferAbort (hal_i2c_master_handle_t handle)
 Aborts an interrupt non-blocking transfer early. 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_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_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...
 
static void HAL_I2cSlaveCallback (LPI2C_Type *base, lpi2c_slave_transfer_t *xfer, void *callbackParam)
 
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...
 
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_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...
 
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...
 

Variables

static LPI2C_Type *const s_i2cBases [] = LPI2C_BASE_PTRS
 Pointers to i2c bases for each instance. More...
 

Typedef Documentation

◆ hal_i2c_master_t

i2c master state structure.

◆ hal_i2c_slave_t

i2c slave state structure.

Function Documentation

◆ HAL_I2cGetStatus()

static hal_i2c_status_t HAL_I2cGetStatus ( status_t  status)
static

Definition at line 52 of file lpi2c_adapter.c.

◆ HAL_I2cMasterCallback()

static void HAL_I2cMasterCallback ( LPI2C_Type base,
lpi2c_master_handle_t handle,
status_t  status,
void *  callbackParam 
)
static

Definition at line 96 of file lpi2c_adapter.c.

◆ HAL_I2cSlaveCallback()

static void HAL_I2cSlaveCallback ( LPI2C_Type base,
lpi2c_slave_transfer_t xfer,
void *  callbackParam 
)
static

Definition at line 109 of file lpi2c_adapter.c.

Variable Documentation

◆ s_i2cBases

LPI2C_Type* const s_i2cBases[] = LPI2C_BASE_PTRS
static

Pointers to i2c bases for each instance.

Definition at line 46 of file lpi2c_adapter.c.



picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:14:57