drv_gpio.h 463 B

123456789101112131415161718192021
  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. #define __TKM32_PORT(port) GPIO##port##_BASE
  13. #define GET_PIN(PORTx,PIN) (rt_base_t)((16 * ( ((rt_base_t)__TKM32_PORT(PORTx) - (rt_base_t)GPIOA_BASE)/(0x0400UL) )) + PIN)
  14. int rt_hw_pin_init(void);
  15. #endif