STM32WB: Add PAL test
@@ -0,0 +1,818 @@ | ||
1 | +/* | |
2 | + ChibiOS - Copyright (C) 2006..2020 Giovanni Di Sirio | |
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 rt/templates/chconf.h | |
19 | + * @brief Configuration file template. | |
20 | + * @details A copy of this file must be placed in each project directory, it | |
21 | + * contains the application specific kernel settings. | |
22 | + * | |
23 | + * @addtogroup config | |
24 | + * @details Kernel related settings and hooks. | |
25 | + * @{ | |
26 | + */ | |
27 | + | |
28 | +#ifndef CHCONF_H | |
29 | +#define CHCONF_H | |
30 | + | |
31 | +#define _CHIBIOS_RT_CONF_ | |
32 | +#define _CHIBIOS_RT_CONF_VER_7_0_ | |
33 | + | |
34 | +/*===========================================================================*/ | |
35 | +/** | |
36 | + * @name System settings | |
37 | + * @{ | |
38 | + */ | |
39 | +/*===========================================================================*/ | |
40 | + | |
41 | +/** | |
42 | + * @brief Handling of instances. | |
43 | + * @note If enabled then threads assigned to various instances can | |
44 | + * interact each other using the same synchronization objects. | |
45 | + * If disabled then each OS instance is a separate world, no | |
46 | + * direct interactions are handled by the OS. | |
47 | + */ | |
48 | +#if !defined(CH_CFG_SMP_MODE) | |
49 | +#define CH_CFG_SMP_MODE FALSE | |
50 | +#endif | |
51 | + | |
52 | +/** @} */ | |
53 | + | |
54 | +/*===========================================================================*/ | |
55 | +/** | |
56 | + * @name System timers settings | |
57 | + * @{ | |
58 | + */ | |
59 | +/*===========================================================================*/ | |
60 | + | |
61 | +/** | |
62 | + * @brief System time counter resolution. | |
63 | + * @note Allowed values are 16, 32 or 64 bits. | |
64 | + */ | |
65 | +#if !defined(CH_CFG_ST_RESOLUTION) | |
66 | +#define CH_CFG_ST_RESOLUTION 32 | |
67 | +#endif | |
68 | + | |
69 | +/** | |
70 | + * @brief System tick frequency. | |
71 | + * @details Frequency of the system timer that drives the system ticks. This | |
72 | + * setting also defines the system tick time unit. | |
73 | + */ | |
74 | +#if !defined(CH_CFG_ST_FREQUENCY) | |
75 | +#define CH_CFG_ST_FREQUENCY 10000 | |
76 | +#endif | |
77 | + | |
78 | +/** | |
79 | + * @brief Time intervals data size. | |
80 | + * @note Allowed values are 16, 32 or 64 bits. | |
81 | + */ | |
82 | +#if !defined(CH_CFG_INTERVALS_SIZE) | |
83 | +#define CH_CFG_INTERVALS_SIZE 32 | |
84 | +#endif | |
85 | + | |
86 | +/** | |
87 | + * @brief Time types data size. | |
88 | + * @note Allowed values are 16 or 32 bits. | |
89 | + */ | |
90 | +#if !defined(CH_CFG_TIME_TYPES_SIZE) | |
91 | +#define CH_CFG_TIME_TYPES_SIZE 32 | |
92 | +#endif | |
93 | + | |
94 | +/** | |
95 | + * @brief Time delta constant for the tick-less mode. | |
96 | + * @note If this value is zero then the system uses the classic | |
97 | + * periodic tick. This value represents the minimum number | |
98 | + * of ticks that is safe to specify in a timeout directive. | |
99 | + * The value one is not valid, timeouts are rounded up to | |
100 | + * this value. | |
101 | + */ | |
102 | +#if !defined(CH_CFG_ST_TIMEDELTA) | |
103 | +#define CH_CFG_ST_TIMEDELTA 2 | |
104 | +#endif | |
105 | + | |
106 | +/** @} */ | |
107 | + | |
108 | +/*===========================================================================*/ | |
109 | +/** | |
110 | + * @name Kernel parameters and options | |
111 | + * @{ | |
112 | + */ | |
113 | +/*===========================================================================*/ | |
114 | + | |
115 | +/** | |
116 | + * @brief Round robin interval. | |
117 | + * @details This constant is the number of system ticks allowed for the | |
118 | + * threads before preemption occurs. Setting this value to zero | |
119 | + * disables the preemption for threads with equal priority and the | |
120 | + * round robin becomes cooperative. Note that higher priority | |
121 | + * threads can still preempt, the kernel is always preemptive. | |
122 | + * @note Disabling the round robin preemption makes the kernel more compact | |
123 | + * and generally faster. | |
124 | + * @note The round robin preemption is not supported in tickless mode and | |
125 | + * must be set to zero in that case. | |
126 | + */ | |
127 | +#if !defined(CH_CFG_TIME_QUANTUM) | |
128 | +#define CH_CFG_TIME_QUANTUM 0 | |
129 | +#endif | |
130 | + | |
131 | +/** | |
132 | + * @brief Idle thread automatic spawn suppression. | |
133 | + * @details When this option is activated the function @p chSysInit() | |
134 | + * does not spawn the idle thread. The application @p main() | |
135 | + * function becomes the idle thread and must implement an | |
136 | + * infinite loop. | |
137 | + */ | |
138 | +#if !defined(CH_CFG_NO_IDLE_THREAD) | |
139 | +#define CH_CFG_NO_IDLE_THREAD FALSE | |
140 | +#endif | |
141 | + | |
142 | +/** @} */ | |
143 | + | |
144 | +/*===========================================================================*/ | |
145 | +/** | |
146 | + * @name Performance options | |
147 | + * @{ | |
148 | + */ | |
149 | +/*===========================================================================*/ | |
150 | + | |
151 | +/** | |
152 | + * @brief OS optimization. | |
153 | + * @details If enabled then time efficient rather than space efficient code | |
154 | + * is used when two possible implementations exist. | |
155 | + * | |
156 | + * @note This is not related to the compiler optimization options. | |
157 | + * @note The default is @p TRUE. | |
158 | + */ | |
159 | +#if !defined(CH_CFG_OPTIMIZE_SPEED) | |
160 | +#define CH_CFG_OPTIMIZE_SPEED FALSE | |
161 | +#endif | |
162 | + | |
163 | +/** @} */ | |
164 | + | |
165 | +/*===========================================================================*/ | |
166 | +/** | |
167 | + * @name Subsystem options | |
168 | + * @{ | |
169 | + */ | |
170 | +/*===========================================================================*/ | |
171 | + | |
172 | +/** | |
173 | + * @brief Time Measurement APIs. | |
174 | + * @details If enabled then the time measurement APIs are included in | |
175 | + * the kernel. | |
176 | + * | |
177 | + * @note The default is @p TRUE. | |
178 | + */ | |
179 | +#if !defined(CH_CFG_USE_TM) | |
180 | +#define CH_CFG_USE_TM TRUE | |
181 | +#endif | |
182 | + | |
183 | +/** | |
184 | + * @brief Time Stamps APIs. | |
185 | + * @details If enabled then the time time stamps APIs are included in | |
186 | + * the kernel. | |
187 | + * | |
188 | + * @note The default is @p TRUE. | |
189 | + */ | |
190 | +#if !defined(CH_CFG_USE_TIMESTAMP) | |
191 | +#define CH_CFG_USE_TIMESTAMP TRUE | |
192 | +#endif | |
193 | + | |
194 | +/** | |
195 | + * @brief Threads registry APIs. | |
196 | + * @details If enabled then the registry APIs are included in the kernel. | |
197 | + * | |
198 | + * @note The default is @p TRUE. | |
199 | + */ | |
200 | +#if !defined(CH_CFG_USE_REGISTRY) | |
201 | +#define CH_CFG_USE_REGISTRY TRUE | |
202 | +#endif | |
203 | + | |
204 | +/** | |
205 | + * @brief Threads synchronization APIs. | |
206 | + * @details If enabled then the @p chThdWait() function is included in | |
207 | + * the kernel. | |
208 | + * | |
209 | + * @note The default is @p TRUE. | |
210 | + */ | |
211 | +#if !defined(CH_CFG_USE_WAITEXIT) | |
212 | +#define CH_CFG_USE_WAITEXIT TRUE | |
213 | +#endif | |
214 | + | |
215 | +/** | |
216 | + * @brief Semaphores APIs. | |
217 | + * @details If enabled then the Semaphores APIs are included in the kernel. | |
218 | + * | |
219 | + * @note The default is @p TRUE. | |
220 | + */ | |
221 | +#if !defined(CH_CFG_USE_SEMAPHORES) | |
222 | +#define CH_CFG_USE_SEMAPHORES TRUE | |
223 | +#endif | |
224 | + | |
225 | +/** | |
226 | + * @brief Semaphores queuing mode. | |
227 | + * @details If enabled then the threads are enqueued on semaphores by | |
228 | + * priority rather than in FIFO order. | |
229 | + * | |
230 | + * @note The default is @p FALSE. Enable this if you have special | |
231 | + * requirements. | |
232 | + * @note Requires @p CH_CFG_USE_SEMAPHORES. | |
233 | + */ | |
234 | +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) | |
235 | +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE | |
236 | +#endif | |
237 | + | |
238 | +/** | |
239 | + * @brief Mutexes APIs. | |
240 | + * @details If enabled then the mutexes APIs are included in the kernel. | |
241 | + * | |
242 | + * @note The default is @p TRUE. | |
243 | + */ | |
244 | +#if !defined(CH_CFG_USE_MUTEXES) | |
245 | +#define CH_CFG_USE_MUTEXES TRUE | |
246 | +#endif | |
247 | + | |
248 | +/** | |
249 | + * @brief Enables recursive behavior on mutexes. | |
250 | + * @note Recursive mutexes are heavier and have an increased | |
251 | + * memory footprint. | |
252 | + * | |
253 | + * @note The default is @p FALSE. | |
254 | + * @note Requires @p CH_CFG_USE_MUTEXES. | |
255 | + */ | |
256 | +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) | |
257 | +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE | |
258 | +#endif | |
259 | + | |
260 | +/** | |
261 | + * @brief Conditional Variables APIs. | |
262 | + * @details If enabled then the conditional variables APIs are included | |
263 | + * in the kernel. | |
264 | + * | |
265 | + * @note The default is @p TRUE. | |
266 | + * @note Requires @p CH_CFG_USE_MUTEXES. | |
267 | + */ | |
268 | +#if !defined(CH_CFG_USE_CONDVARS) | |
269 | +#define CH_CFG_USE_CONDVARS TRUE | |
270 | +#endif | |
271 | + | |
272 | +/** | |
273 | + * @brief Conditional Variables APIs with timeout. | |
274 | + * @details If enabled then the conditional variables APIs with timeout | |
275 | + * specification are included in the kernel. | |
276 | + * | |
277 | + * @note The default is @p TRUE. | |
278 | + * @note Requires @p CH_CFG_USE_CONDVARS. | |
279 | + */ | |
280 | +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) | |
281 | +#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE | |
282 | +#endif | |
283 | + | |
284 | +/** | |
285 | + * @brief Events Flags APIs. | |
286 | + * @details If enabled then the event flags APIs are included in the kernel. | |
287 | + * | |
288 | + * @note The default is @p TRUE. | |
289 | + */ | |
290 | +#if !defined(CH_CFG_USE_EVENTS) | |
291 | +#define CH_CFG_USE_EVENTS TRUE | |
292 | +#endif | |
293 | + | |
294 | +/** | |
295 | + * @brief Events Flags APIs with timeout. | |
296 | + * @details If enabled then the events APIs with timeout specification | |
297 | + * are included in the kernel. | |
298 | + * | |
299 | + * @note The default is @p TRUE. | |
300 | + * @note Requires @p CH_CFG_USE_EVENTS. | |
301 | + */ | |
302 | +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) | |
303 | +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE | |
304 | +#endif | |
305 | + | |
306 | +/** | |
307 | + * @brief Synchronous Messages APIs. | |
308 | + * @details If enabled then the synchronous messages APIs are included | |
309 | + * in the kernel. | |
310 | + * | |
311 | + * @note The default is @p TRUE. | |
312 | + */ | |
313 | +#if !defined(CH_CFG_USE_MESSAGES) | |
314 | +#define CH_CFG_USE_MESSAGES TRUE | |
315 | +#endif | |
316 | + | |
317 | +/** | |
318 | + * @brief Synchronous Messages queuing mode. | |
319 | + * @details If enabled then messages are served by priority rather than in | |
320 | + * FIFO order. | |
321 | + * | |
322 | + * @note The default is @p FALSE. Enable this if you have special | |
323 | + * requirements. | |
324 | + * @note Requires @p CH_CFG_USE_MESSAGES. | |
325 | + */ | |
326 | +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) | |
327 | +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE | |
328 | +#endif | |
329 | + | |
330 | +/** | |
331 | + * @brief Dynamic Threads APIs. | |
332 | + * @details If enabled then the dynamic threads creation APIs are included | |
333 | + * in the kernel. | |
334 | + * | |
335 | + * @note The default is @p TRUE. | |
336 | + * @note Requires @p CH_CFG_USE_WAITEXIT. | |
337 | + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. | |
338 | + */ | |
339 | +#if !defined(CH_CFG_USE_DYNAMIC) | |
340 | +#define CH_CFG_USE_DYNAMIC TRUE | |
341 | +#endif | |
342 | + | |
343 | +/** @} */ | |
344 | + | |
345 | +/*===========================================================================*/ | |
346 | +/** | |
347 | + * @name OSLIB options | |
348 | + * @{ | |
349 | + */ | |
350 | +/*===========================================================================*/ | |
351 | + | |
352 | +/** | |
353 | + * @brief Mailboxes APIs. | |
354 | + * @details If enabled then the asynchronous messages (mailboxes) APIs are | |
355 | + * included in the kernel. | |
356 | + * | |
357 | + * @note The default is @p TRUE. | |
358 | + * @note Requires @p CH_CFG_USE_SEMAPHORES. | |
359 | + */ | |
360 | +#if !defined(CH_CFG_USE_MAILBOXES) | |
361 | +#define CH_CFG_USE_MAILBOXES TRUE | |
362 | +#endif | |
363 | + | |
364 | +/** | |
365 | + * @brief Core Memory Manager APIs. | |
366 | + * @details If enabled then the core memory manager APIs are included | |
367 | + * in the kernel. | |
368 | + * | |
369 | + * @note The default is @p TRUE. | |
370 | + */ | |
371 | +#if !defined(CH_CFG_USE_MEMCORE) | |
372 | +#define CH_CFG_USE_MEMCORE TRUE | |
373 | +#endif | |
374 | + | |
375 | +/** | |
376 | + * @brief Managed RAM size. | |
377 | + * @details Size of the RAM area to be managed by the OS. If set to zero | |
378 | + * then the whole available RAM is used. The core memory is made | |
379 | + * available to the heap allocator and/or can be used directly through | |
380 | + * the simplified core memory allocator. | |
381 | + * | |
382 | + * @note In order to let the OS manage the whole RAM the linker script must | |
383 | + * provide the @p __heap_base__ and @p __heap_end__ symbols. | |
384 | + * @note Requires @p CH_CFG_USE_MEMCORE. | |
385 | + */ | |
386 | +#if !defined(CH_CFG_MEMCORE_SIZE) | |
387 | +#define CH_CFG_MEMCORE_SIZE 0 | |
388 | +#endif | |
389 | + | |
390 | +/** | |
391 | + * @brief Heap Allocator APIs. | |
392 | + * @details If enabled then the memory heap allocator APIs are included | |
393 | + * in the kernel. | |
394 | + * | |
395 | + * @note The default is @p TRUE. | |
396 | + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or | |
397 | + * @p CH_CFG_USE_SEMAPHORES. | |
398 | + * @note Mutexes are recommended. | |
399 | + */ | |
400 | +#if !defined(CH_CFG_USE_HEAP) | |
401 | +#define CH_CFG_USE_HEAP TRUE | |
402 | +#endif | |
403 | + | |
404 | +/** | |
405 | + * @brief Memory Pools Allocator APIs. | |
406 | + * @details If enabled then the memory pools allocator APIs are included | |
407 | + * in the kernel. | |
408 | + * | |
409 | + * @note The default is @p TRUE. | |
410 | + */ | |
411 | +#if !defined(CH_CFG_USE_MEMPOOLS) | |
412 | +#define CH_CFG_USE_MEMPOOLS TRUE | |
413 | +#endif | |
414 | + | |
415 | +/** | |
416 | + * @brief Objects FIFOs APIs. | |
417 | + * @details If enabled then the objects FIFOs APIs are included | |
418 | + * in the kernel. | |
419 | + * | |
420 | + * @note The default is @p TRUE. | |
421 | + */ | |
422 | +#if !defined(CH_CFG_USE_OBJ_FIFOS) | |
423 | +#define CH_CFG_USE_OBJ_FIFOS TRUE | |
424 | +#endif | |
425 | + | |
426 | +/** | |
427 | + * @brief Pipes APIs. | |
428 | + * @details If enabled then the pipes APIs are included | |
429 | + * in the kernel. | |
430 | + * | |
431 | + * @note The default is @p TRUE. | |
432 | + */ | |
433 | +#if !defined(CH_CFG_USE_PIPES) | |
434 | +#define CH_CFG_USE_PIPES TRUE | |
435 | +#endif | |
436 | + | |
437 | +/** | |
438 | + * @brief Objects Caches APIs. | |
439 | + * @details If enabled then the objects caches APIs are included | |
440 | + * in the kernel. | |
441 | + * | |
442 | + * @note The default is @p TRUE. | |
443 | + */ | |
444 | +#if !defined(CH_CFG_USE_OBJ_CACHES) | |
445 | +#define CH_CFG_USE_OBJ_CACHES TRUE | |
446 | +#endif | |
447 | + | |
448 | +/** | |
449 | + * @brief Delegate threads APIs. | |
450 | + * @details If enabled then the delegate threads APIs are included | |
451 | + * in the kernel. | |
452 | + * | |
453 | + * @note The default is @p TRUE. | |
454 | + */ | |
455 | +#if !defined(CH_CFG_USE_DELEGATES) | |
456 | +#define CH_CFG_USE_DELEGATES TRUE | |
457 | +#endif | |
458 | + | |
459 | +/** | |
460 | + * @brief Jobs Queues APIs. | |
461 | + * @details If enabled then the jobs queues APIs are included | |
462 | + * in the kernel. | |
463 | + * | |
464 | + * @note The default is @p TRUE. | |
465 | + */ | |
466 | +#if !defined(CH_CFG_USE_JOBS) | |
467 | +#define CH_CFG_USE_JOBS TRUE | |
468 | +#endif | |
469 | + | |
470 | +/** @} */ | |
471 | + | |
472 | +/*===========================================================================*/ | |
473 | +/** | |
474 | + * @name Objects factory options | |
475 | + * @{ | |
476 | + */ | |
477 | +/*===========================================================================*/ | |
478 | + | |
479 | +/** | |
480 | + * @brief Objects Factory APIs. | |
481 | + * @details If enabled then the objects factory APIs are included in the | |
482 | + * kernel. | |
483 | + * | |
484 | + * @note The default is @p FALSE. | |
485 | + */ | |
486 | +#if !defined(CH_CFG_USE_FACTORY) | |
487 | +#define CH_CFG_USE_FACTORY TRUE | |
488 | +#endif | |
489 | + | |
490 | +/** | |
491 | + * @brief Maximum length for object names. | |
492 | + * @details If the specified length is zero then the name is stored by | |
493 | + * pointer but this could have unintended side effects. | |
494 | + */ | |
495 | +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) | |
496 | +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 | |
497 | +#endif | |
498 | + | |
499 | +/** | |
500 | + * @brief Enables the registry of generic objects. | |
501 | + */ | |
502 | +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) | |
503 | +#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE | |
504 | +#endif | |
505 | + | |
506 | +/** | |
507 | + * @brief Enables factory for generic buffers. | |
508 | + */ | |
509 | +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) | |
510 | +#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE | |
511 | +#endif | |
512 | + | |
513 | +/** | |
514 | + * @brief Enables factory for semaphores. | |
515 | + */ | |
516 | +#if !defined(CH_CFG_FACTORY_SEMAPHORES) | |
517 | +#define CH_CFG_FACTORY_SEMAPHORES TRUE | |
518 | +#endif | |
519 | + | |
520 | +/** | |
521 | + * @brief Enables factory for mailboxes. | |
522 | + */ | |
523 | +#if !defined(CH_CFG_FACTORY_MAILBOXES) | |
524 | +#define CH_CFG_FACTORY_MAILBOXES TRUE | |
525 | +#endif | |
526 | + | |
527 | +/** | |
528 | + * @brief Enables factory for objects FIFOs. | |
529 | + */ | |
530 | +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) | |
531 | +#define CH_CFG_FACTORY_OBJ_FIFOS TRUE | |
532 | +#endif | |
533 | + | |
534 | +/** | |
535 | + * @brief Enables factory for Pipes. | |
536 | + */ | |
537 | +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) | |
538 | +#define CH_CFG_FACTORY_PIPES TRUE | |
539 | +#endif | |
540 | + | |
541 | +/** @} */ | |
542 | + | |
543 | +/*===========================================================================*/ | |
544 | +/** | |
545 | + * @name Debug options | |
546 | + * @{ | |
547 | + */ | |
548 | +/*===========================================================================*/ | |
549 | + | |
550 | +/** | |
551 | + * @brief Debug option, kernel statistics. | |
552 | + * | |
553 | + * @note The default is @p FALSE. | |
554 | + */ | |
555 | +#if !defined(CH_DBG_STATISTICS) | |
556 | +#define CH_DBG_STATISTICS FALSE | |
557 | +#endif | |
558 | + | |
559 | +/** | |
560 | + * @brief Debug option, system state check. | |
561 | + * @details If enabled the correct call protocol for system APIs is checked | |
562 | + * at runtime. | |
563 | + * | |
564 | + * @note The default is @p FALSE. | |
565 | + */ | |
566 | +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) | |
567 | +#define CH_DBG_SYSTEM_STATE_CHECK TRUE | |
568 | +#endif | |
569 | + | |
570 | +/** | |
571 | + * @brief Debug option, parameters checks. | |
572 | + * @details If enabled then the checks on the API functions input | |
573 | + * parameters are activated. | |
574 | + * | |
575 | + * @note The default is @p FALSE. | |
576 | + */ | |
577 | +#if !defined(CH_DBG_ENABLE_CHECKS) | |
578 | +#define CH_DBG_ENABLE_CHECKS TRUE | |
579 | +#endif | |
580 | + | |
581 | +/** | |
582 | + * @brief Debug option, consistency checks. | |
583 | + * @details If enabled then all the assertions in the kernel code are | |
584 | + * activated. This includes consistency checks inside the kernel, | |
585 | + * runtime anomalies and port-defined checks. | |
586 | + * | |
587 | + * @note The default is @p FALSE. | |
588 | + */ | |
589 | +#if !defined(CH_DBG_ENABLE_ASSERTS) | |
590 | +#define CH_DBG_ENABLE_ASSERTS FALSE | |
591 | +#endif | |
592 | + | |
593 | +/** | |
594 | + * @brief Debug option, trace buffer. | |
595 | + * @details If enabled then the trace buffer is activated. | |
596 | + * | |
597 | + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. | |
598 | + */ | |
599 | +#if !defined(CH_DBG_TRACE_MASK) | |
600 | +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED | |
601 | +#endif | |
602 | + | |
603 | +/** | |
604 | + * @brief Trace buffer entries. | |
605 | + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is | |
606 | + * different from @p CH_DBG_TRACE_MASK_DISABLED. | |
607 | + */ | |
608 | +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) | |
609 | +#define CH_DBG_TRACE_BUFFER_SIZE 128 | |
610 | +#endif | |
611 | + | |
612 | +/** | |
613 | + * @brief Debug option, stack checks. | |
614 | + * @details If enabled then a runtime stack check is performed. | |
615 | + * | |
616 | + * @note The default is @p FALSE. | |
617 | + * @note The stack check is performed in a architecture/port dependent way. | |
618 | + * It may not be implemented or some ports. | |
619 | + * @note The default failure mode is to halt the system with the global | |
620 | + * @p panic_msg variable set to @p NULL. | |
621 | + */ | |
622 | +#if !defined(CH_DBG_ENABLE_STACK_CHECK) | |
623 | +#define CH_DBG_ENABLE_STACK_CHECK FALSE | |
624 | +#endif | |
625 | + | |
626 | +/** | |
627 | + * @brief Debug option, stacks initialization. | |
628 | + * @details If enabled then the threads working area is filled with a byte | |
629 | + * value when a thread is created. This can be useful for the | |
630 | + * runtime measurement of the used stack. | |
631 | + * | |
632 | + * @note The default is @p FALSE. | |
633 | + */ | |
634 | +#if !defined(CH_DBG_FILL_THREADS) | |
635 | +#define CH_DBG_FILL_THREADS FALSE | |
636 | +#endif | |
637 | + | |
638 | +/** | |
639 | + * @brief Debug option, threads profiling. | |
640 | + * @details If enabled then a field is added to the @p thread_t structure that | |
641 | + * counts the system ticks occurred while executing the thread. | |
642 | + * | |
643 | + * @note The default is @p FALSE. | |
644 | + * @note This debug option is not currently compatible with the | |
645 | + * tickless mode. | |
646 | + */ | |
647 | +#if !defined(CH_DBG_THREADS_PROFILING) | |
648 | +#define CH_DBG_THREADS_PROFILING FALSE | |
649 | +#endif | |
650 | + | |
651 | +/** @} */ | |
652 | + | |
653 | +/*===========================================================================*/ | |
654 | +/** | |
655 | + * @name Kernel hooks | |
656 | + * @{ | |
657 | + */ | |
658 | +/*===========================================================================*/ | |
659 | + | |
660 | +/** | |
661 | + * @brief System structure extension. | |
662 | + * @details User fields added to the end of the @p ch_system_t structure. | |
663 | + */ | |
664 | +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ | |
665 | + /* Add system custom fields here.*/ | |
666 | + | |
667 | +/** | |
668 | + * @brief System initialization hook. | |
669 | + * @details User initialization code added to the @p chSysInit() function | |
670 | + * just before interrupts are enabled globally. | |
671 | + */ | |
672 | +#define CH_CFG_SYSTEM_INIT_HOOK() { \ | |
673 | + /* Add system initialization code here.*/ \ | |
674 | +} | |
675 | + | |
676 | +/** | |
677 | + * @brief OS instance structure extension. | |
678 | + * @details User fields added to the end of the @p os_instance_t structure. | |
679 | + */ | |
680 | +#define CH_CFG_OS_INSTANCE_EXTRA_FIELDS \ | |
681 | + /* Add OS instance custom fields here.*/ | |
682 | + | |
683 | +/** | |
684 | + * @brief OS instance initialization hook. | |
685 | + * | |
686 | + * @param[in] oip pointer to the @p os_instance_t structure | |
687 | + */ | |
688 | +#define CH_CFG_OS_INSTANCE_INIT_HOOK(oip) { \ | |
689 | + /* Add OS instance initialization code here.*/ \ | |
690 | +} | |
691 | + | |
692 | +/** | |
693 | + * @brief Threads descriptor structure extension. | |
694 | + * @details User fields added to the end of the @p thread_t structure. | |
695 | + */ | |
696 | +#define CH_CFG_THREAD_EXTRA_FIELDS \ | |
697 | + /* Add threads custom fields here.*/ | |
698 | + | |
699 | +/** | |
700 | + * @brief Threads initialization hook. | |
701 | + * @details User initialization code added to the @p _thread_init() function. | |
702 | + * | |
703 | + * @note It is invoked from within @p _thread_init() and implicitly from all | |
704 | + * the threads creation APIs. | |
705 | + * | |
706 | + * @param[in] tp pointer to the @p thread_t structure | |
707 | + */ | |
708 | +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ | |
709 | + /* Add threads initialization code here.*/ \ | |
710 | +} | |
711 | + | |
712 | +/** | |
713 | + * @brief Threads finalization hook. | |
714 | + * @details User finalization code added to the @p chThdExit() API. | |
715 | + * | |
716 | + * @param[in] tp pointer to the @p thread_t structure | |
717 | + */ | |
718 | +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ | |
719 | + /* Add threads finalization code here.*/ \ | |
720 | +} | |
721 | + | |
722 | +/** | |
723 | + * @brief Context switch hook. | |
724 | + * @details This hook is invoked just before switching between threads. | |
725 | + * | |
726 | + * @param[in] ntp thread being switched in | |
727 | + * @param[in] otp thread being switched out | |
728 | + */ | |
729 | +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ | |
730 | + /* Context switch code here.*/ \ | |
731 | +} | |
732 | + | |
733 | +/** | |
734 | + * @brief ISR enter hook. | |
735 | + */ | |
736 | +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ | |
737 | + /* IRQ prologue code here.*/ \ | |
738 | +} | |
739 | + | |
740 | +/** | |
741 | + * @brief ISR exit hook. | |
742 | + */ | |
743 | +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ | |
744 | + /* IRQ epilogue code here.*/ \ | |
745 | +} | |
746 | + | |
747 | +/** | |
748 | + * @brief Idle thread enter hook. | |
749 | + * @note This hook is invoked within a critical zone, no OS functions | |
750 | + * should be invoked from here. | |
751 | + * @note This macro can be used to activate a power saving mode. | |
752 | + */ | |
753 | +#define CH_CFG_IDLE_ENTER_HOOK() { \ | |
754 | + /* Idle-enter code here.*/ \ | |
755 | +} | |
756 | + | |
757 | +/** | |
758 | + * @brief Idle thread leave hook. | |
759 | + * @note This hook is invoked within a critical zone, no OS functions | |
760 | + * should be invoked from here. | |
761 | + * @note This macro can be used to deactivate a power saving mode. | |
762 | + */ | |
763 | +#define CH_CFG_IDLE_LEAVE_HOOK() { \ | |
764 | + /* Idle-leave code here.*/ \ | |
765 | +} | |
766 | + | |
767 | +/** | |
768 | + * @brief Idle Loop hook. | |
769 | + * @details This hook is continuously invoked by the idle thread loop. | |
770 | + */ | |
771 | +#define CH_CFG_IDLE_LOOP_HOOK() { \ | |
772 | + /* Idle loop code here.*/ \ | |
773 | +} | |
774 | + | |
775 | +/** | |
776 | + * @brief System tick event hook. | |
777 | + * @details This hook is invoked in the system tick handler immediately | |
778 | + * after processing the virtual timers queue. | |
779 | + */ | |
780 | +#define CH_CFG_SYSTEM_TICK_HOOK() { \ | |
781 | + /* System tick event code here.*/ \ | |
782 | +} | |
783 | + | |
784 | +/** | |
785 | + * @brief System halt hook. | |
786 | + * @details This hook is invoked in case to a system halting error before | |
787 | + * the system is halted. | |
788 | + */ | |
789 | +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ | |
790 | + /* System halt code here.*/ \ | |
791 | +} | |
792 | + | |
793 | +/** | |
794 | + * @brief Trace hook. | |
795 | + * @details This hook is invoked each time a new record is written in the | |
796 | + * trace buffer. | |
797 | + */ | |
798 | +#define CH_CFG_TRACE_HOOK(tep) { \ | |
799 | + /* Trace code here.*/ \ | |
800 | +} | |
801 | + | |
802 | +/** | |
803 | + * @brief Runtime Faults Collection Unit hook. | |
804 | + * @details This hook is invoked each time new faults are collected and stored. | |
805 | + */ | |
806 | +#define CH_CFG_RUNTIME_FAULTS_HOOK(mask) { \ | |
807 | + /* Faults handling code here.*/ \ | |
808 | +} | |
809 | + | |
810 | +/** @} */ | |
811 | + | |
812 | +/*===========================================================================*/ | |
813 | +/* Port-specific settings (override port settings defaulted in chcore.h). */ | |
814 | +/*===========================================================================*/ | |
815 | + | |
816 | +#endif /* CHCONF_H */ | |
817 | + | |
818 | +/** @} */ |
@@ -0,0 +1,513 @@ | ||
1 | +/* | |
2 | + ChibiOS - Copyright (C) 2006..2020 Giovanni Di Sirio | |
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 | +/** | |
37 | + * @brief Enables the PAL subsystem. | |
38 | + */ | |
39 | +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) | |
40 | +#define HAL_USE_PAL TRUE | |
41 | +#endif | |
42 | + | |
43 | +/** | |
44 | + * @brief Enables the ADC subsystem. | |
45 | + */ | |
46 | +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) | |
47 | +#define HAL_USE_ADC FALSE | |
48 | +#endif | |
49 | + | |
50 | +/** | |
51 | + * @brief Enables the CAN subsystem. | |
52 | + */ | |
53 | +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) | |
54 | +#define HAL_USE_CAN FALSE | |
55 | +#endif | |
56 | + | |
57 | +/** | |
58 | + * @brief Enables the cryptographic subsystem. | |
59 | + */ | |
60 | +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) | |
61 | +#define HAL_USE_CRY FALSE | |
62 | +#endif | |
63 | + | |
64 | +/** | |
65 | + * @brief Enables the DAC subsystem. | |
66 | + */ | |
67 | +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) | |
68 | +#define HAL_USE_DAC FALSE | |
69 | +#endif | |
70 | + | |
71 | +/** | |
72 | + * @brief Enables the EFlash subsystem. | |
73 | + */ | |
74 | +#if !defined(HAL_USE_EFL) || defined(__DOXYGEN__) | |
75 | +#define HAL_USE_EFL FALSE | |
76 | +#endif | |
77 | + | |
78 | +/** | |
79 | + * @brief Enables the GPT subsystem. | |
80 | + */ | |
81 | +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) | |
82 | +#define HAL_USE_GPT FALSE | |
83 | +#endif | |
84 | + | |
85 | +/** | |
86 | + * @brief Enables the I2C subsystem. | |
87 | + */ | |
88 | +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) | |
89 | +#define HAL_USE_I2C FALSE | |
90 | +#endif | |
91 | + | |
92 | +/** | |
93 | + * @brief Enables the I2S subsystem. | |
94 | + */ | |
95 | +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) | |
96 | +#define HAL_USE_I2S FALSE | |
97 | +#endif | |
98 | + | |
99 | +/** | |
100 | + * @brief Enables the ICU subsystem. | |
101 | + */ | |
102 | +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) | |
103 | +#define HAL_USE_ICU FALSE | |
104 | +#endif | |
105 | + | |
106 | +/** | |
107 | + * @brief Enables the MAC subsystem. | |
108 | + */ | |
109 | +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) | |
110 | +#define HAL_USE_MAC FALSE | |
111 | +#endif | |
112 | + | |
113 | +/** | |
114 | + * @brief Enables the MMC_SPI subsystem. | |
115 | + */ | |
116 | +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) | |
117 | +#define HAL_USE_MMC_SPI FALSE | |
118 | +#endif | |
119 | + | |
120 | +/** | |
121 | + * @brief Enables the PWM subsystem. | |
122 | + */ | |
123 | +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) | |
124 | +#define HAL_USE_PWM FALSE | |
125 | +#endif | |
126 | + | |
127 | +/** | |
128 | + * @brief Enables the RTC subsystem. | |
129 | + */ | |
130 | +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) | |
131 | +#define HAL_USE_RTC FALSE | |
132 | +#endif | |
133 | + | |
134 | +/** | |
135 | + * @brief Enables the SDC subsystem. | |
136 | + */ | |
137 | +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) | |
138 | +#define HAL_USE_SDC FALSE | |
139 | +#endif | |
140 | + | |
141 | +/** | |
142 | + * @brief Enables the SERIAL subsystem. | |
143 | + */ | |
144 | +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) | |
145 | +#define HAL_USE_SERIAL FALSE | |
146 | +#endif | |
147 | + | |
148 | +/** | |
149 | + * @brief Enables the SERIAL over USB subsystem. | |
150 | + */ | |
151 | +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) | |
152 | +#define HAL_USE_SERIAL_USB FALSE | |
153 | +#endif | |
154 | + | |
155 | +/** | |
156 | + * @brief Enables the SIO subsystem. | |
157 | + */ | |
158 | +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) | |
159 | +#define HAL_USE_SIO FALSE | |
160 | +#endif | |
161 | + | |
162 | +/** | |
163 | + * @brief Enables the SPI subsystem. | |
164 | + */ | |
165 | +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) | |
166 | +#define HAL_USE_SPI FALSE | |
167 | +#endif | |
168 | + | |
169 | +/** | |
170 | + * @brief Enables the TRNG subsystem. | |
171 | + */ | |
172 | +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) | |
173 | +#define HAL_USE_TRNG FALSE | |
174 | +#endif | |
175 | + | |
176 | +/** | |
177 | + * @brief Enables the UART subsystem. | |
178 | + */ | |
179 | +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) | |
180 | +#define HAL_USE_UART FALSE | |
181 | +#endif | |
182 | + | |
183 | +/** | |
184 | + * @brief Enables the USB subsystem. | |
185 | + */ | |
186 | +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) | |
187 | +#define HAL_USE_USB FALSE | |
188 | +#endif | |
189 | + | |
190 | +/** | |
191 | + * @brief Enables the WDG subsystem. | |
192 | + */ | |
193 | +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) | |
194 | +#define HAL_USE_WDG FALSE | |
195 | +#endif | |
196 | + | |
197 | +/** | |
198 | + * @brief Enables the WSPI subsystem. | |
199 | + */ | |
200 | +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) | |
201 | +#define HAL_USE_WSPI FALSE | |
202 | +#endif | |
203 | + | |
204 | +/*===========================================================================*/ | |
205 | +/* PAL driver related settings. */ | |
206 | +/*===========================================================================*/ | |
207 | + | |
208 | +/** | |
209 | + * @brief Enables synchronous APIs. | |
210 | + * @note Disabling this option saves both code and data space. | |
211 | + */ | |
212 | +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) | |
213 | +#define PAL_USE_CALLBACKS TRUE | |
214 | +#endif | |
215 | + | |
216 | +/** | |
217 | + * @brief Enables synchronous APIs. | |
218 | + * @note Disabling this option saves both code and data space. | |
219 | + */ | |
220 | +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) | |
221 | +#define PAL_USE_WAIT FALSE | |
222 | +#endif | |
223 | + | |
224 | +/*===========================================================================*/ | |
225 | +/* ADC driver related settings. */ | |
226 | +/*===========================================================================*/ | |
227 | + | |
228 | +/** | |
229 | + * @brief Enables synchronous APIs. | |
230 | + * @note Disabling this option saves both code and data space. | |
231 | + */ | |
232 | +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) | |
233 | +#define ADC_USE_WAIT FALSE | |
234 | +#endif | |
235 | + | |
236 | +/** | |
237 | + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. | |
238 | + * @note Disabling this option saves both code and data space. | |
239 | + */ | |
240 | +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) | |
241 | +#define ADC_USE_MUTUAL_EXCLUSION FALSE | |
242 | +#endif | |
243 | + | |
244 | +/*===========================================================================*/ | |
245 | +/* CRY driver related settings. */ | |
246 | +/*===========================================================================*/ | |
247 | + | |
248 | +/** | |
249 | + * @brief Enables the SW fall-back of the cryptographic driver. | |
250 | + * @details When enabled, this option, activates a fall-back software | |
251 | + * implementation for algorithms not supported by the underlying | |
252 | + * hardware. | |
253 | + * @note Fall-back implementations may not be present for all algorithms. | |
254 | + */ | |
255 | +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) | |
256 | +#define HAL_CRY_USE_FALLBACK FALSE | |
257 | +#endif | |
258 | + | |
259 | +/** | |
260 | + * @brief Makes the driver forcibly use the fall-back implementations. | |
261 | + */ | |
262 | +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) | |
263 | +#define HAL_CRY_ENFORCE_FALLBACK FALSE | |
264 | +#endif | |
265 | + | |
266 | +/*===========================================================================*/ | |
267 | +/* DAC driver related settings. */ | |
268 | +/*===========================================================================*/ | |
269 | + | |
270 | +/** | |
271 | + * @brief Enables synchronous APIs. | |
272 | + * @note Disabling this option saves both code and data space. | |
273 | + */ | |
274 | +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) | |
275 | +#define DAC_USE_WAIT TRUE | |
276 | +#endif | |
277 | + | |
278 | +/** | |
279 | + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. | |
280 | + * @note Disabling this option saves both code and data space. | |
281 | + */ | |
282 | +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) | |
283 | +#define DAC_USE_MUTUAL_EXCLUSION TRUE | |
284 | +#endif | |
285 | + | |
286 | +/*===========================================================================*/ | |
287 | +/* I2C driver related settings. */ | |
288 | +/*===========================================================================*/ | |
289 | + | |
290 | +/** | |
291 | + * @brief Enables the mutual exclusion APIs on the I2C bus. | |
292 | + */ | |
293 | +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) | |
294 | +#define I2C_USE_MUTUAL_EXCLUSION TRUE | |
295 | +#endif | |
296 | + | |
297 | +/*===========================================================================*/ | |
298 | +/* MAC driver related settings. */ | |
299 | +/*===========================================================================*/ | |
300 | + | |
301 | +/** | |
302 | + * @brief Enables the zero-copy API. | |
303 | + */ | |
304 | +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) | |
305 | +#define MAC_USE_ZERO_COPY FALSE | |
306 | +#endif | |
307 | + | |
308 | +/** | |
309 | + * @brief Enables an event sources for incoming packets. | |
310 | + */ | |
311 | +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) | |
312 | +#define MAC_USE_EVENTS TRUE | |
313 | +#endif | |
314 | + | |
315 | +/*===========================================================================*/ | |
316 | +/* MMC_SPI driver related settings. */ | |
317 | +/*===========================================================================*/ | |
318 | + | |
319 | +/** | |
320 | + * @brief Delays insertions. | |
321 | + * @details If enabled this options inserts delays into the MMC waiting | |
322 | + * routines releasing some extra CPU time for the threads with | |
323 | + * lower priority, this may slow down the driver a bit however. | |
324 | + * This option is recommended also if the SPI driver does not | |
325 | + * use a DMA channel and heavily loads the CPU. | |
326 | + */ | |
327 | +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) | |
328 | +#define MMC_NICE_WAITING TRUE | |
329 | +#endif | |
330 | + | |
331 | +/*===========================================================================*/ | |
332 | +/* SDC driver related settings. */ | |
333 | +/*===========================================================================*/ | |
334 | + | |
335 | +/** | |
336 | + * @brief Number of initialization attempts before rejecting the card. | |
337 | + * @note Attempts are performed at 10mS intervals. | |
338 | + */ | |
339 | +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) | |
340 | +#define SDC_INIT_RETRY 100 | |
341 | +#endif | |
342 | + | |
343 | +/** | |
344 | + * @brief Include support for MMC cards. | |
345 | + * @note MMC support is not yet implemented so this option must be kept | |
346 | + * at @p FALSE. | |
347 | + */ | |
348 | +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) | |
349 | +#define SDC_MMC_SUPPORT FALSE | |
350 | +#endif | |
351 | + | |
352 | +/** | |
353 | + * @brief Delays insertions. | |
354 | + * @details If enabled this options inserts delays into the MMC waiting | |
355 | + * routines releasing some extra CPU time for the threads with | |
356 | + * lower priority, this may slow down the driver a bit however. | |
357 | + */ | |
358 | +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) | |
359 | +#define SDC_NICE_WAITING TRUE | |
360 | +#endif | |
361 | + | |
362 | +/** | |
363 | + * @brief OCR initialization constant for V20 cards. | |
364 | + */ | |
365 | +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) | |
366 | +#define SDC_INIT_OCR_V20 0x50FF8000U | |
367 | +#endif | |
368 | + | |
369 | +/** | |
370 | + * @brief OCR initialization constant for non-V20 cards. | |
371 | + */ | |
372 | +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) | |
373 | +#define SDC_INIT_OCR 0x80100000U | |
374 | +#endif | |
375 | + | |
376 | +/*===========================================================================*/ | |
377 | +/* SERIAL driver related settings. */ | |
378 | +/*===========================================================================*/ | |
379 | + | |
380 | +/** | |
381 | + * @brief Default bit rate. | |
382 | + * @details Configuration parameter, this is the baud rate selected for the | |
383 | + * default configuration. | |
384 | + */ | |
385 | +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) | |
386 | +#define SERIAL_DEFAULT_BITRATE 38400 | |
387 | +#endif | |
388 | + | |
389 | +/** | |
390 | + * @brief Serial buffers size. | |
391 | + * @details Configuration parameter, you can change the depth of the queue | |
392 | + * buffers depending on the requirements of your application. | |
393 | + * @note The default is 16 bytes for both the transmission and receive | |
394 | + * buffers. | |
395 | + */ | |
396 | +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) | |
397 | +#define SERIAL_BUFFERS_SIZE 16 | |
398 | +#endif | |
399 | + | |
400 | +/*===========================================================================*/ | |
401 | +/* SERIAL_USB driver related setting. */ | |
402 | +/*===========================================================================*/ | |
403 | + | |
404 | +/** | |
405 | + * @brief Serial over USB buffers size. | |
406 | + * @details Configuration parameter, the buffer size must be a multiple of | |
407 | + * the USB data endpoint maximum packet size. | |
408 | + * @note The default is 256 bytes for both the transmission and receive | |
409 | + * buffers. | |
410 | + */ | |
411 | +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) | |
412 | +#define SERIAL_USB_BUFFERS_SIZE 256 | |
413 | +#endif | |
414 | + | |
415 | +/** | |
416 | + * @brief Serial over USB number of buffers. | |
417 | + * @note The default is 2 buffers. | |
418 | + */ | |
419 | +#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) | |
420 | +#define SERIAL_USB_BUFFERS_NUMBER 2 | |
421 | +#endif | |
422 | + | |
423 | +/*===========================================================================*/ | |
424 | +/* SPI driver related settings. */ | |
425 | +/*===========================================================================*/ | |
426 | + | |
427 | +/** | |
428 | + * @brief Enables synchronous APIs. | |
429 | + * @note Disabling this option saves both code and data space. | |
430 | + */ | |
431 | +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) | |
432 | +#define SPI_USE_WAIT TRUE | |
433 | +#endif | |
434 | + | |
435 | +/** | |
436 | + * @brief Enables circular transfers APIs. | |
437 | + * @note Disabling this option saves both code and data space. | |
438 | + */ | |
439 | +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) | |
440 | +#define SPI_USE_CIRCULAR FALSE | |
441 | +#endif | |
442 | + | |
443 | +/** | |
444 | + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. | |
445 | + * @note Disabling this option saves both code and data space. | |
446 | + */ | |
447 | +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) | |
448 | +#define SPI_USE_MUTUAL_EXCLUSION TRUE | |
449 | +#endif | |
450 | + | |
451 | +/** | |
452 | + * @brief Handling method for SPI CS line. | |
453 | + * @note Disabling this option saves both code and data space. | |
454 | + */ | |
455 | +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) | |
456 | +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD | |
457 | +#endif | |
458 | + | |
459 | +/*===========================================================================*/ | |
460 | +/* UART driver related settings. */ | |
461 | +/*===========================================================================*/ | |
462 | + | |
463 | +/** | |
464 | + * @brief Enables synchronous APIs. | |
465 | + * @note Disabling this option saves both code and data space. | |
466 | + */ | |
467 | +#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) | |
468 | +#define UART_USE_WAIT FALSE | |
469 | +#endif | |
470 | + | |
471 | +/** | |
472 | + * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. | |
473 | + * @note Disabling this option saves both code and data space. | |
474 | + */ | |
475 | +#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) | |
476 | +#define UART_USE_MUTUAL_EXCLUSION FALSE | |
477 | +#endif | |
478 | + | |
479 | +/*===========================================================================*/ | |
480 | +/* USB driver related settings. */ | |
481 | +/*===========================================================================*/ | |
482 | + | |
483 | +/** | |
484 | + * @brief Enables synchronous APIs. | |
485 | + * @note Disabling this option saves both code and data space. | |
486 | + */ | |
487 | +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) | |
488 | +#define USB_USE_WAIT FALSE | |
489 | +#endif | |
490 | + | |
491 | +/*===========================================================================*/ | |
492 | +/* WSPI driver related settings. */ | |
493 | +/*===========================================================================*/ | |
494 | + | |
495 | +/** | |
496 | + * @brief Enables synchronous APIs. | |
497 | + * @note Disabling this option saves both code and data space. | |
498 | + */ | |
499 | +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) | |
500 | +#define WSPI_USE_WAIT TRUE | |
501 | +#endif | |
502 | + | |
503 | +/** | |
504 | + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. | |
505 | + * @note Disabling this option saves both code and data space. | |
506 | + */ | |
507 | +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) | |
508 | +#define WSPI_USE_MUTUAL_EXCLUSION TRUE | |
509 | +#endif | |
510 | + | |
511 | +#endif /* HALCONF_H */ | |
512 | + | |
513 | +/** @} */ |
@@ -0,0 +1,243 @@ | ||
1 | +/* | |
2 | + ChibiOS - Copyright (C) 2006..2020 Giovanni Di Sirio | |
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 | + * STM32WB55xx drivers configuration. | |
19 | + * The following settings override the default settings present in | |
20 | + * the various device driver implementation headers. | |
21 | + * Note that the settings for each driver only have effect if the whole | |
22 | + * driver is enabled in halconf.h. | |
23 | + * | |
24 | + * IRQ priorities: | |
25 | + * 15...0 Lowest...Highest. | |
26 | + * | |
27 | + * DMA priorities: | |
28 | + * 0...3 Lowest...Highest. | |
29 | + */ | |
30 | + | |
31 | +#ifndef MCUCONF_H | |
32 | +#define MCUCONF_H | |
33 | + | |
34 | +#define STM32WBxx_MCUCONF | |
35 | +#define STM32WB55_MCUCONF | |
36 | + | |
37 | +/* | |
38 | + * HAL driver system settings. | |
39 | + */ | |
40 | +#define STM32_NO_INIT FALSE | |
41 | +#define STM32_VOS STM32_VOS_RANGE1 | |
42 | +#define STM32_PVD_ENABLE FALSE | |
43 | +#define STM32_PLS STM32_PLS_LEV0 | |
44 | +#define STM32_HSI16_ENABLED FALSE | |
45 | +#define STM32_HSI48_ENABLED FALSE | |
46 | +#define STM32_LSI1_ENABLED TRUE | |
47 | +#define STM32_LSI2_ENABLED FALSE | |
48 | +#define STM32_HSE32_ENABLED TRUE | |
49 | +#define STM32_LSE_ENABLED TRUE | |
50 | +#define STM32_MSIPLL_ENABLED FALSE | |
51 | +#define STM32_MSIRANGE STM32_MSIRANGE_4M | |
52 | +#define STM32_SW STM32_SW_HSE | |
53 | +#define STM32_PLLSRC STM32_PLLSRC_MSI | |
54 | +#define STM32_PLLM_VALUE 1 | |
55 | +#define STM32_PLLN_VALUE 32 | |
56 | +#define STM32_PLLP_VALUE 2 | |
57 | +#define STM32_PLLQ_VALUE 2 | |
58 | +#define STM32_PLLR_VALUE 2 | |
59 | +#define STM32_HPRE STM32_HPRE_DIV1 | |
60 | +#define STM32_PPRE1 STM32_PPRE1_DIV1 | |
61 | +#define STM32_PPRE2 STM32_PPRE2_DIV1 | |
62 | +#define STM32_C2HPRE STM32_C2HPRE_DIV2 | |
63 | +#define STM32_SHDHPRE STM32_SHDHPRE_DIV1 | |
64 | +#define STM32_RFCSSSEL STM32_RFCSSSEL_HSE | |
65 | +#define STM32_STOPWUCK STM32_STOPWUCK_MSI | |
66 | +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK | |
67 | +#define STM32_MCOPRE STM32_MCOPRE_DIV1 | |
68 | +#define STM32_LSCOSEL STM32_LSCOSEL_NOCLOCK | |
69 | +#define STM32_PLLSAI1N_VALUE 24 | |
70 | +#define STM32_PLLSAI1P_VALUE 2 | |
71 | +#define STM32_PLLSAI1Q_VALUE 2 | |
72 | +#define STM32_PLLSAI1R_VALUE 2 | |
73 | + | |
74 | +/* | |
75 | + * Peripherals clock sources. | |
76 | + */ | |
77 | +#define STM32_USART1SEL STM32_USART1SEL_PCLK2 | |
78 | +#define STM32_LPUART1SEL STM32_LPUART1SEL_PCLK1 | |
79 | +#define STM32_I2C1SEL STM32_I2C1SEL_PCLK1 | |
80 | +#define STM32_I2C3SEL STM32_I2C3SEL_PCLK1 | |
81 | +#define STM32_LPTIM1SEL STM32_LPTIM1SEL_PCLK1 | |
82 | +#define STM32_LPTIM2SEL STM32_LPTIM2SEL_PCLK1 | |
83 | +#define STM32_SAI1SEL STM32_SAI1SEL_OFF | |
84 | +#define STM32_CLK48SEL STM32_CLK48SEL_PLLSAI1QCLK | |
85 | +#define STM32_ADCSEL STM32_ADCSEL_SYSCLK | |
86 | +#define STM32_RTCSEL STM32_RTCSEL_LSI | |
87 | + | |
88 | +/* | |
89 | + * IRQ system settings. | |
90 | + */ | |
91 | +#define STM32_IRQ_EXTI0_PRIORITY 6 | |
92 | +#define STM32_IRQ_EXTI1_PRIORITY 6 | |
93 | +#define STM32_IRQ_EXTI2_PRIORITY 6 | |
94 | +#define STM32_IRQ_EXTI3_PRIORITY 6 | |
95 | +#define STM32_IRQ_EXTI4_PRIORITY 6 | |
96 | +#define STM32_IRQ_EXTI5_9_PRIORITY 6 | |
97 | +#define STM32_IRQ_EXTI10_15_PRIORITY 6 | |
98 | +#define STM32_IRQ_EXTI16_31_33_PRIORITY 6 | |
99 | +#define STM32_IRQ_EXTI17_PRIORITY 6 | |
100 | +#define STM32_IRQ_EXTI18_PRIORITY 6 | |
101 | +#define STM32_IRQ_EXTI19_PRIORITY 6 | |
102 | +#define STM32_IRQ_EXTI20_21_PRIORITY 6 | |
103 | + | |
104 | +#define STM32_IRQ_TIM1_BRK_PRIORITY 7 | |
105 | +#define STM32_IRQ_TIM1_UP_TIM16_PRIORITY 7 | |
106 | +#define STM32_IRQ_TIM1_TRGCO_TIM17_PRIORITY 7 | |
107 | +#define STM32_IRQ_TIM1_CC_PRIORITY 7 | |
108 | +#define STM32_IRQ_TIM2_PRIORITY 7 | |
109 | +#define STM32_IRQ_TIM16_PRIORITY 7 | |
110 | +#define STM32_IRQ_TIM17_PRIORITY 7 | |
111 | + | |
112 | +#define STM32_IRQ_USART1_PRIORITY 3 | |
113 | +#define STM32_IRQ_LPUART1_PRIORITY 3 | |
114 | + | |
115 | +/* | |
116 | + * ADC driver system settings. | |
117 | + */ | |
118 | +#define STM32_ADC_COMPACT_SAMPLES FALSE | |
119 | +#define STM32_ADC_USE_ADC1 FALSE | |
120 | +#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(1, 1) | |
121 | +#define STM32_ADC_ADC1_DMA_PRIORITY 2 | |
122 | +#define STM32_ADC_ADC1_IRQ_PRIORITY 5 | |
123 | +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 5 | |
124 | +#define STM32_ADC_ADC1_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV1 | |
125 | +#define STM32_ADC_ADC1_PRESC ADC_CCR_PRESC_DIV2 | |
126 | + | |
127 | +/* | |
128 | + * GPT driver system settings. | |
129 | + */ | |
130 | +#define STM32_GPT_USE_TIM1 FALSE | |
131 | +#define STM32_GPT_USE_TIM2 FALSE | |
132 | +#define STM32_GPT_USE_TIM16 FALSE | |
133 | +#define STM32_GPT_USE_TIM17 FALSE | |
134 | + | |
135 | +/* | |
136 | + * I2C driver system settings. | |
137 | + */ | |
138 | +#define STM32_I2C_USE_I2C1 FALSE | |
139 | +#define STM32_I2C_USE_I2C3 FALSE | |
140 | +#define STM32_I2C_BUSY_TIMEOUT 50 | |
141 | +#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) | |
142 | +#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) | |
143 | +#define STM32_I2C_I2C3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) | |
144 | +#define STM32_I2C_I2C3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) | |
145 | +#define STM32_I2C_I2C1_IRQ_PRIORITY 5 | |
146 | +#define STM32_I2C_I2C3_IRQ_PRIORITY 5 | |
147 | +#define STM32_I2C_I2C1_DMA_PRIORITY 3 | |
148 | +#define STM32_I2C_I2C3_DMA_PRIORITY 3 | |
149 | +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") | |
150 | + | |
151 | +/* | |
152 | + * ICU driver system settings. | |
153 | + */ | |
154 | +#define STM32_ICU_USE_TIM1 FALSE | |
155 | +#define STM32_ICU_USE_TIM2 FALSE | |
156 | + | |
157 | +/* | |
158 | + * PWM driver system settings. | |
159 | + */ | |
160 | +#define STM32_PWM_USE_TIM1 FALSE | |
161 | +#define STM32_PWM_USE_TIM2 FALSE | |
162 | +#define STM32_PWM_USE_TIM16 FALSE | |
163 | +#define STM32_PWM_USE_TIM17 FALSE | |
164 | + | |
165 | +/* | |
166 | + * RTC driver system settings. | |
167 | + */ | |
168 | +#define STM32_RTC_PRESA_VALUE 32 | |
169 | +#define STM32_RTC_PRESS_VALUE 1024 | |
170 | +#define STM32_RTC_CR_INIT 0 | |
171 | +#define STM32_RTC_TAMPCR_INIT 0 | |
172 | + | |
173 | +/* | |
174 | + * SERIAL driver system settings. | |
175 | + */ | |
176 | +#define STM32_SERIAL_USE_USART1 FALSE | |
177 | +#define STM32_SERIAL_USE_LPUART1 FALSE | |
178 | +#define STM32_SERIAL_USART1_PRIORITY 12 | |
179 | +#define STM32_SERIAL_LPUART1_PRIORITY 12 | |
180 | + | |
181 | +/* | |
182 | + * SIO driver system settings. | |
183 | + */ | |
184 | +#define STM32_SIO_USE_USART1 FALSE | |
185 | +#define STM32_SIO_USE_LPUART1 FALSE | |
186 | + | |
187 | +/* | |
188 | + * SPI driver system settings. | |
189 | + */ | |
190 | +#define STM32_SPI_USE_SPI1 FALSE | |
191 | +#define STM32_SPI_USE_SPI2 FALSE | |
192 | +#define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 3) | |
193 | +#define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 4) | |
194 | +#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) | |
195 | +#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) | |
196 | +#define STM32_SPI_SPI1_DMA_PRIORITY 1 | |
197 | +#define STM32_SPI_SPI2_DMA_PRIORITY 1 | |
198 | +#define STM32_SPI_SPI1_IRQ_PRIORITY 10 | |
199 | +#define STM32_SPI_SPI2_IRQ_PRIORITY 10 | |
200 | +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") | |
201 | + | |
202 | +/* | |
203 | + * ST driver system settings. | |
204 | + */ | |
205 | +#define STM32_ST_IRQ_PRIORITY 8 | |
206 | +#define STM32_ST_USE_TIMER 2 | |
207 | + | |
208 | +/* | |
209 | + * TRNG driver system settings. | |
210 | + */ | |
211 | +#define STM32_TRNG_USE_RNG1 FALSE | |
212 | + | |
213 | +/* | |
214 | + * UART driver system settings. | |
215 | + */ | |
216 | +#define STM32_UART_USE_USART1 FALSE | |
217 | +#define STM32_UART_USART1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) | |
218 | +#define STM32_UART_USART1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 6) | |
219 | +#define STM32_UART_USART1_IRQ_PRIORITY 12 | |
220 | +#define STM32_UART_USART1_DMA_PRIORITY 0 | |
221 | +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") | |
222 | + | |
223 | +/* | |
224 | + * USB driver system settings. | |
225 | + */ | |
226 | +#define STM32_USB_USE_USB1 FALSE | |
227 | +#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE | |
228 | +#define STM32_USB_USB1_HP_IRQ_PRIORITY 12 | |
229 | +#define STM32_USB_USB1_LP_IRQ_PRIORITY 12 | |
230 | + | |
231 | +/* | |
232 | + * WDG driver system settings. | |
233 | + */ | |
234 | +#define STM32_WDG_USE_IWDG FALSE | |
235 | + | |
236 | +/* | |
237 | + * WSPI driver system settings. | |
238 | + */ | |
239 | +#define STM32_WSPI_USE_QUADSPI1 FALSE | |
240 | +#define STM32_WSPI_QUADSPI1_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) | |
241 | +#define STM32_WSPI_QUADSPI1_PRESCALER_VALUE 1 | |
242 | + | |
243 | +#endif /* MCUCONF_H */ |
@@ -0,0 +1,51 @@ | ||
1 | +/* | |
2 | + ChibiOS - Copyright (C) 2006..2021 Giovanni Di Sirio | |
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 portab.c | |
19 | + * @brief Application portability module code. | |
20 | + * | |
21 | + * @addtogroup application_portability | |
22 | + * @{ | |
23 | + */ | |
24 | + | |
25 | +#include "portab.h" | |
26 | + | |
27 | +/*===========================================================================*/ | |
28 | +/* Module local definitions. */ | |
29 | +/*===========================================================================*/ | |
30 | + | |
31 | +/*===========================================================================*/ | |
32 | +/* Module exported variables. */ | |
33 | +/*===========================================================================*/ | |
34 | + | |
35 | +/*===========================================================================*/ | |
36 | +/* Module local types. */ | |
37 | +/*===========================================================================*/ | |
38 | + | |
39 | +/*===========================================================================*/ | |
40 | +/* Module local variables. */ | |
41 | +/*===========================================================================*/ | |
42 | + | |
43 | +/*===========================================================================*/ | |
44 | +/* Module local functions. */ | |
45 | +/*===========================================================================*/ | |
46 | + | |
47 | +/*===========================================================================*/ | |
48 | +/* Module exported functions. */ | |
49 | +/*===========================================================================*/ | |
50 | + | |
51 | +/** @} */ |
@@ -0,0 +1,74 @@ | ||
1 | +/* | |
2 | + ChibiOS - Copyright (C) 2006..2021 Giovanni Di Sirio | |
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 portab.h | |
19 | + * @brief Application portability macros and structures. | |
20 | + * | |
21 | + * @addtogroup application_portability | |
22 | + * @{ | |
23 | + */ | |
24 | + | |
25 | +#ifndef PORTAB_H | |
26 | +#define PORTAB_H | |
27 | + | |
28 | +/*===========================================================================*/ | |
29 | +/* Module constants. */ | |
30 | +/*===========================================================================*/ | |
31 | + | |
32 | +#define PORTAB_LINE_LED1 LINE_LED_GREEN | |
33 | +#define PORTAB_LINE_LED2 LINE_LED_BLUE | |
34 | +#define PORTAB_LED_OFF PAL_LOW | |
35 | +#define PORTAB_LED_ON PAL_HIGH | |
36 | + | |
37 | +#define PORTAB_LINE_BUTTON LINE_BUTTON_1 | |
38 | +#define PORTAB_BUTTON_PRESSED PAL_LOW | |
39 | + | |
40 | +/*===========================================================================*/ | |
41 | +/* Module pre-compile time settings. */ | |
42 | +/*===========================================================================*/ | |
43 | + | |
44 | +/*===========================================================================*/ | |
45 | +/* Derived constants and error checks. */ | |
46 | +/*===========================================================================*/ | |
47 | + | |
48 | +/*===========================================================================*/ | |
49 | +/* Module data structures and types. */ | |
50 | +/*===========================================================================*/ | |
51 | + | |
52 | +/*===========================================================================*/ | |
53 | +/* Module macros. */ | |
54 | +/*===========================================================================*/ | |
55 | + | |
56 | +/*===========================================================================*/ | |
57 | +/* External declarations. */ | |
58 | +/*===========================================================================*/ | |
59 | + | |
60 | +#ifdef __cplusplus | |
61 | +extern "C" { | |
62 | +#endif | |
63 | + | |
64 | +#ifdef __cplusplus | |
65 | +} | |
66 | +#endif | |
67 | + | |
68 | +/*===========================================================================*/ | |
69 | +/* Module inline functions. */ | |
70 | +/*===========================================================================*/ | |
71 | + | |
72 | +#endif /* PORTAB_H */ | |
73 | + | |
74 | +/** @} */ |
@@ -48,6 +48,10 @@ | ||
48 | 48 | +@make --no-print-directory -f ./make/stm32wl55jc_nucleo64.make all |
49 | 49 | @echo ==================================================================== |
50 | 50 | @echo |
51 | + @echo === Building for STM32WB55RG_Nucleo68 ============================== | |
52 | + +@make --no-print-directory -f ./make/stm32wb55rg_nucleo68.make all | |
53 | + @echo ==================================================================== | |
54 | + @echo | |
51 | 55 | |
52 | 56 | clean: |
53 | 57 | @echo |
@@ -73,6 +77,8 @@ | ||
73 | 77 | @echo |
74 | 78 | +@make --no-print-directory -f ./make/stm32wl55jc_nucleo64.make clean |
75 | 79 | @echo |
80 | + +@make --no-print-directory -f ./make/stm32wb55rg_nucleo68.make clean | |
81 | + @echo | |
76 | 82 | |
77 | 83 | # |
78 | 84 | ############################################################################## |