From 81e6c9601473cca94be679fcd05c7eb4ee73708b Mon Sep 17 00:00:00 2001 From: Steven Cooreman Date: Tue, 27 Mar 2018 15:11:20 +0200 Subject: [PATCH] Code style fixes requested by @0xc0170 Tests still passing --- targets/TARGET_Silicon_Labs/TARGET_EFM32/rtcc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/targets/TARGET_Silicon_Labs/TARGET_EFM32/rtcc.c b/targets/TARGET_Silicon_Labs/TARGET_EFM32/rtcc.c index 4b14f42ec4..8524094f35 100644 --- a/targets/TARGET_Silicon_Labs/TARGET_EFM32/rtcc.c +++ b/targets/TARGET_Silicon_Labs/TARGET_EFM32/rtcc.c @@ -22,7 +22,7 @@ ******************************************************************************/ #include "device.h" -#if DEVICE_RTC || DEVICE_LPTIMER +#if DEVICE_RTC || DEVICE_LOWPOWERTIMER /* Use RTCC on devices that have it */ #if defined(RTCC_PRESENT) @@ -111,7 +111,9 @@ void lp_ticker_init() { if (!lptick_inited) { rtc_init(); + core_util_critical_section_enter(); lptick_offset = RTCC_CounterGet(); + core_util_critical_section_exit(); RTCC_CCChConf_TypeDef lp_chan_init = RTCC_CH_INIT_COMPARE_DEFAULT; lp_chan_init.compBase = rtccCompBasePreCnt; lp_chan_init.compMask = 0;