![]() |
ISSDK
1.7
IoT Sensing Software Development Kit
|
The pedometer.h file contains the interface and structure definitions for pedometer application. More...
#include <stddef.h>#include <stdint.h>#include <stdbool.h>#include "KeynetikPedometer.h"

Go to the source code of this file.
Data Structures | |
| struct | ped_accel_t |
| This defines the acceleration input data for the pedometer. More... | |
| struct | pedometer_config_t |
| This defines the configuration structure of the pedometer. More... | |
| struct | pedometer_t |
| This defines the pedometer instance. More... | |
| struct | pedometer_t::pedometer_status_tag |
| struct | pedometer_t::pedometer_private_tag |
Macros | |
| #define | PEDO_ONEG_8G 4096 /* One G value for 8G mode.*/ |
| #define | PEDO_ONEG_4G 8192 /* One G value for 4G mode.*/ |
| #define | PEDO_ONEG_2G 16384 /* One G value for 2G mode.*/ |
| #define | PEDO_FREQHZ_DEFAULT 50 /* Default frequency*/ |
| #define | PEDO_STEP_THRESHOLD_DEFAULT 130 |
| #define | PEDO_SPEED_PERIOD_DEFAULT 5 |
| #define | PEDO_FILTER_TIME_DEFAULT 3 |
| #define | PEDO_FILTER_STEPS_DEFAULT 4 |
Typedefs | |
| typedef KeynetikActivityLevel | activitylevel_t |
| typedef uint16_t | debounce_count_t |
Functions | |
| void | pedometer_init (pedometer_t *pPedometer) |
| The interface function initialize the pedometer. More... | |
| void | pedometer_configure (pedometer_t *pPedometer, const pedometer_config_t *pConfig) |
| The interface function to configure the pedometer. More... | |
| int32_t | pedometer_run (pedometer_t *pPedometer, ped_accel_t *pData) |
| The interface function excutes the pedometer algorithm. More... | |
The pedometer.h file contains the interface and structure definitions for pedometer application.
Definition in file pedometer.h.
| #define PEDO_FILTER_STEPS_DEFAULT 4 |
Definition at line 61 of file pedometer.h.
| #define PEDO_FILTER_TIME_DEFAULT 3 |
Definition at line 60 of file pedometer.h.
| #define PEDO_FREQHZ_DEFAULT 50 /* Default frequency*/ |
Definition at line 57 of file pedometer.h.
| #define PEDO_ONEG_2G 16384 /* One G value for 2G mode.*/ |
Definition at line 56 of file pedometer.h.
| #define PEDO_ONEG_4G 8192 /* One G value for 4G mode.*/ |
Definition at line 55 of file pedometer.h.
| #define PEDO_ONEG_8G 4096 /* One G value for 8G mode.*/ |
Definition at line 54 of file pedometer.h.
| #define PEDO_SPEED_PERIOD_DEFAULT 5 |
Definition at line 59 of file pedometer.h.
| #define PEDO_STEP_THRESHOLD_DEFAULT 130 |
Definition at line 58 of file pedometer.h.
| typedef KeynetikActivityLevel activitylevel_t |
Definition at line 52 of file pedometer.h.
| typedef uint16_t debounce_count_t |
Definition at line 53 of file pedometer.h.
| void pedometer_configure | ( | pedometer_t * | pPedometer, |
| const pedometer_config_t * | pConfig | ||
| ) |
The interface function to configure the pedometer.
| [in] | pedometer_t | handle to the pedometer. |
| [in] | config | configuration value. |
Definition at line 137 of file pedometer.c.
References pedometer_t::config, pedometer_config_t::frequency, pedometer_config_t::keynetik, pedometer_config_t::oneG, pedometer_t::private, and pedometer_t::pedometer_private_tag::stepchg_stepcount.
Referenced by main().

| void pedometer_init | ( | pedometer_t * | pPedometer | ) |
The interface function initialize the pedometer.
This function initialize the pedometer structure and return the handle.
| [in] | pPedometer | handle to the pedometer. |
Definition at line 123 of file pedometer.c.
Referenced by main().

| int32_t pedometer_run | ( | pedometer_t * | pPedometer, |
| ped_accel_t * | pData | ||
| ) |
The interface function excutes the pedometer algorithm.
Call this function the rate at which accelerometer runs.
| [in] | pPedometer | handle to the pedometer. |
| [in] | accel_data | acceleration data. |
Definition at line 151 of file pedometer.c.
Referenced by main().
