diff options
Diffstat (limited to 'firmware/target/arm/as3525/usb-as3525.c')
-rw-r--r-- | firmware/target/arm/as3525/usb-as3525.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/firmware/target/arm/as3525/usb-as3525.c b/firmware/target/arm/as3525/usb-as3525.c index d798d4da83..3f636256a8 100644 --- a/firmware/target/arm/as3525/usb-as3525.c +++ b/firmware/target/arm/as3525/usb-as3525.c | |||
@@ -53,12 +53,21 @@ static int usb_status = USB_EXTRACTED; | |||
53 | void usb_enable(bool on) | 53 | void usb_enable(bool on) |
54 | { | 54 | { |
55 | #if defined(HAVE_USBSTACK) | 55 | #if defined(HAVE_USBSTACK) |
56 | static int boosted = 0; | ||
56 | if (on){ | 57 | if (on){ |
57 | cpu_boost(1); | 58 | if (boosted == 0) |
59 | { | ||
60 | cpu_boost(1); | ||
61 | boosted = 1; | ||
62 | } | ||
58 | usb_core_init(); | 63 | usb_core_init(); |
59 | } else { | 64 | } else { |
60 | usb_core_exit(); | 65 | usb_core_exit(); |
61 | cpu_boost(0); | 66 | if(boosted == 1) |
67 | { | ||
68 | cpu_boost(0); | ||
69 | boosted = 0; | ||
70 | } | ||
62 | } | 71 | } |
63 | #else | 72 | #else |
64 | (void)on; | 73 | (void)on; |