资源简介
可以修改下。得到很多启发。可以看下怎么工作的。
![](http://www.nz998.com/pic/42013.jpg)
代码片段和文件信息
/*
* $Id: usbkbd.cv 1.27 2001/12/27 10:37:41 vojtech Exp $
*
* Copyright (c) 1999-2001 Vojtech Pavlik
*
* USB HIDBP Keyboard support
*/
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not write to the Free Software
* Foundation Inc. 59 Temple Place Suite 330 Boston MA 02111-1307 USA
*
* Should you need to contact me the author you can do so either by
* e-mail - mail your message to or by paper mail:
* Vojtech Pavlik Simunkova 1594 Prague 8 182 00 Czech Republic
*/
#include
#include
#include
#include
#include
#include
#include
/*
* Version Information
*/
#define DRIVER_VERSION ““
#define DRIVER_AUTHOR “Vojtech Pavlik “
#define DRIVER_DESC “USB HID Boot Protocol keyboard driver“
#define DRIVER_LICENSE “GPL“
MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DEscriptION(DRIVER_DESC);
MODULE_LICENSE(DRIVER_LICENSE);
static unsigned char usb_kbd_keycode[256] = {
0 0 0 0 30 48 46 32 18 33 34 35 23 36 37 38
50 49 24 25 16 19 31 20 22 47 17 45 21 44 2 3
4 5 6 7 8 9 10 11 28 1 14 15 57 12 13 26
27 43 43 39 40 41 51 52 53 58 59 60 61 62 63 64
65 66 67 68 87 88 99 70119110102104111107109106
105108103 69 98 55 74 78 96 79 80 81 75 76 77 71
72 73 82 83 86127116117183184185186187188189190
191192193194134138130132128129131137133135136113
115114 0 0 0121 0 89 93124 92 94 95 0 0 0
122123 90 91 85 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
29 42 56125 97 54100126164166165163161115114113
150158159128136177178176142152173140
};
struct usb_kbd {
struct input_dev *dev;
struct usb_device *usbdev;
unsigned char old[8];
struct urb *irq *led;
unsigned char newleds;
char name[128];
char phys[64];
unsigned char *new;
struct usb_ctrlrequest *cr;
unsigned char *leds;
dma_addr_t cr_dma;
dma_addr_t new_dma;
dma_addr_t leds_dma;
};
static void usb_kbd_irq(struct urb *urb struct
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 25775 2007-10-11 23:39 USB键盘驱动\input.h
文件 851 2008-06-14 10:08 USB键盘驱动\Makefile
文件 10291 2007-10-11 23:38 USB键盘驱动\usbkbd.c
文件 642 2007-10-11 23:38 USB键盘驱动\usb_input.h
目录 0 2008-05-29 23:33 USB键盘驱动
----------- --------- ---------- ----- ----
37559 5
评论
共有 条评论