rhport argument in usbd_ API() is not used (always use the initialized port)

remove the usage of TUD_OPT_RHPORT in class driver
This commit is contained in:
hathach
2022-06-02 16:51:17 +07:00
parent 99c1585ed2
commit 8b9cf152a0
13 changed files with 116 additions and 96 deletions

View File

@@ -59,10 +59,12 @@ CFG_TUSB_MEM_SECTION btd_interface_t _btd_itf;
static bool bt_tx_data(uint8_t ep, void *data, uint16_t len)
{
// skip if previous transfer not complete
TU_VERIFY(!usbd_edpt_busy(TUD_OPT_RHPORT, ep));
uint8_t const rhport = 0;
TU_ASSERT(usbd_edpt_xfer(TUD_OPT_RHPORT, ep, data, len));
// skip if previous transfer not complete
TU_VERIFY(!usbd_edpt_busy(rhport, ep));
TU_ASSERT(usbd_edpt_xfer(rhport, ep, data, len));
return true;
}