Decare a IO port
volatile IOPreg *s2440IOP = (IOPreg *)IOP_BASE;
IOPreg and IOP_BASE defined here:s2440.h
#define IOP_BASE 0xB1600000 // 0x56000000
typedef struct {
unsigned int rGPACON; // 00
unsigned int rGPADAT;
unsigned int rPAD1[2];
unsigned int rGPBCON; // 10
unsigned int rGPBDAT;
unsigned int rGPBUP;
unsigned int rPAD2;
unsigned int rGPCCON; // 20
unsigned int rGPCDAT;
unsigned int rGPCUP;
unsigned int rPAD3;
unsigned int rGPDCON; // 30
unsigned int rGPDDAT;
unsigned int rGPDUP;
unsigned int rPAD4;
unsigned int rGPECON; // 40
unsigned int rGPEDAT;
unsigned int rGPEUP;
unsigned int rPAD5;
unsigned int rGPFCON; // 50
unsigned int rGPFDAT;
unsigned int rGPFUP;
unsigned int rPAD6;
unsigned int rGPGCON; // 60
unsigned int rGPGDAT;
unsigned int rGPGUP;
unsigned int rPAD7;
unsigned int rGPHCON; // 70
unsigned int rGPHDAT;
unsigned int rGPHUP;
unsigned int rPAD8;
unsigned int rMISCCR; // 80
unsigned int rDCKCON;
unsigned int rEXTINT0;
unsigned int rEXTINT1;
unsigned int rEXTINT2; // 90
unsigned int rEINTFLT0;
unsigned int rEINTFLT1;
unsigned int rEINTFLT2;
unsigned int rEINTFLT3; // A0
unsigned int rEINTMASK;
unsigned int rEINTPEND;
unsigned int rGSTATUS0; // AC
unsigned int rGSTATUS1; // B0
unsigned int rGSTATUS2; // B4 ;;; SHL
unsigned int rGSTATUS3; // B8
unsigned int rGSTATUS4; // BC
unsigned int rFLTOUT; // C0
unsigned int rDSC0;
unsigned int rDSC1;
unsigned int rMSLCON;
unsigned int rGPJCON; // D0
unsigned int rGPJDAT;
unsigned int rGPJUP;
unsigned int rPAD9;
}IOPreg;
Operate the IO port like this:
s2440IOP->rGPBCON = (s2440IOP->rGPBCON &~(3 << 10)) | (1<< 10);
s2440IOP->rGPBDAT=s2440IOP->rGPBDAT&~(0x1<<5);
上一篇:uboot在s3c2440上的移植(5)
下一篇:S3C2440启动程序运行过程
推荐阅读最新更新时间:2024-11-12 16:45
设计资源 培训 开发板 精华推荐
- 基于TI cc2530的ZigBee无线自组网的LED节能灯控制系统
- TI答疑:LED功能介绍及LED驱动设计注意事项
- EEWORLD大学堂----解读64位ARMv8架构:Cortex-A57 处理器
- 关于直流数控电源的设计
- e络盟限时福利|《e选》产品低至5折起,下单百元返现中!
- MSP430芯片SPI的驱动程序,存储器用的芯片AT45DB161D 编译时找不到头文件include "AT45DB161D.h"
- 深夜放块板~有感兴趣的么~
- LED技术全攻略-工程师必备手册
- 转手一套dsp 6455 dsp starter kit
- 求,CeAllocAsynchronousBuffer的用法,同步问题??