Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions variants/esp32s3/diy/lilka/pins_arduino.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#ifndef Pins_Arduino_h
#define Pins_Arduino_h

#include <stdint.h>
#include <variant.h>

#define USB_VID 0x303a
#define USB_PID 0x1001

static const uint8_t SS = 21;
static const uint8_t MOSI = 14;
static const uint8_t MISO = 13;
static const uint8_t SCK = 12;

static const uint8_t SCL = I2C_SCL;
static const uint8_t SDA = I2C_SDA;

#endif
23 changes: 23 additions & 0 deletions variants/esp32s3/diy/lilka/platformio.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[env:lilka]
extends = esp32s3_base
board = esp32-s3-devkitc-1
board_build.partitions = default_16MB.csv
board_level = extra
board_upload.flash_size = 16MB
upload_protocol = esptool

build_flags =
${esp32s3_base.build_flags}
-D PRIVATE_HW
-D EBYTE_ESP32_S3
-I variants/esp32s3/diy/lilka
-D BOARD_HAS_PSRAM
-D ARDUINO_USB_MODE=1
-D ARDUINO_USB_CDC_ON_BOOT=1

lib_deps =
${esp32s3_base.lib_deps}
lovyan03/[email protected]

build_src_filter =
${esp32s3_base.build_src_filter}
65 changes: 65 additions & 0 deletions variants/esp32s3/diy/lilka/variant.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#define PIN_BUZZER 11
#define BUTTON_PIN 39
#define BATTERY_PIN 3
#define ADC_MULTIPLIER 1.2
#define ADC_CHANNEL ADC1_GPIO3_CHANNEL
#define I2C_SCL 42
#define I2C_SDA 2

// IPS 1.69 280х240 ST7789
#define USE_TFTDISPLAY 1
#define ST7789_CS 7
#define ST7789_RS 15
#define ST7789_SDA 17
#define ST7789_SCK 18
#define ST7789_RESET -1
#define ST7789_MISO -1
#define ST7789_BUSY -1
#define ST7789_BL 46
#define ST7789_SPI_HOST SPI3_HOST
#define TFT_BL 46
#define SPI_FREQUENCY 40000000
#define SPI_READ_FREQUENCY 16000000
#define TFT_HEIGHT 280
#define TFT_WIDTH 240
#define TFT_OFFSET_X 0
#define TFT_OFFSET_Y -20
#define TFT_OFFSET_ROTATION 0
#define SCREEN_ROTATE
#define SCREEN_TRANSITION_FRAMERATE 5
#define BRIGHTNESS_DEFAULT 130

// E22 400M30S
#define E22_DIO1 44
#define E22_BUSY 43
#define E22_NRST 48
#define E22_MISO 47
#define E22_MOSI 21
#define E22_SCK 14
#define E22_NSS 13
#define E22_RXEN 12
#define SX126X_CS E22_NSS
#define LORA_SCK E22_SCK
#define LORA_MOSI E22_MOSI
#define LORA_MISO E22_MISO
#define SX126X_RESET E22_NRST
#define SX126X_BUSY E22_BUSY
#define SX126X_DIO1 E22_DIO1
#define SX126X_RXEN E22_RXEN
#define SX126X_DIO2_AS_RF_SWITCH
#define SX126X_TXEN RADIOLIB_NC
#define SX126X_MAX_POWER 22
#define USE_SX1268
#define USE_SX1262
#define SX126X_DIO3_TCXO_VOLTAGE 1.8
#define TCXO_OPTIONAL
#define LORA_CS SX126X_CS
#define LORA_DIO1 SX126X_DIO1

// sd-card
// #define HAS_SDCARD
// #define SDCARD_USE_SPI1
// #define SDCARD_CS 16
// #define SPI_MISO 8
// #define SPI_MOSI 17
// #define SPI_SCK 18