From c5cfd9b8aae81ea2c50f8a969a4f8e04daa075bb Mon Sep 17 00:00:00 2001 From: Peter Lawrence <12226419+majbthrd@users.noreply.github.com> Date: Wed, 3 Aug 2022 14:40:22 -0500 Subject: [PATCH] fix for IDEs sending under-sized OUT messages; bcdDevice to v10.05 --- main.c | 3 +-- usb_descriptors.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/main.c b/main.c index 560a388..c421718 100644 --- a/main.c +++ b/main.c @@ -68,7 +68,6 @@ uint16_t tud_hid_get_report_cb(uint8_t instance, uint8_t report_id, hid_report_t void tud_hid_set_report_cb(uint8_t instance, uint8_t report_id, hid_report_type_t report_type, uint8_t const* RxDataBuffer, uint16_t bufsize) { static uint8_t TxDataBuffer[CFG_TUD_HID_EP_BUFSIZE]; - uint32_t response_size = TU_MIN(CFG_TUD_HID_EP_BUFSIZE, bufsize); // This doesn't use multiple report and report ID (void) instance; @@ -77,5 +76,5 @@ void tud_hid_set_report_cb(uint8_t instance, uint8_t report_id, hid_report_type_ DAP_ProcessCommand(RxDataBuffer, TxDataBuffer); - tud_hid_report(0, TxDataBuffer, response_size); + tud_hid_report(0, TxDataBuffer, sizeof(TxDataBuffer)); } diff --git a/usb_descriptors.c b/usb_descriptors.c index 3ae77bb..3e4e814 100644 --- a/usb_descriptors.c +++ b/usb_descriptors.c @@ -25,7 +25,7 @@ tusb_desc_device_t const desc_device = /* using Dapper Miser CMSIS-DAP VID:PID */ .idVendor = 0x1209, .idProduct = 0x2488, - .bcdDevice = 0x1004, + .bcdDevice = 0x1005, .iManufacturer = STRID_MANUFACTURER, .iProduct = STRID_PRODUCT,