14 #ifndef MMA9553_DRV_H_ 15 #define MMA9553_DRV_H_ 73 #define MMA9553_COCO_ERROR_MASK (0x7F) 77 #define MMA9553_SPI_MAX_MSG_SIZE (64) 81 #define MMA9553_SPI_CMD_LEN (1) 85 #define MMA9553_SS_ACTIVE_VALUE SPI_SS_ACTIVE_LOW 102 ARM_DRIVER_I2C *pBus,
249 #endif // MMA9553_DRV_H_ #define MMA9553_HDR_SIZE
Size of fixed header bytes in sensor commands.
This structure defines the device specific info required by register I/O.
This defines the sensor specific information for I2C.
The sensor_io_spi.h file declares low-level interface functions for reading and writing sensor regist...
int32_t MMA9553_I2C_CommandResponse(mma9553_i2c_sensorhandle_t *pSensorHandle, const registercommandlist_t *pCommandList, const registerreadlist_t *pReadList, uint8_t *pBuffer)
The interface function to read the sensor data.
void MMA9553_SPI_SetIdleTask(mma9553_spi_sensorhandle_t *pSensorHandle, registeridlefunction_t idleTask, void *userParam)
: The interface function to set the SPI Idle Task.
int32_t MMA9553_I2C_DeInit(mma9553_i2c_sensorhandle_t *pSensorHandle)
The interface function to De Initialize sensor..
This structure defines the Size of response for pedometer data read command.
The register_io_spi.h file declares low-level interface functions for reading and writing sensor regi...
This structure defines the Block command List.
This defines the sensor specific information for SPI.
This structure defines the spi slave command format.
int32_t MMA9553_I2C_Initialize(mma9553_i2c_sensorhandle_t *pSensorHandle, ARM_DRIVER_I2C *pBus, uint8_t index, uint16_t sAddress)
The interface function to initialize the sensor.
typedef int32_t(DATA_FORMAT_Append_t))(void *pData
The interface function to append the data on the formated stream.
This structure defines the mma9553 pedometer data buffer.
The register_io_i2c.h file declares low-level interface functions for reading and writing sensor regi...
int32_t MMA9553_SPI_CommandResponse(mma9553_spi_sensorhandle_t *pSensorHandle, const registercommandlist_t *pCommandList, const registerreadlist_t *pReadList, uint8_t *pBuffer)
The interface function to read the sensor data.
void(* registeridlefunction_t)(void *userParam)
This is the register idle function type.
registerDeviceInfo_t deviceInfo
spiSlaveSpecificParams_t slaveParams
void MMA9553_I2C_SetIdleTask(mma9553_i2c_sensorhandle_t *pSensorHandle, registeridlefunction_t idleTask, void *userParam)
: The interface function to set the I2C Idle Task.
ARM_DRIVER_SPI * pCommDrv
int32_t MMA9553_SPI_Configure(mma9553_spi_sensorhandle_t *pSensorHandle, const registercommandlist_t *pCommandList)
The interface function to configure he sensor.
int32_t MMA9553_SPI_Initialize(mma9553_spi_sensorhandle_t *pSensorHandle, ARM_DRIVER_SPI *pBus, uint8_t index, void *pSlaveSelect, void *pReset)
The interface function to initialize the sensor.
int32_t MMA9553_SPI_DeInit(mma9553_spi_sensorhandle_t *pSensorHandle)
The interface function to De Initialize sensor..
This structure defines the Read command List.
int32_t MMA9553_I2C_Configure(mma9553_i2c_sensorhandle_t *pSensorHandle, const registercommandlist_t *pCommandList)
The interface function to configure he sensor.
ARM_DRIVER_I2C * pCommDrv
registerDeviceInfo_t deviceInfo
void MMA9553_SPI_ReadPreprocess(void *pCmdOut, uint32_t offset, uint32_t size)
The SPI Read Pre-Process function to generate Sensor specific SPI Message Header. ...
The sensor_io_i2c.h file declares low-level interface functions for reading and writing sensor regist...
void MMA9553_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.