drv_gpio.h 911 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * Copyright (c) 2006-2025, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2021-07-29 KyleChan first version
  9. */
  10. #ifndef __DRV_GPIO_H__
  11. #define __DRV_GPIO_H__
  12. #include <board.h>
  13. #include <rthw.h>
  14. #include <rtdbg.h>
  15. #include <rtthread.h>
  16. #include <rtdevice.h>
  17. #include <drv_common.h>
  18. #include <hal_data.h>
  19. #ifdef __cplusplus
  20. extern "C" {
  21. #endif
  22. #ifdef SOC_SERIES_R9A07G0
  23. #define RA_MIN_PIN_VALUE BSP_IO_PORT_00_PIN_0
  24. #define RA_MAX_PIN_VALUE BSP_IO_PORT_24_PIN_7
  25. #else
  26. #define RA_MIN_PIN_VALUE BSP_IO_PORT_00_PIN_00
  27. #define RA_MAX_PIN_VALUE BSP_IO_PORT_11_PIN_15
  28. #endif
  29. #ifdef R_ICU_H
  30. struct ra_pin_irq_map
  31. {
  32. const icu_instance_ctrl_t *irq_ctrl;
  33. const external_irq_cfg_t *irq_cfg;
  34. };
  35. #endif
  36. int rt_hw_pin_init(void);
  37. #ifdef __cplusplus
  38. }
  39. #endif
  40. #endif /* __DRV_GPIO_H__ */