summaryrefslogtreecommitdiffstats
path: root/firmware/target/sh/archos/fm_v2/usb-fm_v2.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/sh/archos/fm_v2/usb-fm_v2.c')
-rw-r--r--firmware/target/sh/archos/fm_v2/usb-fm_v2.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/firmware/target/sh/archos/fm_v2/usb-fm_v2.c b/firmware/target/sh/archos/fm_v2/usb-fm_v2.c
index 3dcc3559a3..9c641b925a 100644
--- a/firmware/target/sh/archos/fm_v2/usb-fm_v2.c
+++ b/firmware/target/sh/archos/fm_v2/usb-fm_v2.c
@@ -22,10 +22,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)