esp-sdr-zephyr
Raw I/Q receive and transmit on the ESP32-S3/C6 Wi-Fi radio, for Zephyr
Loading...
Searching...
No Matches
esp_sdr_ring.h File Reference

ESP-SDR continuous receive: gapless, decimated I/Q from the 16 MS/s ring. More...

#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <esp_sdr/esp_sdr.h>

Go to the source code of this file.

Data Structures

struct  esp_sdr_ring_cfg
struct  esp_sdr_ring_stats
struct  esp_sdr_ring_bench_result
struct  esp_sdr_ring_burst_stats

Macros

#define ESP_SDR_RING_RATE_HZ   16000000U
#define ESP_SDR_RING_DECIM_MIN   64U
#define ESP_SDR_RING_FULL_SCALE   16384
#define ESP_SDR_RING_DECIM_BOX4   4U
#define ESP_SDR_RING_DECIM_RAW   1U
#define ESP_SDR_RING_UNIT_DEFAULT   12288U
#define ESP_SDR_RING_UNIT_MIN   1024U

Typedefs

typedef void(* esp_sdr_ring_sink_t) (void *user, const int16_t *i, const int16_t *q, size_t n, uint64_t index)
typedef void(* esp_sdr_ring_gen_t) (void *user, uint32_t *dst, uint64_t index, uint32_t n)

Enumerations

enum  esp_sdr_ring_status {
}

Functions

int esp_sdr_ring_run (const struct esp_sdr_ring_cfg *cfg, struct esp_sdr_ring_stats *stats)
 Stream until esp_sdr_ring_stop() or a ring failure.
bool esp_sdr_ring_wmac_hold (void)
 Hold off the Wi-Fi MAC interrupt on the calling CPU.
void esp_sdr_ring_wmac_release (bool was_enabled)
 Undo esp_sdr_ring_wmac_hold() on the same CPU.
int esp_sdr_ring_bench (const struct esp_sdr_ring_cfg *cfg, unsigned int units, struct esp_sdr_ring_bench_result *res)
 Time the filter on synthetic data in bank 0, the engine idle.
void esp_sdr_ring_stop (void)
 Ask a running esp_sdr_ring_run() to return; safe from any thread or ISR.
bool esp_sdr_ring_active (void)
bool esp_sdr_ring_now (uint64_t *pair)
 The running ring's position, from any CPU.
uint32_t * esp_sdr_ring_burst_buf (size_t *words)
 The burst bank, the CPUs' to write while no burst is armed and outside its waveform's [from, words) once armed.
int esp_sdr_ring_burst_arm (uint64_t end_pair, uint64_t limit_pair, esp_sdr_ring_gen_t gen, void *user, uint32_t from, uint32_t words)
 Arm a burst (from another CPU than the run's).
bool esp_sdr_ring_burst_fire (uint64_t at_pair)
 Play the armed burst with its first sample at at_pair (at once if that has passed).
void esp_sdr_ring_burst_cancel (void)
 Drop the armed burst; the capture goes on or restarts.
bool esp_sdr_ring_burst_busy (void)

Detailed Description

ESP-SDR continuous receive: gapless, decimated I/Q from the 16 MS/s ring.

The dump engine runs in circular mode and rotates through three SRAM banks; a two-stage decimating FIR (vector unit) filters every finished bank. Needs CONFIG_ESP_SDR_RING, which reserves SRAM banks 0 to 2.