You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by je...@apache.org on 2021/03/31 06:57:54 UTC

[mynewt-core] branch master updated: tinyusb: Update HID callbacks signatures

This is an automated email from the ASF dual-hosted git repository.

jerzy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


The following commit(s) were added to refs/heads/master by this push:
     new 7f2a1de  tinyusb: Update HID callbacks signatures
7f2a1de is described below

commit 7f2a1de4f8fcc3fe69a52ee4cbcc505998fa7460
Author: Jerzy Kasenberg <je...@codecoup.pl>
AuthorDate: Tue Mar 30 11:55:55 2021 +0200

    tinyusb: Update HID callbacks signatures
    
    TinyUSB project updated HID callbacks function with
    additional interface parameter.
    
    This updated standard descriptors handling code to
    use new prototypes provided by TinyUSB.
---
 hw/usb/tinyusb/std_descriptors/src/std_descriptors.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/hw/usb/tinyusb/std_descriptors/src/std_descriptors.c b/hw/usb/tinyusb/std_descriptors/src/std_descriptors.c
index 4f00cba..62e9730 100755
--- a/hw/usb/tinyusb/std_descriptors/src/std_descriptors.c
+++ b/hw/usb/tinyusb/std_descriptors/src/std_descriptors.c
@@ -65,8 +65,9 @@ const uint8_t desc_hid_report[] = {
  * Descriptor contents must exist long enough for transfer to complete
  */
 const uint8_t *
-tud_hid_descriptor_report_cb(void)
+tud_hid_descriptor_report_cb(uint8_t itf)
 {
+    (void)itf;
     return desc_hid_report;
 }
 
@@ -76,9 +77,10 @@ tud_hid_descriptor_report_cb(void)
  * 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)
+tud_hid_get_report_cb(uint8_t itf, uint8_t report_id, hid_report_type_t report_type, uint8_t *buffer, uint16_t reqlen)
 {
     /* TODO: not implemented yet */
+    (void)itf;
     (void)report_id;
     (void)report_type;
     (void)buffer;
@@ -92,8 +94,10 @@ tud_hid_get_report_cb(uint8_t report_id, hid_report_type_t report_type, uint8_t
  * received data on OUT endpoint ( Report ID = 0, Type = 0 )
  */
 void
-tud_hid_set_report_cb(uint8_t report_id, hid_report_type_t report_type, const uint8_t *report, uint16_t report_size)
+tud_hid_set_report_cb(uint8_t itf, uint8_t report_id, hid_report_type_t report_type, const uint8_t *report,
+                      uint16_t report_size)
 {
+    (void)itf;
     (void)report_id;
     (void)report_type;
     (void)report_size;