summaryrefslogtreecommitdiffstats
path: root/firmware/target/coldfire
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/coldfire')
-rw-r--r--firmware/target/coldfire/iaudio/usb-iaudio.c5
-rw-r--r--firmware/target/coldfire/iriver/h100/usb-h100.c5
-rw-r--r--firmware/target/coldfire/iriver/h300/usb-h300.c5
3 files changed, 9 insertions, 6 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 @@
#include <stdbool.h>
#include "cpu.h"
#include "system.h"
+#include "usb.h"
void usb_init_device(void)
{
@@ -30,9 +31,9 @@ void usb_init_device(void)
or_l(0x00800000, &GPIO1_FUNCTION); /* USB detect */
}
-bool usb_detect(void)
+int usb_detect(void)
{
- return (GPIO1_READ & 0x00800000)?true:false;
+ return (GPIO1_READ & 0x00800000) ? USB_INSERTED : USB_EXTRACTED;
}
void usb_enable(bool on)
diff --git a/firmware/target/coldfire/iriver/h100/usb-h100.c b/firmware/target/coldfire/iriver/h100/usb-h100.c
index 3b00e967da..5a2f7f500b 100644
--- a/firmware/target/coldfire/iriver/h100/usb-h100.c
+++ b/firmware/target/coldfire/iriver/h100/usb-h100.c
@@ -21,6 +21,7 @@
#include "cpu.h"
#include "system.h"
#include "kernel.h"
+#include "usb.h"
void usb_init_device(void)
{
@@ -30,9 +31,9 @@ void usb_init_device(void)
or_l(0x01000040, &GPIO_FUNCTION);
}
-bool usb_detect(void)
+int usb_detect(void)
{
- return (GPIO1_READ & 0x80)?true:false;
+ return (GPIO1_READ & 0x80) ? USB_INSERTED : USB_EXTRACTED;
}
void usb_enable(bool on)
diff --git a/firmware/target/coldfire/iriver/h300/usb-h300.c b/firmware/target/coldfire/iriver/h300/usb-h300.c
index d08cc24dba..d50b7bc808 100644
--- a/firmware/target/coldfire/iriver/h300/usb-h300.c
+++ b/firmware/target/coldfire/iriver/h300/usb-h300.c
@@ -21,6 +21,7 @@
#include "cpu.h"
#include "system.h"
#include "kernel.h"
+#include "usb.h"
void usb_init_device(void)
{
@@ -35,9 +36,9 @@ void usb_init_device(void)
or_l(0x03000000, &GPIO_FUNCTION);
}
-bool usb_detect(void)
+int usb_detect(void)
{
- return (GPIO1_READ & 0x80)?true:false;
+ return (GPIO1_READ & 0x80) ? USB_INSERTED : USB_EXTRACTED;
}
void usb_enable(bool on)