From 47bade1437d5281a5aca0ec8b2b9a3956f88f685 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Thu, 15 Dec 2011 00:14:36 +0000 Subject: Simplify and neaten-up usb.c a bit. USB_INSERTED and USB_EXTRACTED are always used as events to indicate cable state. USB_HOSTED is posted to indicated that a host was detected. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31263 a1c6a512-1295-4272-9138-f99709370657 --- firmware/export/usb.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'firmware/export') diff --git a/firmware/export/usb.h b/firmware/export/usb.h index d68ac7d910..3baacc5420 100644 --- a/firmware/export/usb.h +++ b/firmware/export/usb.h @@ -30,15 +30,16 @@ #endif /* Messages from usb_tick and thread states */ -enum { +enum +{ +#ifdef HAVE_LCD_BITMAP + USB_SCREENDUMP = -1, /* State */ +#endif USB_EXTRACTED = 0, /* Event+State */ USB_INSERTED, /* Event+State */ - USB_POWERED, /* Event+State - transitional indicator if no power */ + USB_POWERED, /* State - transitional indicator if no power */ #ifdef USB_DETECT_BY_CORE - USB_UNPOWERED, /* Event */ -#endif -#ifdef HAVE_LCD_BITMAP - USB_SCREENDUMP, /* State */ + USB_HOSTED, /* Event - host presence was detected */ #endif #if (CONFIG_STORAGE & STORAGE_MMC) USB_REENABLE, /* Event */ @@ -57,6 +58,7 @@ enum { USB_HANDLED, /* Bootloader status code */ #endif }; + #ifdef HAVE_USB_POWER #if CONFIG_KEYPAD == RECORDER_PAD #define USBPOWER_BUTTON BUTTON_F1 -- cgit v1.2.3