Selaa lähdekoodia

moved pindefs from board file to variant.h

Rastislav Vysoky 6 kuukautta sitten
vanhempi
sitoutus
f41872420e
2 muutettua tiedostoa jossa 30 lisäystä ja 34 poistoa
  1. 0 21
      variants/rak4631/RAK4631Board.h
  2. 30 13
      variants/rak4631/variant.h

+ 0 - 21
variants/rak4631/RAK4631Board.h

@@ -4,27 +4,6 @@
 #include <Arduino.h>
 #include <helpers/NRF52Board.h>
 
-// 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)

+ 30 - 13
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
 }