summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/export/config-e200v2.h4
-rw-r--r--firmware/export/config-fuze.h4
-rw-r--r--firmware/target/arm/as3525/usb-as3525.c6
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 @@
#define HAVE_HOTSWAP
#endif
+#ifndef BOOTLOADER
+
#define USB_HANDLED_BY_OF
/* USB On-the-go */
@@ -195,6 +197,8 @@
#define USB_VENDOR_ID 0x0781
#define USB_PRODUCT_ID 0x7423
+#endif /* !BOOTLOADER */
+
/* Define this if you have adjustable CPU frequency */
#define HAVE_ADJUSTABLE_CPU_FREQ
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 @@
#define HAVE_HOTSWAP
#endif
+#ifndef BOOTLOADER
+
#define USB_HANDLED_BY_OF
/* USB On-the-go */
@@ -193,6 +195,8 @@
#define USB_VENDOR_ID 0x0781
#define USB_PRODUCT_ID 0x7423
+#endif /* !BOOTLOADER */
+
/* Define this if you have adjustable CPU frequency */
#define HAVE_ADJUSTABLE_CPU_FREQ
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 @@
#include <stdbool.h>
#include "config.h"
#include "usb.h"
+#ifdef HAVE_USBSTACK
#include "usb_core.h"
+#endif
#include "usb-target.h"
#include "power.h"
#include "as3525.h"
@@ -39,10 +41,14 @@
void usb_enable(bool on)
{
+#ifdef HAVE_USBSTACK
if (on)
usb_core_init();
else
usb_core_exit();
+#else
+ (void)on;
+#endif
}
void usb_init_device(void)