Added Restart(by RESET) function from Standby mode only for some Nucleo boards (STM32 series)
Dependencies: LPC1114_WakeInterruptIn
Fork of WakeUp by
Example program using "Standby function" for Nucleo series is here.
/users/kenjiArai/code/Check_StandBy/
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