1 sensor using RTOS Timer, another 2 over RTOS Semaphore

Dependents:   Autonomous_quadcopter

Fork of HCSR04 by Antoniolinux B.

Revision:
3:81512ca9a13c
Parent:
1:53657de3246f
Child:
7:dcf0aa89bcd7
--- a/hcsr04.h	Fri Dec 01 11:10:54 2017 +0000
+++ b/hcsr04.h	Sat Jan 20 11:44:21 2018 +0000
@@ -47,7 +47,8 @@
         DigitalOut trig;
         DigitalIn echo;
         Timer timer;
-        Thread* thread;
+        Thread *thread;
+        RtosTimer *threadUpdateTimer;
         uint16_t distance_cm;
         uint32_t distan;
 };