REDAC HybridController
Firmware for LUCIDAC/REDAC Teensy
|
Routines for data acquisition (DAQ) using the internal analog-to-digital converters (ADC). More...
Namespaces | |
namespace | stream |
Detailed Description
Routines for data acquisition (DAQ) using the internal analog-to-digital converters (ADC).
Data acquisition can switch between on-demand (“one-shot”) and continuous streaming into a ring buffer. For on-demand sampling, use the sample_raw(), sample() or average() function. For continuous streaming, you should use stream::get() to enable a scoped continuous acquisition and periodically call the stream::Scope::process function to handle incoming data. The continuous acquisition of samples currently only happens while the OP signal is active. Stopping a continuous acquisition thus mostly refers to cleaning up state and side-effects in software and is automatically done when the stream::Scope object is destructed. Alternatively, you can use the stream::start(), stream::process() and stream::stop() functions manually. You cannot use on-demand sampling while a continuous acquisition is active.
See test/hardware/components/daq/test_flexio_daq_num_of_samples/test.cpp
for how to use it in practice.
- Warning
- You need to call daq::init() once before you can do any sampling.