Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/flipperdevices/libusb_stm32.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/usbd_stm32f429_otgfs.c')
-rw-r--r--src/usbd_stm32f429_otgfs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/usbd_stm32f429_otgfs.c b/src/usbd_stm32f429_otgfs.c
index 1633e04..ea1b3b4 100644
--- a/src/usbd_stm32f429_otgfs.c
+++ b/src/usbd_stm32f429_otgfs.c
@@ -338,7 +338,7 @@ static int32_t ep_read(uint8_t ep, void* buf, uint16_t blen) {
return (len < blen) ? len : blen;
}
-static int32_t ep_write(uint8_t ep, void *buf, uint16_t blen) {
+static int32_t ep_write(uint8_t ep, const void *buf, uint16_t blen) {
uint32_t len, tmp;
ep &= 0x7F;
volatile uint32_t* fifo = EPFIFO(ep);
@@ -356,7 +356,7 @@ static int32_t ep_write(uint8_t ep, void *buf, uint16_t blen) {
/* push data to FIFO */
tmp = 0;
for (int idx = 0; idx < blen; idx++) {
- tmp |= (uint32_t)((uint8_t*)buf)[idx] << ((idx & 0x03) << 3);
+ tmp |= (uint32_t)((const uint8_t*)buf)[idx] << ((idx & 0x03) << 3);
if ((idx & 0x03) == 0x03 || (idx + 1) == blen) {
*fifo = tmp;
tmp = 0;