Skip to content

Commit

Permalink
USB: retry address setting
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastien Bourdeauducq committed Nov 14, 2011
1 parent 0d3a651 commit fe5b41e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions softusb-input/main.c
Expand Up @@ -81,11 +81,11 @@ static void usb_tx(unsigned char *buf, unsigned char len)
unsigned char i; unsigned char i;


wio8(SIE_TX_DATA, 0x80); /* send SYNC */ wio8(SIE_TX_DATA, 0x80); /* send SYNC */
while(rio8(SIE_TX_PENDING));
for(i=0;i<len;i++) { for(i=0;i<len;i++) {
wio8(SIE_TX_DATA, buf[i]);
while(rio8(SIE_TX_PENDING)); while(rio8(SIE_TX_PENDING));
wio8(SIE_TX_DATA, buf[i]);
} }
while(rio8(SIE_TX_PENDING));
wio8(SIE_TX_VALID, 0); wio8(SIE_TX_VALID, 0);
while(rio8(SIE_TX_BUSY)); while(rio8(SIE_TX_BUSY));
} }
Expand Down Expand Up @@ -477,6 +477,7 @@ static void port_service(struct port_status *p, char name)
else else
wio8(SIE_TX_BUSRESET, rio8(SIE_TX_BUSRESET) & 0x01); wio8(SIE_TX_BUSRESET, rio8(SIE_TX_BUSRESET) & 0x01);
p->state = PORT_STATE_SET_ADDRESS; p->state = PORT_STATE_SET_ADDRESS;
p->retry_count = 0;
} }
break; break;
case PORT_STATE_SET_ADDRESS: { case PORT_STATE_SET_ADDRESS: {
Expand Down

0 comments on commit fe5b41e

Please sign in to comment.