summaryrefslogtreecommitdiffstats
path: root/firmware/target/sh/archos/ondio
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/sh/archos/ondio')
-rw-r--r--firmware/target/sh/archos/ondio/usb-ondio.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/firmware/target/sh/archos/ondio/usb-ondio.c b/firmware/target/sh/archos/ondio/usb-ondio.c
index c856f3ae2c..b370fec3d9 100644
--- a/firmware/target/sh/archos/ondio/usb-ondio.c
+++ b/firmware/target/sh/archos/ondio/usb-ondio.c
@@ -23,10 +23,11 @@
#include "cpu.h"
#include "hwcompat.h"
#include "system.h"
+#include "usb.h"
-bool usb_detect(void)
+int usb_detect(void)
{
- return (adc_read(ADC_USB_POWER) <= 512) ? true : false;
+ return (adc_read(ADC_USB_POWER) <= 512) ? USB_INSERTED : USB_EXTRACTED;
}
void usb_enable(bool on)