summaryrefslogtreecommitdiff
path: root/firmware/export/usb_core.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/export/usb_core.h')
-rw-r--r--firmware/export/usb_core.h23
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 */
35enum { 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
49extern int usb_max_pkt_size; 38extern int usb_max_pkt_size;
50 39
@@ -54,7 +43,9 @@ void usb_core_control_request(struct usb_ctrlrequest* req);
54void usb_core_transfer_complete(int endpoint, bool in, int status, int length); 43void usb_core_transfer_complete(int endpoint, bool in, int status, int length);
55void usb_core_bus_reset(void); 44void usb_core_bus_reset(void);
56bool usb_core_exclusive_connection(void); 45bool usb_core_exclusive_connection(void);
57void usb_core_enable_protocol(int driver,bool enabled); 46void usb_core_enable_driver(int driver,bool enabled);
58void usb_core_handle_transfer_completion(struct usb_transfer_completion_event_data* event); 47bool usb_core_driver_enabled (int driver);
48void usb_core_handle_transfer_completion(
49 struct usb_transfer_completion_event_data* event);
59#endif 50#endif
60 51