updated variant rak3401

This commit is contained in:
chrisdavis2110 2026-01-17 22:54:20 -08:00
parent 5e4b33a1a0
commit ed5d2909fc
7 changed files with 147 additions and 106 deletions

View file

@ -17,8 +17,6 @@ RAK3401Board board;
#endif
#endif
// RAK3401 uses SPI1 for the RAK13302 LoRa module
// Note: nRF52 doesn't have a separate SPI1 object, so we use SPI but configure it with SPI1 pins
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, SPI);
WRAPPER_CLASS radio_driver(radio, board);
@ -36,12 +34,6 @@ AutoDiscoverRTCClock rtc_clock(fallback_clock);
bool radio_init() {
rtc_clock.begin(Wire);
// Configure SPI with SPI1 pins for RAK13302
// nRF52 uses the same SPI peripheral but with different pin assignments
SPI.setPins(P_LORA_MISO, P_LORA_SCLK, P_LORA_MOSI);
SPI.begin();
return radio.std_init(&SPI);
}