MotionCP Software Library: algorithms/Middlewares/ST/STM32_MotionCP_Library/Inc/motion_cp.h Source File

Motion CP

MotionCP Software Library
MotionCP Software Library Documentation
motion_cp.h
Go to the documentation of this file.
1 
38 /* Define to prevent recursive inclusion -------------------------------------*/
39 #ifndef _MOTION_CP_H_
40 #define _MOTION_CP_H_
41 
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45 
46 /* Includes ------------------------------------------------------------------*/
47 #include <stdint.h>
48 
61 /* Exported constants --------------------------------------------------------*/
62 
63 /* Exported types ------------------------------------------------------------*/
64  typedef struct
65 {
66  float AccX; /* Acceleration in X axis in [g] */
67  float AccY; /* Acceleration in Y axis in [g] */
68  float AccZ; /* Acceleration in Z axis in [g] */
69 } MCP_input_t;
70 
71 typedef enum
72 {
73  MCP_UNKNOWN = 0x00,
74  MCP_ONDESK = 0x01,
75  MCP_INHAND = 0x02,
76  MCP_NEARHEAD = 0x03,
79  MCP_ARMSWING = 0x06,
81 } MCP_output_t;
82 
87 /* Exported variables --------------------------------------------------------*/
88 /* Exported macro ------------------------------------------------------------*/
89 
94 /* Exported functions ------------------------------------------------------- */
95 
101 void MotionCP_Initialize(void);
102 
108 void MotionCP_SetOrientation_Acc(const char *acc_orientation);
109 
116 void MotionCP_Update(MCP_input_t *data_in, MCP_output_t *data_out);
117 
123 uint8_t MotionCP_GetLibVersion(char *version);
124 
125 
138 #ifdef __cplusplus
139 }
140 #endif
141 
142 #endif /* _MOTION_CP_H_ */
143 
144 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
void MotionCP_Update(MCP_input_t *data_in, MCP_output_t *data_out)
Run carry position recognition algorithm.
float AccZ
Definition: motion_cp.h:68
float AccX
Definition: motion_cp.h:66
void MotionCP_Initialize(void)
Initialize the MotionCP engine.
void MotionCP_SetOrientation_Acc(const char *acc_orientation)
Set the MotionCP accelerometer data orientation.
float AccY
Definition: motion_cp.h:67
uint8_t MotionCP_GetLibVersion(char *version)
Get the library version.
MCP_output_t
Definition: motion_cp.h:71
Generated on Fri Mar 31 2017 11:03:53 for MotionCP Software Library by   doxygen 1.8.9.1