From 9f0df8180a3e65e8636b5ea051d627bc44450dc9 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sun, 3 Apr 2016 09:52:08 -0600 Subject: [PATCH] STM32 RTC: Fix some errors when RTC debug is enabled --- arch/arm/src/stm32/stm32_rtc_lowerhalf.c | 2 +- arch/arm/src/stm32/stm32f40xxx_rtcc.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/arm/src/stm32/stm32_rtc_lowerhalf.c b/arch/arm/src/stm32/stm32_rtc_lowerhalf.c index 90eb345d06..c89b75c2c9 100644 --- a/arch/arm/src/stm32/stm32_rtc_lowerhalf.c +++ b/arch/arm/src/stm32/stm32_rtc_lowerhalf.c @@ -612,7 +612,7 @@ static int stm32_cancelalarm(FAR struct rtc_lowerhalf_s *lower, int alarmid) /* ID0-> Alarm A; ID1 -> Alarm B */ DEBUGASSERT(lower != NULL); - DEBUGASSERT(alarminfo->id == RTC_ALARMA || alarminfo->id == RTC_ALARMB); + DEBUGASSERT(alarmid == RTC_ALARMA || alarmid == RTC_ALARMB); # warning Missing logic return -ENOSYS; diff --git a/arch/arm/src/stm32/stm32f40xxx_rtcc.c b/arch/arm/src/stm32/stm32f40xxx_rtcc.c index 4ef236b34d..2bdd23e1ee 100644 --- a/arch/arm/src/stm32/stm32f40xxx_rtcc.c +++ b/arch/arm/src/stm32/stm32f40xxx_rtcc.c @@ -144,10 +144,10 @@ /* Debug ****************************************************************************/ #ifdef CONFIG_DEBUG_RTC -# define rtcdbg rtcdbg -# define rtcvdbg rtcvdbg -# define rtclldbg rctlldbg -# define rtcllvdbg rtcllvdbg +# define rtcdbg dbg +# define rtcvdbg vdbg +# define rtclldbg lldbg +# define rtcllvdbg llvdbg #else # define rtcdbg(x...) # define rtcvdbg(x...) @@ -1398,7 +1398,7 @@ int stm32_rtc_setalarm(FAR struct alm_setalarm_s *alminfo) break; default: - rtcvdbg("error unknown %d\n", alminfo->asr_id); + rtcvdbg("ERROR: Invalid ALARM%d\n", alminfo->as_id); break; }