Linux2.6.24内核在开发板支持usb鼠标的实现


昨天下午,对以前移植的Linux2.6.24内核不能检测USB鼠标进行了修改menuconfig,新内核的USB鼠标在内核drivers/hid/usbhid目录下,文件名:usbmouse.c,如果你需要对鼠标驱动修改就看这个文件,我的开发板暂时不需要对鼠标驱动定制特别的操作,于是在保证2410配置文件默认的情况下,make menuconfig然后选择 Device Drivers -->进入 选中HID Devices ---> 进入 USB HID Boot Protocol drivers ---> 看到 USB HIDBP Mouse (simple Boot) support,选中它,如果没有出现该项说明你在上边的步骤中选中了其他多余项,可以根据打开的kconfig文件中看到。

menu "USB HID Boot Protocol drivers"
depends on USB!=n && USB_HID!=y
config USB_KBD
tristate "USB HIDBP Keyboard (simple Boot) support"
depends on USB && INPUT
---help---
Say Y here only if you are absolutely sure that you don't want
to use the generic HID driver for your USB keyboard and prefer
to use the keyboard in its limited Boot Protocol mode instead.
This is almost certainly not what you want. This is mostly
useful for embedded applications or simple keyboards.
To compile this driver as a module, choose M here: the
module will be called usbkbd.
If even remotely unsure, say N.
config USB_MOUSE
tristate "USB HIDBP Mouse (simple Boot) support"
depends on USB && INPUT
---help---
Say Y here only if you are absolutely sure that you don't want
to use the generic HID driver for your USB mouse and prefer
to use the mouse in its limited Boot Protocol mode instead.
This is almost certainly not what you want. This is mostly
useful for embedded applications or simple mice.
To compile this driver as a module, choose M here: the
module will be called usbmouse.
If even remotely unsure, say N.
endmenu

选中以后,make zImage好了,烧录开发板,重启,可以看到检测到鼠标驱动了,原来的报出的错误没有了。

相关内容