Home IO Control
ESPHome add-on for IO-Homecontrol devices
Loading...
Searching...
No Matches
radio_sx1262.h
Go to the documentation of this file.
1#pragma once
2
3/// @file radio_sx1262.h
4/// @brief SX1262 radio driver for IO-Homecontrol.
5/// @ingroup hioc_radio
6///
7/// Implements the RadioDriver interface for the Semtech SX1262 transceiver.
8/// Unlike the SX1276, the SX1262 uses opcode-based SPI commands and requires a
9/// BUSY pin check before every SPI transaction. The capture path preserves the
10/// radio-reported RX metadata so offline analysis can work from trustworthy data.
11/// The IRQ-driven RX/TX orchestration this driver shares with RadioLR1121 lives in
12/// SoftPhyDriverBase (see radio_soft_phy_driver_base.h) — this file has the SX1262-specific
13/// SPI transport and register/opcode encoding underneath it.
14/// @todo Validate Heltec V4-family boards on real hardware, especially the assumed
15/// front-end module enable pins and the required TCXO voltage selection.
16
18#include "esphome/core/hal.h"
19
20namespace esphome {
21namespace home_io_control {
22
23// ============================================================================
24// SX1262 Opcode Constants
25// ============================================================================
26
27static constexpr uint8_t SX1262_SET_STANDBY = 0x80;
28static constexpr uint8_t SX1262_SET_RX = 0x82;
29static constexpr uint8_t SX1262_SET_TX = 0x83;
30static constexpr uint8_t SX1262_SET_RF_FREQUENCY = 0x86;
31static constexpr uint8_t SX1262_SET_RX_TX_FALLBACK_MODE = 0x93;
32static constexpr uint8_t SX1262_WRITE_BUFFER = 0x0E;
33static constexpr uint8_t SX1262_READ_BUFFER = 0x1E;
34static constexpr uint8_t SX1262_SET_DIO_IRQ_PARAMS = 0x08;
35static constexpr uint8_t SX1262_GET_IRQ_STATUS = 0x12;
36static constexpr uint8_t SX1262_GET_PACKET_STATUS = 0x14;
37static constexpr uint8_t SX1262_GET_DEVICE_ERRORS = 0x17;
38static constexpr uint8_t SX1262_CLEAR_IRQ_STATUS = 0x02;
39static constexpr uint8_t SX1262_CLEAR_DEVICE_ERRORS = 0x07;
40static constexpr uint8_t SX1262_SET_PACKET_TYPE = 0x8A;
41static constexpr uint8_t SX1262_SET_MODULATION_PARAMS = 0x8B;
42static constexpr uint8_t SX1262_SET_PACKET_PARAMS = 0x8C;
43static constexpr uint8_t SX1262_SET_BUFFER_BASE_ADDRESS = 0x8F;
44static constexpr uint8_t SX1262_SET_PA_CONFIG = 0x95;
45static constexpr uint8_t SX1262_SET_TX_PARAMS = 0x8E;
46static constexpr uint8_t SX1262_SET_DIO2_AS_RF_SWITCH_CTRL = 0x9D;
47static constexpr uint8_t SX1262_SET_DIO3_AS_TCXO_CTRL = 0x97;
48static constexpr uint8_t SX1262_CALIBRATE = 0x89;
49static constexpr uint8_t SX1262_CALIBRATE_IMAGE = 0x98;
50static constexpr uint8_t SX1262_GET_RX_BUFFER_STATUS = 0x13;
51static constexpr uint8_t SX1262_GET_RSSI_INST = 0x15;
52static constexpr uint8_t SX1262_SET_REGULATOR_MODE = 0x96;
53static constexpr uint8_t SX1262_GET_STATUS = 0xC0;
54
55// SPI register access opcodes
56static constexpr uint8_t SX1262_WRITE_REGISTER = 0x0D;
57static constexpr uint8_t SX1262_READ_REGISTER = 0x1D;
58
59// ============================================================================
60// SX1262 IRQ Bit Masks
61// ============================================================================
62
63static constexpr uint16_t SX1262_IRQ_TX_DONE = 0x0001;
64static constexpr uint16_t SX1262_IRQ_RX_DONE = 0x0002;
65static constexpr uint16_t SX1262_IRQ_PREAMBLE_DETECTED = 0x0004;
66static constexpr uint16_t SX1262_IRQ_SYNC_WORD_VALID = 0x0008;
67static constexpr uint16_t SX1262_IRQ_CRC_ERR = 0x0040;
68// Sync word register base address
69static constexpr uint16_t SX1262_REG_SYNC_WORD = 0x06C0;
70static constexpr uint16_t SX1262_REG_RX_GAIN = 0x08AC;
71static constexpr uint16_t SX1262_REG_TX_CLAMP_CONFIG = 0x08D8;
72
73/// TX modulation-quality erratum register (SX1262 datasheet §15.1, "Modulation Quality with
74/// 500 kHz LoRa Bandwidth" — the title names LoRa, but the workaround table covers every
75/// modulation). Bit 2 must be cleared *only* for LoRa at BW 500 kHz and set to 1 for everything
76/// else, explicitly including any (G)FSK configuration — which is all this driver ever uses.
77/// Semtech's own driver and RadioLib apply it as `TxModulation` / `fixModulationQuality()`.
78/// Leaving it at its reset value degrades transmitted modulation quality, which on this protocol
79/// shows up as a peer that intermittently fails to decode an otherwise strong frame.
80/// Counterpart to the already-applied TxClamp erratum (@ref SX1262_REG_TX_CLAMP_CONFIG).
81static constexpr uint16_t SX1262_REG_TX_MODULATION = 0x0889;
82/// Bit 2 of @ref SX1262_REG_TX_MODULATION — the (G)FSK-correct value is 1.
83static constexpr uint8_t SX1262_TX_MODULATION_GFSK_BIT = 0x04;
84
85/// Data-buffer split programmed by configure_buffer_base(): TX packets build from 0x00, RX
86/// packets land at 0x80. The RX base doubles as the read offset for a length-driven receive —
87/// a single in-flight packet always starts exactly there.
88static constexpr uint8_t SX1262_TX_BUFFER_BASE = 0x00;
89static constexpr uint8_t SX1262_RX_BUFFER_BASE = 0x80;
90
91static constexpr uint8_t SX1262_GFSK_PACKET_TYPE_KNOWN_LENGTH = 0x00;
92static constexpr uint8_t SX1262_GFSK_CRC_OFF = 0x01;
93static constexpr uint8_t SX1262_FALLBACK_STDBY_XOSC = 0x30;
94
95/// SX1262-specific per-channel dwell while waiting for authenticated exchange responses.
96///
97/// A 50 ms dwell was short enough that the controller could hop away from the request channel
98/// just before the device emitted its post-auth reply. Using 90 ms keeps the SX1262 receiver on
99/// that channel long enough for the observed device turn-around after 0x3D, without inflating the
100/// overall 300/500 ms exchange windows for the rest of the protocol.
101static constexpr int32_t SX1262_EXCHANGE_RESPONSE_WAIT_SLICE_MS = 90;
102
103// ============================================================================
104// SX1262 Radio Driver
105// ============================================================================
106
107/// @brief SX1262 implementation of RadioDriver.
108/// @ingroup hioc_radio
109///
110/// Manages the SX1262 via opcode‑based SPI using the SpiAccess interface.
111/// Configures the chip in FSK mode with software CRC‑CCITT to match the
112/// IO‑Homecontrol protocol (the SX1262 lacks the SX1276's IoHomeOn mode).
113/// The IRQ-driven RX/TX orchestration is inherited from SoftPhyDriverBase; this class supplies
114/// the SPI transport and every SX1262-specific register/opcode encoding underneath it.
115/// @todo Confirm whether additional SX1262 board variants need board-specific FEM
116/// defaults beyond the currently documented Heltec V3/V4 assumptions.
118 public:
119 RadioSX1262(SpiAccess *spi, InternalGPIOPin *rst_pin, InternalGPIOPin *dio1_pin, InternalGPIOPin *busy_pin,
120 uint8_t tx_power, uint8_t tcxo_voltage, InternalGPIOPin *fem_en_pin = nullptr,
121 InternalGPIOPin *vfem_pin = nullptr, InternalGPIOPin *fem_pa_pin = nullptr)
123 spi_(spi),
124 dio1_pin_(dio1_pin),
125 busy_pin_(busy_pin),
126 fem_en_pin_(fem_en_pin),
127 vfem_pin_(vfem_pin),
128 fem_pa_pin_(fem_pa_pin),
129 tx_power_(tx_power),
130 tcxo_voltage_(tcxo_voltage) {}
131
132 /// @copydoc RadioDriver::init
133 bool init() override;
134 /// @brief Apply SX1262 runtime tuning: RX bandwidth, response preamble, post-TX settle delay.
140 /// @brief Per-channel dwell while waiting for exchange responses (SX1262).
141 ///
142 /// Longer than the protocol baseline; rationale is documented at
143 /// @ref SX1262_EXCHANGE_RESPONSE_WAIT_SLICE_MS.
144 [[nodiscard]] uint32_t exchange_wait_slice_ms() const override { return SX1262_EXCHANGE_RESPONSE_WAIT_SLICE_MS; }
145 /// @brief Per-channel dwell while pairing discovery hops (SX1262).
146 ///
147 /// SX1262 frequency changes require a standby→SetRfFrequency→RX cycle (no
148 /// fast hop), so discovery needs a much longer dwell than the SX1276. The
149 /// value comes from the user-facing `sx1262_discovery_hop_slice_ms` tuning field.
150 [[nodiscard]] uint16_t discovery_hop_slice_ms(const TuningConfig &tuning) const override {
151 return tuning.sx1262_discovery_hop_slice_ms;
152 }
153 /// @brief TX→RX turnaround capability (SX1262): slow.
154 ///
155 /// The TX→standby→RX transition plus the post-TX settle delay is too slow to
156 /// catch a device's immediate reply through the standard exchange wait; in
157 /// pairing, the key-confirm (0x33) is missed that way. PairingEngine therefore
158 /// uses its dedicated key-confirm wait with key-init re-trigger on this driver.
159 [[nodiscard]] bool has_fast_tx_rx_turnaround() const override { return false; }
160 /// @copydoc RadioDriver::set_mode_rx
161 void set_mode_rx() override;
162 /// @copydoc RadioDriver::set_mode_standby
163 void set_mode_standby() override;
164 [[nodiscard]] bool is_failed() const override { return this->failed_; }
165 [[nodiscard]] const char *chip_name() const override { return "sx1262"; }
166 /// @brief Dump SX1262‑specific debug info.
167 void dump_debug() override;
168
169 protected:
170 // --- Tuning helper unique to this chip (its RX-bandwidth enum is not shared, see
171 // tuning_config.h's LR1121RxBandwidth comment for why the two chips' encodings diverged) ---
172 /// Apply the RX bandwidth selector and rewrite the modulation parameters.
173 /// @param bandwidth Bandwidth selector enum.
174 void set_rx_bandwidth_(SX1262RxBandwidth bandwidth);
175
176 // --- SPI communication (opcode‑based) ---
177 /// Wait until BUSY pin is low before any SPI transaction.
178 void wait_busy_();
179 /// Write an opcode with optional parameter bytes.
180 /// @param opcode SX1262 opcode.
181 /// @param params Pointer to parameter buffer (may be nullptr).
182 /// @param len Parameter length.
183 void write_opcode_(uint8_t opcode, const uint8_t *params, uint8_t len);
184 /// Read response from an opcode.
185 /// @param opcode Opcode that was previously written.
186 /// @param data Output buffer.
187 /// @param len Expected number of bytes to read.
188 void read_opcode_(uint8_t opcode, uint8_t *data, uint8_t len);
189 /// Write to a register (SX1262 uses opcodes for register access).
190 /// @param addr 16‑bit register address.
191 /// @param data Pointer to data bytes.
192 /// @param len Number of bytes.
193 void write_register_(uint16_t addr, const uint8_t *data, uint8_t len);
194 /// Read from a register.
195 /// @param addr 16‑bit register address.
196 /// @param data Output buffer.
197 /// @param len Number of bytes to read.
198 void read_register_(uint16_t addr, uint8_t *data, uint8_t len);
199 /// Write into the SX1262 TX/RX buffer at a given offset.
200 /// @param offset Buffer offset.
201 /// @param data Payload bytes.
202 /// @param len Payload length.
203 void write_buffer_(uint8_t offset, const uint8_t *data, uint8_t len);
204 /// Read from the SX1262 RX buffer.
205 /// @param offset Buffer offset.
206 /// @param data Output buffer.
207 /// @param len Number of bytes to read.
208 void read_buffer_(uint8_t offset, uint8_t *data, uint8_t len);
209
210 // --- Radio configuration ---
211 /// Full radio initialization (called from init()).
212 void configure_radio_();
213 /// @copydoc SoftPhyDriverBase::set_frequency_register
214 void set_frequency_register(uint32_t freq_hz) override;
215 /// Configure packet parameters (preamble, payload length, CRC).
216 /// @param preamble_len Preamble length in symbols.
217 /// @param payload_len Expected payload length.
218 /// @param packet_type Fixed for GFSK.
219 /// @param crc_type CRC configuration (off or on).
220 void set_packet_params_(uint16_t preamble_len, uint8_t payload_len, uint8_t packet_type, uint8_t crc_type);
221 /// Apply the runtime bandwidth setting to the SX1262 modulation parameters.
223 /// Apply the Semtech TX modulation-quality erratum workaround (datasheet §15.1). The datasheet
224 /// requires it "before any packet transmission", so it hangs off @ref before_tx_arm rather than
225 /// running once at init — same placement rationale as RadioLR1121's high-ACP workaround.
227 /// @copydoc SoftPhyDriverBase::set_rx_packet_params
228 void set_rx_packet_params() override;
229 /// @copydoc SoftPhyDriverBase::set_tx_packet_params
230 void set_tx_packet_params(uint16_t preamble_len, uint8_t payload_len) override {
232 }
233 /// @copydoc SoftPhyDriverBase::clear_irq_status
234 void clear_irq_status(uint32_t irq_mask) override;
235 /// @brief Read device error flags (and clear them).
236 /// @return Error bitmask.
237 uint16_t get_device_errors_();
238 /// @brief Clear device error flags.
240 /// @copydoc SoftPhyDriverBase::configure_buffer_base
241 ///
242 /// SX1262's buffer base addresses (TX=0x00, RX=0x80) are re-asserted on every RX reset — LR1121
243 /// has no equivalent register.
244 void configure_buffer_base() override;
245 /// @copydoc SoftPhyDriverBase::early_rx_read_offset
246 ///
247 /// The SX1262 writes demodulated bytes into its data buffer as they arrive, and a single
248 /// in-flight packet always starts at the RX base address programmed by configure_buffer_base(),
249 /// so the shared flow can read the frame out on its own air time rather than waiting the fixed
250 /// ~10 ms for the 48-byte RX_DONE.
251 [[nodiscard]] int16_t early_rx_read_offset() const override { return SX1262_RX_BUFFER_BASE; }
252 /// @copydoc SoftPhyDriverBase::fill_capture_info
253 ///
254 /// Note: `crc_error` is set from the CrcErr IRQ bit — unlike the SX1276, this
255 /// driver sees and reports frames with a bad CRC.
256 void fill_capture_info(bool blocking_wait, uint32_t irq_status, uint8_t rx_offset, uint8_t reported_len,
257 const uint8_t *raw, uint8_t raw_len, const uint8_t *frame, uint8_t frame_len) override;
258
259 /// DIO1 ISR — sets dio_fired flag. Runs in interrupt context.
260 static void gpio_intr(RadioSX1262 *arg);
261
262 /// @copydoc SoftPhyDriverBase::read_irq_status_raw
263 uint32_t read_irq_status_raw() override;
264 /// @copydoc SoftPhyDriverBase::sync_word_valid_bit
265 [[nodiscard]] uint32_t sync_word_valid_bit() const override { return SX1262_IRQ_SYNC_WORD_VALID; }
266 /// @copydoc SoftPhyDriverBase::rx_done_bit
267 [[nodiscard]] uint32_t rx_done_bit() const override { return SX1262_IRQ_RX_DONE; }
268 /// @copydoc SoftPhyDriverBase::tx_done_bit
269 [[nodiscard]] uint32_t tx_done_bit() const override { return SX1262_IRQ_TX_DONE; }
270 /// @copydoc SoftPhyDriverBase::preamble_detected_bit
271 [[nodiscard]] uint32_t preamble_detected_bit() const override { return SX1262_IRQ_PREAMBLE_DETECTED; }
272 /// @copydoc SoftPhyDriverBase::read_rssi_raw_byte
273 uint8_t read_rssi_raw_byte() override;
274 /// @copydoc SoftPhyDriverBase::write_tx_buffer
275 void write_tx_buffer(const uint8_t *data, uint8_t len) override {
276 this->write_buffer_(SX1262_TX_BUFFER_BASE, data, len);
277 }
278 /// @copydoc SoftPhyDriverBase::get_rx_buffer_status
279 void get_rx_buffer_status(uint8_t &reported_len, uint8_t &rx_offset) override;
280 /// @copydoc SoftPhyDriverBase::read_rx_buffer
281 void read_rx_buffer(uint8_t offset, uint8_t *data, uint8_t len) override { this->read_buffer_(offset, data, len); }
282 /// @copydoc SoftPhyDriverBase::start_tx
283 void start_tx() override;
284 /// @copydoc SoftPhyDriverBase::before_tx_arm
285 ///
286 /// TX modulation-quality erratum (@ref SX1262_REG_TX_MODULATION): the datasheet requires bit 2
287 /// be set for every (G)FSK transmission, so it is re-asserted before each SetTx rather than
288 /// assumed to survive from init.
290
291 private:
292 SpiAccess *spi_;
293 InternalGPIOPin *dio1_pin_;
294 InternalGPIOPin *busy_pin_;
295 InternalGPIOPin *fem_en_pin_;
296 InternalGPIOPin *vfem_pin_;
297 InternalGPIOPin *fem_pa_pin_;
298 uint8_t tx_power_;
299 uint8_t tcxo_voltage_;
300 bool failed_{false};
301 SX1262RxBandwidth rx_bandwidth_{SX1262RxBandwidth::BW_117_3_KHZ}; ///< Runtime-tunable RX bandwidth.
302};
303
304} // namespace home_io_control
305} // namespace esphome
SX1262 implementation of RadioDriver.
void set_rx_packet_params() override
Configure RX-specific packet parameters (preamble detector length, fixed probe length).
void before_tx_arm() override
Hook run immediately before every SetTx.
void read_rx_buffer(uint8_t offset, uint8_t *data, uint8_t len) override
Read len bytes from the RX buffer starting at offset.
void wait_busy_()
Wait until BUSY pin is low before any SPI transaction.
void set_mode_rx() override
Switch to continuous receive mode.
void get_rx_buffer_status(uint8_t &reported_len, uint8_t &rx_offset) override
Read the chip-reported RX length and buffer offset (raw, before any clamping).
void write_opcode_(uint8_t opcode, const uint8_t *params, uint8_t len)
Write an opcode with optional parameter bytes.
void set_mode_standby() override
Switch to standby mode.
void clear_irq_status(uint32_t irq_mask) override
Clear IRQ status bits.
void apply_tuning(const TuningConfig &tuning) override
Apply SX1262 runtime tuning: RX bandwidth, response preamble, post-TX settle delay.
bool has_fast_tx_rx_turnaround() const override
TX→RX turnaround capability (SX1262): slow.
RadioSX1262(SpiAccess *spi, InternalGPIOPin *rst_pin, InternalGPIOPin *dio1_pin, InternalGPIOPin *busy_pin, uint8_t tx_power, uint8_t tcxo_voltage, InternalGPIOPin *fem_en_pin=nullptr, InternalGPIOPin *vfem_pin=nullptr, InternalGPIOPin *fem_pa_pin=nullptr)
uint32_t exchange_wait_slice_ms() const override
Per-channel dwell while waiting for exchange responses (SX1262).
void write_modulation_params_()
Apply the runtime bandwidth setting to the SX1262 modulation parameters.
void write_buffer_(uint8_t offset, const uint8_t *data, uint8_t len)
Write into the SX1262 TX/RX buffer at a given offset.
const char * chip_name() const override
Get a human‑readable chip name.
uint8_t read_rssi_raw_byte() override
Read the single raw RSSI byte (chip-specific opcode); formula is shared, see read_rssi.
void set_tx_packet_params(uint16_t preamble_len, uint8_t payload_len) override
Configure TX packet parameters for one outgoing UART-encoded frame.
uint32_t tx_done_bit() const override
void write_tx_buffer(const uint8_t *data, uint8_t len) override
Write the UART-encoded TX payload into the chip's TX buffer.
uint32_t read_irq_status_raw() override
Read the raw IRQ status word from the radio.
void clear_device_errors_()
Clear device error flags.
uint32_t rx_done_bit() const override
void set_frequency_register(uint32_t freq_hz) override
Set RF frequency via the chip's own frequency register/opcode encoding, and update current_freq_.
void write_register_(uint16_t addr, const uint8_t *data, uint8_t len)
Write to a register (SX1262 uses opcodes for register access).
void configure_buffer_base() override
Hook run as part of reset_rx_state_, before re-entering RX.
void set_packet_params_(uint16_t preamble_len, uint8_t payload_len, uint8_t packet_type, uint8_t crc_type)
Configure packet parameters (preamble, payload length, CRC).
void dump_debug() override
Dump SX1262‑specific debug info.
void configure_radio_()
Full radio initialization (called from init()).
void start_tx() override
Issue the SetTx opcode with the fixed TX timeout — identical 3-byte payload on both chips,...
void apply_tx_modulation_workaround_()
Apply the Semtech TX modulation-quality erratum workaround (datasheet §15.1).
uint32_t sync_word_valid_bit() const override
static void gpio_intr(RadioSX1262 *arg)
DIO1 ISR — sets dio_fired flag. Runs in interrupt context.
void read_opcode_(uint8_t opcode, uint8_t *data, uint8_t len)
Read response from an opcode.
bool init() override
Initialize the radio hardware. Returns true on success.
void set_rx_bandwidth_(SX1262RxBandwidth bandwidth)
Apply the RX bandwidth selector and rewrite the modulation parameters.
void fill_capture_info(bool blocking_wait, uint32_t irq_status, uint8_t rx_offset, uint8_t reported_len, const uint8_t *raw, uint8_t raw_len, const uint8_t *frame, uint8_t frame_len) override
Populate the RadioCaptureInfo from chip-specific telemetry (RSSI opcode, packet-status byte,...
void read_buffer_(uint8_t offset, uint8_t *data, uint8_t len)
Read from the SX1262 RX buffer.
uint16_t discovery_hop_slice_ms(const TuningConfig &tuning) const override
Per-channel dwell while pairing discovery hops (SX1262).
int16_t early_rx_read_offset() const override
Data-buffer offset an in-flight reception is being written to, or a negative value when this chip mus...
void read_register_(uint16_t addr, uint8_t *data, uint8_t len)
Read from a register.
uint32_t preamble_detected_bit() const override
bool is_failed() const override
Returns true if the radio failed to initialize or encountered a fatal error.
uint16_t get_device_errors_()
Read device error flags (and clear them).
SoftPhyDriverBase(InternalGPIOPin *rst_pin, uint16_t default_response_preamble, uint16_t default_post_tx_settle_us)
void set_post_tx_settle_us_(uint16_t delay_us)
Set the delay between TX completion and re-entering RX.
void set_response_preamble_(uint16_t preamble)
Set the preamble length used for response/continuation frames within an exchange.
Interface for SPI bus access.
static constexpr uint8_t SX1262_SET_DIO3_AS_TCXO_CTRL
static constexpr uint8_t SX1262_CALIBRATE
static constexpr uint16_t SX1262_REG_RX_GAIN
static constexpr uint8_t SX1262_SET_BUFFER_BASE_ADDRESS
static constexpr uint8_t SX1262_CLEAR_DEVICE_ERRORS
static constexpr uint8_t SX1262_GFSK_CRC_OFF
SX1262RxBandwidth
Valid SX1262 RX bandwidth options (kHz register values).
static constexpr uint8_t SX1262_READ_REGISTER
static constexpr uint8_t SX1262_SET_PACKET_TYPE
static constexpr uint16_t SX1262_IRQ_SYNC_WORD_VALID
static constexpr uint8_t SX1262_GET_DEVICE_ERRORS
static constexpr uint16_t SX1262_IRQ_CRC_ERR
static constexpr uint8_t SX1262_SET_MODULATION_PARAMS
static constexpr uint8_t SX1262_GET_RX_BUFFER_STATUS
static constexpr uint16_t SX1262_REG_TX_MODULATION
TX modulation-quality erratum register (SX1262 datasheet §15.1, "Modulation Quality with500 kHz LoRa ...
static constexpr uint8_t SX1262_CLEAR_IRQ_STATUS
static constexpr uint8_t SX1262_SET_RX
static constexpr uint8_t SX1262_SET_TX
static constexpr uint8_t SX1262_GFSK_PACKET_TYPE_KNOWN_LENGTH
static constexpr uint8_t SX1262_CALIBRATE_IMAGE
static constexpr uint8_t SX1262_SET_DIO2_AS_RF_SWITCH_CTRL
static constexpr uint8_t SX1262_WRITE_BUFFER
static constexpr uint8_t SX1262_READ_BUFFER
static constexpr uint16_t SX1262_IRQ_RX_DONE
static constexpr uint8_t SX1262_SET_PA_CONFIG
static constexpr uint8_t SX1262_SET_TX_PARAMS
static constexpr uint16_t SX1262_IRQ_TX_DONE
static constexpr uint8_t SX1262_SET_DIO_IRQ_PARAMS
static constexpr int32_t SX1262_EXCHANGE_RESPONSE_WAIT_SLICE_MS
SX1262-specific per-channel dwell while waiting for authenticated exchange responses.
static constexpr uint8_t SX1262_SET_PACKET_PARAMS
static constexpr uint8_t SX1262_TX_MODULATION_GFSK_BIT
Bit 2 of SX1262_REG_TX_MODULATION — the (G)FSK-correct value is 1.
static constexpr uint16_t SX1262_RESPONSE_PREAMBLE
SX1262-specific preamble for response/continuation frames within an exchange.
static constexpr uint8_t SX1262_GET_STATUS
static constexpr uint16_t SX1262_REG_TX_CLAMP_CONFIG
static constexpr uint16_t SX1262_IRQ_PREAMBLE_DETECTED
static constexpr uint8_t SX1262_SET_RX_TX_FALLBACK_MODE
static constexpr uint8_t SX1262_TX_BUFFER_BASE
Data-buffer split programmed by configure_buffer_base(): TX packets build from 0x00,...
static constexpr uint8_t SX1262_RX_BUFFER_BASE
static constexpr uint8_t SX1262_GET_IRQ_STATUS
static constexpr uint8_t SX1262_SET_REGULATOR_MODE
static constexpr uint8_t SX1262_GET_PACKET_STATUS
static constexpr uint16_t SX1262_POST_TX_SETTLE_US
SX1262-specific post-TX settling delay before re-entering RX.
static constexpr uint16_t SX1262_REG_SYNC_WORD
static constexpr uint8_t SX1262_FALLBACK_STDBY_XOSC
static constexpr uint8_t SX1262_SET_RF_FREQUENCY
static constexpr uint8_t SX1262_SET_STANDBY
static constexpr uint8_t SX1262_WRITE_REGISTER
static constexpr uint8_t SX1262_GET_RSSI_INST
Shared driver flow for radios using the software PHY (SX1262, LR1121).
All runtime tunable parameters for pairing and radio diagnostics.
SX1262RxBandwidth sx1262_rx_bandwidth
SX1262 RX bandwidth selector.
uint16_t sx1262_post_tx_settle_us
Delay after SX1262 TX before RX (µs).
uint16_t sx1262_response_preamble
SX1262 response preamble in bytes.
uint16_t sx1262_discovery_hop_slice_ms
Per-channel dwell while SX1262 discovery hops.