diff options
author | Frank Gevaerts <frank@gevaerts.be> | 2008-03-06 21:25:09 +0000 |
---|---|---|
committer | Frank Gevaerts <frank@gevaerts.be> | 2008-03-06 21:25:09 +0000 |
commit | f0b4a32d6f983b1bece0b8cb2f2da1fdd23b012e (patch) | |
tree | 90f36c9f421c174d0385268ea47f0013b0c8cd8c /firmware/export/usb_core.h | |
parent | 5f83f0e4d2aaad77bda682cfd81a7ebb111a6024 (diff) | |
download | rockbox-f0b4a32d6f983b1bece0b8cb2f2da1fdd23b012e.tar.gz rockbox-f0b4a32d6f983b1bece0b8cb2f2da1fdd23b012e.zip |
reorganise the usb stack to provide a clean separation between core and class drivers
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16541 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export/usb_core.h')
-rw-r--r-- | firmware/export/usb_core.h | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/firmware/export/usb_core.h b/firmware/export/usb_core.h index bb4ce6cedd..97712bca4d 100644 --- a/firmware/export/usb_core.h +++ b/firmware/export/usb_core.h | |||
@@ -21,7 +21,7 @@ | |||
21 | 21 | ||
22 | #ifndef BOOTLOADER | 22 | #ifndef BOOTLOADER |
23 | 23 | ||
24 | //#define USB_SERIAL | 24 | #define USB_SERIAL |
25 | #define USB_STORAGE | 25 | #define USB_STORAGE |
26 | #define USB_CHARGING_ONLY | 26 | #define USB_CHARGING_ONLY |
27 | #else /* BOOTLOADER */ | 27 | #else /* BOOTLOADER */ |
@@ -32,19 +32,8 @@ | |||
32 | #include "usb.h" | 32 | #include "usb.h" |
33 | 33 | ||
34 | /* endpoints */ | 34 | /* endpoints */ |
35 | enum { | 35 | #define EP_CONTROL 0 |
36 | EP_CONTROL = 0, | 36 | #define NUM_ENDPOINTS 3 |
37 | #ifdef USB_STORAGE | ||
38 | EP_MASS_STORAGE, | ||
39 | #endif | ||
40 | #ifdef USB_SERIAL | ||
41 | EP_SERIAL, | ||
42 | #endif | ||
43 | #ifdef USB_CHARGING_ONLY | ||
44 | EP_CHARGING_ONLY, | ||
45 | #endif | ||
46 | NUM_ENDPOINTS | ||
47 | }; | ||
48 | 37 | ||
49 | extern int usb_max_pkt_size; | 38 | extern int usb_max_pkt_size; |
50 | 39 | ||
@@ -54,7 +43,9 @@ void usb_core_control_request(struct usb_ctrlrequest* req); | |||
54 | void usb_core_transfer_complete(int endpoint, bool in, int status, int length); | 43 | void usb_core_transfer_complete(int endpoint, bool in, int status, int length); |
55 | void usb_core_bus_reset(void); | 44 | void usb_core_bus_reset(void); |
56 | bool usb_core_exclusive_connection(void); | 45 | bool usb_core_exclusive_connection(void); |
57 | void usb_core_enable_protocol(int driver,bool enabled); | 46 | void usb_core_enable_driver(int driver,bool enabled); |
58 | void usb_core_handle_transfer_completion(struct usb_transfer_completion_event_data* event); | 47 | bool usb_core_driver_enabled (int driver); |
48 | void usb_core_handle_transfer_completion( | ||
49 | struct usb_transfer_completion_event_data* event); | ||
59 | #endif | 50 | #endif |
60 | 51 | ||