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

22 lines
463 B
C
Raw Permalink Normal View History

2021-10-14 18:50:35 +08:00
/*
2021-10-15 00:52:10 +08:00
* Copyright (c) 2006-2021, RT-Thread Development Team
2021-10-14 18:50:35 +08:00
*
* 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