Skip to content
This repository was archived by the owner on Dec 11, 2022. It is now read-only.

Commit c5cfd9b

Browse files
committed
fix for IDEs sending under-sized OUT messages; bcdDevice to v10.05
1 parent 5035fb4 commit c5cfd9b

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

main.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ uint16_t tud_hid_get_report_cb(uint8_t instance, uint8_t report_id, hid_report_t
6868
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)
6969
{
7070
static uint8_t TxDataBuffer[CFG_TUD_HID_EP_BUFSIZE];
71-
uint32_t response_size = TU_MIN(CFG_TUD_HID_EP_BUFSIZE, bufsize);
7271

7372
// This doesn't use multiple report and report ID
7473
(void) instance;
@@ -77,5 +76,5 @@ void tud_hid_set_report_cb(uint8_t instance, uint8_t report_id, hid_report_type_
7776

7877
DAP_ProcessCommand(RxDataBuffer, TxDataBuffer);
7978

80-
tud_hid_report(0, TxDataBuffer, response_size);
79+
tud_hid_report(0, TxDataBuffer, sizeof(TxDataBuffer));
8180
}

usb_descriptors.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ tusb_desc_device_t const desc_device =
2525
/* using Dapper Miser CMSIS-DAP VID:PID */
2626
.idVendor = 0x1209,
2727
.idProduct = 0x2488,
28-
.bcdDevice = 0x1004,
28+
.bcdDevice = 0x1005,
2929

3030
.iManufacturer = STRID_MANUFACTURER,
3131
.iProduct = STRID_PRODUCT,

0 commit comments

Comments
 (0)