MotionSM Software Library: Middlewares/ST/STM32_MotionSM_Library/Inc/motion_sm.h Source File

MotionSM Software Library

MotionSM Software Library
MotionSM Software Library Documentation
motion_sm.h
Go to the documentation of this file.
1 
38 /* Define to prevent recursive inclusion -------------------------------------*/
39 #ifndef _MOTION_SM_H_
40 #define _MOTION_SM_H_
41 
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45 
46 /* Includes ------------------------------------------------------------------*/
47 #include <stdint.h>
48 
61 /* Exported constants --------------------------------------------------------*/
62 /* Exported types ------------------------------------------------------------*/
63 typedef enum
64 {
65  MSM_NOSLEEP = 0x00,
66  MSM_SLEEP = 0x01
67 } MSM_sleep_t;
68 
69 typedef struct
70 {
71  float AccX; /* Acceleration in X axis in [g] */
72  float AccY; /* Acceleration in Y axis in [g] */
73  float AccZ; /* Acceleration in Z axis in [g] */
74 } MSM_input_t;
75 
76 typedef struct
77 {
79  uint32_t TotalSleepTime;
80 } MSM_output_t;
81 
82 
87 /* Exported variables --------------------------------------------------------*/
88 /* Exported macro ------------------------------------------------------------*/
89 
94 /* Exported functions ------------------------------------------------------- */
95 
101 void MotionSM_Initialize(void);
102 
108 void MotionSM_SetOrientation_Acc(const char *acc_orientation);
109 
116 void MotionSM_Update(MSM_input_t *data_in, MSM_output_t *data_out);
117 
123 void MotionSM_Reset(void);
124 
130 uint8_t MotionSM_GetLibVersion(char *version);
131 
144 #ifdef __cplusplus
145 }
146 #endif
147 
148 #endif /* _MOTION_SM_H_ */
149 
150 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
MSM_sleep_t
Definition: motion_sm.h:63
void MotionSM_SetOrientation_Acc(const char *acc_orientation)
Set the MotionSM accelerometer data orientation.
void MotionSM_Initialize(void)
Initialize the MotionSM engine.
float AccX
Definition: motion_sm.h:71
uint8_t MotionSM_GetLibVersion(char *version)
Get the library version.
void MotionSM_Reset(void)
Reset sleep monitorin algorithm.
uint32_t TotalSleepTime
Definition: motion_sm.h:79
float AccZ
Definition: motion_sm.h:73
MSM_sleep_t SleepFlag
Definition: motion_sm.h:78
float AccY
Definition: motion_sm.h:72
void MotionSM_Update(MSM_input_t *data_in, MSM_output_t *data_out)
Run sleep monitoring algorithm.
Generated on Fri Nov 24 2017 16:59:13 for MotionSM Software Library by   doxygen 1.8.9.1