S3C2451_GPIO初始化、置位、读取源码

本文分享了博主使用S3C2451开发板进行GPIO初始化、置位和读取的源码,适用于ARM平台,旨在促进学习和交流。
摘要由CSDN通过智能技术生成

以下是博主自己写的基于三星的S3C2451mini开发板的GPIO编程代码。 供大家参考学习

/*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))
/*GPIO2451.h*/
#ifndef _GPIO2451_H_
#define _GPIO2451_H_

#include "typedef.h"

typedef enum
{
    Bit_RESET = <
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

zxnsirius

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值