|
Sensor Fusion Library 0.6.1
Orientation sensing for Espressif (ESP32, ESP8266) processors
|
Describes the fxos8700 driver interface and structures. More...


Go to the source code of this file.
Classes | |
| struct | fxos8700_i2c_sensorhandle_t |
| This defines the sensor specific information for I2C. More... | |
| struct | fxos8700_accelmagdata_t |
| This structure defines the fxos8700 raw data buffer. More... | |
| struct | fxos8700_acceldata_t |
| This structure defines the fxos8700 raw accel data buffer. More... | |
Macros | |
| #define | FXOS8700_SPI_MAX_MSG_SIZE (64) |
| The MAX size of SPI message. | |
| #define | FXOS8700_SPI_CMD_LEN (2) |
| The size of the Sensor specific SPI Header. | |
| #define | FXOS8700_SS_ACTIVE_VALUE SPI_SS_ACTIVE_LOW |
| Is the Slave Select Pin Active Low or High. | |
Functions | |
| int32_t | FXOS8700_I2C_Initialize (fxos8700_i2c_sensorhandle_t *pSensorHandle, uint8_t index, uint16_t sAddress, uint8_t whoAmi) |
| The interface function to initialize the sensor. | |
| void | FXOS8700_I2C_SetIdleTask (fxos8700_i2c_sensorhandle_t *pSensorHandle, registeridlefunction_t idleTask, void *userParam) |
| : The interface function to set the I2C Idle Task. | |
| int32_t | FXOS8700_I2C_Configure (fxos8700_i2c_sensorhandle_t *pSensorHandle, const registerwritelist_t *pRegWriteList) |
| The interface function to configure the sensor. | |
| int32_t | FXOS8700_I2C_ReadData (fxos8700_i2c_sensorhandle_t *pSensorHandle, const registerReadlist_t *pReadList, uint8_t *pBuffer) |
| The interface function to read the sensor data. | |
| int32_t | FXOS8700_I2C_Deinit (fxos8700_i2c_sensorhandle_t *pSensorHandle) |
| The interface function to De Initialize sensor.. | |
Describes the fxos8700 driver interface and structures.
Definition in file driver_fxos8700.h.
| #define FXOS8700_SPI_CMD_LEN (2) |
The size of the Sensor specific SPI Header.
Definition at line 61 of file driver_fxos8700.h.
| #define FXOS8700_SPI_MAX_MSG_SIZE (64) |
The MAX size of SPI message.
Definition at line 57 of file driver_fxos8700.h.
| #define FXOS8700_SS_ACTIVE_VALUE SPI_SS_ACTIVE_LOW |
Is the Slave Select Pin Active Low or High.
Definition at line 65 of file driver_fxos8700.h.
| int32_t FXOS8700_I2C_Configure | ( | fxos8700_i2c_sensorhandle_t * | pSensorHandle, |
| const registerwritelist_t * | pRegWriteList | ||
| ) |
The interface function to configure the sensor.
This function configure the sensor with requested ODR, Range and registers in the regsiter pair array.
| [in] | pSensorHandle | handle to the sensor. |
| [in] | pRegWriteList | pointer to the register list. @constraints This can be called any number of times only after FXOS8700_I2C_Initialize(). Application has to ensure that previous instances of these APIs have exited before invocation. @reeentrant No |
| int32_t FXOS8700_I2C_Deinit | ( | fxos8700_i2c_sensorhandle_t * | pSensorHandle | ) |
The interface function to De Initialize sensor..
This function made sensor in a power safe state and de initialize its handle.
| [in] | pSensorHandle | handle to the sensor. @constraints This can be called only after FXOS8700_I2C_Initialize(). Application has to ensure that previous instances of these APIs have exited before invocation. @reeentrant No |
| int32_t FXOS8700_I2C_Initialize | ( | fxos8700_i2c_sensorhandle_t * | pSensorHandle, |
| uint8_t | index, | ||
| uint16_t | sAddress, | ||
| uint8_t | whoAmi | ||
| ) |
The interface function to initialize the sensor.
This function initializes the sensor and sensor handle.
| [in] | pSensorHandle | handle to the sensor. |
| [in] | index | the I2C device number. |
| [in] | sAddress | slave address of the device on the bus. |
| [in] | whoami | WHO_AM_I value of the device. @constraints This should be the first API to be called. Application has to ensure that previous instances of these APIs have exited before invocation. @reeentrant No |
| int32_t FXOS8700_I2C_ReadData | ( | fxos8700_i2c_sensorhandle_t * | pSensorHandle, |
| const registerReadlist_t * | pReadList, | ||
| uint8_t * | pBuffer | ||
| ) |
The interface function to read the sensor data.
This function read the sensor data out from the device and returns raw data in a byte stream.
| [in] | pSensorHandle | handle to the sensor. |
| [in] | pReadList | pointer to the list of device registers and values to read. |
| [out] | pBuffer | buffer which holds raw sensor data.This buffer may be back to back databuffer based command read in the list. @constraints This can be called any number of times only after FXOS8700_I2C_Initialize(). Application has to ensure that previous instances of these APIs have exited before invocation. @reeentrant No |
| void FXOS8700_I2C_SetIdleTask | ( | fxos8700_i2c_sensorhandle_t * | pSensorHandle, |
| registeridlefunction_t | idleTask, | ||
| void * | userParam | ||
| ) |
: The interface function to set the I2C Idle Task.
| [in] | fxos8700_i2c_sensorhandle_t *pSensorHandle, handle to the sensor handle. | |
| [in] | registeridlefunction_t idleTask, function pointer to the function to execute on I2C Idle Time. | |
| [in] | void *userParam, the pointer to the user idle ftask parameters. |