內核版本:2.6.32.2
錯誤:
error:implicit declaration of function 'request_irq'
error:implicit declaration of function 'free_irq'
解決方法:
#include <linux/interrupt.h>
錯誤:
error: 'IRQT_BOTHEDGE' undeclared (first use in this function)
解決方法:
#define __IRQT_FALEDGE IRQ_TYPE_EDGE_FALLING
#define __IRQT_RISEDGE IRQ_TYPE_EDGE_RISING
#define __IRQT_LOWLVL IRQ_TYPE_LEVEL_LOW
#define __IRQT_HIGHLVL IRQ_TYPE_LEVEL_HIGH
#define IRQT_NOEDGE (0)
#define IRQT_RISING (__IRQT_RISEDGE)
#define IRQT_FALLING (__IRQT_FALEDGE)
#define IRQT_BOTHEDGE (__IRQT_RISEDGE|__IRQT_FALEDGE)
#define IRQT_LOW (__IRQT_LOWLVL)
#define IRQT_HIGH (__IRQT_HIGHLVL)
#define IRQT_PROBE IRQ_TYPE_PROBE
錯誤:
error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function)
error: implicit declaration of function 'signal_pending'
error: implicit declaration of function 'schedule'
解決方法:
#include <linux/sched.h>
錯誤:
error:implicit declaration of function 's3c2410_gpio_getpin'
解決方法:
#include <linux/gpio.h>
另外還有其他的一些問題解決方法可以參考:
asm/arch/regs-gpio.h: No such file or directory:
http://www.armbbs.net/forum.php?mod=viewthread&tid=11269
class_create報錯: