mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-03-29 08:39:56 +00:00
Compare commits
4 Commits
93367b9f8f
...
629adc23c5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
629adc23c5 | ||
|
|
8f605f83fc | ||
|
|
f41872420e | ||
|
|
d5a73b2394 |
@@ -4,30 +4,6 @@
|
||||
#include <Arduino.h>
|
||||
#include <helpers/NRF52Board.h>
|
||||
|
||||
// LoRa radio module pins for RAK13302
|
||||
#define P_LORA_SCLK 3
|
||||
#define P_LORA_MISO 29
|
||||
#define P_LORA_MOSI 30
|
||||
#define P_LORA_NSS 26
|
||||
#define P_LORA_DIO_1 10
|
||||
#define P_LORA_BUSY 9
|
||||
#define P_LORA_RESET 4
|
||||
#ifndef P_LORA_PA_EN
|
||||
#define P_LORA_PA_EN 31
|
||||
#endif
|
||||
|
||||
//#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
|
||||
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
|
||||
|
||||
|
||||
// built-ins
|
||||
#define PIN_VBAT_READ 5
|
||||
#define ADC_MULTIPLIER (3 * 1.73 * 1.187 * 1000)
|
||||
@@ -35,9 +11,13 @@
|
||||
#define PIN_3V3_EN (34)
|
||||
#define WB_IO2 PIN_3V3_EN
|
||||
|
||||
class RAK3401Board : public NRF52BoardDCDC, public NRF52BoardOTA {
|
||||
class RAK3401Board : public NRF52BoardDCDC {
|
||||
protected:
|
||||
#ifdef NRF52_POWER_MANAGEMENT
|
||||
void initiateShutdown(uint8_t reason) override;
|
||||
#endif
|
||||
public:
|
||||
RAK3401Board() : NRF52BoardOTA("RAK3401_OTA") {}
|
||||
RAK3401Board() : NRF52Board("RAK3401_OTA") {}
|
||||
void begin();
|
||||
|
||||
#define BATTERY_SAMPLES 8
|
||||
|
||||
@@ -141,11 +141,6 @@ static const uint8_t AREF = PIN_AREF;
|
||||
#define EXTERNAL_FLASH_DEVICES IS25LP080D
|
||||
#define EXTERNAL_FLASH_USE_QSPI
|
||||
|
||||
#define P_LORA_SCK PIN_SPI1_SCK
|
||||
#define P_LORA_MISO PIN_SPI1_MISO
|
||||
#define P_LORA_MOSI PIN_SPI1_MOSI
|
||||
#define P_LORA_CS 26
|
||||
|
||||
#define USE_SX1262
|
||||
#define SX126X_CS (26)
|
||||
#define SX126X_DIO1 (10)
|
||||
@@ -157,6 +152,15 @@ static const uint8_t AREF = PIN_AREF;
|
||||
#define SX126X_DIO2_AS_RF_SWITCH
|
||||
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
|
||||
|
||||
#define P_LORA_SCLK PIN_SPI1_SCK
|
||||
#define P_LORA_MISO PIN_SPI1_MISO
|
||||
#define P_LORA_MOSI PIN_SPI1_MOSI
|
||||
#define P_LORA_NSS SX126X_CS
|
||||
#define P_LORA_DIO_1 SX126X_DIO1
|
||||
#define P_LORA_BUSY SX126X_BUSY
|
||||
#define P_LORA_RESET SX126X_RESET
|
||||
#define P_LORA_PA_EN 31
|
||||
|
||||
// enables 3.3V periphery like GPS or IO Module
|
||||
// Do not toggle this for GPS power savings
|
||||
#define PIN_3V3_EN (34)
|
||||
@@ -173,6 +177,10 @@ static const uint8_t AREF = PIN_AREF;
|
||||
#define PIN_GPS_RX PIN_SERIAL1_RX
|
||||
#define PIN_GPS_TX PIN_SERIAL1_TX
|
||||
|
||||
#define PIN_GPS_1PPS PIN_GPS_PPS
|
||||
#define GPS_BAUD_RATE 9600
|
||||
#define GPS_ADDRESS 0x42 //i2c address for GPS
|
||||
|
||||
// Battery
|
||||
// The battery sense is hooked to pin A0 (5)
|
||||
#define BATTERY_PIN PIN_A0
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
// 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
|
||||
// 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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user