Skip to content

Commit edee46e

Browse files
committed
renesas: host: remove attach_attempt logic
1 parent 47ae883 commit edee46e

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

src/portable/renesas/rusb2/hcd_rusb2.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,6 @@ bool hcd_edpt_clear_stall(uint8_t rhport, uint8_t dev_addr, uint8_t ep_addr) {
774774
void hcd_int_handler(uint8_t rhport)
775775
{
776776
rusb2_reg_t* rusb = RUSB2_REG(rhport);
777-
static unsigned char attach_attempt = 0; // TODO remove later
778777
unsigned is0 = rusb->INTSTS0;
779778
unsigned is1 = rusb->INTSTS1;
780779

@@ -789,23 +788,14 @@ void hcd_int_handler(uint8_t rhport)
789788
if (is1 & RUSB2_INTSTS1_SACK_Msk) {
790789
/* Set DATA1 in advance for the next transfer. */
791790
rusb->DCPCTR_b.SQSET = 1;
792-
attach_attempt = 0;
793791
hcd_event_xfer_complete(rusb->DCPMAXP_b.DEVSEL, tu_edpt_addr(0, TUSB_DIR_OUT), 8, XFER_RESULT_SUCCESS, true);
794792
}
795793

796794
if (is1 & RUSB2_INTSTS1_SIGN_Msk) {
797795
hcd_event_xfer_complete(rusb->DCPMAXP_b.DEVSEL, tu_edpt_addr(0, TUSB_DIR_OUT), 8, XFER_RESULT_FAILED, true);
798-
if(attach_attempt > 0) {
799-
rusb->DVSTCTR0_b.UACT = 1;
800-
_hcd.need_reset = true;
801-
rusb->INTENB1 = (rusb->INTENB1 & ~RUSB2_INTSTS1_ATTCH_Msk) | RUSB2_INTSTS1_DTCH_Msk;
802-
hcd_event_device_attach(rhport, true);
803-
}
804-
attach_attempt--;
805796
}
806797

807798
if (is1 & RUSB2_INTSTS1_ATTCH_Msk) {
808-
attach_attempt = 10;
809799
rusb->DVSTCTR0_b.UACT = 1;
810800
_hcd.need_reset = true;
811801
rusb->INTENB1 = (rusb->INTENB1 & ~RUSB2_INTSTS1_ATTCH_Msk) | RUSB2_INTSTS1_DTCH_Msk;

0 commit comments

Comments
 (0)