31 if ((pSensorHandle == NULL) || (pBus == NULL))
71 if ((pSensorHandle == NULL) || (pReadList == NULL) || (pBuffer == NULL))
85 if (ARM_DRIVER_OK != status)
This defines the function pointers and sensor specific information.
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.
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.
ARM_DRIVER_I2C * pCommDrv
typedef int32_t(DATA_FORMAT_Append_t))(void *pData
The interface function to append the data on the formated stream.
void MMA8491Q_I2C_SetIdleTask(mma8491q_i2c_sensorhandle_t *pSensorHandle, registeridlefunction_t idleTask, void *userParam)
: The interface function to set the I2C Idle Task.
void(* registeridlefunction_t)(void *userParam)
This is the register idle function type.
registerDeviceInfo_t deviceInfo
int32_t MMA8491Q_I2C_ReadData(mma8491q_i2c_sensorhandle_t *pSensorHandle, const registerreadlist_t *pReadList, uint8_t *pBuffer)
The interface function to read the sensor data.
The mma8491q_drv.h file describes the MMA8491Q driver interface and structures.
int32_t MMA8491Q_I2C_Initialize(mma8491q_i2c_sensorhandle_t *pSensorHandle, ARM_DRIVER_I2C *pBus, uint8_t index, uint16_t sAddress)
The interface function to initialize the sensor.
#define MMA8491Q_STATUS_RESERVED_MASK
This structure defines the Read command List.
#define MMA8491Q_STATUS_RESERVED_ZERO
registeridlefunction_t idleFunction