Implement SX126X SPI and chip configuration for PoC
- radio.cpp: Add custom SPI bus initialization for boards with non-default pins (conditional on LORA_PIN_SCLK definition). Pass lora_spi object to Module instantiation for SX1262/LR1110. - radio.cpp: Add TCXO voltage to SX1262/LR1110 chip_begin() as 8th parameter (using SX126X_DIO3_TCXO_VOLTAGE macro or 0 if undefined). - radio.cpp: Add post-begin SX126X configuration: setDio2AsRfSwitch(), setCurrentLimit(), setRxBoostedGainMode() (conditional on build macros). - radio.cpp: Fix radio_tx() const conversion for RadioLib transmit() API compatibility. - config.h: Add LORA_TX_POWER → LORA_POWER_DBM alias for boards like Heltec V3 that define power via LORA_TX_POWER. Use #ifndef guard to avoid redefinition warnings. - platformio.ini: Add -Wall -Werror to treat warnings as fatal in our code (excluding SDK/framework). - platformio.ini: Add -std=c99 build flag for KISS C99 support. - src/kiss.c → src/kiss.cpp: Rename to .cpp so Arduino framework compiles it. Verified: Builds cleanly for seeed_xiao_s3_wio_sx1262 and heltec_v3 with no warnings.
This commit is contained in:
@@ -4,8 +4,8 @@
|
||||
|
||||
[platformio]
|
||||
default_envs =
|
||||
heltec_v3,
|
||||
rak_rak4631,
|
||||
heltec_v3
|
||||
rak_rak4631
|
||||
heltec_v2
|
||||
|
||||
extra_configs =
|
||||
@@ -45,6 +45,10 @@ lib_deps =
|
||||
monitor_speed = 115200
|
||||
|
||||
build_flags =
|
||||
; Treat warnings as errors in our code, but not in third-party
|
||||
-Wall -Werror -Wno-error=unused-function
|
||||
; C99 for KISS implementation
|
||||
-std=c99
|
||||
; Default LoRa radio parameters — override per-board as needed
|
||||
-DLORA_FREQ_KHZ=869525UL
|
||||
-DLORA_BW_HZ=125000UL
|
||||
|
||||
Reference in New Issue
Block a user