try to sync
This commit is contained in:
parent
19e89fd269
commit
a40898dbfe
|
@ -449,7 +449,7 @@ uint32 usb_cdcacm_rx(uint8* buf, uint32 len) {
|
||||||
|
|
||||||
/* If all bytes have been read, re-enable the RX endpoint, which
|
/* If all bytes have been read, re-enable the RX endpoint, which
|
||||||
* was set to NAK when the current batch of bytes was received. */
|
* was set to NAK when the current batch of bytes was received. */
|
||||||
if (n_unread_bytes ==0) {
|
if (n_unread_bytes == 0) {
|
||||||
usb_set_ep_rx_count(USB_CDCACM_RX_ENDP, USB_CDCACM_RX_EPSIZE);
|
usb_set_ep_rx_count(USB_CDCACM_RX_ENDP, USB_CDCACM_RX_EPSIZE);
|
||||||
usb_set_ep_rx_stat(USB_CDCACM_RX_ENDP, USB_EP_STAT_RX_VALID);
|
usb_set_ep_rx_stat(USB_CDCACM_RX_ENDP, USB_EP_STAT_RX_VALID);
|
||||||
}
|
}
|
||||||
|
@ -565,7 +565,7 @@ static void vcomDataRxCb(void) {
|
||||||
|
|
||||||
n_unread_bytes += ep_rx_size;
|
n_unread_bytes += ep_rx_size;
|
||||||
|
|
||||||
if ( n_unread_bytes==0 ) {
|
if ( n_unread_bytes == 0 ) {
|
||||||
usb_set_ep_rx_count(USB_CDCACM_RX_ENDP, USB_CDCACM_RX_EPSIZE);
|
usb_set_ep_rx_count(USB_CDCACM_RX_ENDP, USB_CDCACM_RX_EPSIZE);
|
||||||
usb_set_ep_rx_stat(USB_CDCACM_RX_ENDP, USB_EP_STAT_RX_VALID);
|
usb_set_ep_rx_stat(USB_CDCACM_RX_ENDP, USB_EP_STAT_RX_VALID);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue