Skip to content

Commit

Permalink
Revert "updated to support new TinyUSB usbd_class_driver_t and fixed …
Browse files Browse the repository at this point in the history
…issue FeralAI#76"

This reverts commit aacd960.
  • Loading branch information
Inchworm333 committed Jul 10, 2022
1 parent aacd960 commit 17fc56b
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 deletions.
7 changes: 4 additions & 3 deletions lib/TinyUSB_Gamepad/src/hid_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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, uint8_t stage, tusb_control_request_t const * request)
bool hid_device_control_request(uint8_t rhport, tusb_control_request_t const * request)
{
if (
get_input_mode() == INPUT_MODE_HID &&
Expand All @@ -34,7 +34,7 @@ bool hid_device_control_request(uint8_t rhport, uint8_t stage, tusb_control_requ
}
else
{
return hidd_control_xfer_cb(rhport, stage, request);
return hidd_control_request(rhport, request);
}
}

Expand All @@ -45,7 +45,8 @@ const usbd_class_driver_t hid_driver = {
.init = hidd_init,
.reset = hidd_reset,
.open = hidd_open,
.control_xfer_cb = hid_device_control_request,
.control_request = hid_device_control_request,
.control_complete = hidd_control_complete,
.xfer_cb = hidd_xfer_cb,
.sof = NULL
};
3 changes: 2 additions & 1 deletion lib/TinyUSB_Gamepad/src/net_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ const usbd_class_driver_t net_driver = {
.init = netd_init,
.reset = netd_reset,
.open = netd_open,
.control_xfer_cb = netd_control_xfer_cb,
.control_request = netd_control_request,
.control_complete = netd_control_complete,
.xfer_cb = netd_xfer_cb,
.sof = NULL,
};
14 changes: 11 additions & 3 deletions lib/TinyUSB_Gamepad/src/xinput_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,17 @@ 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, uint8_t stage, tusb_control_request_t const *request)
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)
{
(void)rhport;
(void)stage;
(void)request;

return true;
Expand All @@ -105,7 +112,8 @@ const usbd_class_driver_t xinput_driver =
.init = xinput_init,
.reset = xinput_reset,
.open = xinput_open,
.control_xfer_cb = xinput_device_control_request,
.control_request = xinput_device_control_request,
.control_complete = xinput_control_complete,
.xfer_cb = xinput_xfer_callback,
.sof = NULL
};
2 changes: 1 addition & 1 deletion lib/rndis/rndis.c
Original file line number Diff line number Diff line change
Expand Up @@ -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(p->len))
if (tud_network_can_xmit())
{
tud_network_xmit(p, 0 /* unused for this example */);
return ERR_OK;
Expand Down

0 comments on commit 17fc56b

Please sign in to comment.