Skip to content

Commit

Permalink
Merge pull request #150 from sieren/m5stack-fixes
Browse files Browse the repository at this point in the history
Fix M5Stack Core1
  • Loading branch information
sieren committed Feb 10, 2021
2 parents 325f1fc + d61becd commit 9e07d03
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,9 @@ file(REMOVE ${CMAKE_SOURCE_DIR}/main/libraries/TFT_eSPI/User_Setup.h)
if(BOARD STREQUAL "M5STACK")
message(STATUS "Compiling for M5Stack")
list(APPEND compile_definitions "M5Stack")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DM5Stack")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DM5Stack")
list(APPEND compile_definitions "M5StackCore1")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DM5Stack -DM5StackCore1")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DM5Stack -DM5StackCore1")
file(COPY ${CMAKE_SOURCE_DIR}/main/config/TFT_eSPI/M5Stack/User_Setup.h
DESTINATION ${CMAKE_SOURCE_DIR}/main/libraries/TFT_eSPI)
endif(BOARD STREQUAL "M5STACK")
Expand Down
2 changes: 1 addition & 1 deletion main/config/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ static const unsigned long MinsBeforeScreenSleep = 10; // Minutes before putting
//
//

#if defined(M5StackCore1) || defined(BUTTONSASS)
#if defined(M5StackCore1) || defined(BUTTONS)
// Define Button PINs
#define BUTTON_A_PIN 39
#define BUTTON_B_PIN 38
Expand Down
1 change: 1 addition & 0 deletions main/touch/ButtonDriver.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ namespace gfx
{
struct ButtonDriver
{
using InnerDriver = TFT_eSPI;
ButtonDriver(TFT_eSPI* tftDriver);
void updateHardwareConfig(config::HardwareConfig& hwConfig) { }; // noop

Expand Down

0 comments on commit 9e07d03

Please sign in to comment.