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

Commit

Permalink
fix for IDEs sending under-sized OUT messages; bcdDevice to v10.05
Browse files Browse the repository at this point in the history
  • Loading branch information
majbthrd committed Aug 3, 2022
1 parent 5035fb4 commit c5cfd9b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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));
}
2 changes: 1 addition & 1 deletion usb_descriptors.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit c5cfd9b

Please sign in to comment.