From 19e89fd2693a3de21a716c7fbb8cecd33258c131 Mon Sep 17 00:00:00 2001 From: stevstrong Date: Sun, 16 Oct 2016 20:14:11 +0200 Subject: [PATCH] revert to Jaret's version --- STM32F1/cores/maple/libmaple/usb/stm32f1/usb_cdcacm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/STM32F1/cores/maple/libmaple/usb/stm32f1/usb_cdcacm.c b/STM32F1/cores/maple/libmaple/usb/stm32f1/usb_cdcacm.c index bdddf8a..aefa45c 100644 --- a/STM32F1/cores/maple/libmaple/usb/stm32f1/usb_cdcacm.c +++ b/STM32F1/cores/maple/libmaple/usb/stm32f1/usb_cdcacm.c @@ -449,7 +449,7 @@ uint32 usb_cdcacm_rx(uint8* buf, uint32 len) { /* If all bytes have been read, re-enable the RX endpoint, which * 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_stat(USB_CDCACM_RX_ENDP, USB_EP_STAT_RX_VALID); } @@ -565,7 +565,7 @@ static void vcomDataRxCb(void) { 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_stat(USB_CDCACM_RX_ENDP, USB_EP_STAT_RX_VALID); }