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
52
53
56
57
60
61
64
65
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
87
88
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
119
120
121
124
125
128
129
132
133
136
137
138
139
140
141
142
143
/* ... */
#ifndef __ACCELERO_H
#define __ACCELERO_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
/* ... */
/* ... */
/* ... */
/* ... */
/* ... */
typedef struct
{
void (*Init)(uint16_t);
void (*DeInit)(void);
uint8_t (*ReadID)(void);
void (*Reset)(void);
void (*LowPower)(void);
void (*ConfigIT)(void);
void (*EnableIT)(uint8_t);
void (*DisableIT)(uint8_t);
uint8_t (*ITStatus)(uint16_t);
void (*ClearIT)(void);
void (*FilterConfig)(uint8_t);
void (*FilterCmd)(uint8_t);
void (*GetXYZ)(int16_t *);
...}ACCELERO_DrvTypeDef;
/* ... */
/* ... */
typedef struct
{
uint8_t Power_Mode;
uint8_t AccOutput_DataRate;
uint8_t Axes_Enable;
uint8_t High_Resolution;
uint8_t BlockData_Update;
uint8_t Endianness;
uint8_t AccFull_Scale;
uint8_t Communication_Mode;
...}ACCELERO_InitTypeDef;
typedef struct
{
uint8_t HighPassFilter_Mode_Selection;
uint8_t HighPassFilter_CutOff_Frequency;
uint8_t HighPassFilter_AOI1;
uint8_t HighPassFilter_AOI2;
uint8_t HighPassFilter_Data_Sel;
uint8_t HighPassFilter_Stat;
...}ACCELERO_FilterConfigTypeDef;
/* ... */
/* ... */
/* ... */
/* ... */
/* ... */
#ifdef __cplusplus
}extern "C" { ... }
#endif
/* ... */
#endif