1
0
Fork 0
forked from len0rd/rockbox

Ondio USB mode works, but only with external MMC

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5072 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jörg Hohensohn 2004-09-14 22:27:52 +00:00
parent 7025d835c8
commit eb8fef7cce

View file

@ -242,16 +242,17 @@ int ata_soft_reset(void)
void ata_enable(bool on)
{
PBCR1 &= ~0x0C00; /* use PB13 as GPIO, if not modified below */
PBCR1 &= ~0x0CC0; /* PB13 and TxD1 become GPIOs, if not modified below */
if (on)
{
/* serial setup */
PBCR1 |= 0x0800; /* as SCK1 */
PBCR1 |= 0x0880; /* as SCK1, TxD1 */
}
else
{
PBDR |= 0x2000; /* drive PB13 high */
PBIOR |= 0x2000; /* output PB13 */
PBIOR &= ~0x0800; /* high impedance for TxD1 GPIO */
}
}
@ -275,10 +276,12 @@ int ata_init(void)
if(adc_read(ADC_MMC_SWITCH) < 0x200)
{ /* MMC inserted */
PADR &= ~0x1000; /* clear PA12 */
PADR |= 0x0400; /* chip select internal flash */
}
else
{ /* no MMC, use internal memory */
PADR |= 0x1000; /* set PA12 */
PADR |= 0x0200; /* chip select external flash */
}
sleeping = false;