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

Commit 63278f8

Browse files
committedMar 21, 2022
update to TinyUSB v0.13.0
1 parent 25d1677 commit 63278f8

File tree

6 files changed

+12
-7
lines changed

6 files changed

+12
-7
lines changed
 

‎main.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,10 @@ int main(void)
5353
// Invoked when received GET_REPORT control request
5454
// Application must fill buffer report's content and return its length.
5555
// Return zero will cause the stack to STALL request
56-
uint16_t tud_hid_get_report_cb(uint8_t report_id, hid_report_type_t report_type, uint8_t* buffer, uint16_t reqlen)
56+
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)
5757
{
5858
// TODO not Implemented
59+
(void) instance;
5960
(void) report_id;
6061
(void) report_type;
6162
(void) buffer;
@@ -64,12 +65,13 @@ uint16_t tud_hid_get_report_cb(uint8_t report_id, hid_report_type_t report_type,
6465
return 0;
6566
}
6667

67-
void tud_hid_set_report_cb(uint8_t report_id, hid_report_type_t report_type, uint8_t const* RxDataBuffer, uint16_t bufsize)
68+
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)
6869
{
6970
static uint8_t TxDataBuffer[CFG_TUD_HID_EP_BUFSIZE];
7071
uint32_t response_size = TU_MIN(CFG_TUD_HID_EP_BUFSIZE, bufsize);
7172

7273
// This doesn't use multiple report and report ID
74+
(void) instance;
7375
(void) report_id;
7476
(void) report_type;
7577

‎myboard.c

+1
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,4 @@ __NO_RETURN static void bad_happened(void)
5757

5858
void panic(const char *fmt, ...) { bad_happened(); }
5959
void __assert(const char *__expression, const char *__filename, int __line) { bad_happened(); }
60+
void hard_assertion_failure(void) { bad_happened(); }

‎pico-debug.hzp

+2-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@
4141
<file file_name="$(TOP)/src/class/midi/midi_device.c" />
4242
<file file_name="$(TOP)/src/class/usbtmc/usbtmc_device.c" />
4343
<file file_name="$(TOP)/src/class/vendor/vendor_device.c" />
44-
<file file_name="$(TOP)/src/class/net/net_device.c" />
44+
<file file_name="$(TOP)/src/class/net/ecm_rndis_device.c" />
45+
<file file_name="$(TOP)/src/class/net/ncm_device.c" />
4546
<file file_name="$(TOP)/src/portable/$(VENDOR)/$(CHIP_FAMILY)/dcd_$(CHIP_FAMILY).c" />
4647
</folder>
4748
<folder Name="System Files">

‎tinyusb

Submodule tinyusb updated 844 files

‎tusb_config.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
#define CFG_TUD_HID 1
100100
#define CFG_TUD_MIDI 0
101101
#define CFG_TUD_VENDOR 0
102-
#define CFG_TUD_NET 0
102+
#define CFG_TUD_ECM_RNDIS 0
103103

104104
#define CFG_TUD_HID_EP_BUFSIZE 64
105105

‎usb_descriptors.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,9 @@ static uint8_t const desc_hid_report[] =
5353
// Invoked when received GET HID REPORT DESCRIPTOR
5454
// Application return pointer to descriptor
5555
// Descriptor contents must exist long enough for transfer to complete
56-
uint8_t const * tud_hid_descriptor_report_cb(void)
56+
uint8_t const * tud_hid_descriptor_report_cb(uint8_t instance)
5757
{
58+
(void)instance;
5859
return desc_hid_report;
5960
}
6061

@@ -78,7 +79,7 @@ uint8_t const desc_configuration[] =
7879
TUD_CONFIG_DESCRIPTOR(1, ITF_NUM_TOTAL, 0, CONFIG_TOTAL_LEN, TUSB_DESC_CONFIG_ATT_REMOTE_WAKEUP, 100),
7980

8081
// Interface number, string index, protocol, report descriptor len, EP In & Out address, size & polling interval
81-
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)
82+
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)
8283
};
8384

8485
// Invoked when received GET CONFIGURATION DESCRIPTOR

0 commit comments

Comments
 (0)
This repository has been archived.