Skip to content

Commit

Permalink
Fixed the T-Embed
Browse files Browse the repository at this point in the history
  • Loading branch information
rouing committed Dec 20, 2024
1 parent 61fb24a commit 992b97e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 131 deletions.
130 changes: 1 addition & 129 deletions boards/_New-Device-Model.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@
; https://docs.platformio.org/page/projectconf.html

[env:NewDeviceModel]
platform = espressif32
platform_packages =
framework-arduinoespressif32 @ https://github.com/bmorcelli/arduino-esp32/releases/download/2.0.17d/esp32-2.0.17d.zip
board = _New-Device-Model
framework = arduino
board_build.partitions = custom_8Mb.csv
build_flags =
${env.build_flags}
Expand All @@ -22,131 +18,7 @@ build_flags =
-DCORE_DEBUG_LEVEL=5
;-DARDUINO_USB_CDC_ON_BOOT=1 ; Used only in ESP32-S3 to make Serial Comands work

-DNEW_DEVICE=1 ;key for new device,
;mykeyboard.cpp: need map buttons an/or touchscreen and battery status value,
;settings.cpp: need map brighness control
;main.cpp: need set startup
;serialcmds.cpp: need set power off command

;Features Enabled
# Config to use IRQ and RST pins of PN532, if needed
;-DPN532_RF_REST=-1
;-DPN532_IRQ=-1

;FM Radio
;-DFM_SI4713=1 ;Uncomment to activate FM Radio using Adafruit Si4713
-DFM_RSTPIN=40
;-DLITE_VERSION=1 ;limits some features to save space for M5Launcher Compatibility
;Microphone
;-DMIC_SPM1423=1 ;uncomment to enable Applicable for SPM1423 device
-DPIN_CLK=43
-DI2S_SCLK_PIN=43
-DI2S_DATA_PIN=46
-DPIN_DATA=46

;RGB LED runned by xylopyrographer/LiteLED@^1.2.0 library
;-DHAS_RGB_LED=1 ;uncomment to enable
-DRGB_LED=21

;Have RTC Chip
;-DHAS_RTC=1

;Speaker to run music, compatible with NS4168
;-DHAS_NS4168_SPKR=1 ;uncomment to enable
-DBCLK=41
-DWCLK=43
-DDOUT=42

;Can run USB as HID
;-DUSB_as_HID=1 ;uncomment to enable
-DBAD_TX=GROVE_SDA
-DBAD_RX=GROVE_SCL

;Battery ADC read pin
;-DBAT_PIN=10

;Buttons configuration
-DHAS_BTN=0
-DBTN_ALIAS='"Ok"'
-DBTN_PIN=0
-DBTN_ACT=LOw

;-DALLOW_ALL_GPIO_FOR_IR_RF=1 ; Set this option to make use of all GPIOs, from 1 to 44 to be chosen, except TFT and SD pins

;Infrared Led default pin and state
-DIR_TX_PINS='{{"M5 IR Mod", GROVE_SDA}, {"Pin 1", 1}, {"Pin 2", 2}}'
-DIR_RX_PINS='{{"M5 IR Mod", GROVE_SCL}, {"Pin 1", 1}, {"Pin 2", 2}}'
-DLED=-1 ;NEED TO SET SOMETHING HERE, at least -1
-DLED_ON=HIGH
-DLED_OFF=LOW

;Radio Frequency (one pin modules) pin setting
-DRF_TX_PINS='{{"M5 RF433T", GROVE_SDA}, {"Pin 1", 1}, {"Pin 2", 2}}'
-DRF_RX_PINS='{{"M5 FR433R", GROVE_SCL}, {"Pin 1", 1}, {"Pin 2", 2}}'

;CC1101 SPI connection pins
; best connection pins for higher speed https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/api-reference/peripherals/spi_master.html#gpio-matrix-and-io-mux
;-DUSE_CC1101_VIA_SPI
-DCC1101_GDO0_PIN=9
-DCC1101_SS_PIN=10
-DCC1101_MOSI_PIN=SPI_MOSI_PIN
-DCC1101_SCK_PIN=SPI_SCK_PIN
-DCC1101_MISO_PIN=SPI_MISO_PIN
;-DCC1101_GDO2_PIN=14 ; optional

; connections are the same as CC1101
;-DUSE_NRF24_VIA_SPI
-DNRF24_CE_PIN=6
-DNRF24_SS_PIN=7 ; chip select
-DNRF24_MOSI_PIN=SPI_MOSI_PIN
-DNRF24_SCK_PIN=SPI_SCK_PIN
-DNRF24_MISO_PIN=SPI_MISO_PIN

;Font sizes, depending on device
-DFP=1
-DFM=2
-DFG=3

;Screen Setup
-DHAS_SCREEN=1
-DROTATION=1
-DBACKLIGHT=38
-DMINBRIGHT=160

;TFT_eSPI Setup
-DUSER_SETUP_LOADED=1
-DUSE_HSPI_PORT=1
-DST7789_2_DRIVER=1
-DTFT_RGB_ORDER=1
-DTFT_WIDTH=135
-DTFT_HEIGHT=240
-DTFT_BACKLIGHT_ON=1
-DTFT_BL=38
-DTFT_RST=33
-DTFT_DC=34
-DTFT_MOSI=35
-DTFT_SCLK=36
-DTFT_CS=37
-DTOUCH_CS=-1
-DSMOOTH_FONT=1
-DSPI_FREQUENCY=20000000
-DSPI_READ_FREQUENCY=20000000
-DSPI_TOUCH_FREQUENCY=2500000

;SD Card Setup pins
-DSDCARD_CS=12
-DSDCARD_SCK=40
-DSDCARD_MISO=39
-DSDCARD_MOSI=14

;Default I2C port
-DGROVE_SDA=2
-DGROVE_SCL=1

-DSPI_SCK_PIN=12
-DSPI_MOSI_PIN=11
-DSPI_MISO_PIN=13
-DSPI_SS_PIN=10


lib_deps =
${env.lib_deps}
Expand Down
3 changes: 1 addition & 2 deletions boards/lilygo-t-embed.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ build_flags =
${env.build_flags}
-Iboards/lilygo-t-embed-cc1101
-Os
-mfix-esp32-psram-cache-issue
-mfix-esp32-psram-cache-strategy=memw
-DCORE_DEBUG_LEVEL=5
-DREDRAW_DELAY=1 # Used to improve navigation on menus for this device
-DMIC_SPM1423

;Infrared Led default pin and state
-DIR_TX_PINS='{{"Pin 16", 16},{"Pin 17", 17}, {"Pin 43", 43}, {"Pin 44", 44}}'
Expand Down
2 changes: 2 additions & 0 deletions boards/lilygo-t-embed.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
"core": "esp32",
"extra_flags": [
"-DT_EMBED",
"-mfix-esp32-psram-cache-issue",
"-mfix-esp32-psram-cache-strategy=memw"
"-DBOARD_HAS_PSRAM",
"-DARDUINO_RUNNING_CORE=0",
"-DARDUINO_EVENT_RUNNING_CORE=0",
Expand Down

0 comments on commit 992b97e

Please sign in to comment.