summaryrefslogtreecommitdiff
path: root/firmware/usbstack/usb_serial.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/usbstack/usb_serial.c')
-rw-r--r--firmware/usbstack/usb_serial.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/firmware/usbstack/usb_serial.c b/firmware/usbstack/usb_serial.c
index a08394c0a8..c96936f1d4 100644
--- a/firmware/usbstack/usb_serial.c
+++ b/firmware/usbstack/usb_serial.c
@@ -294,7 +294,7 @@ bool usb_serial_control_request(struct usb_ctrlrequest* req, unsigned char* dest
294 if (req->wLength == sizeof(line_coding)) 294 if (req->wLength == sizeof(line_coding))
295 { 295 {
296 /* Receive line coding into local copy */ 296 /* Receive line coding into local copy */
297 usb_drv_recv(EP_CONTROL, &line_coding, sizeof(line_coding)); 297 usb_drv_recv_nonblocking(EP_CONTROL, &line_coding, sizeof(line_coding));
298 usb_drv_send(EP_CONTROL, NULL, 0); /* ack */ 298 usb_drv_send(EP_CONTROL, NULL, 0); /* ack */
299 handled = true; 299 handled = true;
300 } 300 }
@@ -316,7 +316,7 @@ bool usb_serial_control_request(struct usb_ctrlrequest* req, unsigned char* dest
316 if (req->wLength == sizeof(line_coding)) 316 if (req->wLength == sizeof(line_coding))
317 { 317 {
318 /* Send back line coding so host is happy */ 318 /* Send back line coding so host is happy */
319 usb_drv_recv(EP_CONTROL, NULL, 0); /* ack */ 319 usb_drv_recv_nonblocking(EP_CONTROL, NULL, 0); /* ack */
320 usb_drv_send(EP_CONTROL, &line_coding, sizeof(line_coding)); 320 usb_drv_send(EP_CONTROL, &line_coding, sizeof(line_coding));
321 handled = true; 321 handled = true;
322 } 322 }
@@ -329,7 +329,7 @@ bool usb_serial_control_request(struct usb_ctrlrequest* req, unsigned char* dest
329void usb_serial_init_connection(void) 329void usb_serial_init_connection(void)
330{ 330{
331 /* prime rx endpoint */ 331 /* prime rx endpoint */
332 usb_drv_recv(ep_out, receive_buffer, sizeof receive_buffer); 332 usb_drv_recv_nonblocking(ep_out, receive_buffer, sizeof receive_buffer);
333 333
334 /* we come here too after a bus reset, so reset some data */ 334 /* we come here too after a bus reset, so reset some data */
335 buffer_transitlength = 0; 335 buffer_transitlength = 0;
@@ -420,7 +420,7 @@ void usb_serial_transfer_complete(int ep,int dir, int status, int length)
420 /* Data received. TODO : Do something with it ? */ 420 /* Data received. TODO : Do something with it ? */
421 421
422 /* Get the next bit */ 422 /* Get the next bit */
423 usb_drv_recv(ep_out, receive_buffer, sizeof receive_buffer); 423 usb_drv_recv_nonblocking(ep_out, receive_buffer, sizeof receive_buffer);
424 break; 424 break;
425 425
426 case USB_DIR_IN: 426 case USB_DIR_IN: