diff options
-rw-r--r-- | firmware/export/config-e200v2.h | 4 | ||||
-rw-r--r-- | firmware/export/config-fuze.h | 4 | ||||
-rw-r--r-- | firmware/target/arm/as3525/usb-as3525.c | 6 |
3 files changed, 14 insertions, 0 deletions
diff --git a/firmware/export/config-e200v2.h b/firmware/export/config-e200v2.h index dff99cde16..b108decce6 100644 --- a/firmware/export/config-e200v2.h +++ b/firmware/export/config-e200v2.h | |||
@@ -185,6 +185,8 @@ | |||
185 | #define HAVE_HOTSWAP | 185 | #define HAVE_HOTSWAP |
186 | #endif | 186 | #endif |
187 | 187 | ||
188 | #ifndef BOOTLOADER | ||
189 | |||
188 | #define USB_HANDLED_BY_OF | 190 | #define USB_HANDLED_BY_OF |
189 | 191 | ||
190 | /* USB On-the-go */ | 192 | /* USB On-the-go */ |
@@ -195,6 +197,8 @@ | |||
195 | #define USB_VENDOR_ID 0x0781 | 197 | #define USB_VENDOR_ID 0x0781 |
196 | #define USB_PRODUCT_ID 0x7423 | 198 | #define USB_PRODUCT_ID 0x7423 |
197 | 199 | ||
200 | #endif /* !BOOTLOADER */ | ||
201 | |||
198 | /* Define this if you have adjustable CPU frequency */ | 202 | /* Define this if you have adjustable CPU frequency */ |
199 | #define HAVE_ADJUSTABLE_CPU_FREQ | 203 | #define HAVE_ADJUSTABLE_CPU_FREQ |
200 | 204 | ||
diff --git a/firmware/export/config-fuze.h b/firmware/export/config-fuze.h index 4ca583ca60..def343c680 100644 --- a/firmware/export/config-fuze.h +++ b/firmware/export/config-fuze.h | |||
@@ -183,6 +183,8 @@ | |||
183 | #define HAVE_HOTSWAP | 183 | #define HAVE_HOTSWAP |
184 | #endif | 184 | #endif |
185 | 185 | ||
186 | #ifndef BOOTLOADER | ||
187 | |||
186 | #define USB_HANDLED_BY_OF | 188 | #define USB_HANDLED_BY_OF |
187 | 189 | ||
188 | /* USB On-the-go */ | 190 | /* USB On-the-go */ |
@@ -193,6 +195,8 @@ | |||
193 | #define USB_VENDOR_ID 0x0781 | 195 | #define USB_VENDOR_ID 0x0781 |
194 | #define USB_PRODUCT_ID 0x7423 | 196 | #define USB_PRODUCT_ID 0x7423 |
195 | 197 | ||
198 | #endif /* !BOOTLOADER */ | ||
199 | |||
196 | /* Define this if you have adjustable CPU frequency */ | 200 | /* Define this if you have adjustable CPU frequency */ |
197 | #define HAVE_ADJUSTABLE_CPU_FREQ | 201 | #define HAVE_ADJUSTABLE_CPU_FREQ |
198 | 202 | ||
diff --git a/firmware/target/arm/as3525/usb-as3525.c b/firmware/target/arm/as3525/usb-as3525.c index c32aa3c249..d5535d00b8 100644 --- a/firmware/target/arm/as3525/usb-as3525.c +++ b/firmware/target/arm/as3525/usb-as3525.c | |||
@@ -22,7 +22,9 @@ | |||
22 | #include <stdbool.h> | 22 | #include <stdbool.h> |
23 | #include "config.h" | 23 | #include "config.h" |
24 | #include "usb.h" | 24 | #include "usb.h" |
25 | #ifdef HAVE_USBSTACK | ||
25 | #include "usb_core.h" | 26 | #include "usb_core.h" |
27 | #endif | ||
26 | #include "usb-target.h" | 28 | #include "usb-target.h" |
27 | #include "power.h" | 29 | #include "power.h" |
28 | #include "as3525.h" | 30 | #include "as3525.h" |
@@ -39,10 +41,14 @@ | |||
39 | 41 | ||
40 | void usb_enable(bool on) | 42 | void usb_enable(bool on) |
41 | { | 43 | { |
44 | #ifdef HAVE_USBSTACK | ||
42 | if (on) | 45 | if (on) |
43 | usb_core_init(); | 46 | usb_core_init(); |
44 | else | 47 | else |
45 | usb_core_exit(); | 48 | usb_core_exit(); |
49 | #else | ||
50 | (void)on; | ||
51 | #endif | ||
46 | } | 52 | } |
47 | 53 | ||
48 | void usb_init_device(void) | 54 | void usb_init_device(void) |