From 07fd31d86200d16726c9139d399c321ee51bf2e1 Mon Sep 17 00:00:00 2001 From: hebe Date: Thu, 13 Sep 2012 10:22:45 +0200 Subject: [PATCH 1/1] Mcu, added errors if sleep mode is not supported. --- arch/ppc/mpc55xx/drivers/Mcu.c | 7 +++++-- arch/ppc/mpc55xx/drivers/Mcu_Sleep.sx | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/arch/ppc/mpc55xx/drivers/Mcu.c b/arch/ppc/mpc55xx/drivers/Mcu.c index 178edfbf..751ee719 100644 --- a/arch/ppc/mpc55xx/drivers/Mcu.c +++ b/arch/ppc/mpc55xx/drivers/Mcu.c @@ -730,7 +730,8 @@ static void enterLowPower (Mcu_ModeType mcuMode ) /* Clear sleep flags to allow pads to operate */ CRP.PSCR.B.SLEEPF = 0x1; -#else + +#elif defined(CFG_MPC5516) uint32 timeout; /* Set the sleep bit; following a WAIT instruction, the device will go to sleep */ CRP.PSCR.B.SLEEP = 1; @@ -771,7 +772,9 @@ static void enterLowPower (Mcu_ModeType mcuMode ) /* Clear sleep flags to allow pads to operate */ CRP.PSCR.B.SLEEPF = 0x1; - +#else + /* NOT SUPPORTED */ + (void) McuMode; #endif } diff --git a/arch/ppc/mpc55xx/drivers/Mcu_Sleep.sx b/arch/ppc/mpc55xx/drivers/Mcu_Sleep.sx index 4b2532d5..9f6d4919 100644 --- a/arch/ppc/mpc55xx/drivers/Mcu_Sleep.sx +++ b/arch/ppc/mpc55xx/drivers/Mcu_Sleep.sx @@ -14,7 +14,7 @@ #if defined(CFG_MPC5516) || defined(CFG_MPC5668) #define CRP_RECPTR 0xfffec058 #else -#error +#error No support for this MCU #endif .global McuE_EnterLowPower -- 2.39.2