diff --git a/main.c b/main.c index 96871d0..560a388 100644 --- a/main.c +++ b/main.c @@ -53,9 +53,10 @@ int main(void) // Invoked when received GET_REPORT control request // Application must fill buffer report's content and return its length. // Return zero will cause the stack to STALL request -uint16_t tud_hid_get_report_cb(uint8_t report_id, hid_report_type_t report_type, uint8_t* buffer, uint16_t reqlen) +uint16_t tud_hid_get_report_cb(uint8_t instance, uint8_t report_id, hid_report_type_t report_type, uint8_t* buffer, uint16_t reqlen) { // TODO not Implemented + (void) instance; (void) report_id; (void) report_type; (void) buffer; @@ -64,12 +65,13 @@ uint16_t tud_hid_get_report_cb(uint8_t report_id, hid_report_type_t report_type, return 0; } -void tud_hid_set_report_cb(uint8_t report_id, hid_report_type_t report_type, uint8_t const* RxDataBuffer, uint16_t bufsize) +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; (void) report_id; (void) report_type; diff --git a/myboard.c b/myboard.c index 65ea9dc..eeee7d3 100644 --- a/myboard.c +++ b/myboard.c @@ -57,3 +57,4 @@ __NO_RETURN static void bad_happened(void) void panic(const char *fmt, ...) { bad_happened(); } void __assert(const char *__expression, const char *__filename, int __line) { bad_happened(); } +void hard_assertion_failure(void) { bad_happened(); } \ No newline at end of file diff --git a/pico-debug.hzp b/pico-debug.hzp index e3206e5..93fa34c 100644 --- a/pico-debug.hzp +++ b/pico-debug.hzp @@ -41,7 +41,8 @@ - + + diff --git a/tinyusb b/tinyusb index 0986843..fa895ed 160000 --- a/tinyusb +++ b/tinyusb @@ -1 +1 @@ -Subproject commit 09868434cd9f53394350cce682333ada97f796c3 +Subproject commit fa895ed3dc46d5aa5e11b19ff07beb6fcfc62655 diff --git a/tusb_config.h b/tusb_config.h index 11ad349..6977659 100644 --- a/tusb_config.h +++ b/tusb_config.h @@ -99,7 +99,7 @@ #define CFG_TUD_HID 1 #define CFG_TUD_MIDI 0 #define CFG_TUD_VENDOR 0 -#define CFG_TUD_NET 0 +#define CFG_TUD_ECM_RNDIS 0 #define CFG_TUD_HID_EP_BUFSIZE 64 diff --git a/usb_descriptors.c b/usb_descriptors.c index d588212..aca8eaa 100644 --- a/usb_descriptors.c +++ b/usb_descriptors.c @@ -53,8 +53,9 @@ static uint8_t const desc_hid_report[] = // Invoked when received GET HID REPORT DESCRIPTOR // Application return pointer to descriptor // Descriptor contents must exist long enough for transfer to complete -uint8_t const * tud_hid_descriptor_report_cb(void) +uint8_t const * tud_hid_descriptor_report_cb(uint8_t instance) { + (void)instance; return desc_hid_report; } @@ -78,7 +79,7 @@ uint8_t const desc_configuration[] = TUD_CONFIG_DESCRIPTOR(1, ITF_NUM_TOTAL, 0, CONFIG_TOTAL_LEN, TUSB_DESC_CONFIG_ATT_REMOTE_WAKEUP, 100), // Interface number, string index, protocol, report descriptor len, EP In & Out address, size & polling interval - TUD_HID_INOUT_DESCRIPTOR(ITF_NUM_HID, 0, HID_PROTOCOL_NONE, sizeof(desc_hid_report), EPNUM_HID, 0x80 | EPNUM_HID, CFG_TUD_HID_EP_BUFSIZE, 1) + TUD_HID_INOUT_DESCRIPTOR(ITF_NUM_HID, 0, HID_PROTOCOL_REPORT, sizeof(desc_hid_report), EPNUM_HID, 0x80 | EPNUM_HID, CFG_TUD_HID_EP_BUFSIZE, 1) }; // Invoked when received GET CONFIGURATION DESCRIPTOR