Timeout driver for event at absolute time

Dependents:   demo_TimeoutAbs i2c_lora_slave

Timeout driver for generating event at absolute time, i.e. alarm at 12:00PM instead of alarm in 5 minutes.

This is the same concept as TIMER_ABSTIME in clock_nanosleep().

The purpose is to remove dependency on when attach() is called, so the event occurs at correct time regardless of any latency in calling attach().

This driver doesnt add any functionality over mbed-os library; it only skips the call to ticker_read_us() in Ticker::setup(), which just changes a relative time to absolute time.

example use here.

Files at this revision

API Documentation at this revision

Comitter:
Wayne Roberts
Date:
Fri Dec 07 17:49:32 2018 -0800
Parent:
0:900163d530ae
Commit message:
ifdef for header multiple inclusion

Changed in this revision

TimeoutAbs.h Show annotated file Show diff for this revision Revisions of this file
diff -r 900163d530ae -r ae6b29794806 TimeoutAbs.h
--- a/TimeoutAbs.h	Mon Nov 26 14:22:55 2018 -0800
+++ b/TimeoutAbs.h	Fri Dec 07 17:49:32 2018 -0800
@@ -1,3 +1,5 @@
+#ifndef _TOABS_H_
+#define _TOABS_H_
 #include "drivers/TimerEvent.h"
 #include "platform/Callback.h"
 #include "platform/mbed_toolchain.h"
@@ -55,3 +57,4 @@
 };
 
 } // namespace mbed
+#endif /* _TOABS_H_ */