Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1753928
  • 博文数量: 787
  • 博客积分: 10000
  • 博客等级: 上将
  • 技术积分: 5015
  • 用 户 组: 普通用户
  • 注册时间: 2008-09-22 15:17
文章分类

全部博文(787)

文章存档

2008年(787)

我的朋友

分类:

2008-09-25 16:05:55

编译驱动遇到的问题
在代码中有包含以下头文件:
#include
#include
#include
#include


相关代码:  
set_external_irq(HPI_INT,EXT_LOWLEVEL,GPIO_PULLUP_DIS);
if(0!=request_irq(HPI_INT,&hpi_interrupt,SA_SHIRQ,"hpi",hpi_dev)){
        printk("hpi request_irq failed...");
        goto fail_request_irq;

为什么编译的时候还会出现如下问题:
337: error: implicit declaration of function ‘set_external_irq’
337: error: ‘EXT_LOWLEVEL’ undeclared (first use in this function)
337: error: (Each undeclared identifier is reported only once
337: error: for each function it appears in.)
337: error: ‘GPIO_PULLUP_DIS’ undeclared (first use in this function)
338: error: ‘SA_SHIRQ’ undeclared (first use in this function)
338: warning: passing argument 2 of ‘request_irq’ from incompatible pointer type


还有
unsigned char a1,a2;
outb(a1,hpi_dev->hpi_vbase+0x1c);
outb(a2,hpi_dev->hpi_vbase+0x1e);

会出现如下警告:
warning: passing argument 2 of ‘outb’ makes integer from pointer without a cast

希望各位大牛能帮帮忙哈,感激不尽

--------------------next---------------------

阅读(549) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~