27#ifndef ESP_SDR_RING_STAGE_H_
28#define ESP_SDR_RING_STAGE_H_
35#define ESP_SDR_STAGE_WORDS 16240U
62void esp_sdr_stage_sink(
void *user,
const int16_t *i,
const int16_t *q,
size_t n, uint64_t index);
void esp_sdr_stage_init(bool halve)
Clear the stage before a capture; halve averages the outputs in pairs. Bank 2 must be the app's (no r...
uint32_t esp_sdr_stage_written(void)
Samples written since esp_sdr_stage_init(), modulo 2^32.
void esp_sdr_stage_run_start(void)
Before each esp_sdr_ring_run(): its output index starts at 0 again (a hole).
bool esp_sdr_stage_advance(struct esp_sdr_stage_reader *r, uint32_t n)
Done with n samples of the last peek. Returns false when the sink overwrote them meanwhile (the reade...
void esp_sdr_stage_sink(void *user, const int16_t *i, const int16_t *q, size_t n, uint64_t index)
The sink for esp_sdr_ring_cfg (user unused).
void esp_sdr_stage_reader_init(struct esp_sdr_stage_reader *r)
A reader at the oldest sample the stage holds now (before the run: at its start).
uint32_t esp_sdr_stage_peek(struct esp_sdr_stage_reader *r, const uint32_t **w, uint64_t *index, uint32_t max)
The samples after r's position that follow each other: up to max words, none past the stage's end or ...
void esp_sdr_stage_put(const int16_t *iq, size_t n, uint64_t index)
Samples into the stage from a writer of its own (the S31's dump ring decimator).
Definition esp_sdr_ring_stage.h:38
uint32_t gen
Definition esp_sdr_ring_stage.h:48
uint32_t lapped
Definition esp_sdr_ring_stage.h:46
uint64_t index
Definition esp_sdr_ring_stage.h:44
uint32_t pos
Definition esp_sdr_ring_stage.h:40
uint32_t holes
Definition esp_sdr_ring_stage.h:42