Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/lovyan03/LovyanGFX into …
Browse files Browse the repository at this point in the history
…develop
  • Loading branch information
tobozo committed Feb 26, 2024
2 parents 3d8da78 + f5445e5 commit 35d562c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/lgfx/v1/LGFX_Button.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ namespace lgfx
static constexpr size_t label_length = 11;
char _label[label_length + 1]; // Button text is 11 chars maximum unless long_name used
float _textsize_x, _textsize_y;
bool _pressed, _last_press; // Button states
bool _pressed = false, _last_press = false; // Button states
};

//----------------------------------------------------------------------------
Expand Down
10 changes: 4 additions & 6 deletions src/lgfx/v1/platforms/esp32/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -486,13 +486,11 @@ namespace lgfx
buscfg.flags = SPICOMMON_BUSFLAG_MASTER;
buscfg.intr_flags = 0;
#if defined (ESP_IDF_VERSION_VAL)
#if (ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 2, 0))
#if (ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 2, 0))
buscfg.isr_cpu_id = ESP_INTR_CPU_AFFINITY_AUTO;
#else
#if (ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 1, 0))
#elif (ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 1, 0))
buscfg.isr_cpu_id = INTR_CPU_ID_AUTO;
#endif
#endif
#endif
if (ESP_OK != spi_bus_initialize(static_cast<spi_host_device_t>(spi_host), &buscfg, dma_channel))
{
Expand Down Expand Up @@ -830,8 +828,8 @@ namespace lgfx
}
#if defined (CONFIG_IDF_TARGET_ESP32S3)
#if (ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 3) && ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 1, 0)) \
|| (ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 1, 1) && ESP_IDF_VERSION <= ESP_IDF_VERSION_VAL(5, 2, 0)) \
|| (ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 3, 0))
|| (ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 1, 1) && ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 2, 0)) \
|| (ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 2, 0))
(&dev->comd[0])[index].val = cmd_val;
#else
(&dev->comd0)[index].val = cmd_val;
Expand Down
18 changes: 9 additions & 9 deletions src/lgfx/v1_autodetect/LGFX_AutoDetect_ESP32_all.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3084,7 +3084,13 @@ namespace lgfx
{
ESP_LOGI(LIBRARY_NAME, "[Autodetect] Sunton_2432S028 (ILI9341)");

result->panel = new Panel_ILI9341();
auto p = new Panel_ILI9341();
result->panel = p;
{
auto cfg = p->config();
cfg.offset_rotation = 2;
p->config(cfg);
}
_detector_Sunton_ESP32_2432S028_t::setup(result);
}
};
Expand All @@ -3095,7 +3101,7 @@ namespace lgfx
: _detector_Sunton_ESP32_2432S028_t
{ board_t::board_Sunton_ESP32_2432S028
, 0x04, 0xFF, 0x85 // ST7789
, 40000000, 16000000
, 80000000, 16000000
, GPIO_NUM_13 // MOSI
, GPIO_NUM_12 // MISO
, GPIO_NUM_14 // SCLK
Expand All @@ -3112,13 +3118,7 @@ namespace lgfx
{
ESP_LOGI(LIBRARY_NAME, "[Autodetect] Sunton_2432S028 (ST7789)");

auto p = new Panel_ST7789();
{
auto cfg = p->config();
cfg.offset_rotation = 2;
p->config(cfg);
}
result->panel = p;
result->panel = new Panel_ST7789();
_detector_Sunton_ESP32_2432S028_t::setup(result);
auto t = result->panel->getTouch();
{
Expand Down

0 comments on commit 35d562c

Please sign in to comment.