esp-sdr-zephyr
Raw I/Q receive and transmit on the ESP32-S3/C6 Wi-Fi radio, for Zephyr
Loading...
Searching...
No Matches
ieee154_phy.h
Go to the documentation of this file.
1/*
2 * SPDX-License-Identifier: GPL-3.0-or-later
3 */
4
12
13#ifndef ESP_SDR_IEEE154_PHY_H_
14#define ESP_SDR_IEEE154_PHY_H_
15
16#include <stdbool.h>
17#include <stddef.h>
18#include <stdint.h>
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
28
30#define IEEE154_PHY_PSDU_MAX 127
31
33#define IEEE154_PHY_MOD_SAMPLES(len) ((6 + (size_t)(len)) * 128 + 4)
34
40typedef void (*ieee154_phy_frame_cb_t)(const uint8_t *psdu, uint8_t len, int lqi, void *user);
41
49typedef bool (*ieee154_phy_hdr_cb_t)(const uint8_t *psdu, uint8_t have, uint8_t len,
50 uint32_t end_pos, void *user);
51
54
57
60
62void ieee154_phy_rx_block(const int16_t *iq, size_t n);
63
66
73
75uint32_t ieee154_phy_chips(int sym);
76
81size_t ieee154_phy_modulate(const uint8_t *psdu, uint8_t len, int16_t amp, int16_t *out,
82 size_t max_samples);
83
85size_t ieee154_phy_append_fcs(uint8_t *buf, size_t n);
86
88
89#ifdef __cplusplus
90}
91#endif
92
93#endif /* ESP_SDR_IEEE154_PHY_H_ */
void ieee154_phy_rx_block(const int16_t *iq, size_t n)
void ieee154_phy_init(void)
uint32_t ieee154_phy_rx_position(void)
uint32_t ieee154_phy_chips(int sym)
void(* ieee154_phy_frame_cb_t)(const uint8_t *psdu, uint8_t len, int lqi, void *user)
Definition ieee154_phy.h:40
bool(* ieee154_phy_hdr_cb_t)(const uint8_t *psdu, uint8_t have, uint8_t len, uint32_t end_pos, void *user)
Definition ieee154_phy.h:49
void ieee154_phy_rx_reset(void)
size_t ieee154_phy_append_fcs(uint8_t *buf, size_t n)
void ieee154_phy_set_hdr_cb(ieee154_phy_hdr_cb_t cb, void *user)
void ieee154_phy_set_rx_cb(ieee154_phy_frame_cb_t cb, void *user)
size_t ieee154_phy_modulate(const uint8_t *psdu, uint8_t len, int16_t amp, int16_t *out, size_t max_samples)