diff --git a/esp32_marauder/configs.h b/esp32_marauder/configs.h index 22c5b9fe7..7267e2791 100644 --- a/esp32_marauder/configs.h +++ b/esp32_marauder/configs.h @@ -8,17 +8,18 @@ //// BOARD TARGETS //#define MARAUDER_M5STICKC - #define MARAUDER_MINI + //#define MARAUDER_MINI //#define MARAUDER_V4 //#define MARAUDER_V6 //#define MARAUDER_V6_1 //#define MARAUDER_KIT - //#define GENERIC_ESP32 + //#define GENERIC_ESP32 //#define MARAUDER_FLIPPER //#define ESP32_LDDB //#define MARAUDER_DEV_BOARD_PRO //#define XIAO_ESP32_S3 //#define MARAUDER_REV_FEATHER + #define LILYGO_T_DISPLAY_S3R8 //// END BOARD TARGETS #define MARAUDER_VERSION "v0.13.9" @@ -46,6 +47,8 @@ #define HARDWARE_NAME "Flipper Zero Dev Board Pro" #elif defined(XIAO_ESP32_S3) #define HARDWARE_NAME "XIAO ESP32 S3" + #elif defined(LILYGO_T_DISPLAY_S3R8) + #define HARDWARE_NAME "LilyGO T-Display S3" #else #define HARDWARE_NAME "ESP32" #endif @@ -118,10 +121,25 @@ #define HAS_NEOPIXEL_LED //#define HAS_PWR_MGMT #define HAS_SCREEN + //#define HAS_SD + //#define USE_SD + #define HAS_TEMP_SENSOR + //#define HAS_GPS + #endif + + #if defined(LILYGO_T_DISPLAY_S3R8) + //#define FLIPPER_ZERO_HAT + //#define HAS_BATTERY + #define HAS_BT + #define HAS_BT_REMOTE + #define HAS_BUTTONS + //#define HAS_NEOPIXEL_LED + //#define HAS_PWR_MGMT + #define HAS_SCREEN #define HAS_SD #define USE_SD #define HAS_TEMP_SENSOR - #define HAS_GPS + //#define HAS_GPS #endif #ifdef MARAUDER_KIT @@ -278,6 +296,26 @@ #define D_PULL true #endif + #ifdef LILYGO_T_DISPLAY_S3R8 + #define L_BTN -1 + #define C_BTN 14 + #define U_BTN -1 + #define R_BTN -1 + #define D_BTN 0 + + //#define HAS_L + //#define HAS_R + //#define HAS_U + #define HAS_D + #define HAS_C + + #define L_PULL true + #define C_PULL true + #define U_PULL true + #define R_PULL true + #define D_PULL true + #endif + #ifdef MARAUDER_V6 #define L_BTN -1 #define C_BTN 0 @@ -449,6 +487,73 @@ #define KIT_LED_BUILTIN 13 #endif + #if defined(LILYGO_T_DISPLAY_S3R8) + #define SCREEN_CHAR_WIDTH 28 + //#define TFT_MISO 19 + //#define TFT_MOSI 15 + //#define TFT_SCLK 13 + //#define TFT_CS 5 + //#define TFT_DC 23 + //#define TFT_RST 18 + //#define TFT_BL -1 + //#define TOUCH_CS -1 + //#define SD_CS 1 + //#define HAS_ILI9341 + + #define BANNER_TEXT_SIZE 2 + + #ifndef TFT_WIDTH + #define TFT_WIDTH 170 + #endif + + #ifndef TFT_HEIGHT + #define TFT_HEIGHT 320 + #endif + + #define TFT_DIY + + #define SCREEN_WIDTH TFT_WIDTH + #define SCREEN_HEIGHT TFT_HEIGHT + #define HEIGHT_1 TFT_WIDTH + #define WIDTH_1 TFT_HEIGHT + #define STANDARD_FONT_CHAR_LIMIT (TFT_WIDTH/6) // number of characters on a single line with normal font + #define TEXT_HEIGHT 16 // Height of text to be printed and scrolled + #define BOT_FIXED_AREA 0 // Number of lines in bottom fixed area (lines counted from bottom of screen) + #define TOP_FIXED_AREA 48 // Number of lines in top fixed area (lines counted from top of screen) + #define YMAX 320 // Bottom of screen area + #define minimum(a,b) (((a) < (b)) ? (a) : (b)) + //#define MENU_FONT NULL + #define MENU_FONT &FreeMono9pt7b // Winner + //#define MENU_FONT &FreeMonoBold9pt7b + //#define MENU_FONT &FreeSans9pt7b + //#define MENU_FONT &FreeSansBold9pt7b + #define BUTTON_SCREEN_LIMIT 12 + #define BUTTON_ARRAY_LEN 12 + #define STATUS_BAR_WIDTH 16 + #define LVGL_TICK_PERIOD 6 + + #define FRAME_X 100 + #define FRAME_Y 64 + #define FRAME_W 120 + #define FRAME_H 50 + + // Red zone size + #define REDBUTTON_X FRAME_X + #define REDBUTTON_Y FRAME_Y + #define REDBUTTON_W (FRAME_W/2) + #define REDBUTTON_H FRAME_H + + // Green zone size + #define GREENBUTTON_X (REDBUTTON_X + REDBUTTON_W) + #define GREENBUTTON_Y FRAME_Y + #define GREENBUTTON_W (FRAME_W/2) + #define GREENBUTTON_H FRAME_H + + #define STATUSBAR_COLOR 0x4A49 + + #define KIT_LED_BUILTIN 13 + #endif + #if defined(MARAUDER_V6) || defined(MARAUDER_V6_1) #define SCREEN_CHAR_WIDTH 40 #define HAS_ILI9341 @@ -723,6 +828,25 @@ //#define BUTTON_ARRAY_LEN 5 #endif + #if defined(LILYGO_T_DISPLAY_S3R8) + #define BANNER_TIME 100 + + #define COMMAND_PREFIX "!" + + // Keypad start position, key sizes and spacing + #define KEY_X 85 // Centre of key + #define KEY_Y 50 + #define KEY_W 170 // Width and height + #define KEY_H 22 + #define KEY_SPACING_X 0 // X and Y gap + #define KEY_SPACING_Y 1 + #define KEY_TEXTSIZE 1 // Font size multiplier + #define ICON_W 22 + #define ICON_H 22 + #define BUTTON_PADDING 22 + //#define BUTTON_ARRAY_LEN 5 + #endif + #if defined(MARAUDER_V6) || defined(MARAUDER_V6_1) #define BANNER_TIME 100 @@ -823,6 +947,10 @@ #define SD_CS 12 #endif + #ifdef LILYGO_T_DISPLAY_S3R8 + #define SD_CS 10 + #endif + #ifdef MARAUDER_V6 #define SD_CS 12 #endif @@ -916,6 +1044,8 @@ #define MEM_LOWER_LIM 20000 #elif defined(XIAO_ESP32_S3) #define MEM_LOWER_LIM 20000 + #else + #define MEM_LOWER_LIM 20000 #endif //// END MEMORY LOWER LIMIT STUFF