From: hebe Date: Thu, 13 Sep 2012 08:22:45 +0000 (+0200) Subject: Mcu, added errors if sleep mode is not supported. X-Git-Url: http://rtime.felk.cvut.cz/gitweb/arc.git/commitdiff_plain/07fd31d86200d16726c9139d399c321ee51bf2e1 Mcu, added errors if sleep mode is not supported. --- 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