Files
klubhaus-doorbell/boards/esp32-32e-4/board_config.h

37 lines
1.4 KiB
C

#pragma once
#define BOARD_NAME "esp32-32e-4"
// ══════════════════════════════════════════════════════════
// Hosyond ESP32-32E 4" (320x480) with ST7796 + XPT2046
// Pin mapping from lcdwiki.com/4.0inch_ESP32-32E_Display
// ══════════════════════════════════════════════════════════
#define DISPLAY_WIDTH 320
#define DISPLAY_HEIGHT 480
#define DISPLAY_ROTATION 1 // landscape
// Backlight GPIO (HIGH = on)
#define PIN_LCD_BL 27
// Touch — XPT2046 configured in tft_user_setup.h
// Touch CS: GPIO33, Touch IRQ: GPIO36
// ── Style Constants (CSS-like) ────────────────────────────────────────
// Spacing - scaled for 320x480
#define STYLE_SPACING_X 6
#define STYLE_SPACING_Y 6
#define STYLE_HEADER_HEIGHT 24
#define STYLE_TILE_GAP 4
#define STYLE_TILE_PADDING 8
#define STYLE_TILE_RADIUS 4
// Colors
#define STYLE_COLOR_BG TFT_BLACK
#define STYLE_COLOR_HEADER 0x1A1A
#define STYLE_COLOR_FG TFT_WHITE
#define STYLE_COLOR_ALERT TFT_RED
#define STYLE_COLOR_TILE_1 0x0280
#define STYLE_COLOR_TILE_2 0x0400
#define STYLE_COLOR_TILE_3 0x0440
#define STYLE_COLOR_TILE_4 0x0100