backward compatibility with esp-idf release/v4.4
This commit is contained in:
parent
50b212aa56
commit
de52f295db
18 changed files with 216 additions and 18 deletions
|
@ -13,7 +13,10 @@
|
|||
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/task.h"
|
||||
|
||||
#include "esp_idf_version.h"
|
||||
#if ESP_IDF_VERSION <= ESP_IDF_VERSION_VAL(5,0,0)
|
||||
#include "rom/gpio.h"
|
||||
#endif
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
|
@ -74,11 +77,19 @@ void ili9481_init(void)
|
|||
};
|
||||
|
||||
//Initialize non-SPI GPIOs
|
||||
#if ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5,0,0)
|
||||
gpio_pad_select_gpio(ILI9481_DC);
|
||||
#else
|
||||
esp_rom_gpio_pad_select_gpio(ILI9481_DC);
|
||||
#endif
|
||||
gpio_set_direction(ILI9481_DC, GPIO_MODE_OUTPUT);
|
||||
|
||||
#if ILI9481_USE_RST
|
||||
#if ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5,0,0)
|
||||
gpio_pad_select_gpio(ILI9481_RST);
|
||||
#else
|
||||
esp_rom_gpio_pad_select_gpio(ILI9481_RST);
|
||||
#endif
|
||||
gpio_set_direction(ILI9481_RST, GPIO_MODE_OUTPUT);
|
||||
|
||||
//Reset the display
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue