MotionFA Software Library: algorithms/Middlewares/ST/STM32_MotionFA_Library/Inc/motion_fa.h Source File

Motion FA

MotionFA Software Library
MotionFA Software Library Documentation
motion_fa.h
Go to the documentation of this file.
1 
38 /* Define to prevent recursive inclusion -------------------------------------*/
39 #ifndef _MOTION_FA_H_
40 #define _MOTION_FA_H_
41 
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45 
46 /* Includes ------------------------------------------------------------------*/
47 #include <stdint.h>
48 
61 /* Exported constants --------------------------------------------------------*/
62 #define NUM_FA_ACTIVITIES 3
63 
64 /* Exported types ------------------------------------------------------------*/
65  typedef struct
66 {
67  float AccX; /* Acceleration in X axis in [g] */
68  float AccY; /* Acceleration in Y axis in [g] */
69  float AccZ; /* Acceleration in Z axis in [g] */
70  float Press; /* Atmospheric pressure in [hPa] */
71 } MFA_input_t;
72 
73 typedef enum
74 {
76  MFA_BICEPCURL = 0x01,
77  MFA_SQUAT = 0x02
79 
80 typedef struct {
81  uint32_t Counter;
82 } MFA_output_t;
83 
88 /* Exported variables --------------------------------------------------------*/
89 /* Exported macro ------------------------------------------------------------*/
90 
95 /* Exported functions ------------------------------------------------------- */
96 
102 void MotionFA_Initialize(void);
103 
109 void MotionFA_SetOrientation_Acc(const char *acc_orientation);
110 
117 void MotionFA_BicepCurl_Update(MFA_input_t *data_in, MFA_output_t *data_out);
118 
125 void MotionFA_Squat_Update(MFA_input_t *data_in, MFA_output_t *data_out);
126 
132 void MotionFA_BicepCurl_Reset(void);
133 
139 void MotionFA_Squat_Reset(void);
140 
146 uint8_t MotionFA_GetLibVersion(char *version);
147 
148 
161 #ifdef __cplusplus
162 }
163 #endif
164 
165 #endif /* _MOTION_FA_H_ */
166 
167 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
void MotionFA_Squat_Reset(void)
Reset squat counter.
MFA_activity_t
Definition: motion_fa.h:73
void MotionFA_Initialize(void)
Initialize the MotionFA engine.
float Press
Definition: motion_fa.h:70
void MotionFA_BicepCurl_Reset(void)
Reset bicep curl counter.
uint32_t Counter
Definition: motion_fa.h:81
uint8_t MotionFA_GetLibVersion(char *version)
Get the library version.
void MotionFA_SetOrientation_Acc(const char *acc_orientation)
Set the MotionFA accelerometer data orientation.
float AccY
Definition: motion_fa.h:68
float AccX
Definition: motion_fa.h:67
void MotionFA_BicepCurl_Update(MFA_input_t *data_in, MFA_output_t *data_out)
Run bicep curl counter.
void MotionFA_Squat_Update(MFA_input_t *data_in, MFA_output_t *data_out)
Run squat counter.
float AccZ
Definition: motion_fa.h:69
Generated on Mon Apr 24 2017 11:57:48 for MotionFA Software Library by   doxygen 1.8.9.1