#pragma once /* Default LoRa parameters — override per-board in hardware/.../platformio.ini */ #ifndef LORA_FREQ_KHZ # define LORA_FREQ_KHZ 869525UL /* 869.525 MHz */ #endif #ifndef LORA_BW_HZ # define LORA_BW_HZ 125000UL /* 125 kHz */ #endif #ifndef LORA_SF # define LORA_SF 7 #endif #ifndef LORA_CR # define LORA_CR 5 /* denominator: coding rate = 4/CR */ #endif #ifndef LORA_POWER_DBM # define LORA_POWER_DBM 14 #endif #ifndef LORA_SYNCWORD # define LORA_SYNCWORD 0x34 /* LoRa public */ #endif #ifndef KISS_BAUD # define KISS_BAUD 115200 #endif /* Pin validation — boards must define all required pins via build_flags */ #ifndef LORA_PIN_NSS # error "LORA_PIN_NSS not defined — add to hardware///platformio.ini" #endif #ifndef LORA_PIN_RESET # error "LORA_PIN_RESET not defined" #endif #if defined(LORA_CHIP_SX1276) # ifndef LORA_PIN_DIO0 # error "LORA_PIN_DIO0 not defined (required for SX1276)" # endif #else # ifndef LORA_PIN_DIO1 # error "LORA_PIN_DIO1 not defined (required for SX1262/LR1110)" # endif # ifndef LORA_PIN_BUSY # error "LORA_PIN_BUSY not defined (required for SX1262/LR1110)" # endif #endif #if !defined(LORA_CHIP_SX1276) && !defined(LORA_CHIP_SX1262) && \ !defined(LORA_CHIP_LR1110) # error "No LoRa chip defined — set LORA_CHIP_SX1276, LORA_CHIP_SX1262, or LORA_CHIP_LR1110" #endif