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_rx.h File Reference

ESP-SDR receive: gain, analog low-pass, burst and decimated capture. More...

#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_rx_burst

Macros

#define ESP_SDR_RX_GAIN_AUTO   (-1)
#define ESP_SDR_RX_LPF_AUTO   (-1)
#define ESP_SDR_RX_LPF_MAX   63
#define ESP_SDR_RX_DECIM_MIN   2U
#define ESP_SDR_RX_FOLD_MIN   2U

Functions

int esp_sdr_rx_set_gain (int index)
 Select hardware AGC or a fixed receive gain.
int esp_sdr_rx_get_gain (void)
int esp_sdr_rx_gain_max (void)
int esp_sdr_rx_set_bandwidth (uint32_t mhz)
 Select the analog low-pass filter by approximate bandwidth.
void esp_sdr_rx_bandwidth_range (uint32_t *min, uint32_t *max)
 Supported bandwidth range in MHz.
int esp_sdr_rx_set_lpf (int code)
 Select a raw low-pass filter capacitor code.
int esp_sdr_rx_get_lpf (void)
int esp_sdr_rx_capture (enum esp_sdr_rate rate, size_t count, struct esp_sdr_rx_burst *burst)
 Capture one burst of complex samples.
int esp_sdr_rx_capture_iq (enum esp_sdr_rate rate, size_t count, struct esp_sdr_iq16 *out, uint64_t *first_ns)
 Capture one burst and convert it to I/Q (raw units, -512 to 511) under the radio lock.
int esp_sdr_rx_capture_bank (enum esp_sdr_rate rate, size_t count, int bank, struct esp_sdr_rx_burst *burst)
 Capture one burst into a chosen bank, like esp_sdr_rx_capture().
int esp_sdr_rx_capture_decimated (enum esp_sdr_rate rate, size_t count, unsigned int m, struct esp_sdr_iq16 *out, size_t max_out, size_t *n_out, uint64_t *first_ns)
 Capture a burst and decimate it with a third order CIC filter.
int esp_sdr_rx_capture_folded (enum esp_sdr_rate rate, size_t count, unsigned int n, struct esp_sdr_iq16 *out, size_t max_out, size_t *n_out, uint64_t *first_ns)
 Capture a burst and fold its spectrum by n: a power estimation mode.
uint32_t esp_sdr_rx_rate_hz (enum esp_sdr_rate rate)
static int16_t esp_sdr_rx_i (uint32_t word)
static int16_t esp_sdr_rx_q (uint32_t word)
size_t esp_sdr_rx_pack_iq8 (const uint32_t *words, size_t count, uint8_t *out)
 Pack raw words to signed 8-bit I then Q (upper 8 of 10 bits).
size_t esp_sdr_rx_pack_iq10 (const uint32_t *words, size_t count, uint8_t *out)
 Pack raw words to the upstream packed 10-bit format.

Detailed Description

ESP-SDR receive: gain, analog low-pass, burst and decimated capture.

Captures bursts of raw baseband I/Q samples from the Wi-Fi receiver through an undocumented debug path.