소스 검색

fix: fix incorrect ep read in usbd_stm32l476_otgfs driver

Dmitry 8 년 전
부모
커밋
86eec4d03a
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/usbd_stm32l476_otgfs.c

+ 1 - 1
src/usbd_stm32l476_otgfs.c

@@ -357,7 +357,7 @@ int32_t ep_read(uint8_t ep, void* buf, uint16_t blen) {
             buf += 4;
         } else {
             while (blen){
-                *(uint8_t*)buf = 0xFF & _t;
+                *((uint8_t*)buf++) = 0xFF & _t;
                 _t >>= 8;
                 blen --;
             }