📄 gpio.h
字号:
/*************************************************************************************
* Copyright (c) 2005 by National ASIC System Engineering Research Center.
* PROPRIETARY RIGHTS of ASIC are involved in the subject matter of this
* material. All manufacturing, reproduction, use, and sales rights
* pertaining to this subject matter are governed by the license agreement.
* The recipient of this software implicitly accepts the terms of the license.
*
* File Name: typedef.h
*
* File Description:
* The file define some macro definition used in some assembler file.
*
* Created by spone <spone_awp@yahoo.com.cn>, 2005-03-30
**************************************************************************************/
#ifndef GPIO_H
#define GPIO_H
/***************************************************
* General-Purpose INPUT OUTPUT Register Definition
***************************************************/
#define GPIO_BASE 0x1000B000
#define PORTA_DIR (GPIO_BASE + 0x04)
#define PORTA_SEL (GPIO_BASE + 0x08)
#define PORTA_DATA (GPIO_BASE + 0x0C)
#define PORTB_DIR (GPIO_BASE + 0x10)
#define PORTB_SEL (GPIO_BASE + 0x14)
#define PORTB_DATA (GPIO_BASE + 0x18)
#define PORTC_DIR (GPIO_BASE + 0x1C)
#define PORTC_SEL (GPIO_BASE + 0x20)
#define PORTC_DATA (GPIO_BASE + 0x24)
#define PORTD_DIR (GPIO_BASE + 0x28)
#define PORTD_SEL (GPIO_BASE + 0x2c)
#define PORTD_DATA (GPIO_BASE + 0x30)
#define PORTE_DIR (GPIO_BASE + 0x34)
#define PORTE_SEL (GPIO_BASE + 0x38)
#define PORTE_INCTL (GPIO_BASE + 0x3C)
#define PORTE_INTRCTL (GPIO_BASE + 0x40)
#define PORTE_INTRCLR (GPIO_BASE + 0x44)
#define PORTE_DATA (GPIO_BASE + 0x48)
#define PORTF_DIR (GPIO_BASE + 0x4C)
#define PORTF_SEL (GPIO_BASE + 0x50)
#define PORTF_DATA (GPIO_BASE + 0x54)
#define PORTG_DIR (GPIO_BASE + 0x58)
#define PORTG_SEL (GPIO_BASE + 0x5C)
#define PORTG_DATA (GPIO_BASE + 0x60)
#define PORTH_DIR (GPIO_BASE + 0x68)
#define PORTH_SEL (GPIO_BASE + 0x6C)
#define PORTH_INCTL (GPIO_BASE + 0x70)
#define PORTH_INTRCTL (GPIO_BASE + 0x74)
#define PORTH_INTRCLR (GPIO_BASE + 0x78)
#define PORTH_DATA (GPIO_BASE + 0x7C)
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -