2020-07-01 23:44:57 +08:00
|
|
|
/*
|
2021-03-21 22:23:24 +08:00
|
|
|
* Copyright (c) 2006-2021, RT-Thread Development Team
|
2020-07-01 23:44:57 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*
|
|
|
|
* Change Logs:
|
|
|
|
* Date Author Notes
|
|
|
|
* 2020-06-27 AHTYDHD the first version
|
|
|
|
*/
|
|
|
|
|
2020-07-02 13:01:57 +08:00
|
|
|
#ifndef __DRV_GPIO_H__
|
|
|
|
#define __DRV_GPIO_H__
|
2020-06-24 19:54:42 +08:00
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <rtthread.h>
|
|
|
|
|
2020-07-01 23:44:57 +08:00
|
|
|
#define _TM4C_PIN(index, gpioport, gpio_index) \
|
|
|
|
{ \
|
|
|
|
index, GPIO_PORT##gpioport##_BASE, GPIO_PIN_##gpio_index \
|
|
|
|
}
|
|
|
|
|
|
|
|
#define _TM4C_PIN_RESERVE \
|
|
|
|
{ \
|
|
|
|
-1, 0, 0 \
|
|
|
|
}
|
2020-06-24 19:54:42 +08:00
|
|
|
|
|
|
|
/* TM4C123 GPIO driver*/
|
|
|
|
struct pin_index
|
|
|
|
{
|
|
|
|
int index;
|
|
|
|
uint32_t gpioBaseAddress;
|
|
|
|
uint32_t pin;
|
|
|
|
};
|
|
|
|
|
|
|
|
extern int rt_hw_pin_init(void);
|
|
|
|
|
2020-07-02 13:01:57 +08:00
|
|
|
#endif /*__DRV_GPIO_H__*/
|
2020-06-24 19:54:42 +08:00
|
|
|
|
2021-03-21 22:23:24 +08:00
|
|
|
/************************** end of file ******************/
|