diff options
| author | sakimisu <[email protected]> | 2023-06-21 20:46:59 +0800 |
|---|---|---|
| committer | sakimisu <[email protected]> | 2023-06-21 20:46:59 +0800 |
| commit | e061b8e784f51bbb2d2f1ffe9d408c1238f73898 (patch) | |
| tree | 363227477ec2925384d24a6e601e861c1c6440e9 | |
| parent | 8856361be0efa7e79ccdb66e3b1292c476e3fba2 (diff) | |
fix winusb demo
| -rw-r--r-- | demo/winusb1.0_template.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/demo/winusb1.0_template.c b/demo/winusb1.0_template.c index c040a4d4..564b79b9 100644 --- a/demo/winusb1.0_template.c +++ b/demo/winusb1.0_template.c @@ -200,17 +200,18 @@ void usbd_winusb_out(uint8_t ep, uint32_t nbytes) // printf("%02x ", read_buffer[i]); // } // printf("\r\n"); + usbd_ep_start_write(WINUSB_IN_EP, read_buffer, nbytes); /* setup next out ep read transfer */ - usbd_ep_start_read(CDC_OUT_EP, read_buffer, 2048); + usbd_ep_start_read(WINUSB_OUT_EP, read_buffer, 2048); } void usbd_winusb_in(uint8_t ep, uint32_t nbytes) { USB_LOG_RAW("actual in len:%d\r\n", nbytes); - if ((nbytes % CDC_MAX_MPS) == 0 && nbytes) { + if ((nbytes % WINUSB_EP_MPS) == 0 && nbytes) { /* send zlp */ - usbd_ep_start_write(CDC_IN_EP, NULL, 0); + usbd_ep_start_write(WINUSB_IN_EP, NULL, 0); } else { ep_tx_busy_flag = false; } |
