Add T-Beam Board Support (#1852)

This commit is contained in:
lewis he 2018-09-18 03:19:02 +08:00 committed by Me No Dev
parent ce61074802
commit 02ee799f35
2 changed files with 122 additions and 0 deletions

View File

@ -2272,3 +2272,64 @@ wipy3.menu.DebugLevel.debug=Debug
wipy3.menu.DebugLevel.debug.build.code_debug=4 wipy3.menu.DebugLevel.debug.build.code_debug=4
wipy3.menu.DebugLevel.verbose=Verbose wipy3.menu.DebugLevel.verbose=Verbose
wipy3.menu.DebugLevel.verbose.build.code_debug=5 wipy3.menu.DebugLevel.verbose.build.code_debug=5
##############################################################
t-beam.name=T-Beam
t-beam.upload.tool=esptool
t-beam.upload.maximum_size=1310720
t-beam.upload.maximum_data_size=327680
t-beam.upload.wait_for_upload_port=true
t-beam.serial.disableDTR=true
t-beam.serial.disableRTS=true
t-beam.build.mcu=esp32
t-beam.build.core=esp32
t-beam.build.variant=t-beam
t-beam.build.board=T-Beam
t-beam.build.f_cpu=240000000L
t-beam.build.flash_mode=dio
t-beam.build.flash_size=4MB
t-beam.build.boot=dio
t-beam.build.partitions=default
t-beam.menu.PSRAM.disabled=Disabled
t-beam.menu.PSRAM.disabled.build.defines=
t-beam.menu.PSRAM.enabled=Enabled
t-beam.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM -mfix-esp32-psram-cache-issue
t-beam.menu.FlashFreq.80=80MHz
t-beam.menu.FlashFreq.80.build.flash_freq=80m
t-beam.menu.FlashFreq.40=40MHz
t-beam.menu.FlashFreq.40.build.flash_freq=40m
t-beam.menu.UploadSpeed.921600=921600
t-beam.menu.UploadSpeed.921600.upload.speed=921600
t-beam.menu.UploadSpeed.115200=115200
t-beam.menu.UploadSpeed.115200.upload.speed=115200
t-beam.menu.UploadSpeed.256000.windows=256000
t-beam.menu.UploadSpeed.256000.upload.speed=256000
t-beam.menu.UploadSpeed.230400.windows.upload.speed=256000
t-beam.menu.UploadSpeed.230400=230400
t-beam.menu.UploadSpeed.230400.upload.speed=230400
t-beam.menu.UploadSpeed.460800.linux=460800
t-beam.menu.UploadSpeed.460800.macosx=460800
t-beam.menu.UploadSpeed.460800.upload.speed=460800
t-beam.menu.UploadSpeed.512000.windows=512000
t-beam.menu.UploadSpeed.512000.upload.speed=512000
t-beam.menu.DebugLevel.none=None
t-beam.menu.DebugLevel.none.build.code_debug=0
t-beam.menu.DebugLevel.error=Error
t-beam.menu.DebugLevel.error.build.code_debug=1
t-beam.menu.DebugLevel.warn=Warn
t-beam.menu.DebugLevel.warn.build.code_debug=2
t-beam.menu.DebugLevel.info=Info
t-beam.menu.DebugLevel.info.build.code_debug=3
t-beam.menu.DebugLevel.debug=Debug
t-beam.menu.DebugLevel.debug.build.code_debug=4
t-beam.menu.DebugLevel.verbose=Verbose
t-beam.menu.DebugLevel.verbose.build.code_debug=5

View File

@ -0,0 +1,61 @@
#ifndef Pins_Arduino_h
#define Pins_Arduino_h
#include <stdint.h>
#define EXTERNAL_NUM_INTERRUPTS 16
#define NUM_DIGITAL_PINS 20
#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)
// SPI LoRa Radio
#define LORA_SCK 5 // GPIO5 - SX1276 SCK
#define LORA_MISO 19 // GPIO19 - SX1276 MISO
#define LORA_MOSI 27 // GPIO27 - SX1276 MOSI
#define LORA_CS 18 // GPIO18 - SX1276 CS
#define LORA_RST 23 // GPIO23 - SX1276 RST
#define LORA_IO0 26 // GPIO26 - SX1276 IO0
#define LORA_IO1 33 // GPIO33 - SX1276 IO1
#define LORA_IO2 32 // GPIO32 - SX1276 IO2
static const uint8_t TX = 1;
static const uint8_t RX = 3;
static const uint8_t SDA = 21;
static const uint8_t SCL = 22;
static const uint8_t SS = 18;
static const uint8_t MOSI = 27;
static const uint8_t MISO = 19;
static const uint8_t SCK = 5;
static const uint8_t A0 = 36;
static const uint8_t A3 = 39;
static const uint8_t A4 = 32;
static const uint8_t A5 = 33;
static const uint8_t A6 = 34;
static const uint8_t A7 = 35;
static const uint8_t A10 = 4;
static const uint8_t A11 = 0;
static const uint8_t A12 = 2;
static const uint8_t A14 = 13;
static const uint8_t A16 = 14;
static const uint8_t A17 = 27; //lora
static const uint8_t A18 = 25;
static const uint8_t A19 = 26; //lora
static const uint8_t T0 = 4;
static const uint8_t T1 = 0;
static const uint8_t T2 = 2;
static const uint8_t T4 = 13;
static const uint8_t T6 = 14;
static const uint8_t T8 = 32;
static const uint8_t T9 = 33;
static const uint8_t DAC2 = 25;
#endif /* Pins_Arduino_h */