diff --git a/variants/rak4631/RAK4631Board.h b/variants/rak4631/RAK4631Board.h index ff4a5b7d42..7e67165b19 100644 --- a/variants/rak4631/RAK4631Board.h +++ b/variants/rak4631/RAK4631Board.h @@ -4,27 +4,6 @@ #include #include -// LoRa radio module pins for RAK4631 -#define P_LORA_DIO_1 47 -#define P_LORA_NSS 42 -#define P_LORA_RESET RADIOLIB_NC // 38 -#define P_LORA_BUSY 46 -#define P_LORA_SCLK 43 -#define P_LORA_MISO 45 -#define P_LORA_MOSI 44 -#define SX126X_POWER_EN 37 - -//#define PIN_GPS_SDA 13 //GPS SDA pin (output option) -//#define PIN_GPS_SCL 14 //GPS SCL pin (output option) -//#define PIN_GPS_TX 16 //GPS TX pin -//#define PIN_GPS_RX 15 //GPS RX pin -#define PIN_GPS_1PPS 17 //GPS PPS pin -#define GPS_BAUD_RATE 9600 -#define GPS_ADDRESS 0x42 //i2c address for GPS - -#define SX126X_DIO2_AS_RF_SWITCH true -#define SX126X_DIO3_TCXO_VOLTAGE 1.8 - // built-ins #define PIN_VBAT_READ 5 #define ADC_MULTIPLIER (3 * 1.73 * 1.187 * 1000) diff --git a/variants/rak4631/variant.h b/variants/rak4631/variant.h index b18335f8da..142d93e91d 100644 --- a/variants/rak4631/variant.h +++ b/variants/rak4631/variant.h @@ -144,6 +144,19 @@ extern "C" static const uint8_t MISO = PIN_SPI_MISO; static const uint8_t SCK = PIN_SPI_SCK; +// LoRa radio module pins for RAK4631 +#define P_LORA_DIO_1 (47) +#define P_LORA_NSS (42) +#define P_LORA_RESET (-1) +#define P_LORA_BUSY (46) +#define P_LORA_SCLK (43) +#define P_LORA_MISO (45) +#define P_LORA_MOSI (44) +#define SX126X_POWER_EN (37) + +#define SX126X_DIO2_AS_RF_SWITCH true +#define SX126X_DIO3_TCXO_VOLTAGE 1.8 + /* * Wire Interfaces */ @@ -155,19 +168,23 @@ extern "C" #define PIN_WIRE1_SDA (24) #define PIN_WIRE1_SCL (25) - // QSPI Pins - // QSPI occupied by GPIO's - #define PIN_QSPI_SCK 3 // 19 - #define PIN_QSPI_CS 26 // 17 - #define PIN_QSPI_IO0 30 // 20 - #define PIN_QSPI_IO1 29 // 21 - #define PIN_QSPI_IO2 28 // 22 - #define PIN_QSPI_IO3 2 // 23 - - // On-board QSPI Flash - // No onboard flash - #define EXTERNAL_FLASH_DEVICES IS25LP080D - #define EXTERNAL_FLASH_USE_QSPI +// QSPI Pins +// QSPI occupied by GPIO's +#define PIN_QSPI_SCK 3 // 19 +#define PIN_QSPI_CS 26 // 17 +#define PIN_QSPI_IO0 30 // 20 +#define PIN_QSPI_IO1 29 // 21 +#define PIN_QSPI_IO2 28 // 22 +#define PIN_QSPI_IO3 2 // 23 + +// On-board QSPI Flash +// No onboard flash +#define EXTERNAL_FLASH_DEVICES IS25LP080D +#define EXTERNAL_FLASH_USE_QSPI + +#define PIN_GPS_1PPS 17 //GPS PPS pin +#define GPS_BAUD_RATE 9600 +#define GPS_ADDRESS 0x42 //i2c address for GPS #ifdef __cplusplus }