![]() |
ISSDK
1.8
IoT Sensing Software Development Kit
|
The pedometer_stepcount_fxls896xaf.c file implements the ISSDK FXLS896XAF sensor driver example demonstration for Motion Activated Pedometer. 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 "pedometer.h"
#include "gpio_driver.h"
#include "fxls896x_drv.h"
Go to the source code of this file.
Macros | |
#define | FXLS896x_DATA_SIZE 6 /* 2 byte X,Y,Z Axis Data each. */ |
Functions | |
int | main (void) |
This is the The main function implementation. More... | |
Variables | |
const registerwritelist_t | cFxls896xConfigInitialize [] |
FXLS896x Motion based Pedometer Register Write List. More... | |
const registerreadlist_t | cFxls896xDRDYEvent [] = {{.readFrom = FXLS896x_INT_STATUS, .numBytes = 1}, __END_READ_DATA__} |
Address of DATA Ready Status Register. More... | |
const registerreadlist_t | cFxls896xOutput [] = {{.readFrom = FXLS896x_OUT_X_LSB, .numBytes = FXLS896x_DATA_SIZE}, __END_READ_DATA__} |
Address of Data Output Registers. More... | |
const char * | pActivity [5] = {"Unknown ", "Rest ", "Walking ", "Jogging ", "Running "} |
Pedometer Mode Name Strings. More... | |
gpioConfigKSDK_t | gpioConfigINT1 |
The pedometer_stepcount_fxls896xaf.c file implements the ISSDK FXLS896XAF sensor driver example demonstration for Motion Activated Pedometer.
Definition in file pedometer_stepcount_fxls896xaf.c.
#define FXLS896x_DATA_SIZE 6 /* 2 byte X,Y,Z Axis Data each. */ |
Definition at line 38 of file pedometer_stepcount_fxls896xaf.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. void There is no return value. |
Initialize the MCU hardware.
Initialize RGB LED pin used by FRDM board
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.
Initialize the pedometer
Configure the pedometer
Wait for data ready from the FXLS896x.
Read the Output from the FXLS896x.
Convert the raw sensor data for feeding to pedometer algorithm.
Execute the pedometer Algorithm
Definition at line 103 of file pedometer_stepcount_fxls896xaf.c.
References fxls896x_acceldata_t::accel, BOARD_BootClockRUN, BOARD_InitDebugConsole(), BOARD_InitPins(), data, Driver_GPIO_KSDK, 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, GPIO_DIRECTION_OUT, GREEN_LED, I2C_S_DEVICE_INDEX, I2C_S_DRIVER, I2C_S_SIGNAL_EVENT, I2Cdrv, int32_t(), pedometer_configure(), pedometer_init(), pedometer_run(), pGpioDriver, GENERIC_DRIVER_GPIO::pin_init, rawData, SENSOR_ERROR_NONE, GENERIC_DRIVER_GPIO::set_pin, SMC, SMC_SetPowerModeWait(), pedometer_t::status, status, pedometer_t::pedometer_status_tag::stepcount, and GENERIC_DRIVER_GPIO::toggle_pin.
const registerwritelist_t cFxls896xConfigInitialize[] |
FXLS896x Motion based Pedometer Register Write List.
Definition at line 44 of file pedometer_stepcount_fxls896xaf.c.
const registerreadlist_t cFxls896xDRDYEvent[] = {{.readFrom = FXLS896x_INT_STATUS, .numBytes = 1}, __END_READ_DATA__} |
Address of DATA Ready Status Register.
Definition at line 52 of file pedometer_stepcount_fxls896xaf.c.
const registerreadlist_t cFxls896xOutput[] = {{.readFrom = FXLS896x_OUT_X_LSB, .numBytes = FXLS896x_DATA_SIZE}, __END_READ_DATA__} |
Address of Data Output Registers.
Definition at line 55 of file pedometer_stepcount_fxls896xaf.c.
gpioConfigKSDK_t gpioConfigINT1 |
Definition at line 85 of file pedometer_stepcount_fxls896xaf.c.
const char* pActivity[5] = {"Unknown ", "Rest ", "Walking ", "Jogging ", "Running "} |
Pedometer Mode Name Strings.
Definition at line 58 of file pedometer_stepcount_fxls896xaf.c.