Skip to content

Commit

Permalink
apparently you can just cheese the preprocessor
Browse files Browse the repository at this point in the history
nice
  • Loading branch information
dexter93 committed Oct 12, 2022
1 parent 7c84758 commit d6c6057
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions platforms/chibios/boards/SN_SN32F240B/configs/chconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,14 @@

#define CH_CFG_USE_WAITEXIT TRUE

#include_next <chconf.h>

#undef CH_CFG_IDLE_ENTER_HOOK
#define CH_CFG_IDLE_ENTER_HOOK() { \
SN_PMU->CTRL = 4; \
}

#undef CH_CFG_IDLE_LEAVE_HOOK
#define CH_CFG_IDLE_LEAVE_HOOK() { \
SN_PMU->CTRL = 0; \
}

#include_next <chconf.h>

7 changes: 4 additions & 3 deletions platforms/chibios/boards/SN_SN32F260/configs/chconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,14 @@

#define CH_CFG_USE_MEMCORE FALSE

#include_next <chconf.h>

#undef CH_CFG_IDLE_ENTER_HOOK
#define CH_CFG_IDLE_ENTER_HOOK() { \
SN_PMU->CTRL = 4; \
}

#undef CH_CFG_IDLE_LEAVE_HOOK
#define CH_CFG_IDLE_LEAVE_HOOK() { \
SN_PMU->CTRL = 0; \
}
Expand All @@ -58,6 +62,3 @@
#pragma weak chThdSleep
#pragma weak chThdSuspendTimeoutS
#endif

#include_next <chconf.h>

0 comments on commit d6c6057

Please sign in to comment.