drv_gpio.h 422 B

123456789101112131415161718192021
  1. /*
  2. * Copyright (c) 2006-2022, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2018-4-30 misonyo the first version.
  9. */
  10. #ifndef DRV_GPIO_H__
  11. #define DRV_GPIO_H__
  12. #include <rtthread.h>
  13. #include <rtdevice.h>
  14. #define GET_PIN(PORTx, PIN) (32 * (PORTx - 1) + (PIN & 31)) /* PORTx:1,2,3,4,5 */
  15. int rt_hw_pin_init(void);
  16. #endif