mrp_motion.h
1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#ifndef __MRP_PAL_MOTION_H__
#define __MRP_PAL_MOTION_H__
#ifdef __DSM_BOSCH_MOTION__
#define MOTION_MAX_ACC (511)
#else
#define MOTION_MAX_ACC (64)
#endif
#define MOTION_FREQUENCY (50)
typedef enum
{
T_MOTION_PWROFF,
T_MOTION_PWERON,
T_MOTION_IDLE,
T_MOTION_LISTENING
}T_MOTION_STATE;
typedef enum
{
MR_MOTION_SENSITIVE_LOW,
MR_MOTION_SENSITIVE_NORMAL,
MR_MOTION_SENSITIVE_HIGH,
MR_MOTION_SENSITIVE_MAX
} MR_MOTION_SENSITIVE_ENUM;
typedef enum
{
MR_MOTION_EVENT_SHAKE,
MR_MOTION_EVENT_TILT
} mr_motion_event_enum;
typedef struct
{
int32 x;
int32 y;
int32 z;
}T_MOTION_ACC;
/**
* \brief motion 开启
*
* \return 成功返回MR_SUCCESS, 失败返回MR_FAILED
*/
int32 mr_motion_power_on(int32 param);
/**
* \brief motion 开启
*
* \return 成功返回MR_SUCCESS, 失败返回MR_FAILED
*/
int32 mr_motion_power_off(int32 param);
/**
* \brief 监听shake
*/
int32 mr_motion_listen_shake(int32 param);
/**
* \brief
*/
int32 mr_motion_listen_tilt(int32 param);
/**
* \brief 停止监听
*/
int32 mr_motion_stop_listen(int32 param);
/**
* \brief 获取 max acc
*/
int32 mr_motion_get_max_acc(int32 param);
#endif