这些小活动你都参加了吗?快来围观一下吧!>>
电子产品世界 » 论坛首页 » 嵌入式开发 » MCU » 高手请进:s3c2410串口中寄存器定义的问题

共3条 1/1 1 跳转至

高手请进:s3c2410串口中寄存器定义的问题

菜鸟
2007-05-22 02:13:04     打赏

刚开始学arm,看2410addr.h文件时有些不明白,请教各位下:

#ifdef __BIG_ENDIAN
#define rUTXH0 (*(volatile unsigned char *)0x50000023) //UART 0 Transmission Hold
#define rURXH0 (*(volatile unsigned char *)0x50000027) //UART 0 Receive buffer
#define rUTXH1 (*(volatile unsigned char *)0x50004023) //UART 1 Transmission Hold
#define rURXH1 (*(volatile unsigned char *)0x50004027) //UART 1 Receive buffer
#define rUTXH2 (*(volatile unsigned char *)0x50008023) //UART 2 Transmission Hold
#define rURXH2 (*(volatile unsigned char *)0x50008027) //UART 2 Receive buffer

#define WrUTXH0(ch) (*(volatile unsigned char *)0x50000023)=(unsigned char)(ch) //写操作
#define RdURXH0() (*(volatile unsigned char *)0x50000027) //读操作
#define WrUTXH1(ch) (*(volatile unsigned char *)0x50004023)=(unsigned char)(ch)
#define RdURXH1() (*(volatile unsigned char *)0x50004027)
#define WrUTXH2(ch) (*(volatile unsigned char *)0x50008023)=(unsigned char)(ch)
#define RdURXH2() (*(volatile unsigned char *)0x50008027)

#define UTXH0 (0x50000020+3) //Byte_access address by DMA
#define URXH0 (0x50000024+3)
#define UTXH1 (0x50004020+3)
#define URXH1 (0x50004024+3)
#define UTXH2 (0x50008020+3)
#define URXH2 (0x50008024+3)

此上为大端模式串口的寄存器. #define UTXH0 (0x50000020+3) //Byte_access address by DMA.这句,我不理解是干什么的,

第一没有采用和前面类似的volatile定义,

第二地址和上面是重复的.

第三,不知道Byte_access address by DMA是什么意思?

谢谢指点!




关键词: 高手     请进     s3c2410     口中     寄存器     定义         

菜鸟
2007-05-22 03:18:00     打赏
2楼

想知道为什么UTXH0要这么定义,为啥不去看看它是如何被使用的呢。


菜鸟
2007-05-22 04:11:00     打赏
3楼
谢谢版主的回复,我开始也这么想的,可是在我看的程序里面没有使用到这个寄存器的标号.

共3条 1/1 1 跳转至

回复

匿名不能发帖!请先 [ 登陆 注册 ]