2019-03-11 13:10:36 +08:00
|
|
|
/*
|
2023-02-11 08:13:40 +08:00
|
|
|
* Copyright (c) 2006-2023, RT-Thread Development Team
|
2019-03-11 13:10:36 +08:00
|
|
|
*
|
2019-03-11 22:55:07 +08:00
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
2019-03-11 13:10:36 +08:00
|
|
|
*
|
|
|
|
* Change Logs:
|
|
|
|
* Date Author Notes
|
2019-06-12 15:01:12 +08:00
|
|
|
* 2018-4-30 misonyo the first version.
|
2019-03-11 13:10:36 +08:00
|
|
|
*/
|
2022-01-26 12:24:09 +08:00
|
|
|
|
2019-06-12 15:01:12 +08:00
|
|
|
#ifndef DRV_GPIO_H__
|
|
|
|
#define DRV_GPIO_H__
|
2019-03-11 13:10:36 +08:00
|
|
|
|
2022-01-26 12:24:09 +08:00
|
|
|
#include <rtthread.h>
|
|
|
|
#include <rtdevice.h>
|
2019-03-11 13:10:36 +08:00
|
|
|
|
2019-06-12 15:01:12 +08:00
|
|
|
#define GET_PIN(PORTx, PIN) (32 * (PORTx - 1) + (PIN & 31)) /* PORTx:1,2,3,4,5 */
|
|
|
|
|
2019-03-11 13:10:36 +08:00
|
|
|
int rt_hw_pin_init(void);
|
|
|
|
|
|
|
|
#endif
|