backward compatibility with esp-idf release/v4.4

This commit is contained in:
hiruna 2023-06-03 23:08:29 +10:00
parent 50b212aa56
commit de52f295db
18 changed files with 216 additions and 18 deletions

View file

@ -7,7 +7,10 @@
#include "EVE.h"
#include "EVE_commands.h"
#include "esp_idf_version.h"
#if ESP_IDF_VERSION <= ESP_IDF_VERSION_VAL(5,0,0)
#include "rom/gpio.h"
#endif
/* some pre-definded colors */
#define RED 0xff0000UL
#define ORANGE 0xffa500UL
@ -263,7 +266,12 @@ void TFT_bitmap_display(void)
void FT81x_init(void)
{
#if EVE_USE_PDN
esp_rom_gpio_pad_select_gpio(EVE_PDN);
#if ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5,0,0)
gpio_pad_select_gpio(EVE_PDN);
#else
esp_rom_gpio_pad_select_gpio(EVE_PDN);
#endif
#endif
gpio_set_level(EVE_CS, 1);