We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7a0baa6 commit f3fdfe3Copy full SHA for f3fdfe3
cores/arduino/stm32/usb/cdc/usbd_cdc.c
@@ -899,6 +899,18 @@ uint8_t USBD_CDC_ClearBuffer(USBD_HandleTypeDef *pdev)
899
}
900
901
902
+uint8_t USBD_CDC_ClearBuffer(USBD_HandleTypeDef *pdev)
903
+{
904
+ /* Suspend or Resume USB Out process */
905
+ if (pdev->pClassData != NULL) {
906
+ /* Prepare Out endpoint to receive next packet */
907
+ USBD_LL_PrepareReceive(pdev, CDC_OUT_EP, 0, 0);
908
+ return USBD_OK;
909
+ } else {
910
+ return USBD_FAIL;
911
+ }
912
+}
913
+
914
#endif /* USBD_USE_CDC */
915
#endif /* USBCON */
916
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
0 commit comments