summaryrefslogtreecommitdiffstats
path: root/firmware/target/sh/archos
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/sh/archos')
-rw-r--r--firmware/target/sh/archos/fm_v2/usb-fm_v2.c5
-rw-r--r--firmware/target/sh/archos/ondio/usb-ondio.c5
-rw-r--r--firmware/target/sh/archos/player/usb-player.c5
-rw-r--r--firmware/target/sh/archos/recorder/usb-recorder.c5
4 files changed, 12 insertions, 8 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)
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)
diff --git a/firmware/target/sh/archos/player/usb-player.c b/firmware/target/sh/archos/player/usb-player.c
index c10e222f0a..e86003f2c2 100644
--- a/firmware/target/sh/archos/player/usb-player.c
+++ b/firmware/target/sh/archos/player/usb-player.c
@@ -20,10 +20,11 @@
#include <stdbool.h>
#include "cpu.h"
#include "system.h"
+#include "usb.h"
-bool usb_detect(void)
+int usb_detect(void)
{
- return (PADR & 0x8000) ? false : true;
+ return (PADR & 0x8000) ? USB_INSERTED : USB_EXTRACTED;
}
void usb_enable(bool on)
diff --git a/firmware/target/sh/archos/recorder/usb-recorder.c b/firmware/target/sh/archos/recorder/usb-recorder.c
index 7ed237068e..dfa8462203 100644
--- a/firmware/target/sh/archos/recorder/usb-recorder.c
+++ b/firmware/target/sh/archos/recorder/usb-recorder.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) > 500) ? true : false;
+ return (adc_read(ADC_USB_POWER) > 500) ? USB_INSERTED : USB_EXTRACTED;
}
void usb_enable(bool on)