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

@@ -92,7 +92,7 @@ bool tud_midi_n_mounted (uint8_t itf)
static void _prep_out_transaction (midid_interface_t* p_midi)
{
uint8_t const rhport = TUD_OPT_RHPORT;
uint8_t const rhport = 0;
uint16_t available = tu_fifo_remaining(&p_midi->rx_ff);
// Prepare for incoming data but only allow what we can store in the ring buffer.
@@ -219,7 +219,7 @@ static uint32_t write_flush(midid_interface_t* midi)
// No data to send
if ( !tu_fifo_count(&midi->tx_ff) ) return 0;
uint8_t const rhport = TUD_OPT_RHPORT;
uint8_t const rhport = 0;
// skip if previous transfer not complete
TU_VERIFY( usbd_edpt_claim(rhport, midi->ep_in), 0 );