From 016559223113f6a25a69f86bc8d7ff407e56f516 Mon Sep 17 00:00:00 2001
From: Angus Gratton <gus@projectgus.com>
Date: Wed, 28 Oct 2015 20:09:41 +1100
Subject: [PATCH] iomux: Fix bug setting IOMUX_FUNC(4)

Function masking value was incorrect
---
 core/include/esp/iomux_regs.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/core/include/esp/iomux_regs.h b/core/include/esp/iomux_regs.h
index 2600da9..ff6f614 100644
--- a/core/include/esp/iomux_regs.h
+++ b/core/include/esp/iomux_regs.h
@@ -40,9 +40,9 @@ _Static_assert(sizeof(struct IOMUX_REGS) == 0x44, "IOMUX_REGS is the wrong size"
 #define IOMUX_PIN_PULLDOWN             BIT(6)
 #define IOMUX_PIN_PULLUP               BIT(7)
 #define IOMUX_PIN_FUNC_HIGH_M          0x00000004
-#define IOMUX_PIN_FUNC_HIGH_S          8
+#define IOMUX_PIN_FUNC_HIGH_S          6
 
-#define IOMUX_PIN_FUNC_MASK            0x00001030
+#define IOMUX_PIN_FUNC_MASK            0x00000130
 
 /* WARNING: Macro evaluates argument twice */
 #define IOMUX_FUNC(val) (VAL2FIELD_M(IOMUX_PIN_FUNC_LOW, val) | VAL2FIELD_M(IOMUX_PIN_FUNC_HIGH, val))