|
esp-sdr-zephyr
Raw I/Q receive and transmit on the ESP32-S3/C6 Wi-Fi radio, for Zephyr
|
#include <esp_sdr/esp_sdr_gapless.h>
Data Fields | |
| uint32_t(* | reserve )(const struct esp_sdr_gapless_seg *seg, int8_t **dst, void *user) |
| void(* | commit )(uint32_t pairs, void *user) |
| bool(* | service )(uint32_t budget, void *user) |
| bool(* | stop )(void *user) |
Where kept samples go. Every callback runs with interrupts off, between the ring's deadlines: mark them, and what they call, as paced code (ESP_SDR_CODE(PACED_CHUNK, fn), esp_sdr_place.h), which the ESP32-C6's rules place in SRAM: a flash cache miss costs hundreds of cycles against the deadlines.
| void(* esp_sdr_gapless_sink::commit) (uint32_t pairs, void *user) |
The samples of the last reserve() are written; pairs of them (at most the granted).
| uint32_t(* esp_sdr_gapless_sink::reserve) (const struct esp_sdr_gapless_seg *seg, int8_t **dst, void *user) |
Room for segment seg: return how many of its samples fit (0: none for now; the samples wait in their block and are lost if it is needed again first) and where they go (2 bytes each, I then Q). The library writes them, then calls commit().
| bool(* esp_sdr_gapless_sink::service) (uint32_t budget, void *user) |
Free time: move data, poll the link. Must return within budget CPU cycles; returns true if it did something (the library then gives it the next free time again).
| bool(* esp_sdr_gapless_sink::stop) (void *user) |
Polled once per unit: true ends the run.