Fork of https://developer.mbed.org/users/bscott/code/STM32_USBDevice/

Fork of STM32_USBDevice by Bradley Scott

Branch:
feature_WebUSB
Revision:
76:eef92651f52f
Parent:
70:b17ecdbfb0ce
diff -r 43bf95761b38 -r eef92651f52f USBDevice/USBHAL_STM32L1.cpp
--- a/USBDevice/USBHAL_STM32L1.cpp	Fri Oct 27 17:22:45 2017 +0200
+++ b/USBDevice/USBHAL_STM32L1.cpp	Thu Jul 19 12:57:27 2018 +0200
@@ -255,9 +255,9 @@
     return EP_COMPLETED;
 }
 
-EP_STATUS USBHAL::endpointWrite(uint8_t endpoint, uint8_t *data, uint32_t size) {
+EP_STATUS USBHAL::endpointWrite(uint8_t endpoint, const uint8_t *data, uint32_t size) {
     core_util_critical_section_enter();
-    HAL_PCD_EP_Transmit(&hpcd_USB_FS, endpoint>>1, data, size);
+    HAL_PCD_EP_Transmit(&hpcd_USB_FS, endpoint>>1, const_cast<uint8_t*>(data), size);
     epComplete &= ~(1 << endpoint);
     core_util_critical_section_exit();
     return EP_PENDING;