Merge pull request #2587 from hathach/revert-pr2245

Revert PR #2245
This commit is contained in:
Ha Thach 2024-04-10 17:24:05 +07:00 committed by GitHub
commit f1944f2b37
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -266,14 +266,6 @@ static void pipe_read_packet_ff(rusb2_reg_t * rusb, tu_fifo_t *f, volatile void
tu_fifo_advance_write_pointer(f, count); tu_fifo_advance_write_pointer(f, count);
} }
static bool wait_pipe_fifo_empty(rusb2_reg_t* rusb, uint8_t num) {
TU_ASSERT(num);
while( (rusb->PIPE_CTR[num-1] & RUSB2_PIPE_CTR_INBUFM_Msk) > 0 ) {}
return true;
}
//--------------------------------------------------------------------+ //--------------------------------------------------------------------+
// Pipe Transfer // Pipe Transfer
//--------------------------------------------------------------------+ //--------------------------------------------------------------------+
@ -347,7 +339,6 @@ static bool pipe_xfer_in(rusb2_reg_t* rusb, unsigned num)
const unsigned rem = pipe->remaining; const unsigned rem = pipe->remaining;
if (!rem) { if (!rem) {
wait_pipe_fifo_empty(rusb, num);
pipe->buf = NULL; pipe->buf = NULL;
return true; return true;
} }