[Board]: Support for M5Stack CoreS3 (Part 1: radio) (#5049)

This commit is contained in:
Ludovic BOUÉ 2024-10-14 10:13:22 +02:00 committed by GitHub
parent 05e4a639a1
commit 0ec1684718
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 101 additions and 0 deletions

View File

@ -104,6 +104,8 @@
#define HW_VENDOR meshtastic_HardwareModel_NANO_G1
#elif defined(M5STACK)
#define HW_VENDOR meshtastic_HardwareModel_M5STACK
#elif defined(M5STACK_CORES3)
#define HW_VENDOR meshtastic_HardwareModel_M5STACK_CORES3
#elif defined(STATION_G1)
#define HW_VENDOR meshtastic_HardwareModel_STATION_G1
#elif defined(DR_DEV)

View File

@ -0,0 +1,63 @@
#ifndef Pins_Arduino_h
#define Pins_Arduino_h
#include "soc/soc_caps.h"
#include <stdint.h>
#define USB_VID 0x303a
#define USB_PID 0x1001
// Some boards have too low voltage on this pin (board design bug)
// Use different pin with 3V and connect with 48
// and change this setup for the chosen pin (for example 38)
static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT + 48;
#define BUILTIN_LED LED_BUILTIN // backward compatibility
#define LED_BUILTIN LED_BUILTIN
#define RGB_BUILTIN LED_BUILTIN
#define RGB_BRIGHTNESS 64
static const uint8_t TX = 43;
static const uint8_t RX = 44;
static const uint8_t TXD2 = 17;
static const uint8_t RXD2 = 18;
static const uint8_t SDA = 12;
static const uint8_t SCL = 11;
static const uint8_t SS = 15;
static const uint8_t MOSI = 37;
static const uint8_t MISO = 35;
static const uint8_t SCK = 36;
static const uint8_t G0 = 0;
static const uint8_t G1 = 1;
static const uint8_t G2 = 2;
static const uint8_t G3 = 3;
static const uint8_t G4 = 4;
static const uint8_t G5 = 5;
static const uint8_t G6 = 6;
static const uint8_t G7 = 7;
static const uint8_t G8 = 8;
static const uint8_t G9 = 9;
static const uint8_t G11 = 11;
static const uint8_t G12 = 12;
static const uint8_t G13 = 13;
static const uint8_t G14 = 14;
static const uint8_t G17 = 17;
static const uint8_t G18 = 18;
static const uint8_t G19 = 19;
static const uint8_t G20 = 20;
static const uint8_t G21 = 21;
static const uint8_t G33 = 33;
static const uint8_t G34 = 34;
static const uint8_t G35 = 35;
static const uint8_t G36 = 36;
static const uint8_t G37 = 37;
static const uint8_t G38 = 38;
static const uint8_t G45 = 45;
static const uint8_t G46 = 46;
static const uint8_t ADC = 10;
#endif /* Pins_Arduino_h */

View File

@ -0,0 +1,14 @@
; M5stack CoreS3
[env:m5stack-cores3]
extends = esp32s3_base
board = m5stack-cores3
board_check = true
upload_protocol = esptool
build_flags = ${esp32_base.build_flags}
-DPRIVATE_HW
-DM5STACK_CORES3
-Ivariants/m5stack_cores3
lib_deps =
${esp32_base.lib_deps}

View File

@ -0,0 +1,22 @@
#define I2C_SDA 12
#define I2C_SCL 11
#undef LORA_SCK
#undef LORA_MISO
#undef LORA_MOSI
#undef LORA_CS
#define LORA_SCK 36
#define LORA_MISO 35
#define LORA_MOSI 37
#define LORA_CS 6 // NSS
#define USE_RF95
#define LORA_DIO0 14 // IRQ
#define LORA_RESET 5 // RESET
#define LORA_RST 5 // RESET
#define LORA_IRQ 14 // DIO0
#define LORA_DIO1 RADIOLIB_NC // Not really used
#define LORA_DIO2 RADIOLIB_NC // Not really used
#define HAS_AXP2101