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
69/// IRQ bits that represent a *terminal* radio event — a frame finished decoding, an outbound
70/// frame completed, or the chip reported a bad CRC. Deliberately excludes PREAMBLE_DETECTED even
71/// though `configure_radio_()` now includes it in `irqMask`: a preamble alone means a frame may
72/// still be arriving, so SoftPhyDriverBase's poll_until_activity_()/check_for_packet() (gated by
73/// @ref RadioSX1262::activity_irq_mask) must not treat it as terminal — doing so would tear down
74/// RX mid-reception. Same trap, same fix shape as @ref LR1121_IRQ_ACTIVITY_MASK.
75static constexpr uint16_t SX1262_IRQ_ACTIVITY_MASK =
77// Sync word register base address
78static constexpr uint16_t SX1262_REG_SYNC_WORD = 0x06C0;
79static constexpr uint16_t SX1262_REG_RX_GAIN = 0x08AC;
80static constexpr uint16_t SX1262_REG_TX_CLAMP_CONFIG = 0x08D8;
81
82/// TX modulation-quality erratum register (SX1262 datasheet §15.1, "Modulation Quality with
83/// 500 kHz LoRa Bandwidth" — the title names LoRa, but the workaround table covers every
84/// modulation). Bit 2 must be cleared *only* for LoRa at BW 500 kHz and set to 1 for everything
85/// else, explicitly including any (G)FSK configuration — which is all this driver ever uses.
86/// Semtech's own driver and RadioLib apply it as `TxModulation` / `fixModulationQuality()`.
87/// Leaving it at its reset value degrades transmitted modulation quality, which on this protocol
88/// shows up as a peer that intermittently fails to decode an otherwise strong frame.
89/// Counterpart to the already-applied TxClamp erratum (@ref SX1262_REG_TX_CLAMP_CONFIG).
90static constexpr uint16_t SX1262_REG_TX_MODULATION = 0x0889;
91/// Bit 2 of @ref SX1262_REG_TX_MODULATION — the (G)FSK-correct value is 1.
92static constexpr uint8_t SX1262_TX_MODULATION_GFSK_BIT = 0x04;
93
94/// Data-buffer split programmed by configure_buffer_base(): TX packets build from 0x00, RX
95/// packets land at 0x80. The RX base doubles as the read offset for a length-driven receive —
96/// a single in-flight packet always starts exactly there.
97static constexpr uint8_t SX1262_TX_BUFFER_BASE = 0x00;
98static constexpr uint8_t SX1262_RX_BUFFER_BASE = 0x80;
99
100static constexpr uint8_t SX1262_GFSK_PACKET_TYPE_KNOWN_LENGTH = 0x00;
101static constexpr uint8_t SX1262_GFSK_CRC_OFF = 0x01;
102static constexpr uint8_t SX1262_FALLBACK_STDBY_XOSC = 0x30;
103
104/// How long SoftPhyDriverBase::wait_busy_() waits for BUSY to drop before declaring the chip
105/// failed. Short: this chip's RC-oscillator-clocked commands settle quickly, unlike LR1121's
106/// post-reset boot ROM (see LR1121_BUSY_TIMEOUT_MS in radio_lr1121.h).
107static constexpr uint32_t SX1262_BUSY_TIMEOUT_MS = 10;
108
109// ============================================================================
110// SX1262 Radio Driver
111// ============================================================================
112
113/// @brief SX1262 implementation of RadioDriver.
114/// @ingroup hioc_radio
115///
116/// Manages the SX1262 via opcode‑based SPI using the SpiAccess interface.
117/// Configures the chip in FSK mode with software CRC‑CCITT to match the
118/// IO‑Homecontrol protocol (the SX1262 lacks the SX1276's IoHomeOn mode).
119/// The IRQ-driven RX/TX orchestration is inherited from SoftPhyDriverBase; this class supplies
120/// the SPI transport and every SX1262-specific register/opcode encoding underneath it.
121/// @todo Confirm whether additional SX1262 board variants need board-specific FEM
122/// defaults beyond the currently documented Heltec V3/V4 assumptions.
124 public:
125 RadioSX1262(SpiAccess *spi, InternalGPIOPin *rst_pin, InternalGPIOPin *dio1_pin, InternalGPIOPin *busy_pin,
126 uint8_t tx_power, uint8_t tcxo_voltage, InternalGPIOPin *fem_en_pin = nullptr,
127 InternalGPIOPin *vfem_pin = nullptr, InternalGPIOPin *fem_pa_pin = nullptr)
130 spi_(spi),
131 dio1_pin_(dio1_pin),
132 fem_en_pin_(fem_en_pin),
133 vfem_pin_(vfem_pin),
134 fem_pa_pin_(fem_pa_pin),
135 tx_power_(tx_power),
136 tcxo_voltage_(tcxo_voltage) {}
137
138 /// @copydoc RadioDriver::init
139 bool init() override;
140 /// @brief Apply SX1262 runtime tuning: RX bandwidth, response preamble, post-TX settle delay.
146 /// @brief Per-channel dwell for a rotating listen (SX1262).
147 ///
148 /// See @ref SX1262_DISCOVERY_HOP_SLICE_MS for why a short dwell is correct here despite SX1262's
149 /// slower per-channel retune than the SX1276's FastHop. Governs discovery and the broadcast
150 /// roll-call alike (see @ref RadioDriver::hop_dwell_ms). The value comes from the user-facing
151 /// `sx1262_discovery_hop_slice_ms` tuning field.
152 [[nodiscard]] uint16_t hop_dwell_ms(const TuningConfig &tuning) const override {
153 return tuning.sx1262_discovery_hop_slice_ms;
154 }
155 /// @brief TX→RX turnaround capability (SX1262): slow.
156 ///
157 /// The TX→standby→RX transition plus the post-TX settle delay is too slow to
158 /// catch a device's immediate reply through the standard exchange wait; in
159 /// pairing, the key-confirm (0x33) is missed that way. PairingEngine therefore
160 /// uses its dedicated key-confirm wait with key-init re-trigger on this driver.
161 [[nodiscard]] bool has_fast_tx_rx_turnaround() const override { return false; }
162 /// @copydoc RadioDriver::set_mode_rx
163 void set_mode_rx() override;
164 /// @copydoc RadioDriver::set_mode_standby
165 void set_mode_standby() override;
166 [[nodiscard]] const char *chip_name() const override { return "sx1262"; }
167 /// @brief Dump SX1262‑specific debug info.
168 void dump_debug() override;
169
170 protected:
171 // --- Tuning helper unique to this chip (its RX-bandwidth enum is not shared, see
172 // tuning_config.h's LR1121RxBandwidth comment for why the two chips' encodings diverged) ---
173 /// Apply the RX bandwidth selector and rewrite the modulation parameters.
174 /// @param bandwidth Bandwidth selector enum.
175 void set_rx_bandwidth_(SX1262RxBandwidth bandwidth);
176
177 // --- SPI communication (opcode‑based) ---
178 /// Write an opcode with optional parameter bytes.
179 /// @param opcode SX1262 opcode.
180 /// @param params Pointer to parameter buffer (may be nullptr).
181 /// @param len Parameter length.
182 void write_opcode_(uint8_t opcode, const uint8_t *params, uint8_t len);
183 /// Read response from an opcode.
184 /// @param opcode Opcode that was previously written.
185 /// @param data Output buffer.
186 /// @param len Expected number of bytes to read.
187 void read_opcode_(uint8_t opcode, uint8_t *data, uint8_t len);
188 /// Write to a register (SX1262 uses opcodes for register access).
189 /// @param addr 16‑bit register address.
190 /// @param data Pointer to data bytes.
191 /// @param len Number of bytes.
192 void write_register_(uint16_t addr, const uint8_t *data, uint8_t len);
193 /// Read from a register.
194 /// @param addr 16‑bit register address.
195 /// @param data Output buffer.
196 /// @param len Number of bytes to read.
197 void read_register_(uint16_t addr, uint8_t *data, uint8_t len);
198 /// Write into the SX1262 TX/RX buffer at a given offset.
199 /// @param offset Buffer offset.
200 /// @param data Payload bytes.
201 /// @param len Payload length.
202 void write_buffer_(uint8_t offset, const uint8_t *data, uint8_t len);
203 /// Read from the SX1262 RX buffer.
204 /// @param offset Buffer offset.
205 /// @param data Output buffer.
206 /// @param len Number of bytes to read.
207 void read_buffer_(uint8_t offset, uint8_t *data, uint8_t len);
208
209 // --- Radio configuration ---
210 /// Full radio initialization (called from init()).
211 void configure_radio_();
212 /// @copydoc SoftPhyDriverBase::set_frequency_register
213 void set_frequency_register(uint32_t freq_hz) override;
214 /// Configure packet parameters (preamble, payload length, CRC).
215 /// @param preamble_len Preamble length in symbols.
216 /// @param payload_len Expected payload length.
217 /// @param packet_type Fixed for GFSK.
218 /// @param crc_type CRC configuration (off or on).
219 void set_packet_params_(uint16_t preamble_len, uint8_t payload_len, uint8_t packet_type, uint8_t crc_type);
220 /// Apply the runtime bandwidth setting to the SX1262 modulation parameters.
222 /// Apply the Semtech TX modulation-quality erratum workaround (datasheet §15.1). The datasheet
223 /// requires it "before any packet transmission", so it hangs off @ref before_tx_arm rather than
224 /// running once at init — same placement rationale as RadioLR1121's high-ACP workaround.
226 /// @copydoc SoftPhyDriverBase::set_rx_packet_params
227 void set_rx_packet_params() override;
228 /// @copydoc SoftPhyDriverBase::set_tx_packet_params
229 void set_tx_packet_params(uint16_t preamble_len, uint8_t payload_len) override {
231 }
232 /// @copydoc SoftPhyDriverBase::clear_irq_status
233 void clear_irq_status(uint32_t irq_mask) override;
234 /// @brief Read device error flags (and clear them).
235 /// @return Error bitmask.
236 uint16_t get_device_errors_();
237 /// @brief Clear device error flags.
239 /// @copydoc SoftPhyDriverBase::configure_buffer_base
240 ///
241 /// SX1262's buffer base addresses (TX=0x00, RX=0x80) are re-asserted on every RX reset — LR1121
242 /// has no equivalent register.
243 void configure_buffer_base() override;
244 /// @copydoc SoftPhyDriverBase::early_rx_read_offset
245 ///
246 /// The SX1262 writes demodulated bytes into its data buffer as they arrive, and a single
247 /// in-flight packet always starts at the RX base address programmed by configure_buffer_base(),
248 /// so the shared flow can read the frame out on its own air time rather than waiting the fixed
249 /// ~10 ms for the 48-byte RX_DONE.
250 [[nodiscard]] int16_t early_rx_read_offset() const override { return SX1262_RX_BUFFER_BASE; }
251 /// @copydoc SoftPhyDriverBase::fill_capture_info
252 ///
253 /// Note: `crc_error` is set from the CrcErr IRQ bit — unlike the SX1276, this
254 /// driver sees and reports frames with a bad CRC.
255 void fill_capture_info(bool blocking_wait, uint32_t irq_status, uint8_t rx_offset, uint8_t reported_len,
256 const uint8_t *raw, uint8_t raw_len, const uint8_t *frame, uint8_t frame_len) override;
257
258 /// DIO1 ISR — sets dio_fired flag. Runs in interrupt context.
259 static void gpio_intr(RadioSX1262 *arg);
260
261 /// @copydoc SoftPhyDriverBase::read_irq_status_raw
262 uint32_t read_irq_status_raw() override;
263 /// @copydoc SoftPhyDriverBase::sync_word_valid_bit
264 [[nodiscard]] uint32_t sync_word_valid_bit() const override { return SX1262_IRQ_SYNC_WORD_VALID; }
265 /// @copydoc SoftPhyDriverBase::rx_done_bit
266 [[nodiscard]] uint32_t rx_done_bit() const override { return SX1262_IRQ_RX_DONE; }
267 /// @copydoc SoftPhyDriverBase::tx_done_bit
268 [[nodiscard]] uint32_t tx_done_bit() const override { return SX1262_IRQ_TX_DONE; }
269 /// @copydoc SoftPhyDriverBase::preamble_detected_bit
270 [[nodiscard]] uint32_t preamble_detected_bit() const override { return SX1262_IRQ_PREAMBLE_DETECTED; }
271 /// @copydoc SoftPhyDriverBase::activity_irq_mask
272 ///
273 /// The base class default ("any bit") stopped being safe the moment `configure_radio_()`
274 /// unmasked PreambleDetected — see @ref SX1262_IRQ_ACTIVITY_MASK's doc comment.
275 [[nodiscard]] uint32_t activity_irq_mask() const override { return SX1262_IRQ_ACTIVITY_MASK; }
276 /// @copydoc SoftPhyDriverBase::read_rssi_raw_byte
277 uint8_t read_rssi_raw_byte() override;
278 /// @copydoc SoftPhyDriverBase::write_tx_buffer
279 void write_tx_buffer(const uint8_t *data, uint8_t len) override {
280 this->write_buffer_(SX1262_TX_BUFFER_BASE, data, len);
281 }
282 /// @copydoc SoftPhyDriverBase::get_rx_buffer_status
283 void get_rx_buffer_status(uint8_t &reported_len, uint8_t &rx_offset) override;
284 /// @copydoc SoftPhyDriverBase::read_rx_buffer
285 void read_rx_buffer(uint8_t offset, uint8_t *data, uint8_t len) override { this->read_buffer_(offset, data, len); }
286 /// @copydoc SoftPhyDriverBase::start_tx
287 void start_tx() override;
288 /// @copydoc SoftPhyDriverBase::before_tx_arm
289 ///
290 /// TX modulation-quality erratum (@ref SX1262_REG_TX_MODULATION): the datasheet requires bit 2
291 /// be set for every (G)FSK transmission, so it is re-asserted before each SetTx rather than
292 /// assumed to survive from init.
294
295 private:
296 SpiAccess *spi_;
297 InternalGPIOPin *dio1_pin_;
298 InternalGPIOPin *fem_en_pin_;
299 InternalGPIOPin *vfem_pin_;
300 InternalGPIOPin *fem_pa_pin_;
301 uint8_t tx_power_;
302 uint8_t tcxo_voltage_;
303 SX1262RxBandwidth rx_bandwidth_{SX1262RxBandwidth::BW_58_6_KHZ}; ///< Runtime-tunable RX bandwidth.
304};
305
306} // namespace home_io_control
307} // 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 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)
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
uint16_t hop_dwell_ms(const TuningConfig &tuning) const override
Per-channel dwell for a rotating listen (SX1262).
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.
uint32_t activity_irq_mask() const override
IRQ bits that count as "activity" for the internal poll_until_activity_() helper and check_for_packet...
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
uint16_t get_device_errors_()
Read device error flags (and clear them).
SoftPhyDriverBase(InternalGPIOPin *rst_pin, InternalGPIOPin *busy_pin, uint32_t busy_timeout_ms, 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).
@ BW_58_6_KHZ
58.6 kHz — default; the narrowest value validated on real hardware here.
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 uint32_t SX1262_BUSY_TIMEOUT_MS
How long SoftPhyDriverBase::wait_busy_() waits for BUSY to drop before declaring the chip failed.
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 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 uint16_t SX1262_IRQ_ACTIVITY_MASK
IRQ bits that represent a terminal radio event — a frame finished decoding, an outbound frame complet...
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.