Implement Port 2 (config commands) handler in main.cpp

- Add complete KISS protocol Port 2 command handler supporting all 14 commands:
  GET/SET_RADIO, GET/SET_FREQUENCY, GET/SET_BANDWIDTH, GET/SET_SF,
  GET/SET_CR, GET/SET_POWER, GET/SET_SYNCWORD
- Commands return RES_OK (0x01) or RES_ERROR (0x02) with appropriate payloads
- Responses encoded as KISS frames on Port 2
- All parameters use big-endian encoding per PROJECT.md specification
- Preserves syncword when setting other parameters via SET_RADIO

Verified: Both seeed_xiao_s3_wio_sx1262 and heltec_v3 build without warnings.
This commit is contained in:
Maze X
2026-03-27 17:38:18 +01:00
parent 9f6c115001
commit add91bb47b
3 changed files with 215 additions and 3 deletions

View File

@@ -50,7 +50,7 @@ build_flags =
; C99 for KISS implementation
-std=c99
; Default LoRa radio parameters — override per-board as needed
-DLORA_FREQ_KHZ=869525UL
-DLORA_FREQ_KHZ=868000UL
-DLORA_BW_HZ=125000UL
-DLORA_SF=7
-DLORA_CR=5