1
0
Fork 0
forked from len0rd/rockbox

Try to get some control over #ifdef hell in usb.c by refactoring and inline function use. SYS_USB_DISCONNECTED_ACK hasn't been doing anything useful for the USB thread; remove it. USB thread simply ignores that value. Observe only valid usb_state transitions.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29084 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Michael Sevakis 2011-01-18 14:10:06 +00:00
parent 980225c3e2
commit 453550a687
15 changed files with 334 additions and 315 deletions

View file

@ -303,7 +303,7 @@ void display_logf(void) /* Doesn't return! */
if(button == SYS_USB_CONNECTED)
usb_acknowledge(SYS_USB_CONNECTED_ACK);
else if(button == SYS_USB_DISCONNECTED)
usb_acknowledge(SYS_USB_DISCONNECTED_ACK);
;
else if(button & LOGF_UP)
user_index++;
else if(button & LOGF_DOWN)

View file

@ -135,10 +135,7 @@ static void handle_usb(void)
{
button = button_get(true);
if (button == SYS_USB_DISCONNECTED)
{
usb_acknowledge(SYS_USB_DISCONNECTED_ACK);
break;
}
}
}

View file

@ -78,10 +78,7 @@ static void usb_mode(void)
{
button = button_get(true);
if (button == SYS_USB_DISCONNECTED)
{
usb_acknowledge(SYS_USB_DISCONNECTED_ACK);
break;
}
}
}
}