rt-thread-official/bsp/tkm32F499/drivers/drv_gpio.h

22 lines
463 B
C

/*
* Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2021-10-02 spaceman first version
*/
#ifndef DRV_GPIO_H__
#define DRV_GPIO_H__
#define __TKM32_PORT(port) GPIO##port##_BASE
#define GET_PIN(PORTx,PIN) (rt_base_t)((16 * ( ((rt_base_t)__TKM32_PORT(PORTx) - (rt_base_t)GPIOA_BASE)/(0x0400UL) )) + PIN)
int rt_hw_pin_init(void);
#endif