MotionPW Software Library: Middlewares/ST/STM32_MotionPW_Library/Inc/motion_pw.h Source File

MotionPW Software Library

MotionPW Software Library
MotionPW Software Library Documentation
motion_pw.h
Go to the documentation of this file.
1 
38 /* Define to prevent recursive inclusion -------------------------------------*/
39 #ifndef _MOTION_PW_H_
40 #define _MOTION_PW_H_
41 
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45 
46 /* Includes ------------------------------------------------------------------*/
47 #include <stdint.h>
48 
61 /* Exported types ------------------------------------------------------------*/
62 typedef enum
63 {
65  MPW_WALKING = 0x01,
67  MPW_JOGGING = 0x03
69 
70 typedef struct
71 {
72  float AccX; /* Acceleration in X axis in [g] */
73  float AccY; /* Acceleration in Y axis in [g] */
74  float AccZ; /* Acceleration in Z axis in [g] */
75  MPW_activity_t CurrentActivity; /* Current user activity */
76 } MPW_input_t;
77 
78 typedef struct
79 {
80  uint8_t Cadence; /* [steps/min] */
81  uint32_t Nsteps;
82  uint8_t Confidence;
83 } MPW_output_t;
84 
89 /* Exported constants --------------------------------------------------------*/
90 /* Exported variables --------------------------------------------------------*/
91 /* Exported macro ------------------------------------------------------------*/
92 
97 /* Exported functions ------------------------------------------------------- */
98 
104 void MotionPW_Initialize(void);
105 
112 void MotionPW_Update(MPW_input_t *data_in, MPW_output_t *data_out);
113 
119 uint8_t MotionPW_GetLibVersion(char *version);
120 
127 
133 void MotionPW_ResetStepCount(void);
134 
147 #ifdef __cplusplus
148 }
149 #endif
150 
151 #endif /* _MOTION_PW_H_ */
152 
153 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
float AccY
Definition: motion_pw.h:73
uint8_t MotionPW_GetLibVersion(char *version)
Get the library version.
uint32_t Nsteps
Definition: motion_pw.h:81
float AccX
Definition: motion_pw.h:72
float AccZ
Definition: motion_pw.h:74
MPW_activity_t CurrentActivity
Definition: motion_pw.h:75
void MotionPW_ResetPedometerLibrary(void)
Reset library.
uint8_t Confidence
Definition: motion_pw.h:82
void MotionPW_Initialize(void)
Initialize the MotionPW engine.
void MotionPW_ResetStepCount(void)
Reset step count.
MPW_activity_t
Definition: motion_pw.h:62
void MotionPW_Update(MPW_input_t *data_in, MPW_output_t *data_out)
Run pedometer algorithm.
uint8_t Cadence
Definition: motion_pw.h:80
Generated on Fri Nov 24 2017 16:53:21 for MotionPW Software Library by   doxygen 1.8.9.1