Merge branch 'feature/enable_gpio19_esp32c3' into 'master'

gpio: enable GPIO19 on ESP32C3 boards

Closes IDF-2463

See merge request espressif/esp-idf!12354
pull/6718/head
Angus Gratton 2021-02-22 09:19:35 +00:00
commit 97ea38a407
3 zmienionych plików z 4 dodań i 3 usunięć

Wyświetl plik

@ -391,7 +391,8 @@ esp_err_t gpio_config(const gpio_config_t *pGPIOConfig)
gpio_intr_disable(io_num);
}
PIN_FUNC_SELECT(io_reg, PIN_FUNC_GPIO); /*function number 2 is GPIO_FUNC for each pin */
/* By default, all the pins have to be configured as GPIO pins. */
PIN_FUNC_SELECT(io_reg, PIN_FUNC_GPIO);
}
io_num++;

Wyświetl plik

@ -292,7 +292,7 @@ typedef enum {
GPIO_NUM_16 = 16, /*!< GPIO16, input and output */
GPIO_NUM_17 = 17, /*!< GPIO17, input and output */
GPIO_NUM_18 = 18, /*!< GPIO18, input and output */
// TODO: ESP32C3 IDF-2463
GPIO_NUM_19 = 19, /*!< GPIO19, input and output */
GPIO_NUM_20 = 20, /*!< GPIO20, input and output */
GPIO_NUM_21 = 21, /*!< GPIO21, input and output */
GPIO_NUM_22 = 22, /*!< GPIO22, input and output */

Wyświetl plik

@ -117,7 +117,7 @@
#define IO_MUX_GPIO20_REG PERIPHS_IO_MUX_U0RXD_U
#define IO_MUX_GPIO21_REG PERIPHS_IO_MUX_U0TXD_U
#define FUNC_GPIO_GPIO 1
/* Value to set in IO Mux to use a pin as GPIO. */
#define PIN_FUNC_GPIO 1
#define GPIO_PAD_PULLUP(num) do{PIN_PULLDWN_DIS(IOMUX_REG_GPIO##num);PIN_PULLUP_EN(IOMUX_REG_GPIO##num);}while(0)