-
Notifications
You must be signed in to change notification settings - Fork 747
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2486892
commit c4eb7ac
Showing
9 changed files
with
216 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"build": { | ||
"arduino": { | ||
"ldscript": "esp32s3_out.ld" | ||
}, | ||
"core": "esp32", | ||
"extra_flags": [ | ||
"-DBOARD_HAS_PSRAM", | ||
"-DT_WATCH_S3", | ||
"-DARDUINO_USB_CDC_ON_BOOT=1", | ||
"-DARDUINO_USB_MODE=0", | ||
"-DARDUINO_RUNNING_CORE=1", | ||
"-DARDUINO_EVENT_RUNNING_CORE=1" | ||
], | ||
"f_cpu": "240000000L", | ||
"f_flash": "80000000L", | ||
"flash_mode": "dio", | ||
"hwids": [["0X303A", "0x1001"]], | ||
"mcu": "esp32s3", | ||
"variant": "t-watch" | ||
}, | ||
"connectivity": ["wifi"], | ||
"debug": { | ||
"openocd_target": "esp32s3.cfg" | ||
}, | ||
"frameworks": ["arduino"], | ||
"name": "LilyGo T-Watch 2020 V3", | ||
"upload": { | ||
"flash_size": "8MB", | ||
"maximum_ram_size": 327680, | ||
"maximum_size": 8388608, | ||
"require_upload_port": true, | ||
"speed": 921600 | ||
}, | ||
"url": "http://www.lilygo.cn/", | ||
"vendor": "LilyGo" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
#ifndef Pins_Arduino_h | ||
#define Pins_Arduino_h | ||
|
||
#include <stdint.h> | ||
|
||
#define EXTERNAL_NUM_INTERRUPTS 46 | ||
#define NUM_DIGITAL_PINS 48 | ||
#define NUM_ANALOG_INPUTS 20 | ||
|
||
#define analogInputToDigitalPin(p) (((p) < NUM_ANALOG_INPUTS) ? (analogChannelToDigitalPin(p)) : -1) | ||
#define digitalPinToInterrupt(p) (((p) < NUM_DIGITAL_PINS) ? (p) : -1) | ||
#define digitalPinHasPWM(p) (p < EXTERNAL_NUM_INTERRUPTS) | ||
|
||
// static const uint8_t LED_BUILTIN = -1; | ||
|
||
// static const uint8_t TX = 43; | ||
// static const uint8_t RX = 44; | ||
|
||
static const uint8_t SDA = 10; | ||
static const uint8_t SCL = 11; | ||
|
||
// Default SPI will be mapped to Radio | ||
static const uint8_t SS = 5; | ||
static const uint8_t MOSI = 1; | ||
static const uint8_t MISO = 4; | ||
static const uint8_t SCK = 3; | ||
|
||
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 A13 = 14; | ||
static const uint8_t A14 = 15; | ||
static const uint8_t A15 = 16; | ||
static const uint8_t A16 = 17; | ||
static const uint8_t A17 = 18; | ||
static const uint8_t A18 = 19; | ||
static const uint8_t A19 = 20; | ||
|
||
static const uint8_t T1 = 1; | ||
static const uint8_t T2 = 2; | ||
static const uint8_t T3 = 3; | ||
static const uint8_t T4 = 4; | ||
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 T13 = 13; | ||
static const uint8_t T14 = 14; | ||
|
||
#endif /* Pins_Arduino_h */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
; LilyGo T-Watch S3 | ||
[env:t-watch-s3] | ||
extends = esp32s3_base | ||
board = t-watch-s3 | ||
upload_protocol = esp-builtin | ||
monitor_port = /dev/tty.usbmodem3485188D636C1 | ||
monitor_speed = 115200 | ||
|
||
build_flags = ${esp32_base.build_flags} | ||
-DT_WATCH_S3 | ||
-Ivariants/t-watch-s3 | ||
|
||
lib_deps = ${esp32s3_base.lib_deps} | ||
lovyan03/LovyanGFX@^1.1.7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
// ST7789 TFT LCD | ||
#define ST7789_CS 12 | ||
#define ST7789_RS 38 // DC | ||
#define ST7789_SDA 13 // MOSI | ||
#define ST7789_SCK 18 | ||
#define ST7789_RESET -1 | ||
#define ST7789_MISO -1 | ||
#define ST7789_BUSY -1 | ||
#define ST7789_BL 45 | ||
#define ST7789_SPI_HOST SPI2_HOST | ||
//#define ST7789_BACKLIGHT_EN 15 | ||
#define SPI_FREQUENCY 40000000 | ||
#define SPI_READ_FREQUENCY 16000000 | ||
#define TFT_HEIGHT 240 | ||
#define TFT_WIDTH 240 | ||
#define TFT_OFFSET_X 0 | ||
#define TFT_OFFSET_Y 0 | ||
#define SCREEN_ROTATE | ||
#define SCREEN_TRANSITION_FRAMERATE 1 // fps | ||
#define SCREEN_TOUCH_INT 16 | ||
#define TOUCH_SLAVE_ADDRESS 0x5D // GT911 | ||
|
||
// #define TWATCH_TFT_MISO (GPIO_NUM_MAX) | ||
// #define TWATCH_TFT_MOSI (GPIO_NUM_19) | ||
// #define TWATCH_TFT_SCLK (GPIO_NUM_18) | ||
// #define TWATCH_TFT_CS (GPIO_NUM_5) | ||
// #define TWATCH_TFT_DC (GPIO_NUM_27) | ||
// #define TWATCH_TFT_RST (GPIO_NUM_MAX) | ||
// #define TWATCH_TFT_BL (GPIO_NUM_15) | ||
|
||
// Leave undefined to disable our PMU IRQ handler. DO NOT ENABLE THIS because the pmuirq can cause sperious interrupts | ||
// and waking from light sleep | ||
// #define PMU_IRQ 40 | ||
#define HAS_AXP2101 | ||
|
||
#define HAS_RTC 1 | ||
|
||
// Specify the PMU as Wire1. In the t-beam-s3 core, PCF8563 and PMU share the bus | ||
#define PMU_USE_WIRE1 | ||
#define RTC_USE_WIRE1 | ||
|
||
// #define TOUCH_SDA (23) | ||
// #define TOUCH_SCL (32) | ||
// #define TOUCH_INT (38) | ||
// #define TOUCH_RST (14) | ||
|
||
// #define SEN_SDA (21) | ||
// #define SEN_SCL (22) | ||
|
||
// #define RTC_INT_PIN (37) | ||
// #define AXP202_INT (35) | ||
// #define BMA423_INT1 (39) | ||
|
||
// #define TWATCH_DAC_IIS_BCK (26) | ||
// #define TWATCH_DAC_IIS_WS (25) | ||
// #define TWATCH_DAC_IIS_DOUT (33) | ||
|
||
// #define MOTOR_PIN (4) | ||
|
||
#define I2C_SDA 10 // For QMC6310 sensors and screens | ||
#define I2C_SCL 11 // For QMC6310 sensors and screens | ||
|
||
#define BUTTON_PIN 0 | ||
// #define BUTTON_NEED_PULLUP | ||
|
||
#define HAS_GPS 0 | ||
#undef GPS_RX_PIN | ||
#undef GPS_TX_PIN | ||
|
||
#define USE_SX1262 | ||
#define USE_SX1268 | ||
|
||
#define RF95_SCK 3 | ||
#define RF95_MISO 4 | ||
#define RF95_MOSI 1 | ||
#define RF95_NSS 5 | ||
|
||
#define LORA_DIO0 -1 // a No connect on the SX1262 module | ||
#define LORA_RESET 8 | ||
#define LORA_DIO1 9 // SX1262 IRQ | ||
#define LORA_DIO2 7 // SX1262 BUSY | ||
#define LORA_DIO3 // Not connected on PCB, but internally on the TTGO SX1262, if DIO3 is high the TXCO is enabled | ||
|
||
#define SX126X_CS RF95_NSS // FIXME - we really should define LORA_CS instead | ||
#define SX126X_DIO1 LORA_DIO1 | ||
#define SX126X_BUSY LORA_DIO2 | ||
#define SX126X_RESET LORA_RESET | ||
#define SX126X_E22 // Not really an E22 but TTGO seems to be trying to clone that | ||
// Internally the TTGO module hooks the SX1262-DIO2 in to control the TX/RX switch (which is the default for the sx1262interface | ||
// code) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters