Linux USB上位机协议

1电脑端库

Universal USB Device Driver for Windows - USB Development Kit for Windows

2.linux端

diff --git a/drivers/usb/gadget/function/u_serial.c b/drivers/usb/gadget/function/u_serial.c
index 6ee76af9..b793ab09 100644
--- a/drivers/usb/gadget/function/u_serial.c
+++ b/drivers/usb/gadget/function/u_serial.c
@@ -401,7 +401,7 @@ __acquires(&port->port_lock)
 
 		req->length = len;
 		list_del(&req->list);
-		req->zero = (gs_buf_data_avail(&port->port_write_buf) == 0);
+		req->zero = 0;//(gs_buf_data_avail(&port->port_write_buf) == 0);//jarvis very important
 
 		printk(KERN_ERR "ttyGS%d: tx len=%d, 0x%02x 0x%02x 0x%02x ...\n",
 			  port->port_num, len, *((u8 *)req->buf),

你可能感兴趣的:(linux,linux,运维,服务器)