Keisuke Sehara
/
STM32_Whisking
fast-feedback virtual target task code on STM Nucleo
Diff: core/pulse.cpp
- Revision:
- 29:1fb060aab1f8
- Parent:
- 28:797536a42b9f
--- a/core/pulse.cpp Sun Jul 22 16:25:25 2018 +0000 +++ b/core/pulse.cpp Mon Oct 01 14:54:37 2018 +0000 @@ -1,4 +1,5 @@ #include "pulse.h" +#include "IO.h" Pulse::Pulse(PinName pin, const uint64_t& onset_us, @@ -38,6 +39,12 @@ blinkdur_ = value_us; } +void Pulse::loginfo() { + const uint32_t onset_ms = onset_/1000; + const uint32_t duration_ms = dur_/1000; + IO::debug("pulse: enabled=%d, onset=%d ms, duration=%d ms", enabled_, onset_ms, duration_ms); +} + void Pulse::attachTurnOnCallback(Callback<void ()> cb) { turnon_ = cb;