-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathICM-42605.c
120 lines (115 loc) · 3.94 KB
/
ICM-42605.c
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
#include "ICM-42605.h"
/*
* cat reg | sed 's/,//g' | sed 's/ //' | sed -re 's/(^\w*)/[\1]/' | sed 's/$/ = "",/'
*/
const char* ICM_42605_REG_NAME_BANK0[128] = {
[DEVICE_CONFIG] = "DEVICE_CONFIG",
[DRIVE_CONFIG] = "DRIVE_CONFIG",
[INT_CONFIG] = "INT_CONFIG",
[FIFO_CONFIG] = "FIFO_CONFIG",
[TEMP_DATA1] = "TEMP_DATA1",
[TEMP_DATA0] = "TEMP_DATA0",
[ACCEL_DATA_X1] = "ACCEL_DATA_X1",
[ACCEL_DATA_X0] = "ACCEL_DATA_X0",
[ACCEL_DATA_Y1] = "ACCEL_DATA_Y1",
[ACCEL_DATA_Y0] = "ACCEL_DATA_Y0",
[ACCEL_DATA_Z1] = "ACCEL_DATA_Z1",
[ACCEL_DATA_Z0] = "ACCEL_DATA_Z0",
[GYRO_DATA_X1] = "GYRO_DATA_X1",
[GYRO_DATA_X0] = "GYRO_DATA_X0",
[GYRO_DATA_Y1] = "GYRO_DATA_Y1",
[GYRO_DATA_Y0] = "GYRO_DATA_Y0",
[GYRO_DATA_Z1] = "GYRO_DATA_Z1",
[GYRO_DATA_Z0] = "GYRO_DATA_Z0",
[INT_STATUS] = "INT_STATUS",
[FIFO_COUNTH] = "FIFO_COUNTH",
[FIFO_COUNTL] = "FIFO_COUNTL",
[FIFO_DATA] = "FIFO_DATA",
[APEX_DATA0] = "APEX_DATA0",
[APEX_DATA1] = "APEX_DATA1",
[APEX_DATA2] = "APEX_DATA2",
[APEX_DATA3] = "APEX_DATA3",
[APEX_DATA4] = "APEX_DATA4",
[APEX_DATA5] = "APEX_DATA5",
[INT_STATUS2] = "INT_STATUS2",
[INT_STATUS3] = "INT_STATUS3",
[SIGNAL_PATH_RESET] = "SIGNAL_PATH_RESET",
[INTF_CONFIG0] = "INTF_CONFIG0",
[INTF_CONFIG1] = "INTF_CONFIG1",
[PWR_MGMT0] = "PWR_MGMT0",
[GYRO_CONFIG0] = "GYRO_CONFIG0",
[ACCEL_CONFIG0] = "ACCEL_CONFIG0",
[GYRO_CONFIG1] = "GYRO_CONFIG1",
[GYRO_ACCEL_CONFIG0] = "GYRO_ACCEL_CONFIG0",
[ACCEL_CONFIG1] = "ACCEL_CONFIG1",
[TMST_CONFIG] = "TMST_CONFIG",
[APEX_CONFIG0] = "APEX_CONFIG0",
[SMD_CONFIG] = "SMD_CONFIG",
[FIFO_CONFIG1] = "FIFO_CONFIG1",
[FIFO_CONFIG2] = "FIFO_CONFIG2",
[FIFO_CONFIG3] = "FIFO_CONFIG3",
[INT_CONFIG0] = "INT_CONFIG0",
[INT_CONFIG1] = "INT_CONFIG1",
[INT_SOURCE0] = "INT_SOURCE0",
[INT_SOURCE1] = "INT_SOURCE1",
[INT_SOURCE3] = "INT_SOURCE3",
[INT_SOURCE4] = "INT_SOURCE4",
[FIFO_LOST_PKT0] = "FIFO_LOST_PKT0",
[FIFO_LOST_PKT1] = "FIFO_LOST_PKT1",
[SELF_TEST_CONFIG] = "SELF_TEST_CONFIG",
[WHO_AM_I] = "WHO_AM_I",
[REG_BANK_SEL] = "REG_BANK_SEL"
};
const char* ICM_42605_REG_NAME_BANK1[128] = {
[SENSOR_CONFIG0] = "SENSOR_CONFIG0",
[GYRO_CONFIG_STATIC2] = "GYRO_CONFIG_STATIC2",
[GYRO_CONFIG_STATIC3] = "GYRO_CONFIG_STATIC3",
[GYRO_CONFIG_STATIC4] = "GYRO_CONFIG_STATIC4",
[GYRO_CONFIG_STATIC5] = "GYRO_CONFIG_STATIC5",
[GYRO_CONFIG_STATIC6] = "GYRO_CONFIG_STATIC6",
[GYRO_CONFIG_STATIC7] = "GYRO_CONFIG_STATIC7",
[GYRO_CONFIG_STATIC8] = "GYRO_CONFIG_STATIC8",
[GYRO_CONFIG_STATIC9] = "GYRO_CONFIG_STATIC9",
[GYRO_CONFIG_STATIC10] = "GYRO_CONFIG_STATIC10",
[XG_ST_DATA] = "XG_ST_DATA",
[YG_ST_DATA] = "YG_ST_DATA",
[ZG_ST_DATA] = "ZG_ST_DATA",
[TMSTVAL0] = "TMSTVAL0",
[TMSTVAL1] = "TMSTVAL1",
[TMSTVAL2] = "TMSTVAL2",
[INTF_CONFIG4] = "INTF_CONFIG4",
[INTF_CONFIG5] = "INTF_CONFIG5"
};
const char* ICM_42605_REG_NAME_BANK2[128] = {
[ACCEL_CONFIG_STATIC2] = "ACCEL_CONFIG_STATIC2",
[ACCEL_CONFIG_STATIC3] = "ACCEL_CONFIG_STATIC3",
[ACCEL_CONFIG_STATIC4] = "ACCEL_CONFIG_STATIC4",
[XA_ST_DATA] = "XA_ST_DATA",
[YA_ST_DATA] = "YA_ST_DATA",
[ZA_ST_DATA] = "ZA_ST_DATA"
};
const char* ICM_42605_REG_NAME_BANK4[128] = {
[APEX_CONFIG1] = "APEX_CONFIG1",
[APEX_CONFIG2] = "APEX_CONFIG2",
[APEX_CONFIG3] = "APEX_CONFIG3",
[APEX_CONFIG4] = "APEX_CONFIG4",
[APEX_CONFIG5] = "APEX_CONFIG5",
[APEX_CONFIG6] = "APEX_CONFIG6",
[APEX_CONFIG7] = "APEX_CONFIG7",
[APEX_CONFIG8] = "APEX_CONFIG8",
[APEX_CONFIG9] = "APEX_CONFIG9",
[ACCEL_WOM_X_THR] = "ACCEL_WOM_X_THR",
[ACCEL_WOM_Y_THR] = "ACCEL_WOM_Y_THR",
[ACCEL_WOM_Z_THR] = "ACCEL_WOM_Z_THR",
[INT_SOURCE6] = "INT_SOURCE6",
[INT_SOURCE7] = "INT_SOURCE7",
[OFFSET_USER0] = "OFFSET_USER0",
[OFFSET_USER1] = "OFFSET_USER1",
[OFFSET_USER2] = "OFFSET_USER2",
[OFFSET_USER3] = "OFFSET_USER3",
[OFFSET_USER4] = "OFFSET_USER4",
[OFFSET_USER5] = "OFFSET_USER5",
[OFFSET_USER6] = "OFFSET_USER6",
[OFFSET_USER7] = "OFFSET_USER7",
[OFFSET_USER8] = "OFFSET_USER8"
};