mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-10 13:45:10 -05:00
mrobe100: power off HDD (courtesy of lowlight) ~2h extra playtime
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22313 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
1b87b45e40
commit
65eaf60b35
1 changed files with 16 additions and 4 deletions
|
|
@ -35,6 +35,11 @@ void power_init(void)
|
||||||
GPIOB_ENABLE |= 0x80;
|
GPIOB_ENABLE |= 0x80;
|
||||||
GPIOB_OUTPUT_VAL &= ~0x80;
|
GPIOB_OUTPUT_VAL &= ~0x80;
|
||||||
GPIOB_OUTPUT_EN |= 0x80;
|
GPIOB_OUTPUT_EN |= 0x80;
|
||||||
|
|
||||||
|
/* IDE power */
|
||||||
|
GPIOC_ENABLE |= 0x8;
|
||||||
|
GPIOC_OUTPUT_VAL &= ~0x8;
|
||||||
|
GPIOC_OUTPUT_EN |= 0x8;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int power_input_status(void)
|
unsigned int power_input_status(void)
|
||||||
|
|
@ -45,15 +50,22 @@ unsigned int power_input_status(void)
|
||||||
|
|
||||||
void ide_power_enable(bool on)
|
void ide_power_enable(bool on)
|
||||||
{
|
{
|
||||||
(void)on;
|
if(on)
|
||||||
/* We do nothing */
|
{
|
||||||
|
GPIO_CLEAR_BITWISE(GPIOC_OUTPUT_VAL, 0x08);
|
||||||
|
DEV_EN |= DEV_IDE0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DEV_EN &= ~DEV_IDE0;
|
||||||
|
GPIO_SET_BITWISE(GPIOC_OUTPUT_VAL, 0x08);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool ide_powered(void)
|
bool ide_powered(void)
|
||||||
{
|
{
|
||||||
/* pretend we are always powered - we don't turn it off */
|
return ((GPIOC_INPUT_VAL & 0x8) == 0);
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void power_off(void)
|
void power_off(void)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue