![]() |
ISSDK
1.8
IoT Sensing Software Development Kit
|
The register_io_i2c.c file contains definitions for low-level interface functions for reading and writing sensor registers. More...
Go to the source code of this file.
Macros | |
#define | I2C_COUNT (sizeof(i2cBases) / sizeof(void *)) |
Functions | |
int32_t | Register_I2C_BlockWrite (ARM_DRIVER_I2C *pCommDrv, registerDeviceInfo_t *devInfo, uint16_t slaveAddress, uint8_t offset, const uint8_t *pBuffer, uint8_t bytesToWrite) |
The interface function to write a sensor register. More... | |
int32_t | Register_I2C_Write (ARM_DRIVER_I2C *pCommDrv, registerDeviceInfo_t *devInfo, uint16_t slaveAddress, uint8_t offset, uint8_t value, uint8_t mask, bool repeatedStart) |
The interface function to write a sensor register. More... | |
int32_t | Register_I2C_Read (ARM_DRIVER_I2C *pCommDrv, registerDeviceInfo_t *devInfo, uint16_t slaveAddress, uint8_t offset, uint8_t length, uint8_t *pOutBuffer) |
The interface function to read a sensor register. More... | |
Variables | |
I2C_Type *const | i2cBases [] = I2C_BASE_PTRS |
volatile bool | b_I2C_CompletionFlag [I2C_COUNT] = {false} |
volatile uint32_t | g_I2C_ErrorEvent [I2C_COUNT] = {ARM_I2C_EVENT_TRANSFER_DONE} |
The register_io_i2c.c file contains definitions for low-level interface functions for reading and writing sensor registers.
Definition in file register_io_i2c.c.
#define I2C_COUNT (sizeof(i2cBases) / sizeof(void *)) |
Definition at line 25 of file register_io_i2c.c.
int32_t Register_I2C_BlockWrite | ( | ARM_DRIVER_I2C * | pCommDrv, |
registerDeviceInfo_t * | devInfo, | ||
uint16_t | slaveAddress, | ||
uint8_t | offset, | ||
const uint8_t * | pBuffer, | ||
uint8_t | bytesToWrite | ||
) |
The interface function to write a sensor register.
The interface function to block write sensor registers.
Definition at line 149 of file register_io_i2c.c.
References b_I2C_CompletionFlag, registerDeviceInfo_t::deviceInstance, registerDeviceInfo_t::functionParam, g_I2C_ErrorEvent, registerDeviceInfo_t::idleFunction, int32_t(), SENSOR_MAX_REGISTER_COUNT, and status.
Referenced by ADS_FXLC95000Query(), ADS_MMA9553Query(), FXLC95000_I2C_CheckRomMode(), FXLC95000_I2C_Initialize(), Host_IO_Receive(), MMA9553_I2C_Initialize(), and Sensor_I2C_BlockWrite().
int32_t Register_I2C_Read | ( | ARM_DRIVER_I2C * | pCommDrv, |
registerDeviceInfo_t * | devInfo, | ||
uint16_t | slaveAddress, | ||
uint8_t | offset, | ||
uint8_t | length, | ||
uint8_t * | pOutBuffer | ||
) |
The interface function to read a sensor register.
The interface function to read a sensor register.
Read and update the value.
Definition at line 310 of file register_io_i2c.c.
References b_I2C_CompletionFlag, registerDeviceInfo_t::deviceInstance, registerDeviceInfo_t::functionParam, g_I2C_ErrorEvent, registerDeviceInfo_t::idleFunction, int32_t(), and status.
Referenced by ADS_DetectShield(), ADS_MMA9553Query(), DBAP_I2C_Initialize(), FXAS21002_I2C_Initialize(), FXLS8471Q_Init(), FXLS8962_I2C_Initialize(), FXLS896x_I2C_Initialize(), FXLS8974_I2C_Initialize(), FXOS8700_I2C_Initialize(), FXOS8700_Init(), FXPQ3115_I2C_Initialize(), Host_IO_Receive(), ISL29023_I2C_Initialize(), MAG3110_I2C_Initialize(), MAG3110_Init(), MMA845x_I2C_Initialize(), MMA8491Q_I2C_Initialize(), MMA865x_I2C_Initialize(), MMA9553_I2C_Configure(), MMA9553_I2C_Initialize(), MPL3115_I2C_Initialize(), Sensor_I2C_BlockWrite(), and Sensor_I2C_Read().
int32_t Register_I2C_Write | ( | ARM_DRIVER_I2C * | pCommDrv, |
registerDeviceInfo_t * | devInfo, | ||
uint16_t | slaveAddress, | ||
uint8_t | offset, | ||
uint8_t | value, | ||
uint8_t | mask, | ||
bool | repeatedStart | ||
) |
The interface function to write a sensor register.
The interface function to write a sensor register.
Set the register based on the values in the register value pair configuration.
Send the register address to read from.
Read the value.
'OR' in the requested values to the current contents of the register
Overwrite the register with specified value.
Write the updated value.
Definition at line 193 of file register_io_i2c.c.
References b_I2C_CompletionFlag, registerDeviceInfo_t::deviceInstance, registerDeviceInfo_t::functionParam, g_I2C_ErrorEvent, registerDeviceInfo_t::idleFunction, int32_t(), and status.
Referenced by FXAS21002_I2C_Configure(), FXAS21002_I2C_Deinit(), FXLS8962_I2C_Configure(), FXLS8962_I2C_DeInit(), FXLS896x_I2C_Configure(), FXLS896x_I2C_DeInit(), FXLS8974_I2C_Configure(), FXLS8974_I2C_DeInit(), FXOS8700_I2C_Configure(), FXOS8700_I2C_Deinit(), FXPQ3115_I2C_Configure(), FXPQ3115_I2C_DeInit(), ISL29023_I2C_DeInit(), MAG3110_I2C_Configure(), MAG3110_I2C_DeInit(), main(), MMA845x_I2C_Configure(), MMA845x_I2C_Deinit(), MMA865x_I2C_Configure(), MMA865x_I2C_DeInit(), MPL3115_I2C_Configure(), MPL3115_I2C_DeInit(), perform_selftest(), and Sensor_I2C_Write().
Definition at line 31 of file register_io_i2c.c.
Referenced by Register_I2C_BlockWrite(), Register_I2C_Read(), and Register_I2C_Write().
volatile uint32_t g_I2C_ErrorEvent[I2C_COUNT] = {ARM_I2C_EVENT_TRANSFER_DONE} |
Definition at line 32 of file register_io_i2c.c.
Referenced by Register_I2C_BlockWrite(), Register_I2C_Read(), and Register_I2C_Write().
I2C_Type* const i2cBases[] = I2C_BASE_PTRS |
Definition at line 30 of file register_io_i2c.c.