feat: add board configuration system, refactor Config.h
Board selection driven by -DTARGET_E32R35T or -DTARGET_WAVESHARE_S3_43.
Defaults to E32R35T for backward compatibility.
All hardware pin definitions moved from Config.h to board headers.
SCREEN_WIDTH/SCREEN_HEIGHT now come from board headers.
Config.h is now purely application-level configuration.
New files:
BoardConfig.h — board selector
boards/board_e32r35t.h — E32R35T pins, display, touch config
boards/board_waveshare_s3.h — Waveshare S3 4.3" pins, display, touch config
Modified:
Config.h — removed hardware pins section, added #include BoardConfig.h,
added HOLD_DURATION_MS to timing section
This commit is contained in:
18
sketches/doorbell-touch-esp32-32e/BoardConfig.h
Normal file
18
sketches/doorbell-touch-esp32-32e/BoardConfig.h
Normal file
@@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
// ═══════════════════════════════════════════════════════════════════
|
||||
// Board selector — driven by build flags
|
||||
// Pass -DTARGET_E32R35T or -DTARGET_WAVESHARE_S3_43
|
||||
// ═══════════════════════════════════════════════════════════════════
|
||||
|
||||
#if defined(TARGET_E32R35T)
|
||||
#include "boards/board_e32r35t.h"
|
||||
|
||||
#elif defined(TARGET_WAVESHARE_S3_43)
|
||||
#include "boards/board_waveshare_s3.h"
|
||||
|
||||
#else
|
||||
// Default to E32R35T for backward compatibility with existing builds
|
||||
#pragma message("No TARGET_* defined — defaulting to E32R35T")
|
||||
#define TARGET_E32R35T
|
||||
#include "boards/board_e32r35t.h"
|
||||
#endif
|
||||
Reference in New Issue
Block a user