From e6bc6c482951851020e0e3b36e878bdae2b61249 Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Mon, 11 Apr 2005 11:17:31 +0000 Subject: iRiver: Implemented S/PDIF transmit power control. The optical LED is now off by default. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6268 a1c6a512-1295-4272-9138-f99709370657 --- firmware/drivers/power.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'firmware/drivers/power.c') diff --git a/firmware/drivers/power.c b/firmware/drivers/power.c index 3a4ae466bc..de62c7aa96 100644 --- a/firmware/drivers/power.c +++ b/firmware/drivers/power.c @@ -70,6 +70,9 @@ void power_init(void) GPIO_ENABLE |= 0x80000000; GPIO_FUNCTION |= 0x80000000; +#ifdef HAVE_SPDIF_POWER + spdif_power_enable(false); +#endif #else #ifdef HAVE_CHARGE_CTRL or_b(0x20, &PBIORL); /* Set charging control bit to output */ @@ -128,6 +131,19 @@ void charger_enable(bool on) #endif } +#ifdef HAVE_SPDIF_POWER +void spdif_power_enable(bool on) +{ + GPIO1_FUNCTION |= 0x01000000; + GPIO1_ENABLE |= 0x01000000; + + if(on) + GPIO1_OUT &= ~0x01000000; + else + GPIO1_OUT |= 0x01000000; +} +#endif + #ifndef HAVE_MMC void ide_power_enable(bool on) { @@ -261,4 +277,11 @@ void ide_power_enable(bool on) (void)on; } +#ifdef HAVE_SPDIF_POWER +void spdif_power_enable(bool on) +{ + (void)on; +} +#endif + #endif /* SIMULATOR */ -- cgit v1.2.3