You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ac...@apache.org on 2020/10/07 14:52:17 UTC

[incubator-nuttx] 02/04: 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.

This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 564237a602e1c8cf60bea58c34dcb7a0a15466c8
Author: Abdelatif Guettouche <ab...@espressif.com>
AuthorDate: Mon Oct 5 10:54:48 2020 +0100

    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 <ab...@espressif.com>
---
 arch/xtensa/src/esp32/esp32_gpio.c | 4 ----
 arch/xtensa/src/esp32/esp32_gpio.h | 1 -
 2 files changed, 5 deletions(-)

diff --git a/arch/xtensa/src/esp32/esp32_gpio.c b/arch/xtensa/src/esp32/esp32_gpio.c
index cfb04cd..c881737 100644
--- a/arch/xtensa/src/esp32/esp32_gpio.c
+++ b/arch/xtensa/src/esp32/esp32_gpio.c
@@ -218,10 +218,6 @@ int esp32_configgpio(int pin, gpio_pinattr_t attr)
     {
       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) */
     {
       func |= (uint32_t)((attr >> FUNCTION_SHIFT) << MCU_SEL_S);
diff --git a/arch/xtensa/src/esp32/esp32_gpio.h b/arch/xtensa/src/esp32/esp32_gpio.h
index fa37949..17c8efb 100644
--- a/arch/xtensa/src/esp32/esp32_gpio.h
+++ b/arch/xtensa/src/esp32/esp32_gpio.h
@@ -66,7 +66,6 @@
 #  define FUNCTION_3        (3 << FUNCTION_SHIFT)
 #  define FUNCTION_4        (4 << FUNCTION_SHIFT)
 #  define FUNCTION_5        (5 << FUNCTION_SHIFT)
-#  define SPECIAL           (7 << FUNCTION_SHIFT)
 
 #define INPUT_PULLUP        (INPUT | PULLUP)
 #define INPUT_PULLDOWN      (INPUT | PULLDOWN)