1 /****************************************************************************** 2 * 3 * Copyright (C) 2022-2023 Maxim Integrated Products, Inc. (now owned by 4 * Analog Devices, Inc.), 5 * Copyright (C) 2023-2024 Analog Devices, Inc. 6 * 7 * Licensed under the Apache License, Version 2.0 (the "License"); 8 * you may not use this file except in compliance with the License. 9 * You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, software 14 * distributed under the License is distributed on an "AS IS" BASIS, 15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 * See the License for the specific language governing permissions and 17 * limitations under the License. 18 * 19 ******************************************************************************/ 20 21 #ifndef LIBRARIES_PERIPHDRIVERS_SOURCE_GPIO_GPIO_REVB_H_ 22 #define LIBRARIES_PERIPHDRIVERS_SOURCE_GPIO_GPIO_REVB_H_ 23 24 /* **** Includes **** */ 25 #include "gpio_regs.h" 26 27 #ifdef __cplusplus 28 extern "C" { 29 #endif 30 31 /** 32 * @brief Enumeration type for the pullup strength on a given pin. 33 */ 34 typedef enum { 35 MXC_GPIO_PS_NONE, /**< No pull-up or pull-down strength required*/ 36 MXC_GPIO_PS_PULL_SELECT, /**< Selct pull-up or pull-down strength*/ 37 } mxc_gpio_ps_t; 38 39 /* **** Function Prototypes **** */ 40 41 int MXC_GPIO_RevB_Config(const mxc_gpio_cfg_t *cfg, uint8_t psMask); 42 uint32_t MXC_GPIO_RevB_InGet(mxc_gpio_regs_t *port, uint32_t mask); 43 void MXC_GPIO_RevB_OutSet(mxc_gpio_regs_t *port, uint32_t mask); 44 void MXC_GPIO_RevB_OutClr(mxc_gpio_regs_t *port, uint32_t mask); 45 uint32_t MXC_GPIO_RevB_OutGet(mxc_gpio_regs_t *port, uint32_t mask); 46 void MXC_GPIO_RevB_OutPut(mxc_gpio_regs_t *port, uint32_t mask, uint32_t val); 47 void MXC_GPIO_RevB_OutToggle(mxc_gpio_regs_t *port, uint32_t mask); 48 int MXC_GPIO_RevB_IntConfig(const mxc_gpio_cfg_t *cfg, mxc_gpio_int_pol_t pol); 49 void MXC_GPIO_RevB_EnableInt(mxc_gpio_regs_t *port, uint32_t mask); 50 void MXC_GPIO_RevB_DisableInt(mxc_gpio_regs_t *port, uint32_t mask); 51 void MXC_GPIO_RevB_ClearFlags(mxc_gpio_regs_t *port, uint32_t flags); 52 uint32_t MXC_GPIO_RevB_GetFlags(mxc_gpio_regs_t *port); 53 int MXC_GPIO_RevB_SetVSSEL(mxc_gpio_regs_t *port, mxc_gpio_vssel_t vssel, uint32_t mask); 54 55 /**@} end of group gpio */ 56 57 #ifdef __cplusplus 58 } 59 #endif 60 61 #endif // LIBRARIES_PERIPHDRIVERS_SOURCE_GPIO_GPIO_REVB_H_ 62