Update to support ESP-IDF v5 in develop branch (#186)
* Update to support ESP-IDF v5 in develop branch * Remove the need for rom includes while providing IDF v5 compatibility * Fix missing '(' typo * Remove unnecessarily addded rom header files * Add missing version include * Fix another forgotten ')'
This commit is contained in:
parent
bd8a7e3edd
commit
8d9f6e2548
15 changed files with 77 additions and 47 deletions
|
@ -8,6 +8,7 @@
|
|||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/task.h"
|
||||
#include "driver/gpio.h"
|
||||
#include "esp_idf_version.h"
|
||||
#include <stddef.h>
|
||||
|
||||
#if CONFIG_LV_TOUCH_CONTROLLER_ADCRAW
|
||||
|
@ -138,10 +139,19 @@ static void setup_axis(gpio_num_t plus, gpio_num_t minus, gpio_num_t measure, gp
|
|||
{
|
||||
// Set GPIOs:
|
||||
// - Float "ignore" and "measure"
|
||||
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0)
|
||||
esp_rom_gpio_pad_select_gpio(ignore);
|
||||
#else
|
||||
gpio_pad_select_gpio(ignore);
|
||||
#endif
|
||||
gpio_set_direction(ignore, GPIO_MODE_DISABLE);
|
||||
gpio_set_pull_mode(ignore, GPIO_FLOATING);
|
||||
|
||||
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0)
|
||||
esp_rom_gpio_pad_select_gpio(ignore);
|
||||
#else
|
||||
gpio_pad_select_gpio(measure);
|
||||
#endif
|
||||
gpio_set_direction(measure, GPIO_MODE_DISABLE);
|
||||
gpio_set_pull_mode(measure, GPIO_FLOATING);
|
||||
// - Set "plus" to 1, "minus" to 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue