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
53
54
57
58
61
62
65
66
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
88
89
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
110
111
112
113
118
119
122
123
126
127
130
131
134
135
138
139
140
141
142
143
144
145
/* ... */
#ifndef __GYRO_H
#define __GYRO_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)(uint16_t);
void (*ConfigIT)(uint16_t);
void (*EnableIT)(uint8_t);
void (*DisableIT)(uint8_t);
uint8_t (*ITStatus)(uint16_t, uint16_t);
void (*ClearIT)(uint16_t, uint16_t);
void (*FilterConfig)(uint8_t);
void (*FilterCmd)(uint8_t);
void (*GetXYZ)(float *);
...}GYRO_DrvTypeDef;
/* ... */
/* ... */
typedef struct
{
uint8_t Power_Mode;
uint8_t Output_DataRate;
uint8_t Axes_Enable;
uint8_t Band_Width;
uint8_t BlockData_Update;
uint8_t Endianness;
uint8_t Full_Scale;
...}GYRO_InitTypeDef;
typedef struct
{
uint8_t HighPassFilter_Mode_Selection;
uint8_t HighPassFilter_CutOff_Frequency;
...}GYRO_FilterConfigTypeDef;
typedef struct
{
uint8_t Latch_Request;
uint8_t Interrupt_Axes;
uint8_t Interrupt_ActiveEdge;
...}GYRO_InterruptConfigTypeDef;
/* ... */
/* ... */
/* ... */
/* ... */
/* ... */
#ifdef __cplusplus
}extern "C" { ... }
#endif
/* ... */
#endif