modules: microchip: mec1501: Fix GPIO alternate function field mask

Origin
    MCHP
        https://github.com/MicrochipTech/hal_microchip

Status:
    version: 1.2.0

MEC150x/2x GPIO control register alternate function field is a two
bit field but mask was set for 4 bits.

Signed-off-by: Scott Worley <scott.worley@microchip.com>
This commit is contained in:
Scott Worley 2021-04-26 13:12:44 -04:00 committed by Anas Nashif
parent a1bba228fd
commit 44e24f3ff1
1 changed files with 3 additions and 2 deletions

View File

@ -288,10 +288,11 @@
#define MCHP_GPIO_CTRL_POL_SET(x) (((uint32_t)(x) & MCHP_GPIO_CTRL_POL_MASK0)\
<< MCHP_GPIO_CTRL_POL_POS)
/* bits[13:12] pin mux (fucntion) */
/* bits[13:12] pin mux (function) */
#define MCHP_GPIO_CTRL_MUX_POS 12u
#define MCHP_GPIO_CTRL_MUX_MASK0 0x03ul
#define MCHP_GPIO_CTRL_MUX_MASK (0x0FUL << (MCHP_GPIO_CTRL_MUX_POS))
#define MCHP_GPIO_CTRL_MUX_MASK \
(MCHP_GPIO_CTRL_MUX_MASK0 << (MCHP_GPIO_CTRL_MUX_POS))
#define MCHP_GPIO_CTRL_MUX_F0 (0x00UL << (MCHP_GPIO_CTRL_MUX_POS))
#define MCHP_GPIO_CTRL_MUX_F1 (0x01UL << (MCHP_GPIO_CTRL_MUX_POS))
#define MCHP_GPIO_CTRL_MUX_F2 (0x02UL << (MCHP_GPIO_CTRL_MUX_POS))