jackadandy
驱动牛犊
驱动牛犊
  • 注册日期2004-03-04
  • 最后登录2016-01-09
  • 粉丝1
  • 关注1
  • 积分5分
  • 威望30点
  • 贡献值0点
  • 好评度19点
  • 原创分0分
  • 专家分0分
阅读:786回复:0

写驱动时,设备的寄存器地址在哪设定的?

楼主#
更多 发布于:2004-03-04 16:03
在linux下编写驱动,假设时模数转换的驱动,在
static int Adc0809Read(。。。。。)
{
char Value;
*(unsigned long *)0xfc000000 = 0x0;
Value = *(unsigned char *)0xfc000000;
printk("value : 0x%02x\n", Value);
delay(2000);
copy_to_user(buf, &Value, sizeof Value);
。。。。。。
},中0xfc000000是谁的地址,在哪设定的?
int Adc0809Init(void)
{
int rc;
long val;
unsigned char status;

Ready = 0;

*(unsigned long *)0xff000180 |= 0x00120000;

。。。。。。。。。。

*(unsigned long *)0xfc000000 = 0x0;
printk("0x20000000 : 0x%08x\n", *(unsigned long *)0xfc000000);
delay(10000);
。。。。。。。。。。。

中,0xff000180应该是数模芯片的地址吧,在哪找得到啊,是不是在某个头文件里?
多谢!?!!!

游客

返回顶部