資源簡(jiǎn)介
monihid.c
代碼片段和文件信息
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?“ch9.h“////
#include??
#include?“zebra_mouse.h“
#include?“gadget_chips.h“
#include?“usbstring.c“
#include?“config.c“
#include?“epautoconf.c“
/*...........................................................*/
/*...........................................................*/
#define?DRIVER_DESC “multitouch“
#define?DRIVER_VERSION “2012.02.10“
static?const?char?shortname?[]?=?“multitouch“;
static?const?char?driver_desc?[]?=?DRIVER_DESC;
static?dev_t?zebra_mouse_devno;
int?is_connect?=?0;
static?struct?class?*usb_gadget_class;
/*...........................................................*/
static?ushort?idVendor;
static?ushort?idProduct;
static?ushort?bcdDevice;
static?char?*iManufacturer;
static?char?*iProduct;
static?char?*?iSerialNum;
static?char?*?iPNPstring;
/*...........................................................*/
struct?zebra_mouse_dev?{
spinlock_t lock; /*?lock?this?structure?*/
/*?lock?buffer?lists?during?read/write?calls?*/
spinlock_t lock_zebra_mouse_io;
struct?usb_gadget *gadget;
struct?usb_request *req; /*?for?control?responses?*/
u8 config;
s8 interface;
struct?usb_ep *in_ep;
const?struct?usb_endpoint_descriptor?*in;//進(jìn)入的端點(diǎn)描述符
/*?wait?until?there?is?data?to?be?read.?*/
wait_queue_head_t rx_wait;
struct?list_head tx_reqs; /*?List?of?free?TX?structs???????*/
struct?list_head tx_reqs_active;?/*?List?of?Active?TX?xfers???????*/
/*?Wait?until?there?are?write?buffers?available?to?use.?*/
wait_queue_head_t tx_wait;
/*?Wait?until?all?write?buffers?have?been?sent.?*/
wait_queue_head_t tx_flush_wait;
struct?usb_request *current_rx_req;
size_t current_rx_bytes;
u8 *current_rx_buf;
u8 zebra_mouse_status;
u8 reset_zebra_mouse;
struct?cdev zebra_mouse_cdev;//字符設(shè)備
struct?device *pdev;//?????
u8 zebra_mouse_cdev_open;//?????
wait_queue_head_t wait;
};
static?struct?zebra_mouse_dev?zebra_mouse;
/*...........................................................*/
static?struct?usb_endpoint_descriptor?hs_ep_out_desc?=?{
.bLength?= USB_DT_ENDPOINT_SIZE//0x07
.bDescriptorType?= USB_DT_ENDPOINT//0x05
.bEndpointAddress?= 0x01
.bmAttributes?= USB_ENDPOINT_XFER_BULK//0x02
.wMaxPacketSize?= cpu_to_le16(512)
}
評(píng)論
共有 條評(píng)論