⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gpio.h

📁 philips arm7 lpc2103的常用功能的库函数第二部分
💻 H
字号:
/***********************************************Copyright (c)*********************************************
**                                Guangzou ZLG-MCU Development Co.,LTD.
**                                     
**                                       http://www.zlgmcu.com
**
**--------------File Info---------------------------------------------------------------------------------
** File name:			    Gpio.h
** Last modified Date:      2007-10-15
** Last Version:		    1.0
** Descriptions:		    Gpio头文件
**
**--------------------------------------------------------------------------------------------------------
** Created by:			    wengshujie
** Created date:		    2007-10-15
** Version:				    1.0
** Descriptions:		    
**
**--------------------------------------------------------------------------------------------------------
** Modified by:			    
** Modified Date:		    
** Version:				    
** Descriptions:		    
**
*********************************************************************************************************/
#ifndef __GPIO_H
#define __GPIO_H

/*********************************************************************************************************
  定义P0端口,P0_26,P0_31未用
*********************************************************************************************************/
#define P0_00   0x000
#define P0_01	0x001
#define P0_02	0x002
#define P0_03	0x003
#define P0_04	0x004
#define P0_05	0x005
#define P0_06	0x006
#define P0_07	0x007
#define P0_08	0x008
#define P0_09	0x009
#define P0_10	0x00a
#define P0_11	0x00b
#define P0_12	0x00c
#define P0_13	0x00d
#define P0_14	0x00e
#define P0_15	0x00f
#define P0_16	0x010
#define P0_17	0x011
#define P0_18	0x012
#define P0_19	0x013
#define P0_20	0x014
#define P0_21	0x015
#define P0_22	0x016
#define P0_23	0x017
#define P0_24   0x018
#define P0_25	0x019
#define P0_26	0x01a                                                  
#define P0_27	0x01b
#define P0_28	0x01c
#define P0_29	0x01d
#define P0_30	0x01e
#define P0_31	0x01f                                                   /* P0_31只作为输出              */

/*********************************************************************************************************
  定义P1端口,P1_00~P1_15未用
*********************************************************************************************************/
#define P1_00   0x100
#define P1_01	0x101
#define P1_02	0x102                                                  
#define P1_03	0x103
#define P1_04	0x104
#define P1_05	0x105
#define P1_06	0x106
#define P1_07	0x107
#define P1_08	0x108
#define P1_09	0x109
#define P1_10	0x10a
#define P1_11	0x10b
#define P1_12	0x10c
#define P1_13	0x10d
#define P1_14	0x10e
#define P1_15	0x10f
#define P1_16	0x110
#define P1_17	0x111
#define P1_18	0x112
#define P1_19	0x113
#define P1_20	0x114
#define P1_21	0x115
#define P1_22	0x116
#define P1_23	0x117
#define P1_24	0x118
#define P1_25	0x119
#define P1_26	0x11a
#define P1_27	0x11b
#define P1_28	0x11c
#define P1_29	0x11d
#define P1_30	0x11e
#define P1_31	0x11f

/*********************************************************************************************************
** Function name:           gpioSet
** Descriptions:            GPIO设备输出高电平
** Input parameters:        uiArg  GPIO设备引脚宏定义(端口引用名称)
**                                 P0_00 ~ P0_31        
**                                 P1_16 ~ P1_31 
** Output parameters:       NONE
** Returned value:          OPERATE_SUCCESS
**                          OPERATE_FAIL                        
** Example:                 gpioSet( P0_00 );                       
*********************************************************************************************************/
int32 gpioSet (uint32 uiArg);

/*********************************************************************************************************
** Function name:           gpioClr
** Descriptions:            GPIO设备输出低电平
** Input parameters:        uiArg  GPIO设备引脚宏定义(端口引用名称)
**                                 P0_00 ~ P0_31        
**                                 P1_16 ~ P1_31 
** Output parameters:       NONE
** Returned value:          OPERATE_SUCCESS
**                          OPERATE_FAIL 
** Example:                 gpioClr( P0_00 );                       
*********************************************************************************************************/
int32 gpioClr (uint32 uiArg);

/*********************************************************************************************************
** Function name:           gpioGet
** Descriptions:            获取GPIO设备端口电平
** Input parameters:        uiArg  GPIO设备引脚宏定义(端口引用名称)
**                                 P0_00 ~ P0_31        
**                                 P1_16 ~ P1_31 
** Output parameters:       NONE
** Returned value:          1高电平
**                          0低电平
**                          OPERATE_SUCCESS
** Example:                 gpioGet( P0_00 );                       
*********************************************************************************************************/
int32 gpioGet (uint32 uiArg);

/*********************************************************************************************************
** Function name:           gpioCpl
** Descriptions:            取反GPIO设备端口电平
** Input parameters:        uiArg  GPIO设备引脚宏定义(端口引用名称)
**                                 P0_00 ~ P0_31        
**                                 P1_16 ~ P1_31 
** Output parameters:       NONE
** Returned value:          OPERATE_SUCCESS
**                          OPERATE_FAIL 
** Example:                 gpioCpl( P0_00 );                       
*********************************************************************************************************/
int32 gpioCpl (uint32 uiArg);

#endif                                                                  /* __GPIO_H                     */
/*********************************************************************************************************
  END FILE
*********************************************************************************************************/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -