Skip to content

Commit 9e07d03

Browse files
authored
Merge pull request #150 from sieren/m5stack-fixes
Fix M5Stack Core1
2 parents 325f1fc + d61becd commit 9e07d03

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

main/CMakeLists.txt

+3-2
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,9 @@ file(REMOVE ${CMAKE_SOURCE_DIR}/main/libraries/TFT_eSPI/User_Setup.h)
147147
if(BOARD STREQUAL "M5STACK")
148148
message(STATUS "Compiling for M5Stack")
149149
list(APPEND compile_definitions "M5Stack")
150-
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DM5Stack")
151-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DM5Stack")
150+
list(APPEND compile_definitions "M5StackCore1")
151+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DM5Stack -DM5StackCore1")
152+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DM5Stack -DM5StackCore1")
152153
file(COPY ${CMAKE_SOURCE_DIR}/main/config/TFT_eSPI/M5Stack/User_Setup.h
153154
DESTINATION ${CMAKE_SOURCE_DIR}/main/libraries/TFT_eSPI)
154155
endif(BOARD STREQUAL "M5STACK")

main/config/Config.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ static const unsigned long MinsBeforeScreenSleep = 10; // Minutes before putting
1515
//
1616
//
1717

18-
#if defined(M5StackCore1) || defined(BUTTONSASS)
18+
#if defined(M5StackCore1) || defined(BUTTONS)
1919
// Define Button PINs
2020
#define BUTTON_A_PIN 39
2121
#define BUTTON_B_PIN 38

main/touch/ButtonDriver.h

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ namespace gfx
1212
{
1313
struct ButtonDriver
1414
{
15+
using InnerDriver = TFT_eSPI;
1516
ButtonDriver(TFT_eSPI* tftDriver);
1617
void updateHardwareConfig(config::HardwareConfig& hwConfig) { }; // noop
1718

0 commit comments

Comments
 (0)