summaryrefslogtreecommitdiff
path: root/firmware/export/usb.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/export/usb.h')
-rw-r--r--firmware/export/usb.h40
1 files changed, 25 insertions, 15 deletions
diff --git a/firmware/export/usb.h b/firmware/export/usb.h
index c8bbf28267..49b70f659a 100644
--- a/firmware/export/usb.h
+++ b/firmware/export/usb.h
@@ -24,20 +24,33 @@
24#include "kernel.h" 24#include "kernel.h"
25#include "button.h" 25#include "button.h"
26 26
27#if defined(IPOD_COLOR) || defined(IPOD_4G) \
28 || defined(IPOD_MINI) || defined(IPOD_MINI2G)
29#define USB_FIREWIRE_HANDLING
30#endif
31
27/* Messages from usb_tick and thread states */ 32/* Messages from usb_tick and thread states */
28enum { 33enum {
29 USB_INSERTED, 34 USB_INSERTED, /* Event+State */
30 USB_EXTRACTED, 35 USB_EXTRACTED, /* Event+State */
31 USB_REENABLE, 36#ifdef HAVE_USB_POWER
32 USB_POWERED, 37 USB_POWERED, /* State */
33 USB_TRANSFER_COMPLETION, 38#endif
34 USB_REQUEST_DISK, 39#ifdef HAVE_LCD_BITMAP
35 USB_RELEASE_DISK, 40 USB_SCREENDUMP, /* State */
36 USB_REQUEST_REBOOT, 41#endif
37 USB_QUIT, 42#if (CONFIG_STORAGE & STORAGE_MMC)
43 USB_REENABLE, /* Event */
44#endif
45#ifdef HAVE_USBSTACK
46 USB_TRANSFER_COMPLETION, /* Event */
47#endif
48#ifdef USB_FIREWIRE_HANDLING
49 USB_REQUEST_REBOOT, /* Event */
50#endif
51 USB_QUIT, /* Event */
38}; 52};
39 53
40
41#ifdef HAVE_USB_POWER 54#ifdef HAVE_USB_POWER
42#if CONFIG_KEYPAD == RECORDER_PAD 55#if CONFIG_KEYPAD == RECORDER_PAD
43#define USBPOWER_BUTTON BUTTON_F1 56#define USBPOWER_BUTTON BUTTON_F1
@@ -111,13 +124,10 @@ bool usb_charging_enabled(void);
111#ifdef HAVE_USBSTACK 124#ifdef HAVE_USBSTACK
112void usb_signal_transfer_completion(struct usb_transfer_completion_event_data* event_data); 125void usb_signal_transfer_completion(struct usb_transfer_completion_event_data* event_data);
113bool usb_driver_enabled(int driver); 126bool usb_driver_enabled(int driver);
114bool usb_exclusive_ata(void); /* ata is available for usb */ 127bool usb_exclusive_storage(void); /* storage is available for usb */
115void usb_request_exclusive_ata(void);
116void usb_release_exclusive_ata(void);
117#endif 128#endif
118 129
119#if defined(IPOD_COLOR) || defined(IPOD_4G) \ 130#ifdef USB_FIREWIRE_HANDLING
120 || defined(IPOD_MINI) || defined(IPOD_MINI2G)
121bool firewire_detect(void); 131bool firewire_detect(void);
122#endif 132#endif
123 133