- 论坛徽章:
- 0
|
#define GPFCON (*(volatile unsigned *)0x56000050) //Port F control
#define GPFDAT (*(volatile unsigned *)0x56000054) //Port F data
#define GPFUP (*(volatile unsigned *)0x5600005 //Pull-up control F
...
这些定义实地址:em11:
问题是你的linux跑起来是不是实地址访问?或者arm9的mmu打开了?
映射一下啊..:em12:
typedef struct _tLedControl
{
volatile unsigned int* gpfcon;
volatile unsigned int* gpfdat;
volatile unsigned int* gpfup;
}LedControl, *PLedControl;
PLedControl lc = ioremap(GPFCON, 12);
用lc去访问这三个寄存器地址.
[ 本帖最后由 readkernel 于 2009-12-14 15:06 编辑 ] |
|