diff options
Diffstat (limited to 'quantum/stm32')
| -rw-r--r-- | quantum/stm32/chconf.h | 39 |
1 files changed, 25 insertions, 14 deletions
diff --git a/quantum/stm32/chconf.h b/quantum/stm32/chconf.h index f7b1b077d..6b691950a 100644 --- a/quantum/stm32/chconf.h +++ b/quantum/stm32/chconf.h | |||
| @@ -419,34 +419,39 @@ | |||
| 419 | * @note It is invoked from within @p chThdInit() and implicitly from all | 419 | * @note It is invoked from within @p chThdInit() and implicitly from all |
| 420 | * the threads creation APIs. | 420 | * the threads creation APIs. |
| 421 | */ | 421 | */ |
| 422 | # define CH_CFG_THREAD_INIT_HOOK(tp) \ | 422 | # define CH_CFG_THREAD_INIT_HOOK(tp) \ |
| 423 | { /* Add threads initialization code here.*/ } | 423 | { /* Add threads initialization code here.*/ \ |
| 424 | } | ||
| 424 | 425 | ||
| 425 | /** | 426 | /** |
| 426 | * @brief Threads finalization hook. | 427 | * @brief Threads finalization hook. |
| 427 | * @details User finalization code added to the @p chThdExit() API. | 428 | * @details User finalization code added to the @p chThdExit() API. |
| 428 | */ | 429 | */ |
| 429 | # define CH_CFG_THREAD_EXIT_HOOK(tp) \ | 430 | # define CH_CFG_THREAD_EXIT_HOOK(tp) \ |
| 430 | { /* Add threads finalization code here.*/ } | 431 | { /* Add threads finalization code here.*/ \ |
| 432 | } | ||
| 431 | 433 | ||
| 432 | /** | 434 | /** |
| 433 | * @brief Context switch hook. | 435 | * @brief Context switch hook. |
| 434 | * @details This hook is invoked just before switching between threads. | 436 | * @details This hook is invoked just before switching between threads. |
| 435 | */ | 437 | */ |
| 436 | # define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) \ | 438 | # define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) \ |
| 437 | { /* Context switch code here.*/ } | 439 | { /* Context switch code here.*/ \ |
| 440 | } | ||
| 438 | 441 | ||
| 439 | /** | 442 | /** |
| 440 | * @brief ISR enter hook. | 443 | * @brief ISR enter hook. |
| 441 | */ | 444 | */ |
| 442 | # define CH_CFG_IRQ_PROLOGUE_HOOK() \ | 445 | # define CH_CFG_IRQ_PROLOGUE_HOOK() \ |
| 443 | { /* IRQ prologue code here.*/ } | 446 | { /* IRQ prologue code here.*/ \ |
| 447 | } | ||
| 444 | 448 | ||
| 445 | /** | 449 | /** |
| 446 | * @brief ISR exit hook. | 450 | * @brief ISR exit hook. |
| 447 | */ | 451 | */ |
| 448 | # define CH_CFG_IRQ_EPILOGUE_HOOK() \ | 452 | # define CH_CFG_IRQ_EPILOGUE_HOOK() \ |
| 449 | { /* IRQ epilogue code here.*/ } | 453 | { /* IRQ epilogue code here.*/ \ |
| 454 | } | ||
| 450 | 455 | ||
| 451 | /** | 456 | /** |
| 452 | * @brief Idle thread enter hook. | 457 | * @brief Idle thread enter hook. |
| @@ -455,7 +460,8 @@ | |||
| 455 | * @note This macro can be used to activate a power saving mode. | 460 | * @note This macro can be used to activate a power saving mode. |
| 456 | */ | 461 | */ |
| 457 | # define CH_CFG_IDLE_ENTER_HOOK() \ | 462 | # define CH_CFG_IDLE_ENTER_HOOK() \ |
| 458 | { /* Idle-enter code here.*/ } | 463 | { /* Idle-enter code here.*/ \ |
| 464 | } | ||
| 459 | 465 | ||
| 460 | /** | 466 | /** |
| 461 | * @brief Idle thread leave hook. | 467 | * @brief Idle thread leave hook. |
| @@ -464,22 +470,25 @@ | |||
| 464 | * @note This macro can be used to deactivate a power saving mode. | 470 | * @note This macro can be used to deactivate a power saving mode. |
| 465 | */ | 471 | */ |
| 466 | # define CH_CFG_IDLE_LEAVE_HOOK() \ | 472 | # define CH_CFG_IDLE_LEAVE_HOOK() \ |
| 467 | { /* Idle-leave code here.*/ } | 473 | { /* Idle-leave code here.*/ \ |
| 474 | } | ||
| 468 | 475 | ||
| 469 | /** | 476 | /** |
| 470 | * @brief Idle Loop hook. | 477 | * @brief Idle Loop hook. |
| 471 | * @details This hook is continuously invoked by the idle thread loop. | 478 | * @details This hook is continuously invoked by the idle thread loop. |
| 472 | */ | 479 | */ |
| 473 | # define CH_CFG_IDLE_LOOP_HOOK() \ | 480 | # define CH_CFG_IDLE_LOOP_HOOK() \ |
| 474 | { /* Idle loop code here.*/ } | 481 | { /* Idle loop code here.*/ \ |
| 482 | } | ||
| 475 | 483 | ||
| 476 | /** | 484 | /** |
| 477 | * @brief System tick event hook. | 485 | * @brief System tick event hook. |
| 478 | * @details This hook is invoked in the system tick handler immediately | 486 | * @details This hook is invoked in the system tick handler immediately |
| 479 | * after processing the virtual timers queue. | 487 | * after processing the virtual timers queue. |
| 480 | */ | 488 | */ |
| 481 | # define CH_CFG_SYSTEM_TICK_HOOK() \ | 489 | # define CH_CFG_SYSTEM_TICK_HOOK() \ |
| 482 | { /* System tick event code here.*/ } | 490 | { /* System tick event code here.*/ \ |
| 491 | } | ||
| 483 | 492 | ||
| 484 | /** | 493 | /** |
| 485 | * @brief System halt hook. | 494 | * @brief System halt hook. |
| @@ -487,7 +496,8 @@ | |||
| 487 | * the system is halted. | 496 | * the system is halted. |
| 488 | */ | 497 | */ |
| 489 | # define CH_CFG_SYSTEM_HALT_HOOK(reason) \ | 498 | # define CH_CFG_SYSTEM_HALT_HOOK(reason) \ |
| 490 | { /* System halt code here.*/ } | 499 | { /* System halt code here.*/ \ |
| 500 | } | ||
| 491 | 501 | ||
| 492 | /** | 502 | /** |
| 493 | * @brief Trace hook. | 503 | * @brief Trace hook. |
| @@ -495,7 +505,8 @@ | |||
| 495 | * trace buffer. | 505 | * trace buffer. |
| 496 | */ | 506 | */ |
| 497 | # define CH_CFG_TRACE_HOOK(tep) \ | 507 | # define CH_CFG_TRACE_HOOK(tep) \ |
| 498 | { /* Trace code here.*/ } | 508 | { /* Trace code here.*/ \ |
| 509 | } | ||
| 499 | 510 | ||
| 500 | /** @} */ | 511 | /** @} */ |
| 501 | 512 | ||
