forked from meshtastic/firmware
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added RAK11200 board variant support (meshtastic#1177)
* Added RAK11200 board variant support
- Loading branch information
1 parent
b21b7de
commit 365120e
Showing
4 changed files
with
128 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"build": { | ||
"arduino":{ | ||
"ldscript": "esp32_out.ld" | ||
}, | ||
"core": "esp32", | ||
"extra_flags": "-DARDUINO_ESP32_DEV", | ||
"f_cpu": "240000000L", | ||
"f_flash": "40000000L", | ||
"flash_mode": "dio", | ||
"mcu": "esp32", | ||
"variant": "WisCore_RAK11200_Board" | ||
}, | ||
"connectivity": [ | ||
"wifi", | ||
"bluetooth", | ||
"ethernet", | ||
"can" | ||
], | ||
"frameworks": [ | ||
"arduino", | ||
"espidf" | ||
], | ||
"name": "WisCore RAK11200 Board", | ||
"upload": { | ||
"flash_size": "4MB", | ||
"maximum_ram_size": 327680, | ||
"maximum_size": 4194304, | ||
"protocols": [ | ||
"esptool", | ||
"espota", | ||
"ftdi" | ||
], | ||
"require_upload_port": true, | ||
"speed": 460800 | ||
}, | ||
"url": "https://www.rakwireless.com", | ||
"vendor": "RAKwireless" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[env:rak11200] | ||
extends = esp32_base | ||
board = wiscore_rak11200 | ||
build_flags = | ||
${esp32_base.build_flags} -D RAK_11200 -I variants/WisCore_RAK11200_Board |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
#ifndef Pins_Arduino_h | ||
#define Pins_Arduino_h | ||
|
||
#include <stdint.h> | ||
|
||
#define EXTERNAL_NUM_INTERRUPTS 16 | ||
#define NUM_DIGITAL_PINS 40 | ||
#define NUM_ANALOG_INPUTS 16 | ||
|
||
#define analogInputToDigitalPin(p) (((p) < 20) ? (esp32_adc2gpio[(p)]) : -1) | ||
#define digitalPinToInterrupt(p) (((p) < 40) ? (p) : -1) | ||
#define digitalPinHasPWM(p) (p < 34) | ||
|
||
#define LED_GREEN 12 | ||
#define LED_BLUE 2 | ||
|
||
#define LED_BUILTIN LED_GREEN | ||
|
||
static const uint8_t TX = 1; | ||
static const uint8_t RX = 3; | ||
|
||
#define TX1 21 | ||
#define RX1 19 | ||
|
||
#define WB_IO1 14 | ||
#define WB_IO2 27 | ||
#define WB_IO3 26 | ||
#define WB_IO4 23 | ||
#define WB_IO5 13 | ||
#define WB_IO6 22 | ||
#define WB_SW1 34 | ||
#define WB_A0 36 | ||
#define WB_A1 39 | ||
#define WB_CS 32 | ||
#define WB_LED1 12 | ||
#define WB_LED2 2 | ||
|
||
static const uint8_t SDA = 4; | ||
static const uint8_t SCL = 5; | ||
|
||
static const uint8_t SS = 32; | ||
static const uint8_t MOSI = 25; | ||
static const uint8_t MISO = 35; | ||
static const uint8_t SCK = 33; | ||
|
||
/* -------- Meshtastic pins -------- */ | ||
|
||
#define I2C_SDA SDA | ||
#define I2C_SCL SCL | ||
|
||
#define GPS_RX_PIN RX | ||
#define GPS_RX_PIN TX | ||
|
||
#define LED_PIN LED_BLUE | ||
|
||
#define PIN_VBAT WB_A0 | ||
|
||
// https://docs.rakwireless.com/Product-Categories/WisBlock/RAK13300/ | ||
|
||
#define LORA_DIO0 26 // a No connect on the SX1262/SX1268 module | ||
#define LORA_RESET WB_IO4 // RST for SX1276, and for SX1262/SX1268 | ||
#define LORA_DIO1 WB_IO6 // IRQ for SX1262/SX1268 | ||
#define LORA_DIO2 WB_IO5 // BUSY for SX1262/SX1268 | ||
#define LORA_DIO3 // Not connected on PCB, but internally on the TTGO SX1262/SX1268, if DIO3 is high the TXCO is enabled | ||
|
||
// This is a hack for the radio pin run-around with ESP32 variants | ||
#define RF95_SCK SCK | ||
#define RF95_MISO MISO | ||
#define RF95_MOSI MOSI | ||
#define RF95_NSS SS | ||
|
||
#define USE_SX1262 | ||
#define SX126X_CS (RF95_NSS)// NSS for SX126X | ||
#define SX126X_DIO1 (LORA_DIO1) | ||
#define SX126X_BUSY (LORA_DIO2) | ||
#define SX126X_RESET (LORA_RESET) | ||
#define SX126X_TXEN (-1) | ||
#define SX126X_RXEN (WB_IO3) | ||
#define SX126X_E22 // DIO2 controlls an antenna switch and the TCXO voltage is controlled by DIO3 | ||
#endif /* Pins_Arduino_h */ |