14 #ifndef FXAS21002_DRV_H_ 15 #define FXAS21002_DRV_H_ 61 #define FXAS21002_GYRO_DATA_SIZE (0x06) 65 #define FXAS21002_SPI_MAX_MSG_SIZE (64) 69 #define FXAS21002_SPI_CMD_LEN (1) 73 #define FXAS21002_SS_ACTIVE_VALUE SPI_SS_ACTIVE_LOW 158 ARM_DRIVER_SPI *pBus,
238 #endif // FXAS21002_DRV_H_ int32_t FXAS21002_SPI_Configure(fxas21002_spi_sensorhandle_t *pSensorHandle, const registerwritelist_t *pRegWriteList)
The interface function to configure he sensor.
This structure defines the device specific info required by register I/O.
int32_t FXAS21002_SPI_Initialize(fxas21002_spi_sensorhandle_t *pSensorHandle, ARM_DRIVER_SPI *pBus, uint8_t index, void *pSlaveSelect, uint8_t whoAmi)
The interface function to initialize the sensor.
This structure defines the Write command List.
The sensor_io_spi.h file declares low-level interface functions for reading and writing sensor regist...
This defines the sensor specific information for SPI.
int32_t FXAS21002_SPI_Deinit(fxas21002_spi_sensorhandle_t *pSensorHandle)
The interface function to De Initialize sensor..
The register_io_spi.h file declares low-level interface functions for reading and writing sensor regi...
void FXAS21002_SPI_ReadPreprocess(void *pCmdOut, uint32_t offset, uint32_t size)
The SPI Read Pre-Process function to generate Sensor specific SPI Message Header. ...
This structure defines the spi slave command format.
This structure defines the fxas21002 raw data buffer.
int32_t FXAS21002_I2C_Deinit(fxas21002_i2c_sensorhandle_t *pSensorHandle)
The interface function to De Initialize sensor..
int32_t FXAS21002_I2C_ReadData(fxas21002_i2c_sensorhandle_t *pSensorHandle, const registerreadlist_t *pReadList, uint8_t *pBuffer)
The interface function to read the sensor data.
int32_t FXAS21002_I2C_Configure(fxas21002_i2c_sensorhandle_t *pSensorHandle, const registerwritelist_t *pRegWriteList)
The interface function to configure he sensor.
registerDeviceInfo_t deviceInfo
typedef int32_t(DATA_FORMAT_Append_t))(void *pData
The interface function to append the data on the formated stream.
void FXAS21002_SPI_SetIdleTask(fxas21002_spi_sensorhandle_t *pSensorHandle, registeridlefunction_t idleTask, void *userParam)
: The interface function to set the SPI Idle Task.
The register_io_i2c.h file declares low-level interface functions for reading and writing sensor regi...
This defines the sensor specific information for I2C.
void FXAS21002_I2C_SetIdleTask(fxas21002_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.
spiSlaveSpecificParams_t slaveParams
The fxas21002.h contains the fxas21002 sensor register definitions and its bit mask.
void FXAS21002_SPI_WritePreprocess(void *pCmdOut, uint32_t offset, uint32_t size, void *pWritebuffer)
The SPI Write Pre-Process function to generate Sensor specific SPI Message Header.
int32_t FXAS21002_I2C_Initialize(fxas21002_i2c_sensorhandle_t *pSensorHandle, ARM_DRIVER_I2C *pBus, uint8_t index, uint16_t sAddress, uint8_t whoAmi)
The interface function to initialize the sensor.
ARM_DRIVER_I2C * pCommDrv
ARM_DRIVER_SPI * pCommDrv
This structure defines the Read command List.
registerDeviceInfo_t deviceInfo
The sensor_io_i2c.h file declares low-level interface functions for reading and writing sensor regist...
int32_t FXAS21002_SPI_ReadData(fxas21002_spi_sensorhandle_t *pSensorHandle, const registerreadlist_t *pReadList, uint8_t *pBuffer)
The interface function to read the sensor data.