|
esp-sdr-zephyr
Raw I/Q receive and transmit on the ESP32-S3/C6 Wi-Fi radio, for Zephyr
|
Gapless 8+8 bit receive up to 40 MS/s through the modem diagnostic bus and PARLIO, a ring with room for a block header (esp_sdr_diag16.h, CONFIG_ESP_SDR_DIAG16). More...
Data Structures | |
| struct | esp_sdr_diag16_cfg |
| struct | esp_sdr_diag16_stats |
Macros | |
| #define | ESP_SDR_DIAG16_PINS 16U |
| #define | ESP_SDR_DIAG16_NODE 4096U |
| #define | ESP_SDR_DIAG16_HOLE 16U |
| #define | ESP_SDR_DIAG16_PAYLOAD (ESP_SDR_DIAG16_NODE - ESP_SDR_DIAG16_HOLE) |
Typedefs | |
| typedef void(* | esp_sdr_diag16_sink_t) (void *user, uint8_t *node, uint64_t index) |
Functions | |
| int | esp_sdr_diag16_run (const struct esp_sdr_diag16_cfg *cfg, struct esp_sdr_diag16_stats *stats) |
| Run the ring until the time is up, esp_sdr_diag16_stop() or an overrun. | |
| void | esp_sdr_diag16_stop (void) |
| Ask a running esp_sdr_diag16_run() to return. | |
| bool | esp_sdr_diag16_active (void) |
| uint64_t | esp_sdr_diag16_produced (void) |
| bool | esp_sdr_diag16_node_valid (uint64_t index) |
Is the node a sink got at index still as it was? | |
Gapless 8+8 bit receive up to 40 MS/s through the modem diagnostic bus and PARLIO, a ring with room for a block header (esp_sdr_diag16.h, CONFIG_ESP_SDR_DIAG16).
Guide: Gapless receive.
| #define ESP_SDR_DIAG16_HOLE 16U |
The DMA leaves this many bytes at the start of every node, for a header in front of the samples: nodes side by side are then a run of blocks that needs no copying.
| #define ESP_SDR_DIAG16_NODE 4096U |
A ring node. A sink gets the whole node: the samples start ESP_SDR_DIAG16_HOLE into it.
| #define ESP_SDR_DIAG16_PAYLOAD (ESP_SDR_DIAG16_NODE - ESP_SDR_DIAG16_HOLE) |
Sample bytes in a node.
| #define ESP_SDR_DIAG16_PINS 16U |
Pads, and data lines of the receiver.
| typedef void(* esp_sdr_diag16_sink_t) (void *user, uint8_t *node, uint64_t index) |
Receives one node.
| user | cfg.user. |
| node | ESP_SDR_DIAG16_NODE bytes in the ring. Valid until the DMA comes round again, which esp_sdr_diag16_node_valid() tells, and the DMA does not wait; the hole is the sink's. |
| index | Sample bytes before this node since the start; a jump from the previous index plus ESP_SDR_DIAG16_PAYLOAD means the consumer fell behind and nodes were skipped. |
| bool esp_sdr_diag16_active | ( | void | ) |
| bool esp_sdr_diag16_node_valid | ( | uint64_t | index | ) |
Is the node a sink got at index still as it was?
For a consumer that keeps or copies nodes: copy first, ask after.
| index | The index the sink got. |
| uint64_t esp_sdr_diag16_produced | ( | void | ) |
| int esp_sdr_diag16_run | ( | const struct esp_sdr_diag16_cfg * | cfg, |
| struct esp_sdr_diag16_stats * | stats ) |
Run the ring until the time is up, esp_sdr_diag16_stop() or an overrun.
Takes the radio for the whole run; the receiver keeps its frequency, gain and filter, but not an earlier DC calibration: cfg.dc_correct makes a new one.
A sink slower than the DMA is no error: nodes get skipped (stats->skips), and the run still ends on time or on a stop.
| void esp_sdr_diag16_stop | ( | void | ) |
Ask a running esp_sdr_diag16_run() to return.
With no run in progress it does nothing: a run that starts just after has not seen it, so a caller with a reason to stop must look at that reason again from its sink.