![]() |
ISSDK
1.8
IoT Sensing Software Development Kit
|
The fxls8962_normal_spi.c file implements the ISSDK FXLS8962 SPI sensor driver example demonstration for SPI Mode with polling. 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 "fxls8962_drv.h"
#include "systick_utils.h"
#include "Driver_SPI.h"
Go to the source code of this file.
Macros | |
#define | FXLS8962_DATA_SIZE (6) |
Functions | |
int | main (void) |
This is the The main function implementation. More... | |
Variables | |
const registerwritelist_t | cFxls8962ConfigNormal [] |
Register settings for Normal (non buffered) mode. More... | |
const registerreadlist_t | cFxls8962DRDYEvent [] = {{.readFrom = FXLS8962_INT_STATUS, .numBytes = 1}, __END_READ_DATA__} |
Address of DATA Ready Status Register. More... | |
const registerreadlist_t | cFxls8962OutputNormal [] |
Address of Raw Accel Data in Normal Mode. More... | |
The fxls8962_normal_spi.c file implements the ISSDK FXLS8962 SPI sensor driver example demonstration for SPI Mode with polling.
Definition in file fxls8962_normal_spi.c.
#define FXLS8962_DATA_SIZE (6) |
Definition at line 39 of file fxls8962_normal_spi.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 fxls8962 sensor driver.
Set the task to be executed while waiting for SPI transactions to complete.
Configure the FXLS8962 sensor driver.
Wait for data ready from the FXLS8962.
Read the raw sensor data from the FXLS8962.
Convert the raw sensor data for display to the debug port.
Definition at line 71 of file fxls8962_normal_spi.c.
References fxls8962_acceldata_t::accel, BOARD_BootClockRUN, BOARD_InitDebugConsole(), BOARD_InitPins(), BOARD_SystickEnable(), data, FXLS8962_CS, FXLS8962_DATA_SIZE, FXLS8962_INT_STATUS_SRC_DRDY_MASK, FXLS8962_SPI_Configure(), FXLS8962_SPI_Initialize(), FXLS8962_SPI_ReadData(), FXLS8962_SPI_SetIdleTask(), FXLS8962_WHOAMI_VALUE, fxls8962Driver, FXLS8964_WHOAMI_VALUE, FXLS8967_WHOAMI_VALUE, FXLS8974_WHOAMI_VALUE, gFxls8962DataReady, 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 cFxls8962ConfigNormal[] |
Register settings for Normal (non buffered) mode.
Definition at line 45 of file fxls8962_normal_spi.c.
const registerreadlist_t cFxls8962DRDYEvent[] = {{.readFrom = FXLS8962_INT_STATUS, .numBytes = 1}, __END_READ_DATA__} |
Address of DATA Ready Status Register.
Definition at line 53 of file fxls8962_normal_spi.c.
const registerreadlist_t cFxls8962OutputNormal[] |
Address of Raw Accel Data in Normal Mode.
Definition at line 56 of file fxls8962_normal_spi.c.