Fork of original library to fix mbed 5 deprecation warnings
Dependencies: LPC1114_WakeInterruptIn
Fork of WakeUp by
Diff: Device/WakeUp_LPC11XX.cpp
- Revision:
- 23:884e86933aaa
- Parent:
- 14:6bf547e1e62d
diff -r 49ca85e8822f -r 884e86933aaa Device/WakeUp_LPC11XX.cpp --- a/Device/WakeUp_LPC11XX.cpp Wed Nov 11 20:20:27 2015 +0000 +++ b/Device/WakeUp_LPC11XX.cpp Mon Apr 10 13:05:23 2017 +0000 @@ -17,7 +17,7 @@ WakeInterruptIn IRQ_in(WakeUpPin); PwmOut pulse_out(WakeUpPin); -FunctionPointer WakeUp::callback; +Callback<void()> WakeUp::cbk; float WakeUp::cycles_per_ms = 20.0; static uint32_t old_clk_sel = ~0; @@ -103,7 +103,9 @@ void WakeUp::irq_handler(void) { restore(); - callback.call(); + if (cbk) { + cbk.call(); + } } void WakeUp::calibrate(void)