diff options
Diffstat (limited to 'keyboards/rart/rartlice/chconf.h')
-rw-r--r-- | keyboards/rart/rartlice/chconf.h | 711 |
1 files changed, 711 insertions, 0 deletions
diff --git a/keyboards/rart/rartlice/chconf.h b/keyboards/rart/rartlice/chconf.h new file mode 100644 index 000000000..cf1cd709d --- /dev/null +++ b/keyboards/rart/rartlice/chconf.h | |||
@@ -0,0 +1,711 @@ | |||
1 | /* | ||
2 | ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio | ||
3 | Licensed under the Apache License, Version 2.0 (the "License"); | ||
4 | you may not use this file except in compliance with the License. | ||
5 | You may obtain a copy of the License at | ||
6 | http://www.apache.org/licenses/LICENSE-2.0 | ||
7 | Unless required by applicable law or agreed to in writing, software | ||
8 | distributed under the License is distributed on an "AS IS" BASIS, | ||
9 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
10 | See the License for the specific language governing permissions and | ||
11 | limitations under the License. | ||
12 | */ | ||
13 | |||
14 | /** | ||
15 | * @file rt/templates/chconf.h | ||
16 | * @brief Configuration file template. | ||
17 | * @details A copy of this file must be placed in each project directory, it | ||
18 | * contains the application specific kernel settings. | ||
19 | * | ||
20 | * @addtogroup config | ||
21 | * @details Kernel related settings and hooks. | ||
22 | * @{ | ||
23 | */ | ||
24 | |||
25 | #ifndef CHCONF_H | ||
26 | #define CHCONF_H | ||
27 | |||
28 | #define _CHIBIOS_RT_CONF_ | ||
29 | #define _CHIBIOS_RT_CONF_VER_6_0_ | ||
30 | |||
31 | /*===========================================================================*/ | ||
32 | /** | ||
33 | * @name System timers settings | ||
34 | * @{ | ||
35 | */ | ||
36 | /*===========================================================================*/ | ||
37 | |||
38 | /** | ||
39 | * @brief System time counter resolution. | ||
40 | * @note Allowed values are 16 or 32 bits. | ||
41 | */ | ||
42 | #if !defined(CH_CFG_ST_RESOLUTION) | ||
43 | #define CH_CFG_ST_RESOLUTION 32 | ||
44 | #endif | ||
45 | |||
46 | /** | ||
47 | * @brief System tick frequency. | ||
48 | * @details Frequency of the system timer that drives the system ticks. This | ||
49 | * setting also defines the system tick time unit. | ||
50 | */ | ||
51 | #if !defined(CH_CFG_ST_FREQUENCY) | ||
52 | #define CH_CFG_ST_FREQUENCY 100000 | ||
53 | #endif | ||
54 | |||
55 | /** | ||
56 | * @brief Time intervals data size. | ||
57 | * @note Allowed values are 16, 32 or 64 bits. | ||
58 | */ | ||
59 | #if !defined(CH_CFG_INTERVALS_SIZE) | ||
60 | #define CH_CFG_INTERVALS_SIZE 32 | ||
61 | #endif | ||
62 | |||
63 | /** | ||
64 | * @brief Time types data size. | ||
65 | * @note Allowed values are 16 or 32 bits. | ||
66 | */ | ||
67 | #if !defined(CH_CFG_TIME_TYPES_SIZE) | ||
68 | #define CH_CFG_TIME_TYPES_SIZE 32 | ||
69 | #endif | ||
70 | |||
71 | /** | ||
72 | * @brief Time delta constant for the tick-less mode. | ||
73 | * @note If this value is zero then the system uses the classic | ||
74 | * periodic tick. This value represents the minimum number | ||
75 | * of ticks that is safe to specify in a timeout directive. | ||
76 | * The value one is not valid, timeouts are rounded up to | ||
77 | * this value. | ||
78 | */ | ||
79 | #if !defined(CH_CFG_ST_TIMEDELTA) | ||
80 | #define CH_CFG_ST_TIMEDELTA 0 | ||
81 | #endif | ||
82 | |||
83 | /** @} */ | ||
84 | |||
85 | /*===========================================================================*/ | ||
86 | /** | ||
87 | * @name Kernel parameters and options | ||
88 | * @{ | ||
89 | */ | ||
90 | /*===========================================================================*/ | ||
91 | |||
92 | /** | ||
93 | * @brief Round robin interval. | ||
94 | * @details This constant is the number of system ticks allowed for the | ||
95 | * threads before preemption occurs. Setting this value to zero | ||
96 | * disables the preemption for threads with equal priority and the | ||
97 | * round robin becomes cooperative. Note that higher priority | ||
98 | * threads can still preempt, the kernel is always preemptive. | ||
99 | * @note Disabling the round robin preemption makes the kernel more compact | ||
100 | * and generally faster. | ||
101 | * @note The round robin preemption is not supported in tickless mode and | ||
102 | * must be set to zero in that case. | ||
103 | */ | ||
104 | #if !defined(CH_CFG_TIME_QUANTUM) | ||
105 | #define CH_CFG_TIME_QUANTUM 0 | ||
106 | #endif | ||
107 | |||
108 | /** | ||
109 | * @brief Managed RAM size. | ||
110 | * @details Size of the RAM area to be managed by the OS. If set to zero | ||
111 | * then the whole available RAM is used. The core memory is made | ||
112 | * available to the heap allocator and/or can be used directly through | ||
113 | * the simplified core memory allocator. | ||
114 | * | ||
115 | * @note In order to let the OS manage the whole RAM the linker script must | ||
116 | * provide the @p __heap_base__ and @p __heap_end__ symbols. | ||
117 | * @note Requires @p CH_CFG_USE_MEMCORE. | ||
118 | */ | ||
119 | #if !defined(CH_CFG_MEMCORE_SIZE) | ||
120 | #define CH_CFG_MEMCORE_SIZE 0 | ||
121 | #endif | ||
122 | |||
123 | /** | ||
124 | * @brief Idle thread automatic spawn suppression. | ||
125 | * @details When this option is activated the function @p chSysInit() | ||
126 | * does not spawn the idle thread. The application @p main() | ||
127 | * function becomes the idle thread and must implement an | ||
128 | * infinite loop. | ||
129 | */ | ||
130 | #if !defined(CH_CFG_NO_IDLE_THREAD) | ||
131 | #define CH_CFG_NO_IDLE_THREAD FALSE | ||
132 | #endif | ||
133 | |||
134 | /** @} */ | ||
135 | |||
136 | /*===========================================================================*/ | ||
137 | /** | ||
138 | * @name Performance options | ||
139 | * @{ | ||
140 | */ | ||
141 | /*===========================================================================*/ | ||
142 | |||
143 | /** | ||
144 | * @brief OS optimization. | ||
145 | * @details If enabled then time efficient rather than space efficient code | ||
146 | * is used when two possible implementations exist. | ||
147 | * | ||
148 | * @note This is not related to the compiler optimization options. | ||
149 | * @note The default is @p TRUE. | ||
150 | */ | ||
151 | #if !defined(CH_CFG_OPTIMIZE_SPEED) | ||
152 | #define CH_CFG_OPTIMIZE_SPEED TRUE | ||
153 | #endif | ||
154 | |||
155 | /** @} */ | ||
156 | |||
157 | /*===========================================================================*/ | ||
158 | /** | ||
159 | * @name Subsystem options | ||
160 | * @{ | ||
161 | */ | ||
162 | /*===========================================================================*/ | ||
163 | |||
164 | /** | ||
165 | * @brief Time Measurement APIs. | ||
166 | * @details If enabled then the time measurement APIs are included in | ||
167 | * the kernel. | ||
168 | * | ||
169 | * @note The default is @p TRUE. | ||
170 | */ | ||
171 | #if !defined(CH_CFG_USE_TM) | ||
172 | #define CH_CFG_USE_TM FALSE | ||
173 | #endif | ||
174 | |||
175 | /** | ||
176 | * @brief Threads registry APIs. | ||
177 | * @details If enabled then the registry APIs are included in the kernel. | ||
178 | * | ||
179 | * @note The default is @p TRUE. | ||
180 | */ | ||
181 | #if !defined(CH_CFG_USE_REGISTRY) | ||
182 | #define CH_CFG_USE_REGISTRY TRUE | ||
183 | #endif | ||
184 | |||
185 | /** | ||
186 | * @brief Threads synchronization APIs. | ||
187 | * @details If enabled then the @p chThdWait() function is included in | ||
188 | * the kernel. | ||
189 | * | ||
190 | * @note The default is @p TRUE. | ||
191 | */ | ||
192 | #if !defined(CH_CFG_USE_WAITEXIT) | ||
193 | #define CH_CFG_USE_WAITEXIT TRUE | ||
194 | #endif | ||
195 | |||
196 | /** | ||
197 | * @brief Semaphores APIs. | ||
198 | * @details If enabled then the Semaphores APIs are included in the kernel. | ||
199 | * | ||
200 | * @note The default is @p TRUE. | ||
201 | */ | ||
202 | #if !defined(CH_CFG_USE_SEMAPHORES) | ||
203 | #define CH_CFG_USE_SEMAPHORES TRUE | ||
204 | #endif | ||
205 | |||
206 | /** | ||
207 | * @brief Semaphores queuing mode. | ||
208 | * @details If enabled then the threads are enqueued on semaphores by | ||
209 | * priority rather than in FIFO order. | ||
210 | * | ||
211 | * @note The default is @p FALSE. Enable this if you have special | ||
212 | * requirements. | ||
213 | * @note Requires @p CH_CFG_USE_SEMAPHORES. | ||
214 | */ | ||
215 | #if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) | ||
216 | #define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE | ||
217 | #endif | ||
218 | |||
219 | /** | ||
220 | * @brief Mutexes APIs. | ||
221 | * @details If enabled then the mutexes APIs are included in the kernel. | ||
222 | * | ||
223 | * @note The default is @p TRUE. | ||
224 | */ | ||
225 | #if !defined(CH_CFG_USE_MUTEXES) | ||
226 | #define CH_CFG_USE_MUTEXES TRUE | ||
227 | #endif | ||
228 | |||
229 | /** | ||
230 | * @brief Enables recursive behavior on mutexes. | ||
231 | * @note Recursive mutexes are heavier and have an increased | ||
232 | * memory footprint. | ||
233 | * | ||
234 | * @note The default is @p FALSE. | ||
235 | * @note Requires @p CH_CFG_USE_MUTEXES. | ||
236 | */ | ||
237 | #if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) | ||
238 | #define CH_CFG_USE_MUTEXES_RECURSIVE FALSE | ||
239 | #endif | ||
240 | |||
241 | /** | ||
242 | * @brief Conditional Variables APIs. | ||
243 | * @details If enabled then the conditional variables APIs are included | ||
244 | * in the kernel. | ||
245 | * | ||
246 | * @note The default is @p TRUE. | ||
247 | * @note Requires @p CH_CFG_USE_MUTEXES. | ||
248 | */ | ||
249 | #if !defined(CH_CFG_USE_CONDVARS) | ||
250 | #define CH_CFG_USE_CONDVARS TRUE | ||
251 | #endif | ||
252 | |||
253 | /** | ||
254 | * @brief Conditional Variables APIs with timeout. | ||
255 | * @details If enabled then the conditional variables APIs with timeout | ||
256 | * specification are included in the kernel. | ||
257 | * | ||
258 | * @note The default is @p TRUE. | ||
259 | * @note Requires @p CH_CFG_USE_CONDVARS. | ||
260 | */ | ||
261 | #if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) | ||
262 | #define CH_CFG_USE_CONDVARS_TIMEOUT FALSE | ||
263 | #endif | ||
264 | |||
265 | /** | ||
266 | * @brief Events Flags APIs. | ||
267 | * @details If enabled then the event flags APIs are included in the kernel. | ||
268 | * | ||
269 | * @note The default is @p TRUE. | ||
270 | */ | ||
271 | #if !defined(CH_CFG_USE_EVENTS) | ||
272 | #define CH_CFG_USE_EVENTS TRUE | ||
273 | #endif | ||
274 | |||
275 | /** | ||
276 | * @brief Events Flags APIs with timeout. | ||
277 | * @details If enabled then the events APIs with timeout specification | ||
278 | * are included in the kernel. | ||
279 | * | ||
280 | * @note The default is @p TRUE. | ||
281 | * @note Requires @p CH_CFG_USE_EVENTS. | ||
282 | */ | ||
283 | #if !defined(CH_CFG_USE_EVENTS_TIMEOUT) | ||
284 | #define CH_CFG_USE_EVENTS_TIMEOUT TRUE | ||
285 | #endif | ||
286 | |||
287 | /** | ||
288 | * @brief Synchronous Messages APIs. | ||
289 | * @details If enabled then the synchronous messages APIs are included | ||
290 | * in the kernel. | ||
291 | * | ||
292 | * @note The default is @p TRUE. | ||
293 | */ | ||
294 | #if !defined(CH_CFG_USE_MESSAGES) | ||
295 | #define CH_CFG_USE_MESSAGES TRUE | ||
296 | #endif | ||
297 | |||
298 | /** | ||
299 | * @brief Synchronous Messages queuing mode. | ||
300 | * @details If enabled then messages are served by priority rather than in | ||
301 | * FIFO order. | ||
302 | * | ||
303 | * @note The default is @p FALSE. Enable this if you have special | ||
304 | * requirements. | ||
305 | * @note Requires @p CH_CFG_USE_MESSAGES. | ||
306 | */ | ||
307 | #if !defined(CH_CFG_USE_MESSAGES_PRIORITY) | ||
308 | #define CH_CFG_USE_MESSAGES_PRIORITY FALSE | ||
309 | #endif | ||
310 | |||
311 | /** | ||
312 | * @brief Mailboxes APIs. | ||
313 | * @details If enabled then the asynchronous messages (mailboxes) APIs are | ||
314 | * included in the kernel. | ||
315 | * | ||
316 | * @note The default is @p TRUE. | ||
317 | * @note Requires @p CH_CFG_USE_SEMAPHORES. | ||
318 | */ | ||
319 | #if !defined(CH_CFG_USE_MAILBOXES) | ||
320 | #define CH_CFG_USE_MAILBOXES TRUE | ||
321 | #endif | ||
322 | |||
323 | /** | ||
324 | * @brief Core Memory Manager APIs. | ||
325 | * @details If enabled then the core memory manager APIs are included | ||
326 | * in the kernel. | ||
327 | * | ||
328 | * @note The default is @p TRUE. | ||
329 | */ | ||
330 | #if !defined(CH_CFG_USE_MEMCORE) | ||
331 | #define CH_CFG_USE_MEMCORE TRUE | ||
332 | #endif | ||
333 | |||
334 | /** | ||
335 | * @brief Heap Allocator APIs. | ||
336 | * @details If enabled then the memory heap allocator APIs are included | ||
337 | * in the kernel. | ||
338 | * | ||
339 | * @note The default is @p TRUE. | ||
340 | * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or | ||
341 | * @p CH_CFG_USE_SEMAPHORES. | ||
342 | * @note Mutexes are recommended. | ||
343 | */ | ||
344 | #if !defined(CH_CFG_USE_HEAP) | ||
345 | #define CH_CFG_USE_HEAP TRUE | ||
346 | #endif | ||
347 | |||
348 | /** | ||
349 | * @brief Memory Pools Allocator APIs. | ||
350 | * @details If enabled then the memory pools allocator APIs are included | ||
351 | * in the kernel. | ||
352 | * | ||
353 | * @note The default is @p TRUE. | ||
354 | */ | ||
355 | #if !defined(CH_CFG_USE_MEMPOOLS) | ||
356 | #define CH_CFG_USE_MEMPOOLS FALSE | ||
357 | #endif | ||
358 | |||
359 | /** | ||
360 | * @brief Objects FIFOs APIs. | ||
361 | * @details If enabled then the objects FIFOs APIs are included | ||
362 | * in the kernel. | ||
363 | * | ||
364 | * @note The default is @p TRUE. | ||
365 | */ | ||
366 | #if !defined(CH_CFG_USE_OBJ_FIFOS) | ||
367 | #define CH_CFG_USE_OBJ_FIFOS FALSE | ||
368 | #endif | ||
369 | |||
370 | /** | ||
371 | * @brief Pipes APIs. | ||
372 | * @details If enabled then the pipes APIs are included | ||
373 | * in the kernel. | ||
374 | * | ||
375 | * @note The default is @p TRUE. | ||
376 | */ | ||
377 | #if !defined(CH_CFG_USE_PIPES) | ||
378 | #define CH_CFG_USE_PIPES FALSE | ||
379 | #endif | ||
380 | |||
381 | /** | ||
382 | * @brief Dynamic Threads APIs. | ||
383 | * @details If enabled then the dynamic threads creation APIs are included | ||
384 | * in the kernel. | ||
385 | * | ||
386 | * @note The default is @p TRUE. | ||
387 | * @note Requires @p CH_CFG_USE_WAITEXIT. | ||
388 | * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. | ||
389 | */ | ||
390 | #if !defined(CH_CFG_USE_DYNAMIC) | ||
391 | #define CH_CFG_USE_DYNAMIC FALSE | ||
392 | #endif | ||
393 | |||
394 | /** @} */ | ||
395 | |||
396 | /*===========================================================================*/ | ||
397 | /** | ||
398 | * @name Objects factory options | ||
399 | * @{ | ||
400 | */ | ||
401 | /*===========================================================================*/ | ||
402 | |||
403 | /** | ||
404 | * @brief Objects Factory APIs. | ||
405 | * @details If enabled then the objects factory APIs are included in the | ||
406 | * kernel. | ||
407 | * | ||
408 | * @note The default is @p FALSE. | ||
409 | */ | ||
410 | #if !defined(CH_CFG_USE_FACTORY) | ||
411 | #define CH_CFG_USE_FACTORY FALSE | ||
412 | #endif | ||
413 | |||
414 | /** | ||
415 | * @brief Maximum length for object names. | ||
416 | * @details If the specified length is zero then the name is stored by | ||
417 | * pointer but this could have unintended side effects. | ||
418 | */ | ||
419 | #if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) | ||
420 | #define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 | ||
421 | #endif | ||
422 | |||
423 | /** | ||
424 | * @brief Enables the registry of generic objects. | ||
425 | */ | ||
426 | #if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) | ||
427 | #define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE | ||
428 | #endif | ||
429 | |||
430 | /** | ||
431 | * @brief Enables factory for generic buffers. | ||
432 | */ | ||
433 | #if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) | ||
434 | #define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE | ||
435 | #endif | ||
436 | |||
437 | /** | ||
438 | * @brief Enables factory for semaphores. | ||
439 | */ | ||
440 | #if !defined(CH_CFG_FACTORY_SEMAPHORES) | ||
441 | #define CH_CFG_FACTORY_SEMAPHORES FALSE | ||
442 | #endif | ||
443 | |||
444 | /** | ||
445 | * @brief Enables factory for mailboxes. | ||
446 | */ | ||
447 | #if !defined(CH_CFG_FACTORY_MAILBOXES) | ||
448 | #define CH_CFG_FACTORY_MAILBOXES FALSE | ||
449 | #endif | ||
450 | |||
451 | /** | ||
452 | * @brief Enables factory for objects FIFOs. | ||
453 | */ | ||
454 | #if !defined(CH_CFG_FACTORY_OBJ_FIFOS) | ||
455 | #define CH_CFG_FACTORY_OBJ_FIFOS FALSE | ||
456 | #endif | ||
457 | |||
458 | /** | ||
459 | * @brief Enables factory for Pipes. | ||
460 | */ | ||
461 | #if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) | ||
462 | #define CH_CFG_FACTORY_PIPES FALSE | ||
463 | #endif | ||
464 | |||
465 | /** @} */ | ||
466 | |||
467 | /*===========================================================================*/ | ||
468 | /** | ||
469 | * @name Debug options | ||
470 | * @{ | ||
471 | */ | ||
472 | /*===========================================================================*/ | ||
473 | |||
474 | /** | ||
475 | * @brief Debug option, kernel statistics. | ||
476 | * | ||
477 | * @note The default is @p FALSE. | ||
478 | */ | ||
479 | #if !defined(CH_DBG_STATISTICS) | ||
480 | #define CH_DBG_STATISTICS FALSE | ||
481 | #endif | ||
482 | |||
483 | /** | ||
484 | * @brief Debug option, system state check. | ||
485 | * @details If enabled the correct call protocol for system APIs is checked | ||
486 | * at runtime. | ||
487 | * | ||
488 | * @note The default is @p FALSE. | ||
489 | */ | ||
490 | #if !defined(CH_DBG_SYSTEM_STATE_CHECK) | ||
491 | #define CH_DBG_SYSTEM_STATE_CHECK FALSE | ||
492 | #endif | ||
493 | |||
494 | /** | ||
495 | * @brief Debug option, parameters checks. | ||
496 | * @details If enabled then the checks on the API functions input | ||
497 | * parameters are activated. | ||
498 | * | ||
499 | * @note The default is @p FALSE. | ||
500 | */ | ||
501 | #if !defined(CH_DBG_ENABLE_CHECKS) | ||
502 | #define CH_DBG_ENABLE_CHECKS FALSE | ||
503 | #endif | ||
504 | |||
505 | /** | ||
506 | * @brief Debug option, consistency checks. | ||
507 | * @details If enabled then all the assertions in the kernel code are | ||
508 | * activated. This includes consistency checks inside the kernel, | ||
509 | * runtime anomalies and port-defined checks. | ||
510 | * | ||
511 | * @note The default is @p FALSE. | ||
512 | */ | ||
513 | #if !defined(CH_DBG_ENABLE_ASSERTS) | ||
514 | #define CH_DBG_ENABLE_ASSERTS FALSE | ||
515 | #endif | ||
516 | |||
517 | /** | ||
518 | * @brief Debug option, trace buffer. | ||
519 | * @details If enabled then the trace buffer is activated. | ||
520 | * | ||
521 | * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. | ||
522 | */ | ||
523 | #if !defined(CH_DBG_TRACE_MASK) | ||
524 | #define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED | ||
525 | #endif | ||
526 | |||
527 | /** | ||
528 | * @brief Trace buffer entries. | ||
529 | * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is | ||
530 | * different from @p CH_DBG_TRACE_MASK_DISABLED. | ||
531 | */ | ||
532 | #if !defined(CH_DBG_TRACE_BUFFER_SIZE) | ||
533 | #define CH_DBG_TRACE_BUFFER_SIZE 128 | ||
534 | #endif | ||
535 | |||
536 | /** | ||
537 | * @brief Debug option, stack checks. | ||
538 | * @details If enabled then a runtime stack check is performed. | ||
539 | * | ||
540 | * @note The default is @p FALSE. | ||
541 | * @note The stack check is performed in a architecture/port dependent way. | ||
542 | * It may not be implemented or some ports. | ||
543 | * @note The default failure mode is to halt the system with the global | ||
544 | * @p panic_msg variable set to @p NULL. | ||
545 | */ | ||
546 | #if !defined(CH_DBG_ENABLE_STACK_CHECK) | ||
547 | #define CH_DBG_ENABLE_STACK_CHECK FALSE | ||
548 | #endif | ||
549 | |||
550 | /** | ||
551 | * @brief Debug option, stacks initialization. | ||
552 | * @details If enabled then the threads working area is filled with a byte | ||
553 | * value when a thread is created. This can be useful for the | ||
554 | * runtime measurement of the used stack. | ||
555 | * | ||
556 | * @note The default is @p FALSE. | ||
557 | */ | ||
558 | #if !defined(CH_DBG_FILL_THREADS) | ||
559 | #define CH_DBG_FILL_THREADS FALSE | ||
560 | #endif | ||
561 | |||
562 | /** | ||
563 | * @brief Debug option, threads profiling. | ||
564 | * @details If enabled then a field is added to the @p thread_t structure that | ||
565 | * counts the system ticks occurred while executing the thread. | ||
566 | * | ||
567 | * @note The default is @p FALSE. | ||
568 | * @note This debug option is not currently compatible with the | ||
569 | * tickless mode. | ||
570 | */ | ||
571 | #if !defined(CH_DBG_THREADS_PROFILING) | ||
572 | #define CH_DBG_THREADS_PROFILING FALSE | ||
573 | #endif | ||
574 | |||
575 | /** @} */ | ||
576 | |||
577 | /*===========================================================================*/ | ||
578 | /** | ||
579 | * @name Kernel hooks | ||
580 | * @{ | ||
581 | */ | ||
582 | /*===========================================================================*/ | ||
583 | |||
584 | /** | ||
585 | * @brief System structure extension. | ||
586 | * @details User fields added to the end of the @p ch_system_t structure. | ||
587 | */ | ||
588 | #define CH_CFG_SYSTEM_EXTRA_FIELDS \ | ||
589 | /* Add threads custom fields here.*/ | ||
590 | |||
591 | /** | ||
592 | * @brief System initialization hook. | ||
593 | * @details User initialization code added to the @p chSysInit() function | ||
594 | * just before interrupts are enabled globally. | ||
595 | */ | ||
596 | #define CH_CFG_SYSTEM_INIT_HOOK() { \ | ||
597 | /* Add threads initialization code here.*/ \ | ||
598 | } | ||
599 | |||
600 | /** | ||
601 | * @brief Threads descriptor structure extension. | ||
602 | * @details User fields added to the end of the @p thread_t structure. | ||
603 | */ | ||
604 | #define CH_CFG_THREAD_EXTRA_FIELDS \ | ||
605 | /* Add threads custom fields here.*/ | ||
606 | |||
607 | /** | ||
608 | * @brief Threads initialization hook. | ||
609 | * @details User initialization code added to the @p _thread_init() function. | ||
610 | * | ||
611 | * @note It is invoked from within @p _thread_init() and implicitly from all | ||
612 | * the threads creation APIs. | ||
613 | */ | ||
614 | #define CH_CFG_THREAD_INIT_HOOK(tp) { \ | ||
615 | /* Add threads initialization code here.*/ \ | ||
616 | } | ||
617 | |||
618 | /** | ||
619 | * @brief Threads finalization hook. | ||
620 | * @details User finalization code added to the @p chThdExit() API. | ||
621 | */ | ||
622 | #define CH_CFG_THREAD_EXIT_HOOK(tp) { \ | ||
623 | /* Add threads finalization code here.*/ \ | ||
624 | } | ||
625 | |||
626 | /** | ||
627 | * @brief Context switch hook. | ||
628 | * @details This hook is invoked just before switching between threads. | ||
629 | */ | ||
630 | #define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ | ||
631 | /* Context switch code here.*/ \ | ||
632 | } | ||
633 | |||
634 | /** | ||
635 | * @brief ISR enter hook. | ||
636 | */ | ||
637 | #define CH_CFG_IRQ_PROLOGUE_HOOK() { \ | ||
638 | /* IRQ prologue code here.*/ \ | ||
639 | } | ||
640 | |||
641 | /** | ||
642 | * @brief ISR exit hook. | ||
643 | */ | ||
644 | #define CH_CFG_IRQ_EPILOGUE_HOOK() { \ | ||
645 | /* IRQ epilogue code here.*/ \ | ||
646 | } | ||
647 | |||
648 | /** | ||
649 | * @brief Idle thread enter hook. | ||
650 | * @note This hook is invoked within a critical zone, no OS functions | ||
651 | * should be invoked from here. | ||
652 | * @note This macro can be used to activate a power saving mode. | ||
653 | */ | ||
654 | #define CH_CFG_IDLE_ENTER_HOOK() { \ | ||
655 | /* Idle-enter code here.*/ \ | ||
656 | } | ||
657 | |||
658 | /** | ||
659 | * @brief Idle thread leave hook. | ||
660 | * @note This hook is invoked within a critical zone, no OS functions | ||
661 | * should be invoked from here. | ||
662 | * @note This macro can be used to deactivate a power saving mode. | ||
663 | */ | ||
664 | #define CH_CFG_IDLE_LEAVE_HOOK() { \ | ||
665 | /* Idle-leave code here.*/ \ | ||
666 | } | ||
667 | |||
668 | /** | ||
669 | * @brief Idle Loop hook. | ||
670 | * @details This hook is continuously invoked by the idle thread loop. | ||
671 | */ | ||
672 | #define CH_CFG_IDLE_LOOP_HOOK() { \ | ||
673 | /* Idle loop code here.*/ \ | ||
674 | } | ||
675 | |||
676 | /** | ||
677 | * @brief System tick event hook. | ||
678 | * @details This hook is invoked in the system tick handler immediately | ||
679 | * after processing the virtual timers queue. | ||
680 | */ | ||
681 | #define CH_CFG_SYSTEM_TICK_HOOK() { \ | ||
682 | /* System tick event code here.*/ \ | ||
683 | } | ||
684 | |||
685 | /** | ||
686 | * @brief System halt hook. | ||
687 | * @details This hook is invoked in case to a system halting error before | ||
688 | * the system is halted. | ||
689 | */ | ||
690 | #define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ | ||
691 | /* System halt code here.*/ \ | ||
692 | } | ||
693 | |||
694 | /** | ||
695 | * @brief Trace hook. | ||
696 | * @details This hook is invoked each time a new record is written in the | ||
697 | * trace buffer. | ||
698 | */ | ||
699 | #define CH_CFG_TRACE_HOOK(tep) { \ | ||
700 | /* Trace code here.*/ \ | ||
701 | } | ||
702 | |||
703 | /** @} */ | ||
704 | |||
705 | /*===========================================================================*/ | ||
706 | /* Port-specific settings (override port settings defaulted in chcore.h). */ | ||
707 | /*===========================================================================*/ | ||
708 | |||
709 | #endif /* CHCONF_H */ | ||
710 | |||
711 | /** @} */ | ||