26#ifndef ESP_SDR_ESP_SDR_PACED_H_
27#define ESP_SDR_ESP_SDR_PACED_H_
37#define ESP_SDR_PACED_INPUT_HZ 80000000U
126#if defined(CONFIG_SOC_SERIES_ESP32C6)
128 __asm__
volatile(
"csrr %0, 0x7e2" :
"=r"(v));
130 __asm__
volatile(
"csrr %0, cycle" :
"=r"(v));
bool(* esp_sdr_tx_paced_input_t)(void *user, int16_t *i, int16_t *q)
Definition esp_sdr_paced.h:85
uint32_t esp_sdr_tx_paced_slack(void)
CPU cycles until the next DAC value is due, 0 when it is.
bool esp_sdr_rx_paced_poll(int32_t *i, int32_t *q)
Produce the next receive sample if it is due.
void esp_sdr_tx_paced_stop(void)
Turn the transmit chain off and release the radio; no-op when stopped.
uint32_t esp_sdr_paced_deadline(void)
When the running stream's next sample is due, on esp_sdr_paced_cycles().
unsigned int esp_sdr_tx_paced_power_max(void)
Highest power step: 2 dB per step of the vendor tone's backoff (none on the C5).
static uint32_t esp_sdr_paced_cycles(void)
The CPU cycle counter the paced streams run on.
Definition esp_sdr_paced.h:122
void esp_sdr_tx_paced_range(uint32_t *min_mhz, uint32_t *max_mhz)
Transmit range in MHz: what the vendor tone path tunes (C6 2.4 GHz, C5 also 5 GHz).
void esp_sdr_paced_get_stats(struct esp_sdr_paced_stats *stats)
Statistics of the running or last stream.
void esp_sdr_rx_paced_stop(void)
Stop receiving and release the radio; no-op when stopped.
int esp_sdr_rx_paced_start(uint32_t rate_hz)
Start receiving at rate_hz.
bool esp_sdr_tx_paced_poll(void)
Write the next DAC value if it is due, then compute the one after.
uint32_t esp_sdr_rx_paced_slack(void)
CPU cycles until the next receive sample is due, 0 when it is.
int esp_sdr_tx_paced_start(uint32_t rate_hz, unsigned int interp, unsigned int power, esp_sdr_tx_paced_input_t input, void *user)
Turn the transmit chain on at the current frequency and start playing input at rate_hz.
void esp_sdr_paced_sync(void)
Restart the running stream's clock: the next sample is due one period from now. Call once interrupts ...
Definition esp_sdr_paced.h:39
uint32_t events
Definition esp_sdr_paced.h:47
uint64_t samples
Definition esp_sdr_paced.h:41
uint32_t late_max
Definition esp_sdr_paced.h:45
uint32_t late
Definition esp_sdr_paced.h:43