mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-15 23:32:34 +00:00
Migrate remaining variants to new dir structure (#7412)
This commit is contained in:
65
variants/esp32s3/mesh-tab/pins_arduino.h
Normal file
65
variants/esp32s3/mesh-tab/pins_arduino.h
Normal file
@@ -0,0 +1,65 @@
|
||||
#ifndef Pins_Arduino_h
|
||||
#define Pins_Arduino_h
|
||||
|
||||
#include "soc/soc_caps.h"
|
||||
#include <stdint.h>
|
||||
|
||||
#define USB_VID 0x303A
|
||||
#define USB_PID 0x80D6
|
||||
|
||||
static const uint8_t TX = 43;
|
||||
static const uint8_t RX = 44;
|
||||
|
||||
static const uint8_t SDA = 8;
|
||||
static const uint8_t SCL = 9;
|
||||
|
||||
static const uint8_t SS = 5;
|
||||
static const uint8_t MOSI = 35;
|
||||
static const uint8_t MISO = 37;
|
||||
static const uint8_t SDO = 35;
|
||||
static const uint8_t SDI = 37;
|
||||
static const uint8_t SCK = 36;
|
||||
|
||||
static const uint8_t A0 = 1;
|
||||
static const uint8_t A1 = 2;
|
||||
static const uint8_t A2 = 3;
|
||||
static const uint8_t A3 = 4;
|
||||
static const uint8_t A4 = 5;
|
||||
static const uint8_t A5 = 6;
|
||||
static const uint8_t A6 = 7;
|
||||
static const uint8_t A7 = 8;
|
||||
static const uint8_t A8 = 9;
|
||||
static const uint8_t A9 = 10;
|
||||
static const uint8_t A10 = 11;
|
||||
static const uint8_t A11 = 12;
|
||||
static const uint8_t A12 = 13;
|
||||
|
||||
static const uint8_t T1 = 1;
|
||||
static const uint8_t T3 = 3;
|
||||
static const uint8_t T5 = 5;
|
||||
static const uint8_t T6 = 6;
|
||||
static const uint8_t T7 = 7;
|
||||
static const uint8_t T8 = 8;
|
||||
static const uint8_t T9 = 9;
|
||||
static const uint8_t T10 = 10;
|
||||
static const uint8_t T11 = 11;
|
||||
static const uint8_t T12 = 12;
|
||||
static const uint8_t T14 = 14;
|
||||
|
||||
static const uint8_t VBAT_SENSE = 2;
|
||||
static const uint8_t VBUS_SENSE = 34;
|
||||
|
||||
// User LED
|
||||
#define LED_BUILTIN 13
|
||||
#define BUILTIN_LED LED_BUILTIN // backward compatibility
|
||||
|
||||
static const uint8_t RGB_DATA = 40;
|
||||
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API neopixelWrite()
|
||||
#define RGB_BUILTIN (RGB_DATA + SOC_GPIO_PIN_COUNT)
|
||||
#define RGB_BRIGHTNESS 64
|
||||
|
||||
static const uint8_t RGB_PWR = 39;
|
||||
static const uint8_t LDO2 = 39;
|
||||
static const uint8_t LED = 13;
|
||||
|
||||
#endif /* Pins_Arduino_h */
|
||||
181
variants/esp32s3/mesh-tab/platformio.ini
Normal file
181
variants/esp32s3/mesh-tab/platformio.ini
Normal file
@@ -0,0 +1,181 @@
|
||||
; Base for Mesh-Tab device (esp32-s3 N16R2 + ra-sh01 lora)
|
||||
; https://github.com/valzzu/Mesh-Tab
|
||||
[mesh_tab_base]
|
||||
extends = esp32s3_base
|
||||
board = mesh-tab
|
||||
board_level = extra
|
||||
board_upload.flash_size = 16MB
|
||||
board_build.partitions = default_16MB.csv
|
||||
upload_protocol = esptool
|
||||
build_flags = ${esp32s3_base.build_flags}
|
||||
-D MESH_TAB
|
||||
-D CONFIG_ARDUHAL_ESP_LOG
|
||||
-D CONFIG_ARDUHAL_LOG_COLORS=1
|
||||
-D CONFIG_DISABLE_HAL_LOCKS=1
|
||||
-D MESHTASTIC_EXCLUDE_CANNEDMESSAGES=1
|
||||
-D MESHTASTIC_EXCLUDE_INPUTBROKER=1
|
||||
-D MESHTASTIC_EXCLUDE_BLUETOOTH=1
|
||||
-D MESHTASTIC_EXCLUDE_WEBSERVER=1
|
||||
-D LV_LVGL_H_INCLUDE_SIMPLE
|
||||
-D LV_CONF_INCLUDE_SIMPLE
|
||||
-D LV_COMP_CONF_INCLUDE_SIMPLE
|
||||
-D LV_USE_SYSMON=0
|
||||
-D LV_USE_PROFILER=0
|
||||
-D LV_USE_PERF_MONITOR=0
|
||||
-D LV_USE_MEM_MONITOR=0
|
||||
-D LV_USE_LOG=0
|
||||
-D LV_BUILD_TEST=0
|
||||
-D USE_LOG_DEBUG
|
||||
-D LOG_DEBUG_INC=\"DebugConfiguration.h\"
|
||||
-D RADIOLIB_SPI_PARANOID=0
|
||||
-D HAS_SCREEN=0
|
||||
-D HAS_TFT=1
|
||||
-D USE_PIN_BUZZER
|
||||
-D RAM_SIZE=1024
|
||||
-D LGFX_DRIVER_TEMPLATE
|
||||
-D LGFX_DRIVER=LGFX_GENERIC
|
||||
-D GFX_DRIVER_INC=\"graphics/LGFX/LGFX_GENERIC.h\"
|
||||
-D LGFX_PIN_SCK=12
|
||||
-D LGFX_PIN_MOSI=13
|
||||
-D LGFX_PIN_MISO=11
|
||||
-D LGFX_PIN_DC=16
|
||||
-D LGFX_PIN_CS=10
|
||||
-D LGFX_PIN_RST=-1
|
||||
-D LGFX_PIN_BL=42
|
||||
-D LGFX_TOUCH_INT=41
|
||||
-D VIEW_320x240
|
||||
-D USE_PACKET_API
|
||||
-I variants/esp32s3/mesh-tab
|
||||
build_src_filter = ${esp32_base.build_src_filter}
|
||||
lib_deps =
|
||||
${esp32_base.lib_deps}
|
||||
${device-ui_base.lib_deps}
|
||||
lovyan03/LovyanGFX@^1.2.0
|
||||
|
||||
[mesh_tab_xpt2046]
|
||||
extends = mesh_tab_base
|
||||
build_flags = ${mesh_tab_base.build_flags}
|
||||
-D LGFX_TOUCH=XPT2046
|
||||
-D LGFX_TOUCH_SPI_FREQ=2500000
|
||||
-D LGFX_TOUCH_SPI_HOST=2
|
||||
-D LGFX_TOUCH_CS=7
|
||||
-D LGFX_TOUCH_CLK=12
|
||||
-D LGFX_TOUCH_DO=11
|
||||
-D LGFX_TOUCH_DIN=13
|
||||
-D LGFX_TOUCH_X_MIN=300
|
||||
-D LGFX_TOUCH_X_MAX=3900
|
||||
-D LGFX_TOUCH_Y_MIN=400
|
||||
-D LGFX_TOUCH_Y_MAX=3900
|
||||
|
||||
[mesh_tab_ft5x06]
|
||||
extends = mesh_tab_base
|
||||
build_flags = ${mesh_tab_base.build_flags}
|
||||
-D LGFX_TOUCH=FT5x06
|
||||
-D LGFX_TOUCH_I2C_FREQ=400000
|
||||
-D LGFX_TOUCH_I2C_PORT=0
|
||||
-D LGFX_TOUCH_I2C_ADDR=0x38
|
||||
-D LGFX_TOUCH_I2C_SDA=8
|
||||
-D LGFX_TOUCH_I2C_SCL=9
|
||||
-D LGFX_TOUCH_RST=7
|
||||
|
||||
; 3.2" TN TFT ST7789 / XPT2046: https://vi.aliexpress.com/item/1005005933490544.html
|
||||
[env:mesh-tab-3-2-TN-resistive]
|
||||
extends = mesh_tab_base
|
||||
build_flags = ${mesh_tab_xpt2046.build_flags}
|
||||
-D SPI_FREQUENCY=60000000
|
||||
-D LGFX_SCREEN_WIDTH=240
|
||||
-D LGFX_SCREEN_HEIGHT=320
|
||||
-D DISPLAY_SIZE=320x240 ; landscape mode
|
||||
-D LGFX_PANEL=ST7789
|
||||
-D LGFX_INVERT_COLOR=false
|
||||
-D LGFX_ROTATION=3
|
||||
-D LGFX_TOUCH_ROTATION=4
|
||||
|
||||
; 3.2" IPS TFT ILI9341 / XPT2046: https://www.aliexpress.com/item/1005006258575617.html
|
||||
[env:mesh-tab-3-2-IPS-resistive]
|
||||
extends = mesh_tab_base
|
||||
build_flags = ${mesh_tab_xpt2046.build_flags}
|
||||
-D SPI_FREQUENCY=60000000 ; if image is distorted then lower to 40 MHz
|
||||
-D LGFX_SCREEN_WIDTH=240
|
||||
-D LGFX_SCREEN_HEIGHT=320
|
||||
-D DISPLAY_SIZE=320x240 ; landscape mode
|
||||
-D LGFX_PANEL=ILI9341
|
||||
-D LGFX_ROTATION=1
|
||||
-D LGFX_TOUCH_ROTATION=4
|
||||
|
||||
; 3.5" IPS TFT ILI9488 / XPT2046: https://vi.aliexpress.com/item/1005006333922639.html
|
||||
[env:mesh-tab-3-5-IPS-resistive]
|
||||
extends = mesh_tab_base
|
||||
build_flags = ${mesh_tab_xpt2046.build_flags}
|
||||
-D SPI_FREQUENCY=60000000 ; may go higher upto 40/60/80 MHz
|
||||
-D DISPLAY_SET_RESOLUTION
|
||||
-D LGFX_SCREEN_WIDTH=320
|
||||
-D LGFX_SCREEN_HEIGHT=480
|
||||
-D DISPLAY_SIZE=320x480 ; portrait mode
|
||||
-D LGFX_PANEL=ILI9488
|
||||
-D LGFX_ROTATION=0
|
||||
-D LGFX_TOUCH_ROTATION=0
|
||||
|
||||
; 3.5" TN TFT ILI9488 / XPT2046: https://vi.aliexpress.com/item/32985467436.html
|
||||
[env:mesh-tab-3-5-TN-resistive]
|
||||
extends = mesh_tab_base
|
||||
build_flags = ${mesh_tab_xpt2046.build_flags}
|
||||
-D SPI_FREQUENCY=60000000
|
||||
-D DISPLAY_SET_RESOLUTION
|
||||
-D LGFX_SCREEN_WIDTH=320
|
||||
-D LGFX_SCREEN_HEIGHT=480
|
||||
-D DISPLAY_SIZE=320x480 ; portrait mode
|
||||
-D LGFX_PANEL=HX8357B
|
||||
-D LGFX_INVERT_COLOR=false
|
||||
-D LGFX_ROTATION=4
|
||||
-D LGFX_TOUCH_ROTATION=2
|
||||
|
||||
; 3.2" IPS TFT ILI9341 / FT6236: https://vi.aliexpress.com/item/1005006624072350.html
|
||||
[env:mesh-tab-3-2-IPS-capacitive]
|
||||
extends = mesh_tab_base
|
||||
build_flags = ${mesh_tab_ft5x06.build_flags}
|
||||
-D SPI_FREQUENCY=75000000 ; may go higher upto 60/80 MHz
|
||||
-D LGFX_SCREEN_WIDTH=240
|
||||
-D LGFX_SCREEN_HEIGHT=320
|
||||
-D DISPLAY_SIZE=320x240 ; landscape mode
|
||||
-D LGFX_PANEL=ILI9341
|
||||
-D LGFX_ROTATION=1
|
||||
-D LGFX_TOUCH_X_MIN=0
|
||||
-D LGFX_TOUCH_X_MAX=239
|
||||
-D LGFX_TOUCH_Y_MIN=0
|
||||
-D LGFX_TOUCH_Y_MAX=319
|
||||
-D LGFX_TOUCH_ROTATION=2
|
||||
|
||||
; 3.5" IPS TFT ILI9488 / FT6236: https://vi.aliexpress.com/item/1005006893699919.html
|
||||
[env:mesh-tab-3-5-IPS-capacitive]
|
||||
extends = mesh_tab_base
|
||||
build_flags = ${mesh_tab_ft5x06.build_flags}
|
||||
-D SPI_FREQUENCY=75000000 ; may go higher upto 40/60/80 MHz
|
||||
-D DISPLAY_SET_RESOLUTION
|
||||
-D LGFX_SCREEN_WIDTH=320
|
||||
-D LGFX_SCREEN_HEIGHT=480
|
||||
-D DISPLAY_SIZE=320x480 ; portrait mode
|
||||
-D LGFX_PANEL=ILI9488
|
||||
-D LGFX_ROTATION=2
|
||||
-D LGFX_TOUCH_X_MIN=0
|
||||
-D LGFX_TOUCH_X_MAX=319
|
||||
-D LGFX_TOUCH_Y_MIN=0
|
||||
-D LGFX_TOUCH_Y_MAX=479
|
||||
-D LGFX_TOUCH_ROTATION=0
|
||||
|
||||
; 4.0" IPS TFT ILI9488 / FT6236: https://vi.aliexpress.com/item/1005007082906950.html
|
||||
[env:mesh-tab-4-0-IPS-capacitive]
|
||||
extends = mesh_tab_base
|
||||
build_flags = ${mesh_tab_ft5x06.build_flags}
|
||||
-D SPI_FREQUENCY=75000000
|
||||
-D DISPLAY_SET_RESOLUTION
|
||||
-D LGFX_SCREEN_WIDTH=320
|
||||
-D LGFX_SCREEN_HEIGHT=480
|
||||
-D DISPLAY_SIZE=320x480 ; portrait mode
|
||||
-D LGFX_PANEL=HX8357B
|
||||
-D LGFX_ROTATION=4
|
||||
-D LGFX_TOUCH_X_MIN=0
|
||||
-D LGFX_TOUCH_X_MAX=319
|
||||
-D LGFX_TOUCH_Y_MIN=0
|
||||
-D LGFX_TOUCH_Y_MAX=479
|
||||
-D LGFX_TOUCH_ROTATION=6
|
||||
59
variants/esp32s3/mesh-tab/variant.h
Normal file
59
variants/esp32s3/mesh-tab/variant.h
Normal file
@@ -0,0 +1,59 @@
|
||||
#ifndef _VARIANT_MESHTAB_DIY_
|
||||
#define _VARIANT_MESHTAB_DIY_
|
||||
|
||||
#define HAS_TOUCHSCREEN 1
|
||||
|
||||
#define USE_POWERSAVE
|
||||
#define SLEEP_TIME 180
|
||||
|
||||
// Analog pins
|
||||
#define BATTERY_PIN 4 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage
|
||||
// ratio of voltage divider (100k, 220k)
|
||||
#define ADC_MULTIPLIER 1.6 // 1.45 + 10% for correction of display undervoltage.
|
||||
#define ADC_CHANNEL ADC1_GPIO4_CHANNEL
|
||||
|
||||
// LED
|
||||
#define LED_PIN 21
|
||||
|
||||
// Button
|
||||
#define BUTTON_PIN 0
|
||||
|
||||
// Button
|
||||
#define PIN_BUZZER 5
|
||||
|
||||
// GPS
|
||||
#define GPS_RX_PIN 18
|
||||
#define GPS_TX_PIN 17
|
||||
|
||||
// #define HAS_SDCARD 1
|
||||
#define SPI_MOSI 13
|
||||
#define SPI_SCK 12
|
||||
#define SPI_MISO 11
|
||||
#define SPI_CS 10
|
||||
#define SDCARD_CS 6
|
||||
|
||||
// LORA MODULES
|
||||
#define USE_SX1262
|
||||
|
||||
// LORA SPI
|
||||
#define LORA_SCK 36
|
||||
#define LORA_MISO 37
|
||||
#define LORA_MOSI 35
|
||||
#define LORA_CS 39
|
||||
|
||||
// LORA CONFIG
|
||||
#define LORA_DIO0 -1 // a No connect on the SX1262 module
|
||||
#define LORA_RESET 14
|
||||
#define LORA_DIO1 15 // SX1262 IRQ
|
||||
#define LORA_DIO2 40 // SX1262 BUSY
|
||||
#define LORA_DIO3 // Not connected on PCB, but internally on the TTGO SX1262
|
||||
|
||||
#define SX126X_CS LORA_CS
|
||||
#define SX126X_DIO1 LORA_DIO1
|
||||
#define SX126X_DIO2_AS_RF_SWITCH
|
||||
#define SX126X_BUSY LORA_DIO2
|
||||
#define SX126X_RESET 14
|
||||
#define SX126X_RXEN 47
|
||||
#define SX126X_TXEN RADIOLIB_NC // Assuming that DIO2 is connected to TXEN pin
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user