亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? dummy_audio.c

?? host usb 主設備程序 支持sd卡 mouse keyboard 的最單單的驅動程序 gcc編譯
?? C
?? 第 1 頁 / 共 3 頁
字號:
	.bNumConfigurations =	2,};struct usb_cs_as_general_descriptor {	__u8  bLength;	__u8  bDescriptorType;	__u8  bDescriptorSubType;	__u8  bTerminalLink;	__u8  bDelay;	__u16  wFormatTag;} __attribute__ ((packed));struct usb_cs_as_format_descriptor {	__u8  bLength;	__u8  bDescriptorType;	__u8  bDescriptorSubType;	__u8  bFormatType;	__u8  bNrChannels;	__u8  bSubframeSize;	__u8  bBitResolution;	__u8  bSamfreqType;	__u8  tLowerSamFreq[3];	__u8  tUpperSamFreq[3];} __attribute__ ((packed));static const struct usb_interface_descriptorz_audio_control_if_desc = {	.bLength =		sizeof z_audio_control_if_desc,	.bDescriptorType =	USB_DT_INTERFACE,	.bInterfaceNumber = 0,	.bAlternateSetting = 0,	.bNumEndpoints = 0,	.bInterfaceClass = USB_CLASS_AUDIO,	.bInterfaceSubClass = 0x1,	.bInterfaceProtocol = 0,	.iInterface = 0,};static const struct usb_interface_descriptorz_audio_if_desc = {	.bLength =		sizeof z_audio_if_desc,	.bDescriptorType =	USB_DT_INTERFACE,	.bInterfaceNumber = 1,	.bAlternateSetting = 0,	.bNumEndpoints = 0,	.bInterfaceClass = USB_CLASS_AUDIO,	.bInterfaceSubClass = 0x2,	.bInterfaceProtocol = 0,	.iInterface = 0,};static const struct usb_interface_descriptorz_audio_if_desc2 = {	.bLength =		sizeof z_audio_if_desc,	.bDescriptorType =	USB_DT_INTERFACE,	.bInterfaceNumber = 1,	.bAlternateSetting = 1,	.bNumEndpoints = 1,	.bInterfaceClass = USB_CLASS_AUDIO,	.bInterfaceSubClass = 0x2,	.bInterfaceProtocol = 0,	.iInterface = 0,};static const struct usb_cs_as_general_descriptorz_audio_cs_as_if_desc = {	.bLength = 7,	.bDescriptorType = 0x24,		.bDescriptorSubType = 0x01,	.bTerminalLink = 0x01,	.bDelay = 0x0,	.wFormatTag = __constant_cpu_to_le16 (0x0001)};static const struct usb_cs_as_format_descriptor z_audio_cs_as_format_desc = {	.bLength = 0xe,	.bDescriptorType = 0x24,		.bDescriptorSubType = 2,	.bFormatType = 1,	.bNrChannels = 1,	.bSubframeSize = 1,	.bBitResolution = 8,	.bSamfreqType = 0,	.tLowerSamFreq = {0x7e, 0x13, 0x00},	.tUpperSamFreq = {0xe2, 0xd6, 0x00},};static const struct usb_endpoint_descriptor z_iso_ep = {	.bLength = 0x09,	.bDescriptorType = 0x05,	.bEndpointAddress = 0x04,	.bmAttributes = 0x09,	.wMaxPacketSize = 0x0038,	.bInterval = 0x01,	.bRefresh = 0x00,	.bSynchAddress = 0x00,	};static char z_iso_ep2[] = {0x07, 0x25, 0x01, 0x00, 0x02, 0x00, 0x02};// 9 bytesstatic char z_ac_interface_header_desc[] = { 0x09, 0x24, 0x01, 0x00, 0x01, 0x2b, 0x00, 0x01, 0x01 };// 12 bytesstatic char z_0[] = {0x0c, 0x24, 0x02, 0x01, 0x01, 0x01, 0x00, 0x02, 		     0x03, 0x00, 0x00, 0x00};// 13 bytesstatic char z_1[] = {0x0d, 0x24, 0x06, 0x02, 0x01, 0x02, 0x15, 0x00, 		     0x02, 0x00, 0x02, 0x00, 0x00};// 9 bytesstatic char z_2[] = {0x09, 0x24, 0x03, 0x03, 0x01, 0x03, 0x00, 0x02, 		     0x00};static char za_0[] = {0x09, 0x04, 0x01, 0x02, 0x01, 0x01, 0x02, 0x00, 		      0x00};static char za_1[] = {0x07, 0x24, 0x01, 0x01, 0x00, 0x01, 0x00};static char za_2[] = {0x0e, 0x24, 0x02, 0x01, 0x02, 0x01, 0x08, 0x00, 		      0x7e, 0x13, 0x00, 0xe2, 0xd6, 0x00};static char za_3[] = {0x09, 0x05, 0x04, 0x09, 0x70, 0x00, 0x01, 0x00,		      0x00};static char za_4[] = {0x07, 0x25, 0x01, 0x00, 0x02, 0x00, 0x02};static char za_5[] = {0x09, 0x04, 0x01, 0x03, 0x01, 0x01, 0x02, 0x00,		      0x00};static char za_6[] = {0x07, 0x24, 0x01, 0x01, 0x00, 0x01, 0x00};static char za_7[] = {0x0e, 0x24, 0x02, 0x01, 0x01, 0x02, 0x10, 0x00,		      0x7e, 0x13, 0x00, 0xe2, 0xd6, 0x00};static char za_8[] = {0x09, 0x05, 0x04, 0x09, 0x70, 0x00, 0x01, 0x00,		      0x00};static char za_9[] = {0x07, 0x25, 0x01, 0x00, 0x02, 0x00, 0x02};static char za_10[] = {0x09, 0x04, 0x01, 0x04, 0x01, 0x01, 0x02, 0x00,		       0x00};static char za_11[] = {0x07, 0x24, 0x01, 0x01, 0x00, 0x01, 0x00};static char za_12[] = {0x0e, 0x24, 0x02, 0x01, 0x02, 0x02, 0x10, 0x00,		       0x73, 0x13, 0x00, 0xe2, 0xd6, 0x00};static char za_13[] = {0x09, 0x05, 0x04, 0x09, 0xe0, 0x00, 0x01, 0x00,		       0x00};static char za_14[] = {0x07, 0x25, 0x01, 0x00, 0x02, 0x00, 0x02};static char za_15[] = {0x09, 0x04, 0x01, 0x05, 0x01, 0x01, 0x02, 0x00, 		       0x00};static char za_16[] = {0x07, 0x24, 0x01, 0x01, 0x00, 0x01, 0x00};static char za_17[] = {0x0e, 0x24, 0x02, 0x01, 0x01, 0x03, 0x14, 0x00, 		       0x7e, 0x13, 0x00, 0xe2, 0xd6, 0x00};static char za_18[] = {0x09, 0x05, 0x04, 0x09, 0xa8, 0x00, 0x01, 0x00,		       0x00};static char za_19[] = {0x07, 0x25, 0x01, 0x00, 0x02, 0x00, 0x02};static char za_20[] = {0x09, 0x04, 0x01, 0x06, 0x01, 0x01, 0x02, 0x00,		       0x00};static char za_21[] = {0x07, 0x24, 0x01, 0x01, 0x00, 0x01, 0x00};static char za_22[] = {0x0e, 0x24, 0x02, 0x01, 0x02, 0x03, 0x14, 0x00, 		       0x7e, 0x13, 0x00, 0xe2, 0xd6, 0x00};static char za_23[] = {0x09, 0x05, 0x04, 0x09, 0x50, 0x01, 0x01, 0x00,		       0x00};static char za_24[] = {0x07, 0x25, 0x01, 0x00, 0x02, 0x00, 0x02};static const struct usb_descriptor_header *z_function [] = {	(struct usb_descriptor_header *) &z_audio_control_if_desc,	(struct usb_descriptor_header *) &z_ac_interface_header_desc,	(struct usb_descriptor_header *) &z_0,	(struct usb_descriptor_header *) &z_1,	(struct usb_descriptor_header *) &z_2,	(struct usb_descriptor_header *) &z_audio_if_desc,	(struct usb_descriptor_header *) &z_audio_if_desc2,	(struct usb_descriptor_header *) &z_audio_cs_as_if_desc,	(struct usb_descriptor_header *) &z_audio_cs_as_format_desc,	(struct usb_descriptor_header *) &z_iso_ep,	(struct usb_descriptor_header *) &z_iso_ep2,	(struct usb_descriptor_header *) &za_0,	(struct usb_descriptor_header *) &za_1,	(struct usb_descriptor_header *) &za_2,	(struct usb_descriptor_header *) &za_3,	(struct usb_descriptor_header *) &za_4,	(struct usb_descriptor_header *) &za_5,	(struct usb_descriptor_header *) &za_6,	(struct usb_descriptor_header *) &za_7,	(struct usb_descriptor_header *) &za_8,	(struct usb_descriptor_header *) &za_9,	(struct usb_descriptor_header *) &za_10,	(struct usb_descriptor_header *) &za_11,	(struct usb_descriptor_header *) &za_12,	(struct usb_descriptor_header *) &za_13,	(struct usb_descriptor_header *) &za_14,	(struct usb_descriptor_header *) &za_15,	(struct usb_descriptor_header *) &za_16,	(struct usb_descriptor_header *) &za_17,	(struct usb_descriptor_header *) &za_18,	(struct usb_descriptor_header *) &za_19,	(struct usb_descriptor_header *) &za_20,	(struct usb_descriptor_header *) &za_21,	(struct usb_descriptor_header *) &za_22,	(struct usb_descriptor_header *) &za_23,	(struct usb_descriptor_header *) &za_24,	NULL,};/* maxpacket and other transfer characteristics vary by speed. */#define ep_desc(g,hs,fs) (((g)->speed==USB_SPEED_HIGH)?(hs):(fs))#else/* if there's no high speed support, maxpacket doesn't change. */#define ep_desc(g,hs,fs) fs#endif	/* !CONFIG_USB_GADGET_DUALSPEED */static char				manufacturer [40];//static char				serial [40];static char				serial [] = "Ser 00 em";/* static strings, in UTF-8 */static struct usb_string		strings [] = {	{ STRING_MANUFACTURER, manufacturer, },	{ STRING_PRODUCT, longname, },	{ STRING_SERIAL, serial, },	{ STRING_LOOPBACK, loopback, },	{ STRING_SOURCE_SINK, source_sink, },	{  }			/* end of list */};static struct usb_gadget_strings	stringtab = {	.language	= 0x0409,	/* en-us */	.strings	= strings,};/* * config descriptors are also handcrafted.  these must agree with code * that sets configurations, and with code managing interfaces and their * altsettings.  other complexity may come from: * *  - high speed support, including "other speed config" rules *  - multiple configurations *  - interfaces with alternate settings *  - embedded class or vendor-specific descriptors * * this handles high speed, and has a second config that could as easily * have been an alternate interface setting (on most hardware). * * NOTE:  to demonstrate (and test) more USB capabilities, this driver * should include an altsetting to test interrupt transfers, including * high bandwidth modes at high speed.  (Maybe work like Intel's test * device?) */static intconfig_buf (struct usb_gadget *gadget, u8 *buf, u8 type, unsigned index){	int len;	const struct usb_descriptor_header **function;		function = z_function;	len = usb_gadget_config_buf (&z_config, buf, USB_BUFSIZ, function);	if (len < 0)		return len;	((struct usb_config_descriptor *) buf)->bDescriptorType = type;	return len;}/*-------------------------------------------------------------------------*/static struct usb_request *alloc_ep_req (struct usb_ep *ep, unsigned length){	struct usb_request	*req;	req = usb_ep_alloc_request (ep, GFP_ATOMIC);	if (req) {		req->length = length;		req->buf = usb_ep_alloc_buffer (ep, length,				&req->dma, GFP_ATOMIC);		if (!req->buf) {			usb_ep_free_request (ep, req);			req = NULL;		}	}	return req;}static void free_ep_req (struct usb_ep *ep, struct usb_request *req){	if (req->buf)		usb_ep_free_buffer (ep, req->buf, req->dma, req->length);	usb_ep_free_request (ep, req);}/*-------------------------------------------------------------------------*//* optionally require specific source/sink data patterns  */static intcheck_read_data (	struct zero_dev		*dev,	struct usb_ep		*ep,	struct usb_request	*req){	unsigned	i;	u8		*buf = req->buf;	for (i = 0; i < req->actual; i++, buf++) {		switch (pattern) {		/* all-zeroes has no synchronization issues */		case 0:			if (*buf == 0)				continue;			break;		/* mod63 stays in sync with short-terminated transfers,		 * or otherwise when host and gadget agree on how large		 * each usb transfer request should be.  resync is done		 * with set_interface or set_config.		 */		case 1:			if (*buf == (u8)(i % 63))				continue;			break;		}		ERROR (dev, "bad OUT byte, buf [%d] = %d\n", i, *buf);		usb_ep_set_halt (ep);		return -EINVAL;	}	return 0;}/*-------------------------------------------------------------------------*/static void zero_reset_config (struct zero_dev *dev){	if (dev->config == 0)		return;	DBG (dev, "reset config\n");	/* just disable endpoints, forcing completion of pending i/o.	 * all our completion handlers free their requests in this case.	 */	if (dev->in_ep) {		usb_ep_disable (dev->in_ep);		dev->in_ep = NULL;	}	if (dev->out_ep) {		usb_ep_disable (dev->out_ep);		dev->out_ep = NULL;	}	dev->config = 0;	del_timer (&dev->resume);}#define _write(f, buf, sz) (f->f_op->write(f, buf, sz, &f->f_pos))static void zero_isoc_complete (struct usb_ep *ep, struct usb_request *req){	struct zero_dev	*dev = ep->driver_data;	int		status = req->status;	int i, j;	switch (status) {	case 0: 			/* normal completion? */		//printk ("\nzero ---------------> isoc normal completion %d bytes\n", req->actual);		for (i=0, j=rbuf_start; i<req->actual; i++) {			//printk ("%02x ", ((__u8*)req->buf)[i]);			rbuf[j] = ((__u8*)req->buf)[i];			j++;			if (j >= RBUF_LEN) j=0;		}		rbuf_start = j;		//printk ("\n\n");		if (rbuf_len < RBUF_LEN) {			rbuf_len += req->actual;			if (rbuf_len > RBUF_LEN) {				rbuf_len = RBUF_LEN;			}		}		break;	/* this endpoint is normally active while we're configured */	case -ECONNABORTED: 		/* hardware forced ep reset */	case -ECONNRESET:		/* request dequeued */	case -ESHUTDOWN:		/* disconnect from host */		VDBG (dev, "%s gone (%d), %d/%d\n", ep->name, status,				req->actual, req->length);		if (ep == dev->out_ep)			check_read_data (dev, ep, req);		free_ep_req (ep, req);		return;	case -EOVERFLOW:		/* buffer overrun on read means that					 * we didn't provide a big enough					 * buffer.					 */	default:#if 1		DBG (dev, "%s complete --> %d, %d/%d\n", ep->name,				status, req->actual, req->length);#endif	case -EREMOTEIO:		/* short read */		break;	}	status = usb_ep_queue (ep, req, GFP_ATOMIC);	if (status) {		ERROR (dev, "kill %s:  resubmit %d bytes --> %d\n",				ep->name, req->length, status);		usb_ep_set_halt (ep);		/* FIXME recover later ... somehow */	}}static struct usb_request *zero_start_isoc_ep (struct usb_ep *ep, int gfp_flags){	struct usb_request	*req;	int			status;	req = alloc_ep_req (ep, 512);	if (!req)		return NULL;	req->complete = zero_isoc_complete;	status = usb_ep_queue (ep, req, gfp_flags);	if (status) {		struct zero_dev	*dev = ep->driver_data;		ERROR (dev, "start %s --> %d\n", ep->name, status);		free_ep_req (ep, req);		req = NULL;	}	return req;}/* change our operational config.  this code must agree with the code * that returns config descriptors, and altsetting code. * * it's also responsible for power management interactions. some * configurations might not work with our current power sources. * * note that some device controller hardware will constrain what this * code can do, perhaps by disallowing more than one configuration or * by limiting configuration choices (like the pxa2xx). */static intzero_set_config (struct zero_dev *dev, unsigned number, int gfp_flags){	int			result = 0;	struct usb_gadget	*gadget = dev->gadget;	const struct usb_endpoint_descriptor	*d;	struct usb_ep		*ep;	if (number == dev->config)		return 0;	zero_reset_config (dev);	gadget_for_each_ep (ep, gadget) {		if (strcmp (ep->name, "ep4") == 0) {			d = (struct usb_endpoint_descripter *)&za_23; // isoc ep desc for audio i/f alt setting 6			result = usb_ep_enable (ep, d);			if (result == 0) {				ep->driver_data = dev;				dev->in_ep = ep;				if (zero_start_isoc_ep (ep, gfp_flags) != 0) {					dev->in_ep = ep;					continue;				}				usb_ep_disable (ep);				result = -EIO;			}		}	}	dev->config = number;	return result;}/*-------------------------------------------------------------------------*/static void zero_setup_complete (struct usb_ep *ep, struct usb_request *req){	if (req->status || req->actual != req->length)		DBG ((struct zero_dev *) ep->driver_data,				"setup complete --> %d, %d/%d\n",

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品影音先锋| 日韩欧美在线123| 91麻豆精品国产91久久久使用方法 | 国产又黄又大久久| 欧美在线观看视频一区二区三区| 久久综合九色综合97_久久久| 亚洲国产精品一区二区www在线| 成人少妇影院yyyy| 精品国精品自拍自在线| 亚洲成人午夜电影| 色呦呦国产精品| 日韩理论在线观看| 成人av影视在线观看| 精品美女一区二区| 日韩精品视频网| 欧美日韩国产在线播放网站| 日韩美女久久久| 成人av一区二区三区| 国产三级久久久| 国产成人综合自拍| 久久精品免费在线观看| 久久不见久久见免费视频1| 欧美日本韩国一区| 日韩不卡免费视频| 日韩欧美中文字幕制服| 亚洲丶国产丶欧美一区二区三区| 色成人在线视频| 亚洲视频一区二区在线| 91社区在线播放| 亚洲男人的天堂av| 91福利社在线观看| 午夜天堂影视香蕉久久| 91精品国产一区二区三区蜜臀| 日韩福利电影在线| 日韩午夜三级在线| 久久草av在线| 欧美激情一区二区三区在线| 成人爱爱电影网址| 亚洲欧美一区二区在线观看| 一本到一区二区三区| 亚洲国产一区视频| 欧美一级生活片| 激情亚洲综合在线| 欧美激情一区二区三区不卡| 成人精品免费看| 亚洲黄网站在线观看| 欧美日韩成人高清| 另类调教123区| 日本一区二区综合亚洲| 99re66热这里只有精品3直播| 亚洲人成网站在线| 日韩亚洲欧美在线| 国产高清不卡一区二区| 一区免费观看视频| 欧美日韩精品欧美日韩精品| 国内精品视频666| 中文字幕人成不卡一区| 717成人午夜免费福利电影| 国产精品综合视频| 亚洲综合色婷婷| 欧美tk丨vk视频| 色综合天天综合色综合av | 全国精品久久少妇| 国产精品污网站| 91国产免费观看| 国产剧情av麻豆香蕉精品| 亚洲丝袜自拍清纯另类| 7777精品伊人久久久大香线蕉完整版 | 欧美日韩一区二区在线视频| 另类小说图片综合网| 亚洲欧洲日韩女同| 日韩三级视频在线看| 91在线精品一区二区| 天天综合天天综合色| 欧美激情艳妇裸体舞| 欧美福利一区二区| www.欧美精品一二区| 奇米888四色在线精品| 亚洲欧美一区二区视频| 欧美tk丨vk视频| 欧美日韩国产一区| 不卡的看片网站| 狠狠色丁香婷婷综合久久片| 午夜欧美大尺度福利影院在线看| 久久久综合视频| 欧美一区二区三区不卡| 欧美在线观看一二区| 91美女片黄在线观看91美女| 国产精品中文字幕欧美| 久久97超碰国产精品超碰| 亚洲国产欧美在线| 亚洲三级在线看| 国产精品日韩成人| 久久久久99精品一区| 精品乱人伦一区二区三区| 欧美日韩亚洲综合在线 欧美亚洲特黄一级| 国产精品亚洲а∨天堂免在线| 蜜桃视频免费观看一区| 午夜免费欧美电影| 亚洲国产日韩一区二区| 亚洲国产精品一区二区久久| 亚洲精品国产第一综合99久久 | 久久亚洲精精品中文字幕早川悠里| 在线视频综合导航| 91网站在线观看视频| 成人在线视频首页| 国产成人精品影视| 国产精品影视在线观看| 国产一区二区三区观看| 国产一区二区三区香蕉 | 久久午夜老司机| 久久无码av三级| 久久亚洲精品国产精品紫薇| 久久久99精品久久| 国产精品沙发午睡系列990531| 欧美极品少妇xxxxⅹ高跟鞋| 国产农村妇女毛片精品久久麻豆 | 91年精品国产| 色欧美日韩亚洲| 欧美色图12p| 欧美日韩不卡一区| 3d成人动漫网站| 欧美疯狂做受xxxx富婆| 91精品一区二区三区在线观看| 日韩精品中文字幕一区 | 亚洲男人的天堂av| 亚洲高清一区二区三区| 日本成人在线视频网站| 极品少妇一区二区| 成人午夜视频在线| 色悠悠久久综合| 911精品国产一区二区在线| 欧美电影免费观看高清完整版在 | 亚洲图片欧美视频| 日韩av午夜在线观看| 国产精品一区二区在线播放| 91免费精品国自产拍在线不卡| 欧美在线你懂的| 欧美精品一区二区三区久久久 | 一本大道久久a久久精二百| 欧美日韩中文一区| 精品精品国产高清一毛片一天堂| 国产亚洲成年网址在线观看| 亚洲欧美日韩在线不卡| 日韩av在线免费观看不卡| 成人午夜av电影| 日韩一区二区电影| 国产精品久久久久久久蜜臀| 亚洲国产视频a| 福利一区二区在线观看| 欧美日本视频在线| 中国av一区二区三区| 婷婷综合五月天| 国产成人自拍网| 欧美日韩一区二区电影| 久久久99免费| 日韩精彩视频在线观看| 91在线观看美女| 日韩欧美国产1| 亚洲夂夂婷婷色拍ww47| 国产成人aaa| 欧美一区二区三区色| 亚洲免费观看高清完整版在线观看 | 成人午夜av在线| 欧美精品色一区二区三区| |精品福利一区二区三区| 国产一区三区三区| 777久久久精品| 亚洲美女一区二区三区| 国产一二三精品| 日韩一区二区在线观看视频播放| 亚洲精品精品亚洲| 99久久99久久久精品齐齐| 日韩欧美的一区| 日本成人中文字幕| 欧美唯美清纯偷拍| 自拍视频在线观看一区二区| 国产精品99久久不卡二区| 在线综合视频播放| 亚洲一区二区视频在线观看| 99久久精品一区二区| 国产日产精品一区| 精品一区免费av| 日韩一区二区不卡| 青青草国产成人99久久| 欧美日韩免费一区二区三区| 亚洲最新在线观看| 91视视频在线直接观看在线看网页在线看| 亚洲精品一区二区三区99| 久久精品国产久精国产爱| 欧美一区二区三区在线视频| 亚洲va韩国va欧美va精品| 在线欧美日韩精品| 亚洲综合小说图片| 欧美日韩精品电影| 天天影视色香欲综合网老头| 欧美电影在线免费观看| 天天综合网天天综合色| 欧美一区二区三区色| 精品亚洲国内自在自线福利|