From 72aa345ac16b6a3dea0ef022132b626e7c81166b Mon Sep 17 00:00:00 2001 From: Linar Yusupov Date: Wed, 11 Dec 2024 16:12:25 +0300 Subject: [PATCH] [AVR] build with LR11XX driver [skip ci] --- software/firmware/source/SoftRF/src/platform/AVR.cpp | 6 +++++- software/firmware/source/SoftRF/src/platform/AVR.h | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/software/firmware/source/SoftRF/src/platform/AVR.cpp b/software/firmware/source/SoftRF/src/platform/AVR.cpp index 4e8711e88..4d141fc3f 100644 --- a/software/firmware/source/SoftRF/src/platform/AVR.cpp +++ b/software/firmware/source/SoftRF/src/platform/AVR.cpp @@ -43,7 +43,7 @@ lmic_pinmap lmic_pins = { .rxe = LMIC_UNUSED_PIN, .rst = SOC_GPIO_PIN_RST, .dio = {LMIC_UNUSED_PIN, LMIC_UNUSED_PIN, LMIC_UNUSED_PIN}, - .busy = LMIC_UNUSED_PIN, + .busy = SOC_GPIO_PIN_BUSY, .tcxo = LMIC_UNUSED_PIN, }; @@ -80,6 +80,10 @@ static void AVR_setup() } Serial.begin(SERIAL_OUT_BR, SERIAL_OUT_BITS); + +#if defined(USE_RADIOLIB) + lmic_pins.dio[0] = SOC_GPIO_PIN_DIO1; +#endif /* USE_RADIOLIB */ } static void AVR_post_init() diff --git a/software/firmware/source/SoftRF/src/platform/AVR.h b/software/firmware/source/SoftRF/src/platform/AVR.h index a3b82d4ec..1dd33d2eb 100644 --- a/software/firmware/source/SoftRF/src/platform/AVR.h +++ b/software/firmware/source/SoftRF/src/platform/AVR.h @@ -110,7 +110,7 @@ struct rst_info { /* SX1276 */ #define SOC_GPIO_PIN_RST 9 // PH6 -#define SOC_GPIO_PIN_BUSY SOC_UNUSED_PIN +#define SOC_GPIO_PIN_BUSY LMIC_UNUSED_PIN #define SOC_GPIO_PIN_DIO1 6 // PH3 /* RF antenna switch */ @@ -160,6 +160,10 @@ struct rst_info { //#define EXCLUDE_SOUND #define EXCLUDE_IMU +//#define USE_BASICMAC +//#define EXCLUDE_SX1276 // - 3 kb +//#define USE_RADIOLIB + //#define USE_OLED // kb #define EXCLUDE_OLED_049 //#define EXCLUDE_OLED_BARO_PAGE