-
Notifications
You must be signed in to change notification settings - Fork 217
/
Copy pathconfig.h
187 lines (173 loc) · 6.96 KB
/
config.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
/*
Authored 2021, Phillip Stanley-Marbell.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above
copyright notice, this list of conditions and the following
disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials
provided with the distribution.
* Neither the name of the author nor the names of its
contributors may be used to endorse or promote products
derived from this software without specific prior written
permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
#define WARP_BUILD_ENABLE_SEGGER_RTT_PRINTF 1
#define WARP_BUILD_BOOT_TO_CSVSTREAM 0
#define WARP_BUILD_BOOT_TO_VLPR 1
#define WARP_BUILD_DISABLE_SUPPLIES_BY_DEFAULT 0
/*
* NOTE: The choice of WARP_BUILD_ENABLE_GLAUX_VARIANT is defined via the Makefile build rules.
* The commented line below should never be uncommented. It is just here to stress a point that
* you shouldn't try to enable the Glaux build in this way.
*/
//#define WARP_BUILD_ENABLE_GLAUX_VARIANT 0
/*
* Define this here to activate FRDMKL03-specific behavior. Unlike the Glaux
* build variant above, we currently require users wanting to build for the
* KL03 to manually set this here.
*/
#define WARP_BUILD_ENABLE_FRDMKL03 0
/*
* Force the required configuration if WARP_BUILD_ENABLE_GLAUX_VARIANT is set
*/
#if (WARP_BUILD_ENABLE_GLAUX_VARIANT)
#define WARP_BUILD_ENABLE_DEVADXL362 0
#define WARP_BUILD_ENABLE_DEVAMG8834 0
#define WARP_BUILD_ENABLE_DEVAS7262 0
#define WARP_BUILD_ENABLE_DEVAS7263 0
#define WARP_BUILD_ENABLE_DEVBGX 0
#define WARP_BUILD_ENABLE_DEVBME680 1
#define WARP_BUILD_ENABLE_DEVBMX055 0
#define WARP_BUILD_ENABLE_DEVCCS811 0
#define WARP_BUILD_ENABLE_DEVHDC1000 0
#define WARP_BUILD_ENABLE_DEVIS25xP 0
#define WARP_BUILD_ENABLE_DEVISL23415 0
#define WARP_BUILD_ENABLE_DEVAT45DB 0
#define WARP_BUILD_ENABLE_DEVICE40 0
#define WARP_BUILD_ENABLE_DEVL3GD20H 0
#define WARP_BUILD_ENABLE_DEVLPS25H 0
#define WARP_BUILD_ENABLE_DEVMAG3110 0
#define WARP_BUILD_ENABLE_DEVMMA8451Q 0
#define WARP_BUILD_ENABLE_DEVRV8803C7 1
#define WARP_BUILD_ENABLE_DEVSI4705 0
#define WARP_BUILD_ENABLE_DEVSI7021 0
#define WARP_BUILD_ENABLE_DEVTCS34725 0
#elif (WARP_BUILD_ENABLE_FRDMKL03)
#define WARP_BUILD_ENABLE_DEVADXL362 0
#define WARP_BUILD_ENABLE_DEVAMG8834 0
#define WARP_BUILD_ENABLE_DEVAS7262 0
#define WARP_BUILD_ENABLE_DEVAS7263 0
#define WARP_BUILD_ENABLE_DEVBGX 0
#define WARP_BUILD_ENABLE_DEVBME680 0
#define WARP_BUILD_ENABLE_DEVBMX055 0
#define WARP_BUILD_ENABLE_DEVCCS811 0
#define WARP_BUILD_ENABLE_DEVHDC1000 0
#define WARP_BUILD_ENABLE_DEVIS25xP 0
#define WARP_BUILD_ENABLE_DEVISL23415 0
#define WARP_BUILD_ENABLE_DEVAT45DB 0
#define WARP_BUILD_ENABLE_DEVICE40 0
#define WARP_BUILD_ENABLE_DEVL3GD20H 0
#define WARP_BUILD_ENABLE_DEVLPS25H 0
#define WARP_BUILD_ENABLE_DEVMAG3110 0
#define WARP_BUILD_ENABLE_DEVMMA8451Q 1
#define WARP_BUILD_ENABLE_DEVRV8803C7 0
#define WARP_BUILD_ENABLE_DEVSI4705 0
#define WARP_BUILD_ENABLE_DEVSI7021 0
#define WARP_BUILD_ENABLE_DEVTCS34725 0
#else
/*
* Otherwise: Edit these to set which code paths are activated in the firmware compilation
*/
#define WARP_BUILD_ENABLE_DEVADXL362 1
#define WARP_BUILD_ENABLE_DEVAMG8834 0
#define WARP_BUILD_ENABLE_DEVAS7262 0
#define WARP_BUILD_ENABLE_DEVAS7263 0
#define WARP_BUILD_ENABLE_DEVBGX 1
#define WARP_BUILD_ENABLE_DEVBME680 0
#define WARP_BUILD_ENABLE_DEVBMX055 0
#define WARP_BUILD_ENABLE_DEVCCS811 0
#define WARP_BUILD_ENABLE_DEVHDC1000 0
#define WARP_BUILD_ENABLE_DEVIS25xP 0
#define WARP_BUILD_ENABLE_DEVISL23415 0
#define WARP_BUILD_ENABLE_DEVAT45DB 1
#define WARP_BUILD_ENABLE_DEVICE40 0
#define WARP_BUILD_ENABLE_DEVL3GD20H 0
#define WARP_BUILD_ENABLE_DEVLPS25H 0
#define WARP_BUILD_ENABLE_DEVMAG3110 0
#define WARP_BUILD_ENABLE_DEVMMA8451Q 0
#define WARP_BUILD_ENABLE_DEVRV8803C7 0
#define WARP_BUILD_ENABLE_DEVSI4705 0
#define WARP_BUILD_ENABLE_DEVSI7021 0
#define WARP_BUILD_ENABLE_DEVTCS34725 0
#endif
typedef enum
{
/*
* Speeds
*/
kWarpDefaultI2cBaudRateKbps = 200,
kWarpDefaultUartBaudRateBps = 115200,
kWarpDefaultSpiBaudRateKbps = 10000,
/*
* Times
*/
kWarpDefaultSleeptimeSeconds = 0,
kWarpDefaultI2cTimeoutMilliseconds = 5,
kWarpDefaultUartTimeoutMilliseconds = 1000,
kWarpDefaultSpiTimeoutMicroseconds = 5,
kWarpDefaultMenuPrintDelayMilliseconds = 10,
kWarpDefaultSupplySettlingDelayMilliseconds = 1,
/*
* Sizes
*/
kWarpDefaultPrintBufferSizeBytes = 64,
kWarpMemoryCommonSpiBufferBytes = 64,
kWarpSizesI2cBufferBytes = 4,
kWarpSizesSpiBufferBytes = 7,
kWarpSizesUartBufferBytes = 8,
kWarpSizesBME680CalibrationValuesCount = 41,
/*
* Voltages
*/
kWarpDefaultSupplyVoltageMillivolts = 1800,
kWarpDefaultSupplyVoltageMillivoltsBGX = 3300,
kWarpDefaultSupplyVoltageMillivoltsBMX055accel = 1800,
kWarpDefaultSupplyVoltageMillivoltsBMX055gyro = 1800,
kWarpDefaultSupplyVoltageMillivoltsBMX055mag = 1800,
kWarpDefaultSupplyVoltageMillivoltsMMA8451Q = 1800,
kWarpDefaultSupplyVoltageMillivoltsLPS25H = 1800,
kWarpDefaultSupplyVoltageMillivoltsHDC1000 = 1800,
kWarpDefaultSupplyVoltageMillivoltsMAG3110 = 1800,
kWarpDefaultSupplyVoltageMillivoltsSI7021 = 1800,
kWarpDefaultSupplyVoltageMillivoltsL3GD20H = 1800,
kWarpDefaultSupplyVoltageMillivoltsBME680 = 1800,
kWarpDefaultSupplyVoltageMillivoltsTCS34725 = 1800,
kWarpDefaultSupplyVoltageMillivoltsSI4705 = 1800,
kWarpDefaultSupplyVoltageMillivoltsCCS811 = 1800,
kWarpDefaultSupplyVoltageMillivoltsAMG8834 = 1800,
kWarpDefaultSupplyVoltageMillivoltsAS7262 = 1800,
kWarpDefaultSupplyVoltageMillivoltsAS7263 = 1800,
kWarpDefaultSupplyVoltageMillivoltsRV8803C7 = 1800,
kWarpDefaultSupplyVoltageMillivoltsADXL362 = 2400,
kWarpDefaultSupplyVoltageMillivoltsIS25xP = 1800,
kWarpDefaultSupplyVoltageMillivoltsISL23415 = 1800,
kWarpDefaultSupplyVoltageMillivoltsAT45DB = 1800,
kWarpDefaultSupplyVoltageMillivoltsICE40 = 1800,
} WarpDefaults;