Skip to content

Commit 60a874a

Browse files
committed
[RA4M1] build with LR11XX driver
1 parent dab68bf commit 60a874a

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

software/firmware/source/SoftRF/src/platform/RA4M1.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ lmic_pinmap lmic_pins = {
4848
.rxe = LMIC_UNUSED_PIN,
4949
.rst = SOC_GPIO_PIN_RST,
5050
.dio = {LMIC_UNUSED_PIN, LMIC_UNUSED_PIN, LMIC_UNUSED_PIN},
51-
.busy = LMIC_UNUSED_PIN,
51+
.busy = SOC_GPIO_PIN_BUSY,
5252
.tcxo = LMIC_UNUSED_PIN,
5353
};
5454

@@ -132,6 +132,10 @@ static void RA4M1_setup()
132132
reset_info.reason = REASON_EXT_SYS_RST;
133133
}
134134

135+
#if defined(USE_RADIOLIB)
136+
lmic_pins.dio[0] = SOC_GPIO_PIN_DIO1;
137+
#endif /* USE_RADIOLIB */
138+
135139
#if SOC_GPIO_RADIO_LED_TX != SOC_UNUSED_PIN
136140
pinMode(SOC_GPIO_RADIO_LED_TX, OUTPUT);
137141
digitalWrite(SOC_GPIO_RADIO_LED_TX, ! LED_STATE_ON);

software/firmware/source/SoftRF/src/platform/RA4M1.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ extern SoftSPI RadioSPI;
124124

125125
/* SX1276 */
126126
#define SOC_GPIO_PIN_RST PIN_D9
127-
#define SOC_GPIO_PIN_BUSY SOC_UNUSED_PIN
127+
#define SOC_GPIO_PIN_BUSY LMIC_UNUSED_PIN
128128
#define SOC_GPIO_PIN_DIO1 PIN_D6
129129

130130
/* RF antenna switch */
@@ -206,6 +206,9 @@ extern SoftSPI RadioSPI;
206206

207207
//#define USE_BASICMAC
208208
//#define EXCLUDE_SX1276 // - 3 kb
209+
#if defined(ARDUINO_UNOR4_MINIMA)
210+
#define USE_RADIOLIB
211+
#endif /* ARDUINO_UNOR4_MINIMA */
209212

210213
#if defined(EXCLUDE_WIFI)
211214
#define USE_OLED /* -1.5K HEAP */

0 commit comments

Comments
 (0)