17 #include "gpio_driver.h" 28 if ((pSensorHandle == NULL) || (pBus == NULL))
39 if ((ARM_DRIVER_OK != status) || (whoAmi != reg))
64 if ((pSensorHandle == NULL) || (pRegWriteList == NULL))
78 if (ARM_DRIVER_OK != status)
93 if ((pSensorHandle == NULL) || (pReadList == NULL) || (pBuffer == NULL))
107 if (ARM_DRIVER_OK != status)
int32_t DBAP_I2C_ReadData(dbap_i2c_sensorhandle_t *pSensorHandle, const registerreadlist_t *pReadList, uint8_t *pBuffer)
The interface function to read the sensor data.
int32_t Sensor_I2C_Read(ARM_DRIVER_I2C *pCommDrv, registerDeviceInfo_t *devInfo, uint16_t slaveAddress, const registerreadlist_t *pReadList, uint8_t *pOutBuffer)
Read register data from a sensor.
This structure defines the Write command List.
This defines the sensor specific information for I2C.
void DBAP_I2C_SetIdleTask(dbap_i2c_sensorhandle_t *pSensorHandle, registeridlefunction_t idleTask, void *userParam)
: The interface function to set the I2C Idle Task.
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 dbap_drv.h file describes the DBAP driver interface and structures.
ARM_DRIVER_I2C * pCommDrv
typedef int32_t(DATA_FORMAT_Append_t))(void *pData
The interface function to append the data on the formated stream.
registerDeviceInfo_t deviceInfo
int32_t Sensor_I2C_Write(ARM_DRIVER_I2C *pCommDrv, registerDeviceInfo_t *devInfo, uint16_t slaveAddress, const registerwritelist_t *pRegWriteList)
Write register data to a sensor.
void(* registeridlefunction_t)(void *userParam)
This is the register idle function type.
int32_t DBAP_I2C_Initialize(dbap_i2c_sensorhandle_t *pSensorHandle, ARM_DRIVER_I2C *pBus, uint8_t index, uint16_t sAddress, uint8_t whoAmi)
The interface function to initialize the sensor.
This structure defines the Read command List.
int32_t DBAP_I2C_Configure(dbap_i2c_sensorhandle_t *pSensorHandle, const registerwritelist_t *pRegWriteList)
The interface function to configure he sensor.
registeridlefunction_t idleFunction