![]() |
ISSDK
1.8
IoT Sensing Software Development Kit
|
The fxls8974cf_poll.c file implements the ISSDK FXLS8974 sensor driver example demonstration with polling mode. More...
#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 "fxls8974_drv.h"
#include "systick_utils.h"
Go to the source code of this file.
Macros | |
#define | FXLS8974_DATA_SIZE 6 |
Functions | |
int | main (void) |
Main function. More... | |
Variables | |
const registerwritelist_t | cFxls8974ConfigNormal [] |
Register settings for Normal (non buffered) mode. More... | |
const registerreadlist_t | cFxls8974DRDYEvent [] = {{.readFrom = FXLS8974_INT_STATUS, .numBytes = 1}, __END_READ_DATA__} |
Address of DATA Ready Status Register. More... | |
const registerreadlist_t | cFxls8974OutputNormal [] |
Address of Raw Accel Data in Normal Mode. More... | |
The fxls8974cf_poll.c file implements the ISSDK FXLS8974 sensor driver example demonstration with polling mode.
Definition in file fxls8974cf_poll.c.
#define FXLS8974_DATA_SIZE 6 |
Definition at line 31 of file fxls8974cf_poll.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 FXLS8974 sensor driver.
Set the task to be executed while waiting for I2C transactions to complete.
Configure the FXLS8974 sensor.
Wait for data ready from the FXLS8974.
Read new raw sensor data from the FXLS8974.
Convert the raw sensor data to signed 16-bit container for display to the debug port.
Definition at line 57 of file fxls8974cf_poll.c.
References fxls8974_acceldata_t::accel, ASK_USER_TO_RESUME, BOARD_BootClockRUN, BOARD_InitDebugConsole(), BOARD_InitPins(), BOARD_SystickEnable(), data, FXLS8962_WHOAMI_VALUE, FXLS8964_WHOAMI_VALUE, FXLS8967_WHOAMI_VALUE, FXLS8968_WHOAMI_VALUE, FXLS8974_DATA_SIZE, FXLS8974_I2C_ADDR, FXLS8974_I2C_Configure(), FXLS8974_I2C_Initialize(), FXLS8974_I2C_ReadData(), FXLS8974_I2C_SetIdleTask(), FXLS8974_INT_STATUS_SRC_DRDY_MASK, FXLS8974_WHOAMI_VALUE, fxls8974Driver, I2C_S_DEVICE_INDEX, I2C_S_DRIVER, I2C_S_SIGNAL_EVENT, I2Cdrv, int32_t(), rawData, SMC, SMC_SetPowerModeVlpr(), and status.
const registerwritelist_t cFxls8974ConfigNormal[] |
Register settings for Normal (non buffered) mode.
Definition at line 37 of file fxls8974cf_poll.c.
const registerreadlist_t cFxls8974DRDYEvent[] = {{.readFrom = FXLS8974_INT_STATUS, .numBytes = 1}, __END_READ_DATA__} |
Address of DATA Ready Status Register.
Definition at line 45 of file fxls8974cf_poll.c.
const registerreadlist_t cFxls8974OutputNormal[] |
Address of Raw Accel Data in Normal Mode.
Definition at line 48 of file fxls8974cf_poll.c.