Skip to content

Commit d1d900d

Browse files
author
Rohit Grover
committed
replace AppTimer on Nordic's nRF5x with a driver for RTC1.
AppTimer was an overhead; and it was also reseting the RTC from time to time.
2 parents ec8dd1d + 1108cf9 commit d1d900d

File tree

3 files changed

+214
-1209
lines changed

3 files changed

+214
-1209
lines changed

libraries/mbed/common/us_ticker_api.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,17 @@ void us_ticker_insert_event(ticker_event_t *obj, timestamp_t timestamp, uint32_t
7777
prev = p;
7878
p = p->next;
7979
}
80+
81+
/* if we're at the end p will be NULL, which is correct */
82+
obj->next = p;
83+
8084
/* if prev is NULL we're at the head */
8185
if (prev == NULL) {
8286
head = obj;
8387
us_ticker_set_interrupt(timestamp);
8488
} else {
8589
prev->next = obj;
8690
}
87-
/* if we're at the end p will be NULL, which is correct */
88-
obj->next = p;
8991

9092
__enable_irq();
9193
}

0 commit comments

Comments
 (0)