From 6f99dce581256eadbcbdf7b80bf813c024700c1e Mon Sep 17 00:00:00 2001 From: Bas Stottelaar Date: Wed, 4 Apr 2018 11:37:42 +0200 Subject: [PATCH] cpu: lpc1768: correct number of modes. --- cpu/lpc1768/include/periph_cpu.h | 2 +- cpu/lpc1768/periph/pm.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/cpu/lpc1768/include/periph_cpu.h b/cpu/lpc1768/include/periph_cpu.h index 18ef5d0c35..4e3d33846d 100644 --- a/cpu/lpc1768/include/periph_cpu.h +++ b/cpu/lpc1768/include/periph_cpu.h @@ -71,7 +71,7 @@ typedef enum { /** * @brief Power management configuration */ -#define PM_NUM_MODES (3U) +#define PM_NUM_MODES (2U) #ifdef __cplusplus } diff --git a/cpu/lpc1768/periph/pm.c b/cpu/lpc1768/periph/pm.c index 147e1381c3..be412f5135 100644 --- a/cpu/lpc1768/periph/pm.c +++ b/cpu/lpc1768/periph/pm.c @@ -33,11 +33,10 @@ void pm_set(unsigned mode) LPC_SC->PCON = 0x00; cortexm_sleep(1); break; - case 2: + default: /* enter sleep mode */ LPC_SC->PCON = 0x00; cortexm_sleep(0); - break; } }