-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmax30003_define.h
390 lines (277 loc) · 5.95 KB
/
max30003_define.h
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
88
89
90
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
#ifndef MAX30003_DEFINE_H_
#define MAX30003_DEFINE_H_
typedef enum
{
MAX30003_NO_OP = 0x00,
MAX30003_STAUS = 0x01,
MAX30003_EN_INT = 0x02,
MAX30003_EN_INT2 = 0x03,
MAX30003_MNGR_INT = 0x04,
MAX30003_MNGR_DYN = 0x05,
MAX30003_SW_RST = 0x08,
MAX30003_SYNCH = 0x09,
MAX30003_FIFO_RST = 0x0A,
MAX30003_INFO = 0x0F,
MAX30003_CNFG_GEN = 0x10,
MAX30003_CNFG_CAL = 0x12,
MAX30003_CNFG_EMUX = 0x14,
MAX30003_CNFG_ECG = 0x15,
MAX30003_CNFG_RTOR1 = 0x1D,
MAX30003_CNFG_RTOR2 = 0x1E,
MAX30003_ECG_BURST = 0x20,
MAX30003_ECG = 0x21,
MAX30003_RTOR = 0x25
} max30003_enum;
typedef union
{
struct
{
uint32_t LDOFF_NL :1;
uint32_t LDOFF_NH :1;
uint32_t LDOFF_PL :1;
uint32_t LDOFF_PH :1;
uint32_t RESERVED0 :4;
uint32_t PLLINT :1;
uint32_t SAMP :1;
uint32_t RRINT :1;
uint32_t LONINT :1;
uint32_t RESERVED1 :8;
uint32_t DCLOFFINT :1;
uint32_t FSTINT :1;
uint32_t EOVF :1;
uint32_t EINT :1;
uint32_t RESERVED2 :8;
} bits;
uint32_t value;
} max30003_status_reg;
typedef union
{
struct
{
uint32_t INTB_TYPE :2;
uint32_t RESERVED0 :6;
uint32_t EN_PLLINT :1;
uint32_t EN_SAMP :1;
uint32_t EN_RRINT :1;
uint32_t EN_LONINT :1;
uint32_t RESERVED1 :8;
uint32_t EN_DCLOFFINT :1;
uint32_t EN_FSTINT :1;
uint32_t EN_EOVF :1;
uint32_t EN_EINT :1;
uint32_t RESERVED2 :8;
} bits;
uint32_t value;
} max30003_en_int_reg;
typedef union
{
struct
{
uint32_t INTB_TYPE :2;
uint32_t RESERVED0 :6;
uint32_t EN_PLLINT :1;
uint32_t EN_SAMP :1;
uint32_t EN_RRINT :1;
uint32_t EN_LONINT :1;
uint32_t RESERVED1 :8;
uint32_t EN_DCLOFFINT :1;
uint32_t EN_FSTINT :1;
uint32_t EN_EOVF :1;
uint32_t EN_EINT :1;
uint32_t RESERVED2 :8;
} bits;
uint32_t value;
} max30003_en_int2_reg;
typedef union
{
struct
{
uint32_t SAMP_IT :2;
uint32_t CLR_SAMP :1;
uint32_t RESERVED0 :1;
uint32_t CLR_RRINT :2;
uint32_t CLR_FAST :1;
uint32_t RESERVED1 :12;
uint32_t EFIT :5;
uint32_t RESERVED2 :8;
} bits;
uint32_t value;
} max30003_mngr_int_reg;
typedef union
{
struct
{
uint32_t RESERVED0 :16;
uint32_t FAST_TH :6;
uint32_t FAST :2;
uint32_t RESERVED1 :8;
} bits;
uint32_t value;
} max30003_mngr_dyn_reg;
typedef union
{
struct
{
uint32_t SW_RST :24;
uint32_t RESERVED0 :8;
} bits;
uint32_t value;
} max30003_sw_rst_reg;
typedef union
{
struct
{
uint32_t SYNCH :24;
uint32_t RESERVED0 :8;
} bits;
uint32_t value;
} max30003_synch_reg;
typedef union
{
struct
{
uint32_t FIFO_RST :24;
uint32_t RESERVED0 :8;
} bits;
uint32_t value;
} max30003_fifo_rst_reg;
typedef union
{
struct
{
uint32_t RESERVED0 :16;
uint32_t REV_ID :4;
uint32_t RESERVED1 :4;
uint32_t RESERVED2 :8;
} bits;
uint32_t value;
} max30003_info_reg;
typedef union
{
struct
{
uint32_t RBIASN :1;
uint32_t RBIASP :1;
uint32_t RBIASV :2;
uint32_t EN_RBIAS :2;
uint32_t VTH :2;
uint32_t IMAG :3;
uint32_t IPOL :1;
uint32_t EN_DCLOFF :2;
uint32_t RESERVED0 :5;
uint32_t EN_ECG :1;
uint32_t FMSTR :2;
uint32_t EN_ULP_LON :2;
uint32_t RESERVED1 :8;
} bits;
uint32_t value;
} max30003_cnfg_gen_reg;
typedef union
{
struct
{
uint32_t THIGH :11;
uint32_t FIFTY :1;
uint32_t FCAL :3;
uint32_t RESERVED0 :5;
uint32_t VMAG :1;
uint32_t VMODE :1;
uint32_t EN_VCAL :1;
uint32_t RESERVED1 :1;
uint32_t RESERVED2 :8;
} bits;
uint32_t value;
} max30003_cnfg_cal_reg;
typedef union
{
struct
{
uint32_t RESERVED0 :16;
uint32_t CALN_SEL :2;
uint32_t CALP_SEL :2;
uint32_t OPENN :1;
uint32_t OPENP :1;
uint32_t RESERVED1 :1;
uint32_t POL :1;
uint32_t RESERVED2 :8;
} bits;
uint32_t value;
} max30003_cnfg_emux_reg;
typedef union
{
struct
{
uint32_t RESERVED0 :12;
uint32_t DLPF :2;
uint32_t DHPF :1;
uint32_t RESERVED1 :1;
uint32_t GAIN :2;
uint32_t RESERVED2 :4;
uint32_t RATE :2;
uint32_t RESERVED3 :8;
} bits;
uint32_t value;
} max30003_cnfg_ecg_reg;
typedef union
{
struct
{
uint32_t RESERVED0 :8;
uint32_t PTSF :4;
uint32_t PAVG :2;
uint32_t RESERVED1 :1;
uint32_t EN_RTOR :1;
uint32_t GAIN :4;
uint32_t WNDW :4;
uint32_t RESERVED2 :8;
} bits;
uint32_t value;
} max30003_cnfg_rtor_reg;
typedef union
{
struct
{
uint32_t RESERVED0 :8;
uint32_t RHSF :3;
uint32_t RESERVED1 :1;
uint32_t RAVG :2;
uint32_t RESERVED3 :2;
uint32_t HOFF :6;
uint32_t RESERVED4 :2;
uint32_t RESERVED5 :8;
} bits;
uint32_t value;
} max30003_cnfg_rtor2_reg;
typedef union
{
struct
{
uint32_t PTAG :3;
uint32_t ETAG :3;
uint32_t ECG_SAMPLE :18;
uint32_t RESERVED0 :8;
} bits;
uint32_t value;
} max30003_ecg_burst_reg;
typedef union
{
struct
{
uint32_t PTAG :3;
uint32_t ETAG :3;
uint32_t ECG_SAMPLE :18;
uint32_t RESERVED0 :8;
} bits;
uint32_t value;
} max30003_ecg_reg;
typedef union
{
struct
{
uint32_t RESERVED0 :10;
uint32_t RTOR_INTERVAL :14;
uint32_t RESERVED1 :8;
} bits;
uint32_t value;
} max30003_rtor_reg;
#endif /* MAX30003_DEFINE_H_ */