We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9229772 commit 0470598Copy full SHA for 0470598
targets/TARGET_Freescale/TARGET_KLXX/us_ticker.c
@@ -185,12 +185,11 @@ static void lptmr_isr(void) {
185
}
186
187
void us_ticker_set_interrupt(timestamp_t timestamp) {
188
- uint32_t tcur = us_ticker_read();
189
- int delta = (int)((uint32_t)timestamp - tcur);
+ int delta = (int)((uint32_t)timestamp - us_ticker_read());
190
if (delta <= 0) {
191
// This event was in the past. Force it into the very near
192
// future instead.
193
- timestamp = tcur + 2;
+ delta = 1;
194
195
196
us_ticker_int_counter = (uint32_t)(delta >> 16);
0 commit comments