mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-20 18:42:41 -05:00
M:Robe 500: Initialize power related pins with pin setup function
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23996 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
aa57da3468
commit
47af429f2e
1 changed files with 11 additions and 3 deletions
|
|
@ -35,9 +35,18 @@ void power_init(void)
|
||||||
{
|
{
|
||||||
/* Initialize IDE power pin */
|
/* Initialize IDE power pin */
|
||||||
/* set GIO17 (ATA power) on and output */
|
/* set GIO17 (ATA power) on and output */
|
||||||
ide_power_enable(true);
|
/* 17: output, non-inverted, no-irq, falling edge, no-chat, normal */
|
||||||
IO_GIO_DIR1 &= ~(1<<1);
|
dm320_set_io(17, false, false, false, false, false, 0x00);
|
||||||
|
ide_power_enable(true); /* Power up the drive */
|
||||||
|
|
||||||
/* Charger detect */
|
/* Charger detect */
|
||||||
|
/* 25: input, non-inverted, no-irq, falling edge, no-chat, normal */
|
||||||
|
dm320_set_io(25, false, false, false, false, false, 0x00);
|
||||||
|
|
||||||
|
/* Power down pin */
|
||||||
|
/* 26: input, non-inverted, no-irq, falling edge, no-chat, normal */
|
||||||
|
dm320_set_io(26, false, false, false, false, false, 0x00);
|
||||||
|
IO_GIO_BITCLR1 = 1<<10; /* Make sure it is not active */
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int power_input_status(void)
|
unsigned int power_input_status(void)
|
||||||
|
|
@ -79,6 +88,5 @@ void power_off(void)
|
||||||
lcd_sleep();
|
lcd_sleep();
|
||||||
sleep(HZ);
|
sleep(HZ);
|
||||||
/* Hard shutdown */
|
/* Hard shutdown */
|
||||||
IO_GIO_DIR1 &= ~(1<<10);
|
|
||||||
IO_GIO_BITSET1 = 1<<10;
|
IO_GIO_BITSET1 = 1<<10;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue