drv_gpio.h 425 字节
Newer Older
1
/*
2
 * Copyright (c) 2006-2018, RT-Thread Development Team
3
 *
4
 * SPDX-License-Identifier: Apache-2.0
5 6 7
 *
 * Change Logs:
 * Date           Author       Notes
misonyo's avatar
misonyo 已提交
8
 * 2018-4-30     misonyo     the first version.
9 10
 */
 
misonyo's avatar
misonyo 已提交
11 12
#ifndef DRV_GPIO_H__
#define DRV_GPIO_H__
13 14 15 16

#include <rtthread.h> 
#include <rtdevice.h> 

misonyo's avatar
misonyo 已提交
17 18
#define GET_PIN(PORTx, PIN)      (32 * (PORTx - 1) + (PIN & 31))    /* PORTx:1,2,3,4,5 */

19 20 21
int rt_hw_pin_init(void);

#endif