Skip to content

Commit fe5b41e

Browse files
author
Sebastien Bourdeauducq
committedNov 14, 2011
USB: retry address setting
1 parent 0d3a651 commit fe5b41e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
 

‎softusb-input/main.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,11 @@ static void usb_tx(unsigned char *buf, unsigned char len)
8181
unsigned char i;
8282

8383
wio8(SIE_TX_DATA, 0x80); /* send SYNC */
84-
while(rio8(SIE_TX_PENDING));
8584
for(i=0;i<len;i++) {
86-
wio8(SIE_TX_DATA, buf[i]);
8785
while(rio8(SIE_TX_PENDING));
86+
wio8(SIE_TX_DATA, buf[i]);
8887
}
88+
while(rio8(SIE_TX_PENDING));
8989
wio8(SIE_TX_VALID, 0);
9090
while(rio8(SIE_TX_BUSY));
9191
}
@@ -477,6 +477,7 @@ static void port_service(struct port_status *p, char name)
477477
else
478478
wio8(SIE_TX_BUSRESET, rio8(SIE_TX_BUSRESET) & 0x01);
479479
p->state = PORT_STATE_SET_ADDRESS;
480+
p->retry_count = 0;
480481
}
481482
break;
482483
case PORT_STATE_SET_ADDRESS: {

0 commit comments

Comments
 (0)
Please sign in to comment.