![]() |
ISSDK
1.8
IoT Sensing Software Development Kit
|
The fxls8471q_fifo.c file implements the ISSDK FXLS8471Q sensor driver example demonstration for SPI mode with FIFOs. More...
#include "pin_mux.h"
#include "clock_config.h"
#include "board.h"
#include "fsl_debug_console.h"
#include "issdk_hal.h"
#include "gpio_driver.h"
#include "fxls8471q_drv.h"
#include "Driver_SPI.h"
Go to the source code of this file.
Macros | |
#define | FIFO_SIZE 16 |
The watermark value configured for FXLS8471Q FIFO Buffer. More... | |
Functions | |
int | main (void) |
This is the The main function implementation. More... | |
Variables | |
const registerwritelist_t | cFxls8471q_Config_with_Fifo [] |
const registerreadlist_t | cFxls8471q_Fifo_Event [] = {{.readFrom = FXLS8471Q_F_STATUS, .numBytes = 1}, __END_READ_DATA__} |
const registerreadlist_t | cFxls8471q_Output_Values [] |
The fxls8471q_fifo.c file implements the ISSDK FXLS8471Q sensor driver example demonstration for SPI mode with FIFOs.
Definition in file fxls8471q_spi_fifo.c.
#define FIFO_SIZE 16 |
The watermark value configured for FXLS8471Q FIFO Buffer.
Definition at line 41 of file fxls8471q_spi_fifo.c.
Referenced by main().
int main | ( | void | ) |
This is the The main function implementation.
This function invokes board initializes routines, then then brings up the sensor and finally enters an endless loop to continuously read available samples.
[in] | void | This is no input parameter. |
Initialize the MCU hardware.
Initialize the SPI driver.
Set the SPI Power mode.
Set the SPI Slave speed.
Initialize the FXLS8471Q sensor driver.
Set the task to be executed while waiting for SPI transactions to complete.
Configure the FXLS8471Q sensor driver.
Wait for the FIFO watermark event.
Read the raw sensor data from the FXLS8471Q.
Convert the raw sensor data to signed 16-bit container for display to the debug port.
Definition at line 74 of file fxls8471q_spi_fifo.c.
References fxls8471q_acceldata_t::accel, ASK_USER_TO_RESUME, BOARD_BootClockRUN, BOARD_InitDebugConsole(), BOARD_InitPins(), data, FIFO_SIZE, FXLS8471_SPI_CS, FXLS8471Q_ACCEL_DATA_SIZE, FXLS8471Q_F_STATUS_F_WMRK_FLAG_MASK, FXLS8471Q_SPI_Configure(), FXLS8471Q_SPI_Initialize(), FXLS8471Q_SPI_ReadData(), FXLS8471Q_SPI_SetIdleTask(), FXLS8471Q_WHO_AM_I_WHOAMI_VALUE, int32_t(), rawData, SENSOR_ERROR_NONE, SMC, SMC_SetPowerModeVlpr(), SPI_S_BAUDRATE, SPI_S_DEVICE_INDEX, SPI_S_DRIVER, SPI_S_SIGNAL_EVENT, and status.
const registerwritelist_t cFxls8471q_Config_with_Fifo[] |
Prepare the register write list to configure FXLS8471Q in FIFO mode.
Definition at line 47 of file fxls8471q_spi_fifo.c.
const registerreadlist_t cFxls8471q_Fifo_Event[] = {{.readFrom = FXLS8471Q_F_STATUS, .numBytes = 1}, __END_READ_DATA__} |
Prepare the register read list to read FXLS8471Q FIFO event.
Definition at line 56 of file fxls8471q_spi_fifo.c.
const registerreadlist_t cFxls8471q_Output_Values[] |
Prepare the register read list to read the raw accel data from the FXLS8471Q.
Definition at line 59 of file fxls8471q_spi_fifo.c.