From ddec3a474238d8bd600ec2cc0a1416be4d82ebf2 Mon Sep 17 00:00:00 2001 From: Francisco Date: Wed, 10 Jul 2024 17:18:59 -0300 Subject: [PATCH 1/3] Increment delay at the end of init secuence fix issue with ESP32 at higher SPI clock speeds on display st7920 --- csrc/u8x8_d_st7920.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/csrc/u8x8_d_st7920.c b/csrc/u8x8_d_st7920.c index 150d2b2f..217cf300 100644 --- a/csrc/u8x8_d_st7920.c +++ b/csrc/u8x8_d_st7920.c @@ -52,7 +52,7 @@ static const uint8_t u8x8_d_st7920_init_seq[] = { U8X8_C(0x006), /* Entry mode: Cursor move to right ,DDRAM address counter (AC) plus 1, no shift */ U8X8_C(0x002), /* disable scroll, enable CGRAM adress */ U8X8_C(0x001), /* clear RAM, needs 1.6 ms */ - U8X8_DLY(4), /* delay 2ms */ + U8X8_DLY(10), /* delay 10ms */ U8X8_END_TRANSFER(), /* disable chip */ @@ -403,4 +403,4 @@ uint8_t u8x8_d_st7920_256x32(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *a return u8x8_d_st7920_common(u8x8, msg, arg_int, arg_ptr); } return 1; -} \ No newline at end of file +} From 12e8f8be3f59200ab6f11ec116ae6391608afd35 Mon Sep 17 00:00:00 2001 From: Francisco Herrera Date: Wed, 10 Jul 2024 19:22:59 -0300 Subject: [PATCH 2/3] try to fix for esp-idf --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e4c5dd31..dd0eba6f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,7 @@ cmake_minimum_required(VERSION 3.5) -project(u8g2) +if(NOT DEFINED ESP_PLATFORM) + project(u8g2) +endif() set(COMPONENT_ADD_INCLUDEDIRS csrc) file(GLOB COMPONENT_SRCS csrc/*.c) From bff6902a229d88158cbfef6adfa391ab3360d1f9 Mon Sep 17 00:00:00 2001 From: Francisco Herrera Date: Wed, 10 Jul 2024 19:36:05 -0300 Subject: [PATCH 3/3] . --- CMakeLists.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dd0eba6f..e4c5dd31 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,5 @@ cmake_minimum_required(VERSION 3.5) -if(NOT DEFINED ESP_PLATFORM) - project(u8g2) -endif() +project(u8g2) set(COMPONENT_ADD_INCLUDEDIRS csrc) file(GLOB COMPONENT_SRCS csrc/*.c)