![]() |
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 "fxls896x_drv.h"
#include "systick_utils.h"
Go to the source code of this file.
Macros | |
#define | FXLS896x_DATA_SIZE 6 |
Functions | |
int | main (void) |
Main function. More... | |
Variables | |
const registerwritelist_t | cFxls896xConfigNormal [] |
Register settings for Normal (non buffered) mode. More... | |
const registerreadlist_t | cFxls896xDRDYEvent [] = {{.readFrom = FXLS896x_INT_STATUS, .numBytes = 1}, __END_READ_DATA__} |
Address of DATA Ready Status Register. More... | |
const registerreadlist_t | cFxls896xOutputNormal [] |
Address of Raw Accel Data in Normal Mode. More... | |
#define FXLS896x_DATA_SIZE 6 |
Definition at line 31 of file fxls896xaf_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 FXLS896x sensor driver.
Set the task to be executed while waiting for I2C transactions to complete.
Configure the FXLS896x sensor.
Wait for data ready from the FXLS896x.
Read new raw sensor data from the FXLS896x.
Convert the raw sensor data to signed 16-bit container for display to the debug port.
Definition at line 57 of file fxls896xaf_poll.c.
References fxls896x_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, FXLS896x_DATA_SIZE, FXLS896x_I2C_ADDR, FXLS896x_I2C_Configure(), FXLS896x_I2C_Initialize(), FXLS896x_I2C_ReadData(), FXLS896x_I2C_SetIdleTask(), FXLS896x_INT_STATUS_SRC_DRDY_MASK, fxls896xDriver, FXLS8974_WHOAMI_VALUE, I2C_S_DEVICE_INDEX, I2C_S_DRIVER, I2C_S_SIGNAL_EVENT, I2Cdrv, int32_t(), rawData, SMC, SMC_SetPowerModeVlpr(), and status.
const registerwritelist_t cFxls896xConfigNormal[] |
Register settings for Normal (non buffered) mode.
Definition at line 37 of file fxls896xaf_poll.c.
const registerreadlist_t cFxls896xDRDYEvent[] = {{.readFrom = FXLS896x_INT_STATUS, .numBytes = 1}, __END_READ_DATA__} |
Address of DATA Ready Status Register.
Definition at line 45 of file fxls896xaf_poll.c.
const registerreadlist_t cFxls896xOutputNormal[] |
Address of Raw Accel Data in Normal Mode.
Definition at line 48 of file fxls896xaf_poll.c.