Skip to content

Commit 14c524f

Browse files
Merge pull request #629 from bmorcelli/master
Retrocompatibility to Arduino ESP32 <3
2 parents 45fb4d1 + 97c32bf commit 14c524f

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/databus/Arduino_ESP32QSPI.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@ bool Arduino_ESP32QSPI::begin(int32_t speed, int8_t dataMode)
7474
.address_bits = 24,
7575
.dummy_bits = 0,
7676
.mode = (uint8_t)_dataMode,
77+
#if defined(ESP_ARDUINO_VERSION_MAJOR) && ESP_ARDUINO_VERSION_MAJOR >= 3
7778
.clock_source = SPI_CLK_SRC_DEFAULT,
79+
#endif
7880
.duty_cycle_pos = 0,
7981
.cs_ena_pretrans = 0,
8082
.cs_ena_posttrans = 0,

src/databus/Arduino_ESP32RGBPanel.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,20 @@ uint16_t *Arduino_ESP32RGBPanel::getFrameBuffer(int16_t w, int16_t h)
8181
.de_gpio_num = _de,
8282
.pclk_gpio_num = _pclk,
8383
.disp_gpio_num = GPIO_NUM_NC, // -1
84+
#if defined(ESP_ARDUINO_VERSION_MAJOR) && ESP_ARDUINO_VERSION_MAJOR >= 3
8485
.data_gpio_nums = {0},
86+
#endif
8587
.flags = {
8688
.disp_active_low = true,
89+
#if defined(ESP_ARDUINO_VERSION_MAJOR) && ESP_ARDUINO_VERSION_MAJOR >= 3
8790
.refresh_on_demand = false,
91+
#endif
8892
.fb_in_psram = true, // allocate frame buffer from PSRAM
93+
#if defined(ESP_ARDUINO_VERSION_MAJOR) && ESP_ARDUINO_VERSION_MAJOR >= 3
8994
.double_fb = false,
9095
.no_fb = false,
9196
.bb_invalidate_cache = false,
97+
#endif
9298
},
9399
};
94100

0 commit comments

Comments
 (0)