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_trig.h
Go to the documentation of this file.
1/*
2 * SPDX-License-Identifier: GPL-3.0-or-later
3 */
4
24
25#ifndef ESP_SDR_ESP_SDR_TRIG_H_
26#define ESP_SDR_ESP_SDR_TRIG_H_
27
28#include <stdbool.h>
29#include <stddef.h>
30#include <stdint.h>
31
32#ifdef __cplusplus
33extern "C" {
34#endif
35
40
42#define ESP_SDR_TRIG_RING 16384U
44#define ESP_SDR_TRIG_RATE_HZ 80000000U
46#define ESP_SDR_TRIG_WINDOW_US 10U
52#define ESP_SDR_TRIG_WINDOWS 3U
53
61 uint32_t ratio_x16;
63 uint32_t level;
65 uint32_t post;
67 bool (*stop)(void *user);
68 void *user;
69};
70
73 const uint32_t *words;
75 uint32_t first;
77 uint32_t trig;
82 uint32_t power, baseline;
84 uint8_t *scratch;
85 size_t scratch_len;
86};
87
98int esp_sdr_trig_wait(const struct esp_sdr_trig_cfg *cfg, struct esp_sdr_trig_snap *snap);
99
102
107void esp_sdr_trig_pack_iq8(const struct esp_sdr_trig_snap *snap, uint32_t from, uint32_t n,
108 int8_t *out);
109
111
112#ifdef __cplusplus
113}
114#endif
115
116#endif /* ESP_SDR_ESP_SDR_TRIG_H_ */
void esp_sdr_trig_pack_iq8(const struct esp_sdr_trig_snap *snap, uint32_t from, uint32_t n, int8_t *out)
Pack n samples of a snapshot, from the from-th oldest, to int8 I, Q pairs (the top 8 of each 10-bit v...
int esp_sdr_trig_wait(const struct esp_sdr_trig_cfg *cfg, struct esp_sdr_trig_snap *snap)
Run the ring until a burst, then freeze it.
void esp_sdr_trig_reset(void)
Forget the baseline (after a change of frequency or gain).
Definition esp_sdr_trig.h:54
bool(* stop)(void *user)
Definition esp_sdr_trig.h:67
uint32_t ratio_x16
Definition esp_sdr_trig.h:61
uint32_t level
Definition esp_sdr_trig.h:63
uint32_t post
Definition esp_sdr_trig.h:65
Definition esp_sdr_trig.h:71
const uint32_t * words
Definition esp_sdr_trig.h:73
uint32_t trig
Definition esp_sdr_trig.h:77
uint32_t power
Definition esp_sdr_trig.h:82
uint32_t first
Definition esp_sdr_trig.h:75
uint8_t * scratch
Definition esp_sdr_trig.h:84