kopia lustrzana https://github.com/majbthrd/pico-debug
update to TinyUSB v0.13.0
rodzic
25d167704e
commit
63278f8b48
6
main.c
6
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;
|
||||
|
||||
|
|
|
@ -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(); }
|
|
@ -41,7 +41,8 @@
|
|||
<file file_name="$(TOP)/src/class/midi/midi_device.c" />
|
||||
<file file_name="$(TOP)/src/class/usbtmc/usbtmc_device.c" />
|
||||
<file file_name="$(TOP)/src/class/vendor/vendor_device.c" />
|
||||
<file file_name="$(TOP)/src/class/net/net_device.c" />
|
||||
<file file_name="$(TOP)/src/class/net/ecm_rndis_device.c" />
|
||||
<file file_name="$(TOP)/src/class/net/ncm_device.c" />
|
||||
<file file_name="$(TOP)/src/portable/$(VENDOR)/$(CHIP_FAMILY)/dcd_$(CHIP_FAMILY).c" />
|
||||
</folder>
|
||||
<folder Name="System Files">
|
||||
|
|
2
tinyusb
2
tinyusb
|
@ -1 +1 @@
|
|||
Subproject commit 09868434cd9f53394350cce682333ada97f796c3
|
||||
Subproject commit fa895ed3dc46d5aa5e11b19ff07beb6fcfc62655
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Ładowanie…
Reference in New Issue