22#ifndef ESP_SDR_ESP_SDR_TX_H_
23#define ESP_SDR_ESP_SDR_TX_H_
40#if defined(CONFIG_SOC_SERIES_ESP32S3)
67#if defined(CONFIG_SOC_SERIES_ESP32S31)
69#define ESP_SDR_TX_TONE_ATT_MAX 127U
86int esp_sdr_tx_tone_start(
int offset_khz,
unsigned int att);
89void esp_sdr_tx_tone_stop(
void);
105#if defined(CONFIG_SOC_SERIES_ESP32S3)
111static inline __attribute__((always_inline)) uint32_t
esp_sdr_tx_word(int16_t i, int16_t q)
113 return ((uint32_t)i & 0x3ffU) | (((uint32_t)q & 0x3ffU) << 10);
116#if defined(CONFIG_SOC_SERIES_ESP32S3)
140#define ESP_SDR_TX_PLAY_MAX_MS 5000U
163 uint32_t duration_ms, uint32_t *bursts);
263 uint32_t
fill_us[2], fill_blocks[2], fill_cpu[2];
278#if defined(CONFIG_SOC_SERIES_ESP32S3)
ESP-SDR: raw I/Q receive and transmit on the ESP32-S3 Wi-Fi radio.
esp_sdr_rate
Definition esp_sdr.h:99
int esp_sdr_tx_loop_begin(enum esp_sdr_rate rate)
Take the radio and switch the front end to TX at the selected step.
int esp_sdr_tx_loop_start(int bank, size_t count)
(Re)start looping over the first count words of bank.
void esp_sdr_tx_loop_halt(void)
Stop playback at once; the session stays open.
void esp_sdr_tx_loop_end(void)
Stop playback, back to RX, release the radio.
uint32_t * esp_sdr_tx_loop_buf(int bank, size_t *words)
void esp_sdr_tx_get_stats(struct esp_sdr_tx_stats *stats)
void esp_sdr_tx_dac_get_stats(struct esp_sdr_tx_dac_stats *stats)
uint32_t esp_sdr_tx_rate_hz(enum esp_sdr_rate rate)
int esp_sdr_tx_play_for(enum esp_sdr_rate rate, const uint32_t *words, size_t count, uint32_t duration_ms, uint32_t *bursts)
Replay one burst back to back for a while, like esp_sdr_tx_play().
int esp_sdr_tx_play(enum esp_sdr_rate rate, const uint32_t *words, size_t count)
Play one burst of complex samples out through the TX DAC.
int esp_sdr_tx_get_gain(void)
static uint32_t esp_sdr_tx_word(int16_t i, int16_t q)
Definition esp_sdr_tx.h:111
int esp_sdr_tx_start(uint64_t freq_hz, uint32_t rate_hz)
Start streaming.
int esp_sdr_tx_gain_power(int index)
int esp_sdr_tx_write(const struct esp_sdr_iq16 *samples, size_t count)
Queue samples for the DAC.
int esp_sdr_tx_set_lpf(int code_a, int code_b)
Select the TX baseband low-pass capacitor codes (experimental).
int esp_sdr_tx_set_gain(int index)
Select a transmit power step, picked up by the next transmission.
int esp_sdr_tx_sweep(enum esp_sdr_rate rate, float f0_hz, float f1_hz, uint32_t duration_ms, int amp, struct esp_sdr_tx_sweep_stats *stats)
Transmit a linear frequency sweep at fixed power.
int esp_sdr_tx_stop(void)
Stop streaming; no-op when stopped.
int esp_sdr_tx_dac_play_gen(esp_sdr_tx_dac_gen_t gen, void *user, uint64_t samples)
Play samples generated DAC samples gapless at the current LO.
int esp_sdr_tx_gain_max(void)
uint32_t esp_sdr_tx_dac_queued(void)
void(* esp_sdr_tx_dac_gen_t)(void *user, uint32_t *dst, uint64_t index, uint32_t n)
Definition esp_sdr_tx.h:322
bool esp_sdr_tx_active(void)
Definition esp_sdr_tx.h:253
int32_t slack_us_min
Definition esp_sdr_tx.h:269
uint32_t switches
Definition esp_sdr_tx.h:259
uint32_t restarts
Definition esp_sdr_tx.h:271
uint32_t switch_us_sum
Definition esp_sdr_tx.h:267
uint64_t played
Definition esp_sdr_tx.h:255
uint32_t fill_us[2]
Definition esp_sdr_tx.h:263
bool simd
Definition esp_sdr_tx.h:265
uint32_t fill_us_max
Definition esp_sdr_tx.h:273
int32_t start_margin_us
Definition esp_sdr_tx.h:275
uint32_t interp
Definition esp_sdr_tx.h:261
uint32_t underruns
Definition esp_sdr_tx.h:257
Definition esp_sdr_tx.h:246
Definition esp_sdr_tx.h:166
uint32_t segments
Definition esp_sdr_tx.h:168
uint32_t samples
Definition esp_sdr_tx.h:170
uint32_t elapsed_ms
Definition esp_sdr_tx.h:172