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 * 2020-06-27 AHTYDHD the first version 9 */ 10 11 #ifndef __DRV_GPIO_H__ 12 #define __DRV_GPIO_H__ 13 14 #include <stdint.h> 15 #include <rtthread.h> 16 17 #define _TM4C_PIN(index, gpioport, gpio_index) \ 18 { \ 19 index, GPIO_PORT##gpioport##_BASE, GPIO_PIN_##gpio_index \ 20 } 21 22 #define _TM4C_PIN_RESERVE \ 23 { \ 24 -1, 0, 0 \ 25 } 26 27 /* TM4C123 GPIO driver*/ 28 struct pin_index 29 { 30 int index; 31 uint32_t gpioBaseAddress; 32 uint32_t pin; 33 }; 34 35 extern int rt_hw_pin_init(void); 36 37 #endif /*__DRV_GPIO_H__*/ 38 39 /************************** end of file ******************/ 40