arch/nrf52/nrf52_tickless_rtc.c: fix tickless operations - ostest fail without this change

This commit is contained in:
raiden00pl 2023-03-15 12:45:33 +01:00 committed by Petro Karashchenko
parent 33b19e967c
commit 0976cddd03

View File

@ -244,8 +244,6 @@ static int rtc_handler(int irq, void *context, void *arg)
****************************************************************************/
int up_alarm_cancel(struct timespec *ts)
{
if (g_tickless_dev.alarm_set)
{
uint32_t counter;
irqstate_t flags;
@ -260,7 +258,6 @@ int up_alarm_cancel(struct timespec *ts)
g_tickless_dev.alarm_set = false;
leave_critical_section(flags);
}
return OK;
}
@ -313,9 +310,9 @@ void up_timer_initialize(void)
{
struct timespec ts;
memset(&g_tickless_dev, 0, sizeof(struct nrf52_tickless_dev_s));
g_tickless_dev.rtc = nrf52_rtc_init(CONFIG_NRF52_SYSTIMER_RTC_INSTANCE);
g_tickless_dev.periods = 0;
g_tickless_dev.alarm_set = false;
/* Ensure we have support for the selected RTC instance */