1 /* 2 * Copyright (c) 2006-2024 RT-Thread Development Team 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 * 6 * Change Logs: 7 * Date Author Notes 8 * 2022-07-1 Rbb666 first version 9 */ 10 11 #ifndef __DRV_GPIO_H__ 12 #define __DRV_GPIO_H__ 13 14 #include <rthw.h> 15 #include <rtdevice.h> 16 #include "drv_common.h" 17 #include "cyhal_irq_impl.h" 18 19 #define GPIO_INTERRUPT_PRIORITY (7u) 20 21 #define GET_PIN(PORTx,PIN) ((((uint8_t)(PORTx)) << 3U) + ((uint8_t)(PIN))) 22 23 struct pin_irq_map 24 { 25 rt_uint16_t port; 26 #if defined(SOC_SERIES_IFX_XMC) 27 rt_uint32_t irqno; 28 #else 29 IRQn_Type irqno; 30 #endif 31 }; 32 33 int rt_hw_pin_init(void); 34 35 #endif /* __DRV_GPIO_H__ */ 36