From e8b022c310d806ed7d72f804c05dad0db9847b58 Mon Sep 17 00:00:00 2001 From: Aksel Skauge Mellbye Date: Thu, 17 Sep 2015 08:23:11 +0200 Subject: [PATCH] [EFM32] Fix bug in rtc_free_real --- .../targets/hal/TARGET_Silicon_Labs/TARGET_EFM32/rtc_api.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/mbed/targets/hal/TARGET_Silicon_Labs/TARGET_EFM32/rtc_api.c b/libraries/mbed/targets/hal/TARGET_Silicon_Labs/TARGET_EFM32/rtc_api.c index d1ea76eafd..d02878a41d 100644 --- a/libraries/mbed/targets/hal/TARGET_Silicon_Labs/TARGET_EFM32/rtc_api.c +++ b/libraries/mbed/targets/hal/TARGET_Silicon_Labs/TARGET_EFM32/rtc_api.c @@ -136,10 +136,10 @@ void rtc_free(void) void rtc_free_real(uint32_t flags) { /* Clear use flag */ - flags &= ~flags; + useflags &= ~flags; /* Disable the RTC if it was inited and is no longer in use by anyone. */ - if (rtc_inited && (flags == 0)) { + if (rtc_inited && (useflags == 0)) { NVIC_DisableIRQ(RTC_IRQn); RTC_Reset(); CMU_ClockEnable(cmuClock_RTC, false);