![]() |
ISSDK
1.8
IoT Sensing Software Development Kit
|
#include "pin_mux.h"
#include "clock_config.h"
#include "board.h"
#include "fsl_debug_console.h"
#include "Driver_I2C.h"
#include "issdk_hal.h"
#include "fxos8700_drv.h"
Go to the source code of this file.
Macros | |
#define | FIFO_SIZE 4 |
The watermark value configured for FXAS21002 FIFO Buffer. More... | |
#define | RAW_ACCEL_DATA_SIZE (6) |
Functions | |
int | main (void) |
Main function. More... | |
Variables | |
const registerwritelist_t | fxos8700_Config_with_Fifo [] |
const registerreadlist_t | FXOS8700_STATUS_READ [] = {{.readFrom = FXOS8700_STATUS, .numBytes = 1}, __END_READ_DATA__} |
const registerreadlist_t | FXOS8700_ACCEL_FIFO_READ [] |
#define FIFO_SIZE 4 |
The watermark value configured for FXAS21002 FIFO Buffer.
Definition at line 35 of file fxos8700_fifo.c.
Referenced by main().
#define RAW_ACCEL_DATA_SIZE (6) |
Definition at line 36 of file fxos8700_fifo.c.
Referenced by main().
int main | ( | void | ) |
Main function.
Initialize the MCU hardware.
Initialize the I2C driver.
Set the I2C Power mode.
Set the I2C bus speed.
Initialize the FXOS8700 sensor driver.
Set the task to be executed while waiting for I2C transactions to complete.
Configure the fxos8700 sensor driver.
Wait for the FIFO watermark event.
Read the raw sensor data from the fxos8700.
Convert the raw sensor data to signed 16-bit container for display to the debug port.
Definition at line 64 of file fxos8700_fifo.c.
References fxos8700_accelmagdata_t::accel, ASK_USER_TO_RESUME, BOARD_BootClockRUN, BOARD_InitDebugConsole(), BOARD_InitPins(), data, FIFO_SIZE, FXOS8700_F_STATUS_F_WMRK_FLAG_MASK, FXOS8700_I2C_ADDR, FXOS8700_I2C_Configure(), FXOS8700_I2C_Initialize(), FXOS8700_I2C_ReadData(), FXOS8700_WHO_AM_I_PROD_VALUE, I2C_S_DEVICE_INDEX, I2C_S_DRIVER, I2C_S_SIGNAL_EVENT, I2Cdrv, int32_t(), RAW_ACCEL_DATA_SIZE, rawData, SENSOR_ERROR_NONE, and status.
const registerreadlist_t FXOS8700_ACCEL_FIFO_READ[] |
Command definition to read the FIFO_SIZE Bytes of Accel Data
Definition at line 55 of file fxos8700_fifo.c.
const registerwritelist_t fxos8700_Config_with_Fifo[] |
Prepare the register write list to configure FXOS8700 in FIFO mode.
Definition at line 42 of file fxos8700_fifo.c.
const registerreadlist_t FXOS8700_STATUS_READ[] = {{.readFrom = FXOS8700_STATUS, .numBytes = 1}, __END_READ_DATA__} |
Command definition to read the Data Ready Status
Definition at line 52 of file fxos8700_fifo.c.