From b5a3045f7e23d7dc8859bc6d8f31954a095053fb Mon Sep 17 00:00:00 2001 From: Th3maz1ng Date: Fri, 26 Dec 2025 12:27:37 +0100 Subject: [PATCH] Updated the boardconfig class to support the RFM95W, support for NRF is dropped --- src/app/BoardConfig.cpp | 7 ++++--- src/app/BoardConfig.h | 20 ++++++++++++-------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/src/app/BoardConfig.cpp b/src/app/BoardConfig.cpp index a78096a..49768ae 100644 --- a/src/app/BoardConfig.cpp +++ b/src/app/BoardConfig.cpp @@ -3,15 +3,16 @@ BoardConfig::BoardConfig( const Pin ExternalInt, const Pin LDOEnable, const Pin BattVSensEnable, - const Pin NRFCe, + const Pin RFMRst, const Pin SwitchVSensEnable, - const Pin NRFCs, + const Pin RFMDI0, + const Pin RFMCs, const Pin MOSI, const Pin MISO, const Pin SCK, const Pin BattAnalogVSens, const Pin SwitchAnalogVSens -):ExternalInt(ExternalInt), LDOEnable(LDOEnable), BattVSensEnable(BattVSensEnable), NRFCe(NRFCe), SwitchVSensEnable(SwitchVSensEnable), NRFCs(NRFCs), MOSI(MOSI), MISO(MISO), SCK(SCK), BattAnalogVSens(BattAnalogVSens), SwitchAnalogVSens(SwitchAnalogVSens) +):ExternalInt(ExternalInt), LDOEnable(LDOEnable), BattVSensEnable(BattVSensEnable), RFMRst(RFMRst), SwitchVSensEnable(SwitchVSensEnable), RFMDI0(RFMDI0), RFMCs(RFMCs), MOSI(MOSI), MISO(MISO), SCK(SCK), BattAnalogVSens(BattAnalogVSens), SwitchAnalogVSens(SwitchAnalogVSens) { } diff --git a/src/app/BoardConfig.h b/src/app/BoardConfig.h index 104dfd8..23fbb9a 100644 --- a/src/app/BoardConfig.h +++ b/src/app/BoardConfig.h @@ -1,6 +1,8 @@ /** * Author : Anatole SCHRAMM-HENRY - * Created the : 08/09/2022 + * Created the: 08/09/2022 + * Updated the: 20/12/2025 + * - Replaced the NRF module with a RFM95W (LoRa) * This class encapsulates the various configuration values for the board like the Pin Mapping for instance. */ #ifndef BOARDCONFIG_H @@ -15,9 +17,10 @@ class BoardConfig const Pin ExternalInt = D2_EXTERNAL_INT, const Pin LDOEnable = D4_LDO_EN, const Pin BattVSensEnable = D5_BAT_V_SENS_EN, - const Pin NRFCe = D6_NRF_CE, + const Pin RFMRst = D6_RFM_RST, const Pin SwitchVSensEnable = D7_SWITCH_V_SENS_EN, - const Pin NRFCs = D10_NRF_CS, + const Pin RFMDI0 = D8_RFM_DI0, + const Pin RFMCs = D10_RFM_CS, const Pin MOSI = D11_MOSI, const Pin MISO = D12_MISO, const Pin SCK = D13_SCK, @@ -28,12 +31,13 @@ class BoardConfig const Pin ExternalInt; const Pin LDOEnable; const Pin BattVSensEnable; - const Pin NRFCe; + const Pin RFMRst; const Pin SwitchVSensEnable; - const Pin NRFCs; - const Pin MOSI; - const Pin MISO; - const Pin SCK; + const Pin RFMDI0; + const Pin RFMCs; + const Pin MOSI; + const Pin MISO; + const Pin SCK; const Pin BattAnalogVSens; const Pin SwitchAnalogVSens;