ISSDK  1.7
IoT Sensing Software Development Kit
Macros | Functions | Variables
pedometer_stepcount_fxos8700.c File Reference

The pedometer_stepcount_fxos8700.c file implements the ISSDK prdometer example using FXOS8700 sensor as the acceleration source. More...

#include "board.h"
#include "pin_mux.h"
#include "clock_config.h"
#include "fsl_debug_console.h"
#include "Driver_I2C.h"
#include "issdk_hal.h"
#include "pedometer.h"
#include "fxos8700_drv.h"
Include dependency graph for pedometer_stepcount_fxos8700.c:

Go to the source code of this file.

Macros

#define RAW_ACCEL_DATA_SIZE   (6)
 

Functions

int main (void)
 Main function. More...
 

Variables

const registerwritelist_t fxos8700_Config []
 
const registerreadlist_t FXOS8700_STATUS_READ [] = {{.readFrom = FXOS8700_STATUS, .numBytes = 1}, __END_READ_DATA__}
 
const registerreadlist_t FXOS8700_ACCEL_READ []
 

Detailed Description

The pedometer_stepcount_fxos8700.c file implements the ISSDK prdometer example using FXOS8700 sensor as the acceleration source.

The pedometer_stepcount_fxos8700.c file implements the ISSDK FXOS8700 sensor driver example demonstration for Motion Activated Pedometer.

Definition in file pedometer_stepcount_fxos8700.c.

Macro Definition Documentation

◆ RAW_ACCEL_DATA_SIZE

#define RAW_ACCEL_DATA_SIZE   (6)

Definition at line 58 of file pedometer_stepcount_fxos8700.c.

Referenced by main().

Function Documentation

◆ 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 the FXOS8700 sensor driver.

Set the task to be executed while waiting for I2C transactions to complete.

Configure the fxos8700 sensor driver.

Definition at line 110 of file pedometer_stepcount_fxos8700.c.

References fxos8700_acceldata_t::accel, BOARD_BootClockRUN, BOARD_InitDebugConsole(), BOARD_InitPins(), FXOS8700_I2C_ADDR, FXOS8700_I2C_Configure(), FXOS8700_I2C_Initialize(), FXOS8700_I2C_ReadData(), FXOS8700_I2C_SetIdleTask(), FXOS8700_WHO_AM_I_PROD_VALUE, I2C_S_DEVICE_INDEX, I2C_S_DRIVER, I2C_S_SIGNAL_EVENT, int32_t(), pedometer_configure(), pedometer_init(), pedometer_run(), RAW_ACCEL_DATA_SIZE, rawData, SENSOR_ERROR_NONE, SMC, SMC_SetPowerModeWait(), pedometer_t::status, status, and pedometer_t::pedometer_status_tag::stepcount.

Here is the call graph for this function:

Variable Documentation

◆ FXOS8700_ACCEL_READ

const registerreadlist_t FXOS8700_ACCEL_READ[]
Initial value:
= {{.readFrom = FXOS8700_OUT_X_MSB, .numBytes = RAW_ACCEL_DATA_SIZE},
#define __END_READ_DATA__
Definition: sensor_drv.h:77
#define RAW_ACCEL_DATA_SIZE

Command definition to read the Accel Data

Definition at line 99 of file pedometer_stepcount_fxos8700.c.

◆ fxos8700_Config

const registerwritelist_t fxos8700_Config[]
Initial value:

Definition at line 66 of file pedometer_stepcount_fxos8700.c.

◆ FXOS8700_STATUS_READ

const registerreadlist_t FXOS8700_STATUS_READ[] = {{.readFrom = FXOS8700_STATUS, .numBytes = 1}, __END_READ_DATA__}

Command definition to read the Data Ready Status

Definition at line 96 of file pedometer_stepcount_fxos8700.c.