Modified WakeUp program to run on STM32L152RE
Dependencies: mbed LPC1114_WakeInterruptIn
Fork of WakeUp by
Diff: WakeUp.h
- Revision:
- 23:69a0c843e4bd
- Parent:
- 10:c41bc9154a7c
- Child:
- 24:65c04a02ad45
--- a/WakeUp.h Wed Nov 11 20:20:27 2015 +0000 +++ b/WakeUp.h Wed Jun 14 08:56:55 2017 +0000 @@ -66,18 +66,12 @@ * This means that clock speed dependent functions, such as printf * might end up distorted. * - * Also supports normal way to attach member functions - * (not documented for simplicity) + * It uses the new Callback system to attach functions. * * @param *function function to call */ - static void attach(void (*function)(void)) { - callback.attach(function); - } - - template<typename T> - static void attach(T *object, void (T::*member)(void)) { - callback.attach(object, member); + static void attach(Callback<void()> function) { + callback = function; } /** @@ -92,7 +86,7 @@ private: - static FunctionPointer callback; + static Callback<void()> callback; static void irq_handler(void); static float cycles_per_ms; }; \ No newline at end of file