mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 11:26:12 +08:00
arch/xtensa/src/esp32/esp32_gpio: Function "SPECIAL" doesn't exist. All
pads go through the same GPIO matrix to select one of the 6 possible functions. Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
This commit is contained in:
committed by
Alan Carvalho de Assis
parent
efb2fd5e4b
commit
564237a602
@@ -218,10 +218,6 @@ int esp32_configgpio(int pin, gpio_pinattr_t attr)
|
|||||||
{
|
{
|
||||||
func |= (uint32_t)(2 << MCU_SEL_S);
|
func |= (uint32_t)(2 << MCU_SEL_S);
|
||||||
}
|
}
|
||||||
else if ((attr & FUNCTION_MASK) == SPECIAL)
|
|
||||||
{
|
|
||||||
func |= (uint32_t)((((pin) == 1 || (pin) == 3) ? 0 : 1) << MCU_SEL_S);
|
|
||||||
}
|
|
||||||
else /* if ((attr & FUNCTION) != 0) */
|
else /* if ((attr & FUNCTION) != 0) */
|
||||||
{
|
{
|
||||||
func |= (uint32_t)((attr >> FUNCTION_SHIFT) << MCU_SEL_S);
|
func |= (uint32_t)((attr >> FUNCTION_SHIFT) << MCU_SEL_S);
|
||||||
|
|||||||
@@ -66,7 +66,6 @@
|
|||||||
# define FUNCTION_3 (3 << FUNCTION_SHIFT)
|
# define FUNCTION_3 (3 << FUNCTION_SHIFT)
|
||||||
# define FUNCTION_4 (4 << FUNCTION_SHIFT)
|
# define FUNCTION_4 (4 << FUNCTION_SHIFT)
|
||||||
# define FUNCTION_5 (5 << FUNCTION_SHIFT)
|
# define FUNCTION_5 (5 << FUNCTION_SHIFT)
|
||||||
# define SPECIAL (7 << FUNCTION_SHIFT)
|
|
||||||
|
|
||||||
#define INPUT_PULLUP (INPUT | PULLUP)
|
#define INPUT_PULLUP (INPUT | PULLUP)
|
||||||
#define INPUT_PULLDOWN (INPUT | PULLDOWN)
|
#define INPUT_PULLDOWN (INPUT | PULLDOWN)
|
||||||
|
|||||||
Reference in New Issue
Block a user