summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorJörg Hohensohn <hohensoh@rockbox.org>2004-09-11 02:41:58 +0000
committerJörg Hohensohn <hohensoh@rockbox.org>2004-09-11 02:41:58 +0000
commitb26f6e05f8ea215738ef7b8d4ed82a73eca2fe0e (patch)
treefec2afdd93d48feebd9b2384d2ee9541fab408be /firmware
parent66b45eeb596af1bd950832cd16b3752430f691c4 (diff)
downloadrockbox-b26f6e05f8ea215738ef7b8d4ed82a73eca2fe0e.zip
rockbox-b26f6e05f8ea215738ef7b8d4ed82a73eca2fe0e.tar.gz
rockbox-b26f6e05f8ea215738ef7b8d4ed82a73eca2fe0e.tar.bz2
rockbox-b26f6e05f8ea215738ef7b8d4ed82a73eca2fe0e.tar.xz
Ondio USB enable, ATA part of it is missing by now
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5064 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/export/config-ondiofm.h3
-rw-r--r--firmware/export/config-ondiosp.h3
-rw-r--r--firmware/usb.c12
3 files changed, 18 insertions, 0 deletions
diff --git a/firmware/export/config-ondiofm.h b/firmware/export/config-ondiofm.h
index 62e7c86..646dedd 100644
--- a/firmware/export/config-ondiofm.h
+++ b/firmware/export/config-ondiofm.h
@@ -46,6 +46,9 @@
/* How to detect USB */
#define USB_FMRECORDERSTYLE 1 /* like FM, on AN1 */
+/* How to enable USB */
+#define USB_ENABLE_ONDIOSTYLE 1 /* with PA5 */
+
/* The start address index for ROM builds */
#define ROM_START 0x12010 /* don't know yet */
diff --git a/firmware/export/config-ondiosp.h b/firmware/export/config-ondiosp.h
index f8d04bf..7e364f7 100644
--- a/firmware/export/config-ondiosp.h
+++ b/firmware/export/config-ondiosp.h
@@ -46,6 +46,9 @@
/* How to detect USB */
#define USB_FMRECORDERSTYLE 1 /* like FM, on AN1 */
+/* How to enable USB */
+#define USB_ENABLE_ONDIOSTYLE 1 /* with PA5 */
+
/* The start address index for ROM builds */
#define ROM_START 0x12010 /* don't know yet */
diff --git a/firmware/usb.c b/firmware/usb.c
index 3be6d75..1b9e747 100644
--- a/firmware/usb.c
+++ b/firmware/usb.c
@@ -77,6 +77,17 @@ static void usb_enable(bool on)
on = !on;
#endif
+#ifdef USB_ENABLE_ONDIOSTYLE
+ if(on)
+ {
+ or_b(0x20, &PADRL); /* enable USB */
+ }
+ else
+ {
+ and_b(~0x20, &PADRL);
+ }
+ or_b(0x20, &PAIORL);
+#else /* standard HD Jukebox */
if(on)
{
and_b(~0x04, &PADRH); /* enable USB */
@@ -86,6 +97,7 @@ static void usb_enable(bool on)
or_b(0x04, &PADRH);
}
or_b(0x04, &PAIORH);
+#endif
}
static void usb_slave_mode(bool on)