mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-20 09:43:03 +00:00
fix lora, add v1/v2 variant targets
This commit is contained in:
@@ -637,7 +637,7 @@ void Screen::setup()
|
||||
touchScreenImpl1->init();
|
||||
}
|
||||
}
|
||||
#elif HAS_TOUCHSCREEN && !defined(USE_EINK)
|
||||
#elif HAS_TOUCHSCREEN && !defined(USE_EINK) && !defined(USE_EPD)
|
||||
touchScreenImpl1 =
|
||||
new TouchScreenImpl1(dispdev->getWidth(), dispdev->getHeight(), static_cast<TFTDisplay *>(dispdev)->getTouch);
|
||||
touchScreenImpl1->init();
|
||||
|
||||
11
src/main.cpp
11
src/main.cpp
@@ -394,6 +394,17 @@ void setup()
|
||||
io.pinMode(EXPANDS_GPIO_EN, OUTPUT);
|
||||
io.digitalWrite(EXPANDS_GPIO_EN, HIGH);
|
||||
io.pinMode(EXPANDS_SD_PULLEN, INPUT);
|
||||
#elif defined(T5_S3_EPAPER_PRO)
|
||||
pinMode(LORA_CS, OUTPUT);
|
||||
digitalWrite(LORA_CS, HIGH);
|
||||
pinMode(SDCARD_CS, OUTPUT);
|
||||
digitalWrite(SDCARD_CS, HIGH);
|
||||
pinMode(BOARD_BL_EN, OUTPUT);
|
||||
io.begin(Wire, PCA9535_ADDR, SDA, SCL);
|
||||
io.configPort(ExtensionIOXL9555::PORT0, 0x00);
|
||||
io.configPort(ExtensionIOXL9555::PORT1, 0xFF);
|
||||
io.digitalWrite(PCA9535_IO00_LORA_EN, HIGH);
|
||||
delay(100);
|
||||
#endif
|
||||
concurrency::hasBeenSetup = true;
|
||||
#if ARCH_PORTDUINO
|
||||
|
||||
@@ -12,9 +12,9 @@ static const uint8_t SCL = 40;
|
||||
|
||||
// Default SPI will be mapped to Radio
|
||||
static const uint8_t SS = 46;
|
||||
static const uint8_t MOSI = 17;
|
||||
static const uint8_t MISO = 8;
|
||||
static const uint8_t SCK = 18;
|
||||
static const uint8_t MOSI = 13;
|
||||
static const uint8_t MISO = 21;
|
||||
static const uint8_t SCK = 14;
|
||||
|
||||
#define SPI_MOSI (13)
|
||||
#define SPI_SCK (14)
|
||||
|
||||
@@ -1,27 +1,48 @@
|
||||
[env:t5s3-epaper-inkhud]
|
||||
extends = esp32s3_base, inkhud
|
||||
[t5s3_epaper_base]
|
||||
extends = esp32s3_base
|
||||
board = t5-epaper-s3
|
||||
board_build.partition = default_16MB.csv
|
||||
board_check = false
|
||||
upload_protocol = esptool
|
||||
|
||||
build_flags =
|
||||
${esp32_base.build_flags}
|
||||
${inkhud.build_flags}
|
||||
-I variants/esp32s3/t5s3_epaper
|
||||
-D T5_S3_EPAPER_PRO
|
||||
-D PRIVATE_HW
|
||||
-D GPS_POWER_TOGGLE
|
||||
|
||||
build_src_filter =
|
||||
${esp32s3_base.build_src_filter}
|
||||
${inkhud.build_src_filter}
|
||||
|
||||
lib_deps =
|
||||
${inkhud.lib_deps} ; InkHUD libs first, so we get GFXRoot instead of AdafruitGFX
|
||||
${esp32s3_base.lib_deps}
|
||||
https://github.com/Xinyuan-LilyGO/LilyGo-EPD47
|
||||
https://github.com/mverch67/BQ27220/archive/07d92be846abd8a0258a50c23198dac0858b22ed.zip
|
||||
https://github.com/bitbank2/bb_captouch/archive/refs/tags/1.3.1.zip
|
||||
lewisxhe/XPowersLib@0.3.1
|
||||
lewisxhe/SensorLib@0.3.1
|
||||
|
||||
|
||||
[env:t5s3_epaper_inkhud]
|
||||
extends = t5s3_epaper_base, inkhud
|
||||
build_flags =
|
||||
${t5s3_epaper_base.build_flags}
|
||||
${inkhud.build_flags}
|
||||
build_src_filter =
|
||||
${t5s3_epaper_base.build_src_filter}
|
||||
${inkhud.build_src_filter}
|
||||
lib_deps =
|
||||
${inkhud.lib_deps} ; InkHUD libs first, so we get GFXRoot instead of AdafruitGFX
|
||||
${t5s3_epaper_base.lib_deps}
|
||||
|
||||
|
||||
[env:t5s3-epaper-v1] ; H752
|
||||
extends = t5s3_epaper_base
|
||||
build_flags =
|
||||
${t5s3_epaper_base.build_flags}
|
||||
-D T5_S3_EPAPER_PRO_V1
|
||||
-D GPS_DEFAULT_NOT_PRESENT=1
|
||||
|
||||
[env:t5s3-epaper-v2] ; H752-01
|
||||
extends = t5s3_epaper_base
|
||||
build_flags =
|
||||
${t5s3_epaper_base.build_flags}
|
||||
-D T5_S3_EPAPER_PRO_V2
|
||||
|
||||
@@ -1,12 +1,24 @@
|
||||
|
||||
// TODO: Display (E-Ink)
|
||||
#define PIN_EINK_EN 11 // BL
|
||||
#define PIN_EINK_CS 11
|
||||
#define PIN_EINK_BUSY -1
|
||||
#define PIN_EINK_DC 21
|
||||
#define PIN_EINK_RES -1
|
||||
#define PIN_EINK_SCLK 14
|
||||
#define PIN_EINK_MOSI 13 // SDI
|
||||
// Display (E-Ink) ED047TC1
|
||||
#define USE_EPD
|
||||
#define BOARD_BL_EN 11
|
||||
#define EP_I2C_PORT I2C_NUM_0
|
||||
#define EP_SCL (40)
|
||||
#define EP_SDA (39)
|
||||
#define EP_INTR (38)
|
||||
#define EP_D7 (8)
|
||||
#define EP_D6 (18)
|
||||
#define EP_D5 (17)
|
||||
#define EP_D4 (16)
|
||||
#define EP_D3 (15)
|
||||
#define EP_D2 (7)
|
||||
#define EP_D1 (6)
|
||||
#define EP_D0 (5)
|
||||
#define EP_CKV (48)
|
||||
#define EP_STH (41)
|
||||
#define EP_LEH (42)
|
||||
#define EP_STV (45)
|
||||
#define EP_CKH (4)
|
||||
|
||||
#define EPD_WIDTH 960
|
||||
#define EPD_HEIGHT 540
|
||||
@@ -17,17 +29,17 @@
|
||||
#define HAS_TOUCHSCREEN 1
|
||||
#define GT911_PIN_SDA 39
|
||||
#define GT911_PIN_SCL 40
|
||||
#define GT911_PIN_INT 15
|
||||
#define GT911_PIN_RST 41
|
||||
#define GT911_PIN_INT 3
|
||||
#define GT911_PIN_RST 9
|
||||
|
||||
#define PCF85063_RTC 0x51
|
||||
#define HAS_RTC 1
|
||||
#define PCF85063_INT 2
|
||||
|
||||
#define USE_POWERSAVE
|
||||
#define SLEEP_TIME 120
|
||||
|
||||
// optional GPS
|
||||
#define GPS_DEFAULT_NOT_PRESENT 1
|
||||
// GPS
|
||||
#define GPS_RX_PIN 44
|
||||
#define GPS_TX_PIN 43
|
||||
|
||||
@@ -52,13 +64,27 @@
|
||||
|
||||
// TPS651851
|
||||
|
||||
// PCA9535 IO extender
|
||||
#define USE_XL9555
|
||||
#define PCA9535_ADDR 0x20
|
||||
#define PCA9535_INT 38
|
||||
#define PCA9535_IO00_LORA_EN 00
|
||||
#define PCA9535_IO10_EP_OE 10 // EP Output enable source driver
|
||||
#define PCA9535_IO11_EP_MODE 11 // EP Output mode selection gate driver
|
||||
#define PCA9535_IO12_BUTTON 12
|
||||
#define PCA9535_IO13_TPS_PWRUP 13
|
||||
#define PCA9535_IO14_VCOM_CTRL 14
|
||||
#define PCA9535_IO15_TPS_WAKEUP 15
|
||||
#define PCA9535_IO16_TPS_PWR_GOOD 16
|
||||
#define PCA9535_IO17_TPS_INT 17
|
||||
|
||||
// LoRa
|
||||
#define USE_SX1262
|
||||
#define USE_SX1268
|
||||
|
||||
#define LORA_SCK 18
|
||||
#define LORA_MISO 8
|
||||
#define LORA_MOSI 17
|
||||
#define LORA_SCK 14 // 18
|
||||
#define LORA_MISO 21 // 8
|
||||
#define LORA_MOSI 13 // 17
|
||||
#define LORA_CS 46
|
||||
|
||||
#define LORA_DIO0 -1
|
||||
@@ -73,3 +99,41 @@
|
||||
#define SX126X_RESET LORA_RESET
|
||||
#define SX126X_DIO2_AS_RF_SWITCH
|
||||
#define SX126X_DIO3_TCXO_VOLTAGE 2.4
|
||||
|
||||
/* V1
|
||||
|
||||
#define BOARD_SCL (5)
|
||||
#define BOARD_SDA (6)
|
||||
|
||||
#define BOARD_SPI_MISO (8)
|
||||
#define BOARD_SPI_MOSI (17)
|
||||
#define BOARD_SPI_SCLK (18)
|
||||
|
||||
#define BOARD_SD_MISO (BOARD_SPI_MISO)
|
||||
#define BOARD_SD_MOSI (BOARD_SPI_MOSI)
|
||||
#define BOARD_SD_SCLK (BOARD_SPI_SCLK)
|
||||
#define BOARD_SD_CS (16)
|
||||
|
||||
#define BOARD_LORA_MISO (BOARD_SPI_MISO)
|
||||
#define BOARD_LORA_MOSI (BOARD_SPI_MOSI)
|
||||
#define BOARD_LORA_SCLK (BOARD_SPI_SCLK)
|
||||
#define BOARD_LORA_CS (46)
|
||||
#define BOARD_LORA_IRQ (3)
|
||||
#define BOARD_LORA_RST (43)
|
||||
#define BOARD_LORA_BUSY (44)
|
||||
|
||||
#define BOARD_TOUCH_SCL (BOARD_SCL)
|
||||
#define BOARD_TOUCH_SDA (BOARD_SDA)
|
||||
#define BOARD_TOUCH_INT (15)
|
||||
#define BOARD_TOUCH_RST (41)
|
||||
|
||||
#define BOARD_RTC_INT 7
|
||||
#define BOARD_RT_SCL (BOARD_SCL)
|
||||
#define BOARD_RT_SDA (BOARD_SDA)
|
||||
|
||||
#define BOARD_BL_EN (40)
|
||||
#define BOARD_BATT_PIN (4)
|
||||
#define BOARD_BOOT_BTN (0)
|
||||
#define BOARD_KEY_BTN (48)
|
||||
|
||||
*/
|
||||
Reference in New Issue
Block a user