summaryrefslogtreecommitdiff
path: root/firmware/target/coldfire/iaudio/usb-iaudio.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/coldfire/iaudio/usb-iaudio.c')
-rw-r--r--firmware/target/coldfire/iaudio/usb-iaudio.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/firmware/target/coldfire/iaudio/usb-iaudio.c b/firmware/target/coldfire/iaudio/usb-iaudio.c
index 3bd1a7a458..21d69611b7 100644
--- a/firmware/target/coldfire/iaudio/usb-iaudio.c
+++ b/firmware/target/coldfire/iaudio/usb-iaudio.c
@@ -20,6 +20,7 @@
20#include <stdbool.h> 20#include <stdbool.h>
21#include "cpu.h" 21#include "cpu.h"
22#include "system.h" 22#include "system.h"
23#include "usb.h"
23 24
24void usb_init_device(void) 25void usb_init_device(void)
25{ 26{
@@ -30,9 +31,9 @@ void usb_init_device(void)
30 or_l(0x00800000, &GPIO1_FUNCTION); /* USB detect */ 31 or_l(0x00800000, &GPIO1_FUNCTION); /* USB detect */
31} 32}
32 33
33bool usb_detect(void) 34int usb_detect(void)
34{ 35{
35 return (GPIO1_READ & 0x00800000)?true:false; 36 return (GPIO1_READ & 0x00800000) ? USB_INSERTED : USB_EXTRACTED;
36} 37}
37 38
38void usb_enable(bool on) 39void usb_enable(bool on)