diff options
author | Karl Kurbjun <kkurbjun@gmail.com> | 2007-04-12 07:21:51 +0000 |
---|---|---|
committer | Karl Kurbjun <kkurbjun@gmail.com> | 2007-04-12 07:21:51 +0000 |
commit | dcf6bd23f3e40530ecbb9987f758b34bf35c7423 (patch) | |
tree | 2a3ce8df592a833fc213abd2b0094b48cf71a0b8 | |
parent | 4bd827b242fcb749792cb3f743adec8a890f4fc4 (diff) | |
download | rockbox-dcf6bd23f3e40530ecbb9987f758b34bf35c7423.tar.gz rockbox-dcf6bd23f3e40530ecbb9987f758b34bf35c7423.zip |
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
-rw-r--r-- | firmware/target/arm/gigabeat/meg-fx/ata-meg-fx.c | 10 | ||||
-rw-r--r-- | firmware/target/arm/gigabeat/meg-fx/usb-meg-fx.c | 23 |
2 files changed, 11 insertions, 22 deletions
diff --git a/firmware/target/arm/gigabeat/meg-fx/ata-meg-fx.c b/firmware/target/arm/gigabeat/meg-fx/ata-meg-fx.c index 3c6374f0cd..bc2b53d776 100644 --- a/firmware/target/arm/gigabeat/meg-fx/ata-meg-fx.c +++ b/firmware/target/arm/gigabeat/meg-fx/ata-meg-fx.c @@ -53,15 +53,7 @@ void ata_enable(bool on) USB_ATA_ENABLE; GPBCON=( GPGCON&~(1<<11) ) | (1<<10); /* Make the pin an output */ - 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; -*/ - +// GPBUP|=1<<5; /* Disable pullup in SOC as we are now driving */ } bool ata_is_coldstart(void) diff --git a/firmware/target/arm/gigabeat/meg-fx/usb-meg-fx.c b/firmware/target/arm/gigabeat/meg-fx/usb-meg-fx.c index ead286cec4..3aed8c3256 100644 --- a/firmware/target/arm/gigabeat/meg-fx/usb-meg-fx.c +++ b/firmware/target/arm/gigabeat/meg-fx/usb-meg-fx.c @@ -44,35 +44,32 @@ inline bool usb_detect(void) void usb_init_device(void) { /* Input is the default configuration, only pullups need to be disabled */ - GPFUP|=0x03; - GPGUP|= 1<<14; + GPFUP|=0x02; USB_VPLUS_PWR_ASSERT; GPBCON=( GPBCON&~(1<<13) ) | (1 << 12); - GPBUP|= 1<<6; sleep(HZ/20); - + /* Reset the usb port */ USB_RST_ASSERT; GPBCON = (GPBCON & ~0x200) | 0x100; /* Make sure reset line is an output */ - GPBUP |= 1<<4; /* Make sure pullup is disabled */ sleep(HZ/25); USB_RST_DEASSERT; - + /* needed to complete the reset */ ata_enable(false); - + sleep(HZ/15); /* 66ms */ - + ata_enable(true); - + sleep(HZ/25); - + /* leave chip in low power mode */ USB_VPLUS_PWR_DEASSERT; - + sleep(HZ/25); } @@ -90,8 +87,8 @@ void usb_enable(bool on) } /* Make sure USB_CRADLE_BUS pin is an output */ - GPHCON=( GPGCON&~(1<<17) ) | (1<<16); /* Make the pin an output */ - GPBUP|=1<<8; /* Disable pullup in SOC as we are now driving */ + GPHCON=( GPHCON&~(1<<17) ) | (1<<16); /* Make the pin an output */ + GPHUP|=1<<8; /* Disable pullup in SOC as we are now driving */ sleep(HZ/20); // > 50ms for detecting the enable state change } |