diff options
Diffstat (limited to 'lib/chibios-contrib/testhal/NUMICRO/NUC123/NUTINY-SDK-NUC123-V2.0/SERIAL/cfg/halconf.h')
-rw-r--r-- | lib/chibios-contrib/testhal/NUMICRO/NUC123/NUTINY-SDK-NUC123-V2.0/SERIAL/cfg/halconf.h | 534 |
1 files changed, 534 insertions, 0 deletions
diff --git a/lib/chibios-contrib/testhal/NUMICRO/NUC123/NUTINY-SDK-NUC123-V2.0/SERIAL/cfg/halconf.h b/lib/chibios-contrib/testhal/NUMICRO/NUC123/NUTINY-SDK-NUC123-V2.0/SERIAL/cfg/halconf.h new file mode 100644 index 000000000..fd5c50cf8 --- /dev/null +++ b/lib/chibios-contrib/testhal/NUMICRO/NUC123/NUTINY-SDK-NUC123-V2.0/SERIAL/cfg/halconf.h | |||
@@ -0,0 +1,534 @@ | |||
1 | /* | ||
2 | ChibiOS - Copyright (C) 2020 Alex Lewontin | ||
3 | |||
4 | Licensed under the Apache License, Version 2.0 (the "License"); | ||
5 | you may not use this file except in compliance with the License. | ||
6 | You may obtain a copy of the License at | ||
7 | |||
8 | http://www.apache.org/licenses/LICENSE-2.0 | ||
9 | |||
10 | Unless required by applicable law or agreed to in writing, software | ||
11 | distributed under the License is distributed on an "AS IS" BASIS, | ||
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
13 | See the License for the specific language governing permissions and | ||
14 | limitations under the License. | ||
15 | */ | ||
16 | |||
17 | /** | ||
18 | * @file templates/halconf.h | ||
19 | * @brief HAL configuration header. | ||
20 | * @details HAL configuration file, this file allows to enable or disable the | ||
21 | * various device drivers from your application. You may also use | ||
22 | * this file in order to override the device drivers default settings. | ||
23 | * | ||
24 | * @addtogroup HAL_CONF | ||
25 | * @{ | ||
26 | */ | ||
27 | |||
28 | #ifndef HALCONF_H | ||
29 | #define HALCONF_H | ||
30 | |||
31 | #define _CHIBIOS_HAL_CONF_ | ||
32 | #define _CHIBIOS_HAL_CONF_VER_7_1_ | ||
33 | |||
34 | #include "mcuconf.h" | ||
35 | |||
36 | #define PAL_USE_CALLBACKS TRUE | ||
37 | #define PAL_USE_WAIT TRUE | ||
38 | |||
39 | /** | ||
40 | * @brief Enables the PAL subsystem. | ||
41 | */ | ||
42 | #if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) | ||
43 | #define HAL_USE_PAL FALSE | ||
44 | #endif | ||
45 | |||
46 | /** | ||
47 | * @brief Enables the ADC subsystem. | ||
48 | */ | ||
49 | #if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) | ||
50 | #define HAL_USE_ADC FALSE | ||
51 | #endif | ||
52 | |||
53 | /** | ||
54 | * @brief Enables the CAN subsystem. | ||
55 | */ | ||
56 | #if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) | ||
57 | #define HAL_USE_CAN FALSE | ||
58 | #endif | ||
59 | |||
60 | /** | ||
61 | * @brief Enables the cryptographic subsystem. | ||
62 | */ | ||
63 | #if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) | ||
64 | #define HAL_USE_CRY FALSE | ||
65 | #endif | ||
66 | |||
67 | /** | ||
68 | * @brief Enables the DAC subsystem. | ||
69 | */ | ||
70 | #if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) | ||
71 | #define HAL_USE_DAC FALSE | ||
72 | #endif | ||
73 | |||
74 | /** | ||
75 | * @brief Enables the EFlash subsystem. | ||
76 | */ | ||
77 | #if !defined(HAL_USE_EFL) || defined(__DOXYGEN__) | ||
78 | #define HAL_USE_EFL FALSE | ||
79 | #endif | ||
80 | |||
81 | /** | ||
82 | * @brief Enables the GPT subsystem. | ||
83 | */ | ||
84 | #if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) | ||
85 | #define HAL_USE_GPT FALSE | ||
86 | #endif | ||
87 | |||
88 | /** | ||
89 | * @brief Enables the I2C subsystem. | ||
90 | */ | ||
91 | #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) | ||
92 | #define HAL_USE_I2C FALSE | ||
93 | #endif | ||
94 | |||
95 | /** | ||
96 | * @brief Enables the I2S subsystem. | ||
97 | */ | ||
98 | #if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) | ||
99 | #define HAL_USE_I2S FALSE | ||
100 | #endif | ||
101 | |||
102 | /** | ||
103 | * @brief Enables the ICU subsystem. | ||
104 | */ | ||
105 | #if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) | ||
106 | #define HAL_USE_ICU FALSE | ||
107 | #endif | ||
108 | |||
109 | /** | ||
110 | * @brief Enables the MAC subsystem. | ||
111 | */ | ||
112 | #if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) | ||
113 | #define HAL_USE_MAC FALSE | ||
114 | #endif | ||
115 | |||
116 | /** | ||
117 | * @brief Enables the MMC_SPI subsystem. | ||
118 | */ | ||
119 | #if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) | ||
120 | #define HAL_USE_MMC_SPI FALSE | ||
121 | #endif | ||
122 | |||
123 | /** | ||
124 | * @brief Enables the PWM subsystem. | ||
125 | */ | ||
126 | #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) | ||
127 | #define HAL_USE_PWM FALSE | ||
128 | #endif | ||
129 | |||
130 | /** | ||
131 | * @brief Enables the RTC subsystem. | ||
132 | */ | ||
133 | #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) | ||
134 | #define HAL_USE_RTC FALSE | ||
135 | #endif | ||
136 | |||
137 | /** | ||
138 | * @brief Enables the SDC subsystem. | ||
139 | */ | ||
140 | #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) | ||
141 | #define HAL_USE_SDC FALSE | ||
142 | #endif | ||
143 | |||
144 | /** | ||
145 | * @brief Enables the SERIAL subsystem. | ||
146 | */ | ||
147 | #if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) | ||
148 | #define HAL_USE_SERIAL TRUE | ||
149 | #endif | ||
150 | |||
151 | /** | ||
152 | * @brief Enables the SERIAL over USB subsystem. | ||
153 | */ | ||
154 | #if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) | ||
155 | #define HAL_USE_SERIAL_USB FALSE | ||
156 | #endif | ||
157 | |||
158 | /** | ||
159 | * @brief Enables the SIO subsystem. | ||
160 | */ | ||
161 | #if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) | ||
162 | #define HAL_USE_SIO FALSE | ||
163 | #endif | ||
164 | |||
165 | /** | ||
166 | * @brief Enables the SPI subsystem. | ||
167 | */ | ||
168 | #if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) | ||
169 | #define HAL_USE_SPI FALSE | ||
170 | #endif | ||
171 | |||
172 | /** | ||
173 | * @brief Enables the TRNG subsystem. | ||
174 | */ | ||
175 | #if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) | ||
176 | #define HAL_USE_TRNG FALSE | ||
177 | #endif | ||
178 | |||
179 | /** | ||
180 | * @brief Enables the UART subsystem. | ||
181 | */ | ||
182 | #if !defined(HAL_USE_UART) || defined(__DOXYGEN__) | ||
183 | #define HAL_USE_UART FALSE | ||
184 | #endif | ||
185 | |||
186 | /** | ||
187 | * @brief Enables the USB subsystem. | ||
188 | */ | ||
189 | #if !defined(HAL_USE_USB) || defined(__DOXYGEN__) | ||
190 | #define HAL_USE_USB FALSE | ||
191 | #endif | ||
192 | |||
193 | /** | ||
194 | * @brief Enables the WDG subsystem. | ||
195 | */ | ||
196 | #if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) | ||
197 | #define HAL_USE_WDG FALSE | ||
198 | #endif | ||
199 | |||
200 | /** | ||
201 | * @brief Enables the WSPI subsystem. | ||
202 | */ | ||
203 | #if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) | ||
204 | #define HAL_USE_WSPI FALSE | ||
205 | #endif | ||
206 | |||
207 | /*===========================================================================*/ | ||
208 | /* PAL driver related settings. */ | ||
209 | /*===========================================================================*/ | ||
210 | |||
211 | /** | ||
212 | * @brief Enables synchronous APIs. | ||
213 | * @note Disabling this option saves both code and data space. | ||
214 | */ | ||
215 | #if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) | ||
216 | #define PAL_USE_CALLBACKS FALSE | ||
217 | #endif | ||
218 | |||
219 | /** | ||
220 | * @brief Enables synchronous APIs. | ||
221 | * @note Disabling this option saves both code and data space. | ||
222 | */ | ||
223 | #if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) | ||
224 | #define PAL_USE_WAIT FALSE | ||
225 | #endif | ||
226 | |||
227 | /*===========================================================================*/ | ||
228 | /* ADC driver related settings. */ | ||
229 | /*===========================================================================*/ | ||
230 | |||
231 | /** | ||
232 | * @brief Enables synchronous APIs. | ||
233 | * @note Disabling this option saves both code and data space. | ||
234 | */ | ||
235 | #if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) | ||
236 | #define ADC_USE_WAIT TRUE | ||
237 | #endif | ||
238 | |||
239 | /** | ||
240 | * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. | ||
241 | * @note Disabling this option saves both code and data space. | ||
242 | */ | ||
243 | #if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) | ||
244 | #define ADC_USE_MUTUAL_EXCLUSION TRUE | ||
245 | #endif | ||
246 | |||
247 | /*===========================================================================*/ | ||
248 | /* CAN driver related settings. */ | ||
249 | /*===========================================================================*/ | ||
250 | |||
251 | /** | ||
252 | * @brief Sleep mode related APIs inclusion switch. | ||
253 | */ | ||
254 | #if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) | ||
255 | #define CAN_USE_SLEEP_MODE TRUE | ||
256 | #endif | ||
257 | |||
258 | /** | ||
259 | * @brief Enforces the driver to use direct callbacks rather than OSAL events. | ||
260 | */ | ||
261 | #if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) | ||
262 | #define CAN_ENFORCE_USE_CALLBACKS FALSE | ||
263 | #endif | ||
264 | |||
265 | /*===========================================================================*/ | ||
266 | /* CRY driver related settings. */ | ||
267 | /*===========================================================================*/ | ||
268 | |||
269 | /** | ||
270 | * @brief Enables the SW fall-back of the cryptographic driver. | ||
271 | * @details When enabled, this option, activates a fall-back software | ||
272 | * implementation for algorithms not supported by the underlying | ||
273 | * hardware. | ||
274 | * @note Fall-back implementations may not be present for all algorithms. | ||
275 | */ | ||
276 | #if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) | ||
277 | #define HAL_CRY_USE_FALLBACK FALSE | ||
278 | #endif | ||
279 | |||
280 | /** | ||
281 | * @brief Makes the driver forcibly use the fall-back implementations. | ||
282 | */ | ||
283 | #if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) | ||
284 | #define HAL_CRY_ENFORCE_FALLBACK FALSE | ||
285 | #endif | ||
286 | |||
287 | /*===========================================================================*/ | ||
288 | /* DAC driver related settings. */ | ||
289 | /*===========================================================================*/ | ||
290 | |||
291 | /** | ||
292 | * @brief Enables synchronous APIs. | ||
293 | * @note Disabling this option saves both code and data space. | ||
294 | */ | ||
295 | #if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) | ||
296 | #define DAC_USE_WAIT TRUE | ||
297 | #endif | ||
298 | |||
299 | /** | ||
300 | * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. | ||
301 | * @note Disabling this option saves both code and data space. | ||
302 | */ | ||
303 | #if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) | ||
304 | #define DAC_USE_MUTUAL_EXCLUSION TRUE | ||
305 | #endif | ||
306 | |||
307 | /*===========================================================================*/ | ||
308 | /* I2C driver related settings. */ | ||
309 | /*===========================================================================*/ | ||
310 | |||
311 | /** | ||
312 | * @brief Enables the mutual exclusion APIs on the I2C bus. | ||
313 | */ | ||
314 | #if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) | ||
315 | #define I2C_USE_MUTUAL_EXCLUSION TRUE | ||
316 | #endif | ||
317 | |||
318 | /*===========================================================================*/ | ||
319 | /* MAC driver related settings. */ | ||
320 | /*===========================================================================*/ | ||
321 | |||
322 | /** | ||
323 | * @brief Enables the zero-copy API. | ||
324 | */ | ||
325 | #if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) | ||
326 | #define MAC_USE_ZERO_COPY FALSE | ||
327 | #endif | ||
328 | |||
329 | /** | ||
330 | * @brief Enables an event sources for incoming packets. | ||
331 | */ | ||
332 | #if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) | ||
333 | #define MAC_USE_EVENTS TRUE | ||
334 | #endif | ||
335 | |||
336 | /*===========================================================================*/ | ||
337 | /* MMC_SPI driver related settings. */ | ||
338 | /*===========================================================================*/ | ||
339 | |||
340 | /** | ||
341 | * @brief Delays insertions. | ||
342 | * @details If enabled this options inserts delays into the MMC waiting | ||
343 | * routines releasing some extra CPU time for the threads with | ||
344 | * lower priority, this may slow down the driver a bit however. | ||
345 | * This option is recommended also if the SPI driver does not | ||
346 | * use a DMA channel and heavily loads the CPU. | ||
347 | */ | ||
348 | #if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) | ||
349 | #define MMC_NICE_WAITING TRUE | ||
350 | #endif | ||
351 | |||
352 | /*===========================================================================*/ | ||
353 | /* SDC driver related settings. */ | ||
354 | /*===========================================================================*/ | ||
355 | |||
356 | /** | ||
357 | * @brief Number of initialization attempts before rejecting the card. | ||
358 | * @note Attempts are performed at 10mS intervals. | ||
359 | */ | ||
360 | #if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) | ||
361 | #define SDC_INIT_RETRY 100 | ||
362 | #endif | ||
363 | |||
364 | /** | ||
365 | * @brief Include support for MMC cards. | ||
366 | * @note MMC support is not yet implemented so this option must be kept | ||
367 | * at @p FALSE. | ||
368 | */ | ||
369 | #if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) | ||
370 | #define SDC_MMC_SUPPORT FALSE | ||
371 | #endif | ||
372 | |||
373 | /** | ||
374 | * @brief Delays insertions. | ||
375 | * @details If enabled this options inserts delays into the MMC waiting | ||
376 | * routines releasing some extra CPU time for the threads with | ||
377 | * lower priority, this may slow down the driver a bit however. | ||
378 | */ | ||
379 | #if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) | ||
380 | #define SDC_NICE_WAITING TRUE | ||
381 | #endif | ||
382 | |||
383 | /** | ||
384 | * @brief OCR initialization constant for V20 cards. | ||
385 | */ | ||
386 | #if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) | ||
387 | #define SDC_INIT_OCR_V20 0x50FF8000U | ||
388 | #endif | ||
389 | |||
390 | /** | ||
391 | * @brief OCR initialization constant for non-V20 cards. | ||
392 | */ | ||
393 | #if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) | ||
394 | #define SDC_INIT_OCR 0x80100000U | ||
395 | #endif | ||
396 | |||
397 | /*===========================================================================*/ | ||
398 | /* SERIAL driver related settings. */ | ||
399 | /*===========================================================================*/ | ||
400 | |||
401 | /** | ||
402 | * @brief Default bit rate. | ||
403 | * @details Configuration parameter, this is the baud rate selected for the | ||
404 | * default configuration. | ||
405 | */ | ||
406 | #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) | ||
407 | #define SERIAL_DEFAULT_BITRATE 38400 | ||
408 | #endif | ||
409 | |||
410 | /** | ||
411 | * @brief Serial buffers size. | ||
412 | * @details Configuration parameter, you can change the depth of the queue | ||
413 | * buffers depending on the requirements of your application. | ||
414 | * @note The default is 16 bytes for both the transmission and receive | ||
415 | * buffers. | ||
416 | */ | ||
417 | #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) | ||
418 | #define SERIAL_BUFFERS_SIZE 32 | ||
419 | #endif | ||
420 | |||
421 | /*===========================================================================*/ | ||
422 | /* SERIAL_USB driver related setting. */ | ||
423 | /*===========================================================================*/ | ||
424 | |||
425 | /** | ||
426 | * @brief Serial over USB buffers size. | ||
427 | * @details Configuration parameter, the buffer size must be a multiple of | ||
428 | * the USB data endpoint maximum packet size. | ||
429 | * @note The default is 256 bytes for both the transmission and receive | ||
430 | * buffers. | ||
431 | */ | ||
432 | #if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) | ||
433 | #define SERIAL_USB_BUFFERS_SIZE 256 | ||
434 | #endif | ||
435 | |||
436 | /** | ||
437 | * @brief Serial over USB number of buffers. | ||
438 | * @note The default is 2 buffers. | ||
439 | */ | ||
440 | #if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) | ||
441 | #define SERIAL_USB_BUFFERS_NUMBER 2 | ||
442 | #endif | ||
443 | |||
444 | /*===========================================================================*/ | ||
445 | /* SPI driver related settings. */ | ||
446 | /*===========================================================================*/ | ||
447 | |||
448 | /** | ||
449 | * @brief Enables synchronous APIs. | ||
450 | * @note Disabling this option saves both code and data space. | ||
451 | */ | ||
452 | #if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) | ||
453 | #define SPI_USE_WAIT TRUE | ||
454 | #endif | ||
455 | |||
456 | /** | ||
457 | * @brief Enables circular transfers APIs. | ||
458 | * @note Disabling this option saves both code and data space. | ||
459 | */ | ||
460 | #if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) | ||
461 | #define SPI_USE_CIRCULAR FALSE | ||
462 | #endif | ||
463 | |||
464 | /** | ||
465 | * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. | ||
466 | * @note Disabling this option saves both code and data space. | ||
467 | */ | ||
468 | #if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) | ||
469 | #define SPI_USE_MUTUAL_EXCLUSION TRUE | ||
470 | #endif | ||
471 | |||
472 | /** | ||
473 | * @brief Handling method for SPI CS line. | ||
474 | * @note Disabling this option saves both code and data space. | ||
475 | */ | ||
476 | #if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) | ||
477 | #define SPI_SELECT_MODE SPI_SELECT_MODE_PAD | ||
478 | #endif | ||
479 | |||
480 | /*===========================================================================*/ | ||
481 | /* UART driver related settings. */ | ||
482 | /*===========================================================================*/ | ||
483 | |||
484 | /** | ||
485 | * @brief Enables synchronous APIs. | ||
486 | * @note Disabling this option saves both code and data space. | ||
487 | */ | ||
488 | #if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) | ||
489 | #define UART_USE_WAIT FALSE | ||
490 | #endif | ||
491 | |||
492 | /** | ||
493 | * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. | ||
494 | * @note Disabling this option saves both code and data space. | ||
495 | */ | ||
496 | #if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) | ||
497 | #define UART_USE_MUTUAL_EXCLUSION FALSE | ||
498 | #endif | ||
499 | |||
500 | /*===========================================================================*/ | ||
501 | /* USB driver related settings. */ | ||
502 | /*===========================================================================*/ | ||
503 | |||
504 | /** | ||
505 | * @brief Enables synchronous APIs. | ||
506 | * @note Disabling this option saves both code and data space. | ||
507 | */ | ||
508 | #if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) | ||
509 | #define USB_USE_WAIT FALSE | ||
510 | #endif | ||
511 | |||
512 | /*===========================================================================*/ | ||
513 | /* WSPI driver related settings. */ | ||
514 | /*===========================================================================*/ | ||
515 | |||
516 | /** | ||
517 | * @brief Enables synchronous APIs. | ||
518 | * @note Disabling this option saves both code and data space. | ||
519 | */ | ||
520 | #if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) | ||
521 | #define WSPI_USE_WAIT TRUE | ||
522 | #endif | ||
523 | |||
524 | /** | ||
525 | * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. | ||
526 | * @note Disabling this option saves both code and data space. | ||
527 | */ | ||
528 | #if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) | ||
529 | #define WSPI_USE_MUTUAL_EXCLUSION TRUE | ||
530 | #endif | ||
531 | |||
532 | #endif /* HALCONF_H */ | ||
533 | |||
534 | /** @} */ | ||