diff options
Diffstat (limited to 'source/periph/dac.cpp')
-rw-r--r-- | source/periph/dac.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/source/periph/dac.cpp b/source/periph/dac.cpp index 1ff8867..35c2908 100644 --- a/source/periph/dac.cpp +++ b/source/periph/dac.cpp @@ -61,7 +61,18 @@ void DAC::start(int channel, dacsample_t *buffer, size_t count) int DAC::sigGenWantsMore() { - return dacIsDone; + if (dacIsDone != -1) { + int tmp = dacIsDone; + dacIsDone = -1; + return tmp; + } else { + return -1; + } +} + +int DAC::isSigGenRunning() +{ + return m_driver[1]->state == DAC_ACTIVE; } void DAC::stop(int channel) |