Skip to content

Commit

Permalink
common chconf.h: allow custom idle hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
dexter93 committed Oct 12, 2022
1 parent a39707f commit 92d5f99
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions platforms/chibios/boards/common/configs/chconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -749,20 +749,22 @@
* should be invoked from here.
* @note This macro can be used to activate a power saving mode.
*/
#if !defined(CH_CFG_IDLE_ENTER_HOOK)
#define CH_CFG_IDLE_ENTER_HOOK() { \
/* Idle-enter code here.*/ \
}

#endif
/**
* @brief Idle thread leave hook.
* @note This hook is invoked within a critical zone, no OS functions
* should be invoked from here.
* @note This macro can be used to deactivate a power saving mode.
*/
#if !defined(CH_CFG_IDLE_LEAVE_HOOK)
#define CH_CFG_IDLE_LEAVE_HOOK() { \
/* Idle-leave code here.*/ \
}

#endif
/**
* @brief Idle Loop hook.
* @details This hook is continuously invoked by the idle thread loop.
Expand Down

0 comments on commit 92d5f99

Please sign in to comment.