/* initialize the urb properly */
usb_fill_bulk_urb(urb, dev->udev,
usb_sndbulkpipe(dev->udev, dev->bulk_out_endpointAddr),
buf, count, lcd_write_bulk_callback, dev);
urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
//如果想传输0字节的包,那么需要加入URB_ZERO_PACKET
//变为urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP | URB_ZERO_PACKET;
/* send the data out the bulk port */
retval = usb_submit_urb(urb, GFP_KERNEL);
阅读(3942) | 评论(0) | 转发(0) |