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 11 #ifndef __DRV_GPIO_H__ 12 #define __DRV_GPIO_H__ 13 14 #include <board.h> 15 #include <rthw.h> 16 #include <rtdbg.h> 17 #include <rtthread.h> 18 #include <rtdevice.h> 19 #include <drv_common.h> 20 #include <hal_data.h> 21 22 #ifdef __cplusplus 23 extern "C" { 24 #endif 25 26 #ifdef SOC_SERIES_R9A07G0 27 #define RA_MIN_PIN_VALUE BSP_IO_PORT_00_PIN_0 28 #define RA_MAX_PIN_VALUE BSP_IO_PORT_24_PIN_7 29 #else 30 #define RA_MIN_PIN_VALUE BSP_IO_PORT_00_PIN_00 31 #define RA_MAX_PIN_VALUE BSP_IO_PORT_11_PIN_15 32 #endif 33 34 #ifdef R_ICU_H 35 struct ra_pin_irq_map 36 { 37 const icu_instance_ctrl_t *irq_ctrl; 38 const external_irq_cfg_t *irq_cfg; 39 }; 40 #endif 41 42 int rt_hw_pin_init(void); 43 #ifdef __cplusplus 44 } 45 #endif 46 47 #endif /* __DRV_GPIO_H__ */ 48 49