您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ usb_stor_msg_common函数代码示例

51自学网 2021-06-03 09:21:37
  C++
这篇教程C++ usb_stor_msg_common函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中usb_stor_msg_common函数的典型用法代码示例。如果您正苦于以下问题:C++ usb_stor_msg_common函数的具体用法?C++ usb_stor_msg_common怎么用?C++ usb_stor_msg_common使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了usb_stor_msg_common函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: usb_stor_ctrl_transfer

/* * Transfer one control message, without timeouts, but allowing early * termination.  Return codes are USB_STOR_XFER_xxx. */int usb_stor_ctrl_transfer(struct us_data *us, unsigned int pipe,		u8 request, u8 requesttype, u16 value, u16 index,		void *data, u16 size){	int result;	US_DEBUGP("%s: rq=%02x rqtype=%02x value=%04x index=%02x len=%u/n",			__FUNCTION__, request, requesttype,			value, index, size);	/* fill in the devrequest structure */	us->cr->bRequestType = requesttype;	us->cr->bRequest = request;	us->cr->wValue = cpu_to_le16(value);	us->cr->wIndex = cpu_to_le16(index);	us->cr->wLength = cpu_to_le16(size);	/* fill and submit the URB */	usb_fill_control_urb(us->current_urb, us->pusb_dev, pipe, 			 (unsigned char*) us->cr, data, size, 			 usb_stor_blocking_completion, NULL);	result = usb_stor_msg_common(us, 0);	return interpret_urb_result(us, pipe, size, result,			us->current_urb->actual_length);}
开发者ID:loginab,项目名称:esxdrivers,代码行数:30,


示例2: usb_stor_control_msg

/* * Transfer one control message, with timeouts, and allowing early * termination.  Return codes are usual -Exxx, *not* USB_STOR_XFER_xxx. */int usb_stor_control_msg(struct us_data *us, unsigned int pipe,		 u8 request, u8 requesttype, u16 value, u16 index, 		 void *data, u16 size, int timeout){	int status;	US_DEBUGP("%s: rq=%02x rqtype=%02x value=%04x index=%02x len=%u/n",			__FUNCTION__, request, requesttype,			value, index, size);	/* fill in the devrequest structure */	us->cr->bRequestType = requesttype;	us->cr->bRequest = request;	us->cr->wValue = cpu_to_le16(value);	us->cr->wIndex = cpu_to_le16(index);	us->cr->wLength = cpu_to_le16(size);	/* fill and submit the URB */	usb_fill_control_urb(us->current_urb, us->pusb_dev, pipe, 			 (unsigned char*) us->cr, data, size, 			 usb_stor_blocking_completion, NULL);	status = usb_stor_msg_common(us, timeout);	/* return the actual length of the data transferred if no error */	if (status == 0)		status = us->current_urb->actual_length;	return status;}
开发者ID:loginab,项目名称:esxdrivers,代码行数:32,


示例3: usb_stor_bulk_transfer_buf

//----- usb_stor_bulk_transfer_buf() ---------------------int usb_stor_bulk_transfer_buf(struct us_data *us, unsigned int pipe,	void *buf, unsigned int length, unsigned int *act_len){	int result;	//printk("transport --- usb_stor_bulk_transfer_buf/n");	/* fill and submit the URB */	usb_fill_bulk_urb(us->current_urb, us->pusb_dev, pipe, buf, length, usb_stor_blocking_completion, NULL);	result = usb_stor_msg_common(us, 0);	/* store the actual length of the data transferred */	if (act_len)		*act_len = us->current_urb->actual_length;	return interpret_urb_result(us, pipe, length, result, us->current_urb->actual_length);}
开发者ID:ANFS,项目名称:ANFS-kernel,代码行数:18,


示例4: usb_stor_intr_transfer

/* * Receive one interrupt buffer, without timeouts, but allowing early * termination.  Return codes are USB_STOR_XFER_xxx. * * This routine always uses us->recv_intr_pipe as the pipe and * us->ep_bInterval as the interrupt interval. */static int usb_stor_intr_transfer(struct us_data *us, void *buf,				  unsigned int length){	int result;	unsigned int pipe = us->recv_intr_pipe;	unsigned int maxp;	usb_stor_dbg(us, "xfer %u bytes/n", length);	/* calculate the max packet size */	maxp = usb_maxpacket(us->pusb_dev, pipe, usb_pipeout(pipe));	if (maxp > length)		maxp = length;	/* fill and submit the URB */	usb_fill_int_urb(us->current_urb, us->pusb_dev, pipe, buf,			maxp, usb_stor_blocking_completion, NULL,			us->ep_bInterval);	result = usb_stor_msg_common(us, 0);	return interpret_urb_result(us, pipe, length, result,			us->current_urb->actual_length);}
开发者ID:ShedrockN4,项目名称:wiliteneo,代码行数:30,



注:本文中的usb_stor_msg_common函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ usb_string函数代码示例
C++ usb_stor_dbg函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。