|
esp-sdr-zephyr
Raw I/Q receive and transmit on the ESP32-S3/C6 Wi-Fi radio, for Zephyr
|
The whole 80 MS/s through a ring in SRAM blocks 1 and 2, pruned to the windows above the noise, ESP32-C6 (esp_sdr_gapless.h, CONFIG_ESP_SDR_GAPLESS). More...
Data Structures | |
| struct | esp_sdr_gapless_wide |
| struct | esp_sdr_gapless_seg |
| struct | esp_sdr_gapless_sink |
| struct | esp_sdr_gapless_cfg |
| struct | esp_sdr_gapless_stats |
Macros | |
| #define | ESP_SDR_GAPLESS_RING 16384U |
| #define | ESP_SDR_GAPLESS_UNIT 12288U |
| #define | ESP_SDR_GAPLESS_RATE_HZ 80000000U |
| #define | ESP_SDR_GAPLESS_WINDOW_US 10U |
| #define | ESP_SDR_GAPLESS_SEG_DROPPED 0x01U |
| #define | ESP_SDR_GAPLESS_SEG_WIDE 0x08U |
| #define | ESP_SDR_GAPLESS_WIDE_PAIRS 4U |
Enumerations | |
| enum | esp_sdr_gapless_error { } |
| enum | esp_sdr_gapless_activity { ESP_SDR_GAPLESS_COPY , ESP_SDR_GAPLESS_PACK , ESP_SDR_GAPLESS_SERVICE , ESP_SDR_GAPLESS_WINDOWS , ESP_SDR_GAPLESS_PREP , ESP_SDR_GAPLESS_SWITCH , ESP_SDR_GAPLESS_SORT , ESP_SDR_GAPLESS_ACTIVITIES } |
Functions | |
| int | esp_sdr_gapless_run (const struct esp_sdr_gapless_cfg *cfg, const struct esp_sdr_gapless_sink *sink, struct esp_sdr_gapless_stats *stats) |
Run the gapless receiver until sink's stop() says so or the ring fails. | |
| void | esp_sdr_gapless_peek (struct esp_sdr_gapless_stats *stats) |
| The statistics of the run so far. | |
| void | esp_sdr_gapless_reset (void) |
| Forget the learnt baseline (after a retune or a gain change). | |
The whole 80 MS/s through a ring in SRAM blocks 1 and 2, pruned to the windows above the noise, ESP32-C6 (esp_sdr_gapless.h, CONFIG_ESP_SDR_GAPLESS).
Guide: Gapless receive.
| #define ESP_SDR_GAPLESS_RATE_HZ 80000000U |
Sample rate (esp_sdr_gapless_cfg.half_rate: half of it).
| #define ESP_SDR_GAPLESS_RING 16384U |
Samples in the ring (one lap, 205 us at 80 MS/s, 410 us at 40).
| #define ESP_SDR_GAPLESS_SEG_DROPPED 0x01U |
Segment flags (the same values as esdr_proto.h's ESDR_SEG_*).
| #define ESP_SDR_GAPLESS_SEG_WIDE 0x08U |
A width record (esp_sdr_gapless_cfg.wide): the segment's ESP_SDR_GAPLESS_WIDE_PAIRS pairs hold a struct esp_sdr_gapless_wide, not samples; the samples it stands for (its span, from the segment's index on) carried a signal wider than some 10 MHz and were not sent.
| #define ESP_SDR_GAPLESS_UNIT 12288U |
Samples per unit: the CPU switches blocks after this many (154 us, 307 at 40 MS/s).
| #define ESP_SDR_GAPLESS_WIDE_PAIRS 4U |
Pairs of a width record's segment: the bytes of struct esp_sdr_gapless_wide.
| #define ESP_SDR_GAPLESS_WINDOW_US 10U |
Estimator window, the unit of the keep decision.
What a unit's CPU cycles go to (esp_sdr_gapless_stats.cycles).
| Enumerator | |
|---|---|
| ESP_SDR_GAPLESS_COPY | Kept samples from the ring's blocks to the staging ring. |
| ESP_SDR_GAPLESS_PACK | From the staging ring into the sink, as int8. |
| ESP_SDR_GAPLESS_SERVICE | The sink's service(). |
| ESP_SDR_GAPLESS_WINDOWS | Estimator readings and the keep decisions. |
| ESP_SDR_GAPLESS_PREP | Markers into the next block. |
| ESP_SDR_GAPLESS_SWITCH | The switch, finding the unit, the servos. |
| ESP_SDR_GAPLESS_SORT | Width sorting of the staged samples (esp_sdr_gapless_cfg.wide). |
Why a run ended early.
| void esp_sdr_gapless_peek | ( | struct esp_sdr_gapless_stats * | stats | ) |
The statistics of the run so far.
For the sink's callbacks during esp_sdr_gapless_run(), which fills its own only at the end; after a run, the last run's.
| stats | Filled in. |
| int esp_sdr_gapless_run | ( | const struct esp_sdr_gapless_cfg * | cfg, |
| const struct esp_sdr_gapless_sink * | sink, | ||
| struct esp_sdr_gapless_stats * | stats ) |
Run the gapless receiver until sink's stop() says so or the ring fails.
Needs esp_sdr_init(). Takes the radio lock and holds interrupts off throughout.
| cfg | What to keep. |
| sink | Where kept samples go. |
| stats | Filled with the run's counters; may be NULL. |
| 0 | when stop() ended the run. |
| -EIO | when the ring failed (stats->error says why). |
| -EINVAL | for a bad argument; -EAGAIN without esp_sdr_init(). |