Skip to content

Commit

Permalink
cpu/efm32/pm: add debug output
Browse files Browse the repository at this point in the history
  • Loading branch information
jue89 committed Oct 19, 2022
1 parent 360b36a commit 6c73e1a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cpu/efm32/periph/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,29 @@

#include "em_emu.h"

#define ENABLE_DEBUG 0
#include "debug.h"

void pm_set(unsigned mode)
{
switch (mode) {
case EFM32_PM_MODE_EM3:
DEBUG_PUTS("[pm] enter EFM32_PM_MODE_EM3");
/* after exiting EM3, clocks are restored */
EMU_EnterEM3(true);
break;
case EFM32_PM_MODE_EM2:
DEBUG_PUTS("[pm] enter EFM32_PM_MODE_EM2");
/* after exiting EM2, clocks are restored */
EMU_EnterEM2(true);
break;
case EFM32_PM_MODE_EM1:
DEBUG_PUTS("[pm] enter EFM32_PM_MODE_EM1");
/* wait for next event or interrupt */
EMU_EnterEM1();
break;
default:
DEBUG_PUTS("[pm] no sleep");
/* no sleep at all */
break;
}
Expand Down

0 comments on commit 6c73e1a

Please sign in to comment.