1 /* 2 * Copyright (c) 2022 Microchip Technology Inc. and its subsidiaries. 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #ifndef _MEC_GPIO_H 8 #define _MEC_GPIO_H 9 10 #include <stdint.h> 11 #include <stddef.h> 12 13 #define MCHP_XEC_PINCTRL_REG_IDX(pin) ((pin >> 5) * 32 + (pin & 0x1f)) 14 15 /** @brief All GPIO register as arrays of registers */ 16 struct gpio_regs { 17 volatile uint32_t CTRL[174]; 18 uint32_t RESERVED[18]; 19 volatile uint32_t PARIN[6]; 20 uint32_t RESERVED1[26]; 21 volatile uint32_t PAROUT[6]; 22 uint32_t RESERVED2[20]; 23 volatile uint32_t LOCK[6]; 24 uint32_t RESERVED3[64]; 25 volatile uint32_t CTRL2[174]; 26 }; 27 28 #endif /* #ifndef _MEC_GPIO_H */ 29