arch/nrf52/nrf52_tickless_rtc.c: fix tickless operations - ostest fail without this change
This commit is contained in:
parent
33b19e967c
commit
0976cddd03
@ -245,8 +245,6 @@ static int rtc_handler(int irq, void *context, void *arg)
|
|||||||
|
|
||||||
int up_alarm_cancel(struct timespec *ts)
|
int up_alarm_cancel(struct timespec *ts)
|
||||||
{
|
{
|
||||||
if (g_tickless_dev.alarm_set)
|
|
||||||
{
|
|
||||||
uint32_t counter;
|
uint32_t counter;
|
||||||
irqstate_t flags;
|
irqstate_t flags;
|
||||||
|
|
||||||
@ -260,7 +258,6 @@ int up_alarm_cancel(struct timespec *ts)
|
|||||||
g_tickless_dev.alarm_set = false;
|
g_tickless_dev.alarm_set = false;
|
||||||
|
|
||||||
leave_critical_section(flags);
|
leave_critical_section(flags);
|
||||||
}
|
|
||||||
|
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
@ -313,9 +310,9 @@ void up_timer_initialize(void)
|
|||||||
{
|
{
|
||||||
struct timespec ts;
|
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.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 */
|
/* Ensure we have support for the selected RTC instance */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user