1
0
Fork 0
forked from len0rd/rockbox

Fix the backlight and led bugs from my last commit

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13119 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Karl Kurbjun 2007-04-12 07:21:51 +00:00
parent 4bd827b242
commit dcf6bd23f3
2 changed files with 11 additions and 22 deletions

View file

@ -53,15 +53,7 @@ void ata_enable(bool on)
USB_ATA_ENABLE; USB_ATA_ENABLE;
GPBCON=( GPGCON&~(1<<11) ) | (1<<10); /* Make the pin an output */ GPBCON=( GPGCON&~(1<<11) ) | (1<<10); /* Make the pin an output */
GPBUP|=1<<5; /* Disable pullup in SOC as we are now driving */ // GPBUP|=1<<5; /* Disable pullup in SOC as we are now driving */
/* Code was originally: (Does not seem that GPG12 is connected in the F series)
if(on)
GPGDAT &= 1<<12;
else
GPGDAT |= 1<<12;
*/
} }
bool ata_is_coldstart(void) bool ata_is_coldstart(void)

View file

@ -44,19 +44,16 @@ inline bool usb_detect(void)
void usb_init_device(void) void usb_init_device(void)
{ {
/* Input is the default configuration, only pullups need to be disabled */ /* Input is the default configuration, only pullups need to be disabled */
GPFUP|=0x03; GPFUP|=0x02;
GPGUP|= 1<<14;
USB_VPLUS_PWR_ASSERT; USB_VPLUS_PWR_ASSERT;
GPBCON=( GPBCON&~(1<<13) ) | (1 << 12); GPBCON=( GPBCON&~(1<<13) ) | (1 << 12);
GPBUP|= 1<<6;
sleep(HZ/20); sleep(HZ/20);
/* Reset the usb port */ /* Reset the usb port */
USB_RST_ASSERT; USB_RST_ASSERT;
GPBCON = (GPBCON & ~0x200) | 0x100; /* Make sure reset line is an output */ GPBCON = (GPBCON & ~0x200) | 0x100; /* Make sure reset line is an output */
GPBUP |= 1<<4; /* Make sure pullup is disabled */
sleep(HZ/25); sleep(HZ/25);
USB_RST_DEASSERT; USB_RST_DEASSERT;
@ -90,8 +87,8 @@ void usb_enable(bool on)
} }
/* Make sure USB_CRADLE_BUS pin is an output */ /* Make sure USB_CRADLE_BUS pin is an output */
GPHCON=( GPGCON&~(1<<17) ) | (1<<16); /* Make the pin an output */ GPHCON=( GPHCON&~(1<<17) ) | (1<<16); /* Make the pin an output */
GPBUP|=1<<8; /* Disable pullup in SOC as we are now driving */ GPHUP|=1<<8; /* Disable pullup in SOC as we are now driving */
sleep(HZ/20); // > 50ms for detecting the enable state change sleep(HZ/20); // > 50ms for detecting the enable state change
} }