From 35d1ca6f3b916f7375a1cf3a725d852c35e7d4f4 Mon Sep 17 00:00:00 2001 From: Ken Van Hoeylandt Date: Sat, 16 Aug 2025 00:59:56 +0200 Subject: [PATCH] Board update --- Boards/M5stackCoreS3/Source/hal/CoreS3Display.cpp | 9 +++++---- Boards/M5stackCoreS3/Source/hal/CoreS3Display.h | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Boards/M5stackCoreS3/Source/hal/CoreS3Display.cpp b/Boards/M5stackCoreS3/Source/hal/CoreS3Display.cpp index f9b97241..250e1cc9 100644 --- a/Boards/M5stackCoreS3/Source/hal/CoreS3Display.cpp +++ b/Boards/M5stackCoreS3/Source/hal/CoreS3Display.cpp @@ -1,5 +1,4 @@ #include "CoreS3Display.h" - #include "CoreS3Constants.h" #include @@ -7,7 +6,7 @@ #include #include -#define TAG "cores3" +constexpr auto TAG = "CoreS3Display"; static void setBacklightDuty(uint8_t backlightDuty) { const uint8_t voltage = 20 + ((8 * backlightDuty) / 255); // [0b00000, 0b11100] - under 20 is too dark @@ -25,7 +24,8 @@ static std::shared_ptr createTouch() { 240 ); - return std::make_shared(std::move(configuration)); + auto touch = std::make_shared(std::move(configuration)); + return std::reinterpret_pointer_cast(touch); } std::shared_ptr createDisplay() { @@ -46,5 +46,6 @@ std::shared_ptr createDisplay() { configuration->backlightDutyFunction = ::setBacklightDuty; - return std::make_shared(std::move(configuration)); + auto display = std::make_shared(std::move(configuration)); + return std::reinterpret_pointer_cast(display); } diff --git a/Boards/M5stackCoreS3/Source/hal/CoreS3Display.h b/Boards/M5stackCoreS3/Source/hal/CoreS3Display.h index 5a0d81b3..7a9b967d 100644 --- a/Boards/M5stackCoreS3/Source/hal/CoreS3Display.h +++ b/Boards/M5stackCoreS3/Source/hal/CoreS3Display.h @@ -1,5 +1,5 @@ #pragma once -#include "Tactility/hal/display/DisplayDevice.h" +#include std::shared_ptr createDisplay();