mbed library sources. Supersedes mbed-src.

Dependents:   Nucleo_Hello_Encoder BLE_iBeaconScan AM1805_DEMO DISCO-F429ZI_ExportTemplate1 ... more

Revision:
182:a56a73fd2a6f
Parent:
181:57724642e740
Child:
186:707f6e361f3e
--- a/hal/mbed_ticker_api.c	Fri Feb 16 16:09:33 2018 +0000
+++ b/hal/mbed_ticker_api.c	Tue Mar 20 16:56:18 2018 +0000
@@ -235,6 +235,14 @@
         }
 
         timestamp_t match_tick = compute_tick(ticker, match_time);
+        // The time has been checked to be future, but it could still round
+        // to the last tick as a result of us to ticks conversion
+        if (match_tick == queue->tick_last_read) {
+            // Match time has already expired so fire immediately
+            ticker->interface->fire_interrupt();
+            return;
+        }
+
         ticker->interface->set_interrupt(match_tick);
         timestamp_t cur_tick = ticker->interface->read();