feat: add Xteink X3 hardware support

Adds HAL-level support for the Xteink X3 (SSD1677 controller, 792x528
display). Includes device detection, display initialization, button
mapping, power management, and theme adjustments for the X3 form factor.
This commit is contained in:
Justin Mitchell
2026-04-03 04:04:17 -04:00
parent aa085425af
commit 0db9d93f1c
16 changed files with 564 additions and 132 deletions
+5 -3
View File
@@ -1,5 +1,6 @@
#include "PngToBmpConverter.h"
#include <HalDisplay.h>
#include <HalStorage.h>
#include <InflateReader.h>
#include <Logging.h>
@@ -16,8 +17,6 @@ constexpr bool USE_8BIT_OUTPUT = false;
constexpr bool USE_ATKINSON = true;
constexpr bool USE_FLOYD_STEINBERG = false;
constexpr bool USE_PRESCALE = true;
constexpr int TARGET_MAX_WIDTH = 480;
constexpr int TARGET_MAX_HEIGHT = 800;
// ============================================================================
// BMP writing helpers (same as JpegToBmpConverter)
@@ -822,7 +821,10 @@ bool PngToBmpConverter::pngFileToBmpStreamInternal(FsFile& pngFile, Print& bmpOu
}
bool PngToBmpConverter::pngFileToBmpStream(FsFile& pngFile, Print& bmpOut, bool crop) {
return pngFileToBmpStreamInternal(pngFile, bmpOut, TARGET_MAX_WIDTH, TARGET_MAX_HEIGHT, false, crop);
// Use runtime display dimensions (swapped for portrait cover sizing)
const int targetWidth = display.getDisplayHeight();
const int targetHeight = display.getDisplayWidth();
return pngFileToBmpStreamInternal(pngFile, bmpOut, targetWidth, targetHeight, false, crop);
}
bool PngToBmpConverter::pngFileToBmpStreamWithSize(FsFile& pngFile, Print& bmpOut, int targetMaxWidth,