mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-20 09:43:03 +00:00
ESP32: Initial sort variants by platform (#7340)
This commit is contained in:
47
variants/esp32/m5stack_core/pins_arduino.h
Normal file
47
variants/esp32/m5stack_core/pins_arduino.h
Normal file
@@ -0,0 +1,47 @@
|
||||
#ifndef Pins_Arduino_h
|
||||
#define Pins_Arduino_h
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
static const uint8_t TX = 1;
|
||||
static const uint8_t RX = 3;
|
||||
|
||||
static const uint8_t TXD2 = 17;
|
||||
static const uint8_t RXD2 = 16;
|
||||
|
||||
static const uint8_t SDA = 21;
|
||||
static const uint8_t SCL = 22;
|
||||
|
||||
static const uint8_t SS = 5;
|
||||
static const uint8_t MOSI = 23;
|
||||
static const uint8_t MISO = 19;
|
||||
static const uint8_t SCK = 18;
|
||||
|
||||
static const uint8_t G23 = 23;
|
||||
static const uint8_t G19 = 19;
|
||||
static const uint8_t G18 = 18;
|
||||
static const uint8_t G3 = 3;
|
||||
static const uint8_t G16 = 16;
|
||||
static const uint8_t G21 = 21;
|
||||
static const uint8_t G2 = 2;
|
||||
static const uint8_t G12 = 12;
|
||||
static const uint8_t G15 = 15;
|
||||
static const uint8_t G35 = 35;
|
||||
static const uint8_t G36 = 36;
|
||||
static const uint8_t G25 = 25;
|
||||
static const uint8_t G26 = 26;
|
||||
static const uint8_t G1 = 1;
|
||||
static const uint8_t G17 = 17;
|
||||
static const uint8_t G22 = 22;
|
||||
static const uint8_t G5 = 5;
|
||||
static const uint8_t G13 = 13;
|
||||
static const uint8_t G0 = 0;
|
||||
static const uint8_t G34 = 34;
|
||||
|
||||
static const uint8_t DAC1 = 25;
|
||||
static const uint8_t DAC2 = 26;
|
||||
|
||||
static const uint8_t ADC1 = 35;
|
||||
static const uint8_t ADC2 = 36;
|
||||
|
||||
#endif /* Pins_Arduino_h */
|
||||
29
variants/esp32/m5stack_core/platformio.ini
Normal file
29
variants/esp32/m5stack_core/platformio.ini
Normal file
@@ -0,0 +1,29 @@
|
||||
[env:m5stack-core]
|
||||
extends = esp32_base
|
||||
board = m5stack-core-esp32
|
||||
monitor_filters = esp32_exception_decoder
|
||||
build_src_filter =
|
||||
${esp32_base.build_src_filter}
|
||||
build_flags =
|
||||
${esp32_base.build_flags}
|
||||
-I variants/esp32/m5stack_core
|
||||
-DILI9341_DRIVER
|
||||
-DM5STACK
|
||||
-DUSER_SETUP_LOADED
|
||||
-DTFT_SDA_READ
|
||||
-DTFT_DRIVER=0x9341
|
||||
-DTFT_MISO=19
|
||||
-DTFT_MOSI=23
|
||||
-DTFT_SCLK=18
|
||||
-DTFT_CS=14
|
||||
-DTFT_DC=27
|
||||
-DTFT_RST=33
|
||||
-DTFT_BL=32
|
||||
-DSPI_FREQUENCY=40000000
|
||||
-DSPI_READ_FREQUENCY=16000000
|
||||
-DDISABLE_ALL_LIBRARY_WARNINGS
|
||||
lib_ignore =
|
||||
m5stack-core
|
||||
lib_deps =
|
||||
${esp32_base.lib_deps}
|
||||
lovyan03/LovyanGFX@^1.2.0
|
||||
46
variants/esp32/m5stack_core/variant.h
Normal file
46
variants/esp32/m5stack_core/variant.h
Normal file
@@ -0,0 +1,46 @@
|
||||
// #define BUTTON_NEED_PULLUP // if set we need to turn on the internal CPU pullup during sleep
|
||||
|
||||
#define I2C_SDA 21
|
||||
#define I2C_SCL 22
|
||||
|
||||
// #define BUTTON_PIN 39 // 38, 37
|
||||
// #define BUTTON_PIN 0
|
||||
#define BUTTON_NEED_PULLUP
|
||||
// #define EXT_NOTIFY_OUT 13 // Default pin to use for Ext Notify Plugin.
|
||||
|
||||
#define BUTTON_PIN 38
|
||||
|
||||
#define PIN_BUZZER 25
|
||||
|
||||
#undef LORA_SCK
|
||||
#undef LORA_MISO
|
||||
#undef LORA_MOSI
|
||||
#undef LORA_CS
|
||||
|
||||
#define LORA_SCK 18
|
||||
#define LORA_MISO 19
|
||||
#define LORA_MOSI 23
|
||||
#define LORA_CS 5
|
||||
|
||||
#define USE_RF95
|
||||
#define LORA_DIO0 36 // a No connect on the SX1262 module
|
||||
#define LORA_RESET 26
|
||||
#define LORA_DIO1 RADIOLIB_NC // Not really used
|
||||
#define LORA_DIO2 RADIOLIB_NC // Not really used
|
||||
|
||||
// This board has different GPS pins than all other boards
|
||||
#undef GPS_RX_PIN
|
||||
#undef GPS_TX_PIN
|
||||
#define GPS_RX_PIN 16
|
||||
#define GPS_TX_PIN 17
|
||||
|
||||
#define TFT_HEIGHT 240
|
||||
#define TFT_WIDTH 320
|
||||
#define TFT_OFFSET_X 0
|
||||
#define TFT_OFFSET_Y 0
|
||||
#define TFT_BUSY -1
|
||||
|
||||
// LCD screens are slow, so slowdown the wipe so it looks better
|
||||
#define SCREEN_TRANSITION_FRAMERATE 1 // fps
|
||||
|
||||
#define ILI9341_SPI_HOST VSPI_HOST // VSPI_HOST or HSPI_HOST
|
||||
Reference in New Issue
Block a user