diff options
author | Jörg Hohensohn <hohensoh@rockbox.org> | 2004-09-13 07:39:00 +0000 |
---|---|---|
committer | Jörg Hohensohn <hohensoh@rockbox.org> | 2004-09-13 07:39:00 +0000 |
commit | 8e6174c41013f99110b7ee6d6f0ac1a7ec0d71f7 (patch) | |
tree | 785dad1e75574f2c7dfb7f27923cd7586b648040 | |
parent | 5cd074ecee48c112a0441c5e09f13e3bc32ae414 (diff) |
another fix towards Ondio USB passthrough
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5070 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | firmware/usb.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/firmware/usb.c b/firmware/usb.c index 2adf28a52b..566f9c43d2 100644 --- a/firmware/usb.c +++ b/firmware/usb.c @@ -76,12 +76,15 @@ static void usb_enable(bool on) if(on) { or_b(0x20, &PADRL); /* enable USB */ + and_b(~0x08, &PADRL); /* assert card detect */ } else { and_b(~0x20, &PADRL); /* disable USB */ + or_b(0x08, &PADRL); /* deassert card detect */ } - or_b(0x20, &PAIORL); /* output for USB enable */ + PACR2 &= ~0x00C0; /* use PA3 as GPIO */ + or_b(0x28, &PAIORL); /* output for USB enable and card detect */ #else /* standard HD Jukebox */ #ifdef HAVE_LCD_BITMAP if(read_hw_mask() & USB_ACTIVE_HIGH) |