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 67b3800
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cpu/efm32/periph/pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,24 @@

#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;
Expand Down

0 comments on commit 67b3800

Please sign in to comment.