fast-feedback virtual target task code on STM Nucleo

Dependencies:   mbed

Revision:
28:797536a42b9f
Parent:
27:b31ea8d74f9e
--- a/core/scheduler.cpp	Sat Jul 21 00:36:38 2018 +0000
+++ b/core/scheduler.cpp	Sun Jul 22 16:25:25 2018 +0000
@@ -1,4 +1,5 @@
 #include "scheduler.h"
+#include "IO.h"
 
 namespace scheduler
 {
@@ -9,7 +10,8 @@
         if (timeout_us == 0) {
             func();
         } else {
-            timeout_.attach(func, timeout_us);
+            timeout_.detach();
+            timeout_.attach_us(func, timeout_us);
         }
     }