diff options
| author | Frank Gevaerts <frank@gevaerts.be> | 2008-02-27 19:08:30 +0000 |
|---|---|---|
| committer | Frank Gevaerts <frank@gevaerts.be> | 2008-02-27 19:08:30 +0000 |
| commit | 6e7fac7c34dbf7c50a21f8643eacaabb46d5c17a (patch) | |
| tree | ebf95ae6c55684afc4752659b2a230cbcfddabf0 /firmware/export/usb_core.h | |
| parent | 41c1f17296a834d14b772fca042b1fe9d0e452c1 (diff) | |
| download | rockbox-6e7fac7c34dbf7c50a21f8643eacaabb46d5c17a.zip rockbox-6e7fac7c34dbf7c50a21f8643eacaabb46d5c17a.tar.gz rockbox-6e7fac7c34dbf7c50a21f8643eacaabb46d5c17a.tar.bz2 rockbox-6e7fac7c34dbf7c50a21f8643eacaabb46d5c17a.tar.xz | |
move the usb_core thread functionality to the main usb thread
fix button-detection so screenshots and charge-only mode work without enabling UMS
firewire detection is now handled separately from usb detection
increase the usb thread priority while an UMS connection is active
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16435 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export/usb_core.h')
| -rw-r--r-- | firmware/export/usb_core.h | 30 |
1 files changed, 5 insertions, 25 deletions
diff --git a/firmware/export/usb_core.h b/firmware/export/usb_core.h index 73cf5c0..6af3545 100644 --- a/firmware/export/usb_core.h +++ b/firmware/export/usb_core.h @@ -20,34 +20,23 @@ #define USB_CORE_H #ifndef BOOTLOADER -#define USB_THREAD -#ifdef USE_ROCKBOX_USB //#define USB_SERIAL //#define USB_BENCHMARK #define USB_STORAGE - -#else #define USB_CHARGING_ONLY - -#endif /* USE_ROCKBOX_USB */ -#else +#else /* BOOTLOADER */ #define USB_CHARGING_ONLY #endif /* BOOTLOADER */ #include "usb_ch9.h" +#include "usb.h" #if defined(CPU_PP) #define USB_IRAM_ORIGIN ((unsigned char *)0x4000c000) #define USB_IRAM_SIZE ((size_t)0xc000) #endif - -enum { - USB_CORE_QUIT, - USB_CORE_TRANSFER_COMPLETION -}; - /* endpoints */ enum { EP_CONTROL = 0, @@ -66,16 +55,6 @@ enum { NUM_ENDPOINTS }; - -/* queue events */ -#define USB_TRANSFER_COMPLETE 1 - -struct queue_msg { - int endpoint; - int length; - void* data; -}; - extern int usb_max_pkt_size; void usb_core_init(void); @@ -83,7 +62,8 @@ void usb_core_exit(void); void usb_core_control_request(struct usb_ctrlrequest* req); void usb_core_transfer_complete(int endpoint, bool in, int status, int length); void usb_core_bus_reset(void); -bool usb_core_data_connection(void); - +bool usb_core_exclusive_connection(void); +void usb_core_enable_protocol(int driver,bool enabled); +void usb_core_handle_transfer_completion(struct usb_transfer_completion_event_data* event); #endif |