mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Merge pull request #1049 from openmv/usbdbg_update
Update USB debugging.
This commit is contained in:
commit
881f5398ef
@ -1 +1 @@
|
|||||||
Subproject commit b4826cb165e79e2c5830b74d3ac16ddc40b5a69b
|
Subproject commit 552805900fdf8c747deab21e75fd33d451a21673
|
||||||
@ -90,7 +90,7 @@ void usbdbg_data_in(void *buffer, int length)
|
|||||||
}
|
}
|
||||||
|
|
||||||
case USBDBG_TX_BUF_LEN: {
|
case USBDBG_TX_BUF_LEN: {
|
||||||
uint32_t tx_buf_len = usb_cdc_tx_buf_len();
|
uint32_t tx_buf_len = usb_cdc_buf_len();
|
||||||
memcpy(buffer, &tx_buf_len, sizeof(tx_buf_len));
|
memcpy(buffer, &tx_buf_len, sizeof(tx_buf_len));
|
||||||
cmd = USBDBG_NONE;
|
cmd = USBDBG_NONE;
|
||||||
break;
|
break;
|
||||||
@ -107,8 +107,7 @@ void usbdbg_data_in(void *buffer, int length)
|
|||||||
}
|
}
|
||||||
|
|
||||||
case USBDBG_TX_BUF: {
|
case USBDBG_TX_BUF: {
|
||||||
uint8_t *tx_buf = usb_cdc_tx_buf(length);
|
xfer_bytes += usb_cdc_get_buf(buffer, length);
|
||||||
memcpy(buffer, tx_buf, length);
|
|
||||||
if (xfer_bytes == xfer_length) {
|
if (xfer_bytes == xfer_length) {
|
||||||
cmd = USBDBG_NONE;
|
cmd = USBDBG_NONE;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user