以下是博主自己写的基于三星的S3C2451mini开发板的GPIO编程代码。 供大家参考学习
#define GPACON (*(volatile unsigned long *)0x56000000)
#define GPADAT (*(volatile unsigned long *)0x56000004)
#define GPBCON (*(volatile unsigned long *)0x56000010)
#define GPBDAT (*(volatile unsigned long *)0x56000014)
#define GPBUDP (*(volatile unsigned long *)0x56000018)
#define GPBSEL (*(volatile unsigned long *)0x5600001c)
#define GPCCON (*(volatile unsigned long *)0x56000020)
#define GPCDAT (*(volatile unsigned long *)0x56000024)
#define GPCUDP (*(volatile unsigned long *)0x56000028)
#define GPDCON (*(volatile unsigned long *)0x56000030)
#define GPDDAT (*(volatile unsigned long *)0x56000034)
#define GPDUDP (*(volatile unsigned long *)0x56000038)
#define GPECON (*(volatile unsigned long *)0x56000040)
#define GPEDAT (*(volatile unsigned long *)0x56000044)
#define GPEUDP (*(volatile unsigned long *)0x56000048)
#define GPESEL (*(volatile unsigned long *)0x5600004c)
#define GPFCON (*(volatile unsigned long *)0x56000050)
#define GPFDAT (*(volatile unsigned long *)0x56000054)
#define GPFUDP (*(volatile unsigned long *)0x56000058)
#define GPGCON (*(volatile unsigned long *)0x56000060)
#define GPGUDP (*(volatile unsigned long *)0x56000064)
#define GPGDAT (*(volatile unsigned long *)0x56000068)
#define GPHCON (*(volatile unsigned long *)0x56000070)
#define GPHUDP (*(volatile unsigned long *)0x56000074)
#define GPHDAT (*(volatile unsigned long *)0x56000078)
#define GPJCON (*(volatile unsigned long *)0x560000d0)
#define GPJUDP (*(volatile unsigned long *)0x560000d4)
#define GPJDAT (*(volatile unsigned long *)0x560000d8)
#define GPKCON (*(volatile unsigned long *)0x560000e0)
#define GPKUDP (*(volatile unsigned long *)0x560000e4)
#define GPKDAT (*(volatile unsigned long *)0x560000e8)
#define GPLCON (*(volatile unsigned long *)0x560000f0)
#define GPLUDP (*(volatile unsigned long *)0x560000f4)
#define GPLDAT (*(volatile unsigned long *)0x560000f8)
#define GPMCON (*(volatile unsigned long *)0x56000100)
#define GPMUDP (*(volatile unsigned long *)0x56000104)
#define GPMDAT (*(volatile unsigned long *)0x56000108)
#define UTXH0 (*(volatile unsigned long *)0x50000020)
#define URXH0 (*(volatile unsigned long *)0x50000024)
#define MISCCR (*(volatile unsigned *)(0x56000080))
#ifndef _GPIO2451_H_
#define _GPIO2451_H_
#include "typedef.h"
typedef enum
{
Bit_RESET = <