Skip to content

Commit

Permalink
Revert "Testing"
Browse files Browse the repository at this point in the history
This reverts commit 0820bf6.
  • Loading branch information
rouing committed Dec 18, 2024
1 parent 0820bf6 commit 1c0aa5d
Show file tree
Hide file tree
Showing 7 changed files with 228 additions and 344 deletions.
4 changes: 2 additions & 2 deletions ports/lilygo-t-embed-cc1101/interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ void _setup_gpio() {
#ifdef T_EMBED_1101
// T-Embed CC1101 has a antenna circuit optimized to each frequency band, controlled by SW0 and SW1
//Set antenna frequency settings
pinMode(CC1101_SW1_PIN, OUTPUT);
pinMode(CC1101_SW0_PIN, OUTPUT);
pinMode(BOARD_LORA_SW1, OUTPUT);
pinMode(BOARD_LORA_SW0, OUTPUT);

// Chip Select CC1101 to HIGH State
pinMode(CC1101_SS_PIN, OUTPUT);
Expand Down
198 changes: 0 additions & 198 deletions ports/lilygo-t-embed-cc1101/pinmap.h

This file was deleted.

151 changes: 146 additions & 5 deletions ports/lilygo-t-embed-cc1101/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ platform = https://github.com/bmorcelli/platform-espressif32/releases/download/0
board = lilygo-t-display-s3
framework = arduino
board_build.partitions = custom_16Mb.csv
build_src_filter = ${env.build_src_filter} +<../ports/lilygo-t-embed-cc1101>
build_src_filter =${env.build_src_filter} +<../ports/lilygo-t-embed-cc1101>
build_flags =
${env.build_flags}
-Iports/lilygo-t-embed-cc1101
Expand All @@ -31,21 +31,162 @@ build_flags =
;settings.cpp: need map brighness control
;main.cpp: need set startup
;serialcmds.cpp: need set power off command
-DBOARD_LORA_SW1=47
-DBOARD_LORA_SW0=48

# Config to use IRQ and RST pins of PN532, if needed
-DPN532_RF_REST=45
-DPN532_IRQ=17

;Features Enabled
;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=39
-DI2S_SCLK_PIN=39
-DI2S_DATA_PIN=42
-DPIN_DATA=42

;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

; SERIAL (GPS) dedicated pins
-DSERIAL_TX=43 ;may be wrong
-DSERIAL_RX=44

;Speaker to run music, compatible with NS4168
-DHAS_NS4168_SPKR=1 ;uncomment to enable
-DBCLK=46
-DWCLK=40
-DDOUT=7
-DMCLK=39 # Microphone CLK

;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

;BQ27220 Fuel Gauge
-DBQ27220_I2C_ADDRESS=0x55
-DBQ27220_I2C_SDA=GROVE_SDA
-DBQ27220_I2C_SCL=GROVE_SCL

;Buttons configuration
-DHAS_BTN=1
-DBTN_ALIAS='"Mid"'
-DSEL_BTN=0
-DUP_BTN=-1 ;Dont have btns, use a encoder
-DDW_BTN=-1 ;Dont have btns, use a encoder
-DBK_BTN=6
-DBTN_ACT=LOW

-DENCODER_INA=4
-DENCODER_INB=5
-DENCODER_KEY=0

;-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='{{"Default", 2}, {"Pin 43", 43}, {"Pin 44", 44}}'
-DIR_RX_PINS='{{"Default", 1}, {"Pin 43", 43}, {"Pin 44", 44}}'
-DLED=2 ;NEED TO SET SOMETHING HERE, at least -1
-DRXLED=1
-DLED_ON=HIGH
-DLED_OFF=LOW

;Radio Frequency (one pin modules) pin setting
-DRF_TX_PINS='{{"Pin 43", 43}, {"Pin 44", 44}}'
-DRF_RX_PINS='{{"Pin 43", 43}, {"Pin 44", 44}}'

;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=3 ; or 38, or 47 or 48?
-DCC1101_SS_PIN=12
-DCC1101_MOSI_PIN=SPI_MOSI_PIN
-DCC1101_SCK_PIN=SPI_SCK_PIN
-DCC1101_MISO_PIN=SPI_MISO_PIN
-DCC1101_GDO2_PIN=38 ; optional

; connections are the same as CC1101
-DUSE_NRF24_VIA_SPI
-DNRF24_CE_PIN=43 ; left Grove
-DNRF24_SS_PIN=44 ; chip select
-DNRF24_MOSI_PIN=SDCARD_MOSI
-DNRF24_SCK_PIN=SDCARD_SCK
-DNRF24_MISO_PIN=SDCARD_MISO

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

;Screen Setup
-DHAS_SCREEN=1
-DROTATION=3
-DWIDTH=320
-DHEIGHT=170
-DBACKLIGHT=TFT_BL
-DMINBRIGHT=1
-DPIN_POWER_ON=15

;TFT_eSPI display
-DUSER_SETUP_LOADED=1
-DUSE_HSPI_PORT=1
-DST7789_DRIVER=1
-DTFT_WIDTH=170
-DTFT_HEIGHT=320
-DTFT_INVERSION_ON
-DTFT_BL=21
-DTFT_MISO=SPI_MISO_PIN
-DTFT_MOSI=SPI_MOSI_PIN
-DTFT_SCLK=SPI_SCK_PIN
-DTFT_CS=41
-DTFT_DC=16
-DTFT_RST=-1
-DTOUCH_CS=-1
-DSMOOTH_FONT=1
-DSPI_FREQUENCY=80000000
-DSPI_READ_FREQUENCY=20000000
-DSPI_TOUCH_FREQUENCY=2500000

;SD Card Setup pins
-DSDCARD_CS=13
-DSDCARD_SCK=SPI_SCK_PIN
-DSDCARD_MISO=SPI_MISO_PIN
-DSDCARD_MOSI=SPI_MOSI_PIN

;Default I2C port
-DGROVE_SDA=8
-DGROVE_SCL=18

-DSPI_SCK_PIN=11
-DSPI_MOSI_PIN=9
-DSPI_MISO_PIN=10
-DSPI_SS_PIN=8

lib_deps =
${env.lib_deps}
lewisxhe/XPowersLib @0.2.6
mathertel/RotaryEncoder @1.5.3

######################################################################################################
######################################################################################################
######################################################################################################

[env:lilygo-t-embed]
platform = https://github.com/bmorcelli/platform-espressif32/releases/download/0.0.4/platform-espressif32.zip
board = lilygo-t-display-s3
framework = arduino
board_build.partitions = custom_16Mb.csv
build_src_filter =${env.build_src_filter}
build_src_filter =${env.build_src_filter} +<../ports/lilygo-t-embed-cc1101>
build_flags =
${env.build_flags}
-Iports/lilygo-t-embed-cc1101
Expand Down
Loading

0 comments on commit 1c0aa5d

Please sign in to comment.