diff --git a/lib/TinyUSB_Gamepad/src/hid_driver.cpp b/lib/TinyUSB_Gamepad/src/hid_driver.cpp index 9cac1122..5faa036f 100644 --- a/lib/TinyUSB_Gamepad/src/hid_driver.cpp +++ b/lib/TinyUSB_Gamepad/src/hid_driver.cpp @@ -21,7 +21,7 @@ bool send_hid_report(uint8_t report_id, void *report, uint8_t report_size) return false; } -bool hid_device_control_request(uint8_t rhport, tusb_control_request_t const * request) +bool hid_device_control_request(uint8_t rhport, uint8_t stage, tusb_control_request_t const * request) { if ( get_input_mode() == INPUT_MODE_HID && @@ -34,7 +34,7 @@ bool hid_device_control_request(uint8_t rhport, tusb_control_request_t const * r } else { - return hidd_control_request(rhport, request); + return hidd_control_xfer_cb(rhport, stage, request); } } @@ -45,8 +45,7 @@ const usbd_class_driver_t hid_driver = { .init = hidd_init, .reset = hidd_reset, .open = hidd_open, - .control_request = hid_device_control_request, - .control_complete = hidd_control_complete, + .control_xfer_cb = hid_device_control_request, .xfer_cb = hidd_xfer_cb, .sof = NULL }; diff --git a/lib/TinyUSB_Gamepad/src/net_driver.cpp b/lib/TinyUSB_Gamepad/src/net_driver.cpp index aa73fba9..64217f66 100644 --- a/lib/TinyUSB_Gamepad/src/net_driver.cpp +++ b/lib/TinyUSB_Gamepad/src/net_driver.cpp @@ -7,8 +7,7 @@ const usbd_class_driver_t net_driver = { .init = netd_init, .reset = netd_reset, .open = netd_open, - .control_request = netd_control_request, - .control_complete = netd_control_complete, + .control_xfer_cb = netd_control_xfer_cb, .xfer_cb = netd_xfer_cb, .sof = NULL, }; diff --git a/lib/TinyUSB_Gamepad/src/xinput_driver.cpp b/lib/TinyUSB_Gamepad/src/xinput_driver.cpp index b8b98fbc..f1de1245 100644 --- a/lib/TinyUSB_Gamepad/src/xinput_driver.cpp +++ b/lib/TinyUSB_Gamepad/src/xinput_driver.cpp @@ -76,17 +76,10 @@ static uint16_t xinput_open(uint8_t rhport, tusb_desc_interface_t const *itf_des return driver_length; } -static bool xinput_device_control_request(uint8_t rhport, tusb_control_request_t const *request) -{ - (void)rhport; - (void)request; - - return true; -} - -static bool xinput_control_complete(uint8_t rhport, tusb_control_request_t const *request) +static bool xinput_device_control_request(uint8_t rhport, uint8_t stage, tusb_control_request_t const *request) { (void)rhport; + (void)stage; (void)request; return true; @@ -112,8 +105,7 @@ const usbd_class_driver_t xinput_driver = .init = xinput_init, .reset = xinput_reset, .open = xinput_open, - .control_request = xinput_device_control_request, - .control_complete = xinput_control_complete, + .control_xfer_cb = xinput_device_control_request, .xfer_cb = xinput_xfer_callback, .sof = NULL }; diff --git a/lib/rndis/rndis.c b/lib/rndis/rndis.c index d88e8940..f31f70f2 100644 --- a/lib/rndis/rndis.c +++ b/lib/rndis/rndis.c @@ -97,7 +97,7 @@ static err_t linkoutput_fn(struct netif *netif, struct pbuf *p) return ERR_USE; /* if the network driver can accept another packet, we make it happen */ - if (tud_network_can_xmit()) + if (tud_network_can_xmit(p->len)) { tud_network_xmit(p, 0 /* unused for this example */); return ERR_OK;