FastLED 3.9.15
Loading...
Searching...
No Matches

◆ getRawEdgeTimes()

virtual size_t fl::RxDevice::getRawEdgeTimes ( fl::span< EdgeTime > out,
size_t offset = 0 )
pure virtual

Get raw edge timings in universal format (for debugging)

Parameters
outOutput span to write EdgeTime entries (span.size() = max edges to read)
offsetStarting edge index to read from (default: 0)
Returns
Number of EdgeTime entries written (may be less than out.size() if insufficient data)

Converts internal platform-specific format (RMT ticks, ISR timestamps, etc.) to universal EdgeTime format with nanosecond durations.

For RMT devices: Each RMT symbol produces 2 EdgeTime entries (high/low phases)

Example:

auto rx = RxDevice::create<RxDeviceType::RMT>(6); // GPIO 6
RxConfig config;
config.buffer_size = 512;
rx->begin(config);
rx->wait(100);
// Get first 100 edges
EdgeTime edges[100];
size_t count = rx->getRawEdgeTimes(edges); // offset defaults to 0
// Get 10 edges starting at offset 50
EdgeTime edges[10];
size_t count = rx->getRawEdgeTimes(edges, 50);
static fl::shared_ptr< RxDevice > create(int pin) FL_NOEXCEPT
Template factory method to create RX device by type.
Universal edge timing representation (platform-agnostic)
Definition rx.h:34
size_t buffer_size
Buffer size in symbols/edges (default: 512)
Definition rx.h:218
Configuration for RX device initialization.
Definition rx.h:216

References FL_NOEXCEPT, getRawEdgeTimes(), and offset().

Referenced by getRawEdgeTimes().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: