1 /* 2 * Copyright (c) 2006-2021, RT-Thread Development Team 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 * 6 * Change Logs: 7 * Date Author Notes 8 * 2021-10-02 spaceman first version 9 */ 10 #ifndef DRV_GPIO_H__ 11 #define DRV_GPIO_H__ 12 13 #define __TKM32_PORT(port) GPIO##port##_BASE 14 15 #define GET_PIN(PORTx,PIN) (rt_base_t)((16 * ( ((rt_base_t)__TKM32_PORT(PORTx) - (rt_base_t)GPIOA_BASE)/(0x0400UL) )) + PIN) 16 17 18 19 int rt_hw_pin_init(void); 20 21 #endif 22