diff options
author | Marcoen Hirschberg <marcoen@gmail.com> | 2006-02-24 15:42:52 +0000 |
---|---|---|
committer | Marcoen Hirschberg <marcoen@gmail.com> | 2006-02-24 15:42:52 +0000 |
commit | 338e2bbb0c6673452c64378ef9e609d5c19c7558 (patch) | |
tree | 7314096e43a7eedfd7091c39fed97c0c33400827 /firmware/drivers/power.c | |
parent | b902428180c11def61f2d3caa2612b9f80d7d41a (diff) | |
download | rockbox-338e2bbb0c6673452c64378ef9e609d5c19c7558.tar.gz rockbox-338e2bbb0c6673452c64378ef9e609d5c19c7558.zip |
first gigabeat commit
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8831 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers/power.c')
-rw-r--r-- | firmware/drivers/power.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/firmware/drivers/power.c b/firmware/drivers/power.c index d7750a33b2..b62121298d 100644 --- a/firmware/drivers/power.c +++ b/firmware/drivers/power.c | |||
@@ -122,6 +122,8 @@ bool charger_inserted(void) | |||
122 | /* FM or V2, can also charge from the USB port */ | 122 | /* FM or V2, can also charge from the USB port */ |
123 | return (adc_read(ADC_CHARGE_REGULATOR) < 0x1FF) || | 123 | return (adc_read(ADC_CHARGE_REGULATOR) < 0x1FF) || |
124 | (adc_read(ADC_USB_POWER) < 0x1FF); | 124 | (adc_read(ADC_USB_POWER) < 0x1FF); |
125 | #elif defined(TOSHIBA_GIGABEAT_F) | ||
126 | return false; | ||
125 | #else | 127 | #else |
126 | /* Player */ | 128 | /* Player */ |
127 | return (PADR & 1) == 0; | 129 | return (PADR & 1) == 0; |
@@ -189,6 +191,8 @@ void ide_power_enable(bool on) | |||
189 | P1 &= ~0x08; | 191 | P1 &= ~0x08; |
190 | #elif CONFIG_CPU == PNX0101 | 192 | #elif CONFIG_CPU == PNX0101 |
191 | /* no ide controller */ | 193 | /* no ide controller */ |
194 | #elif defined(TOSHIBA_GIGABEAT_F) | ||
195 | /* Gigabeat TODO */ | ||
192 | #else /* SH1 based archos */ | 196 | #else /* SH1 based archos */ |
193 | bool touched = false; | 197 | bool touched = false; |
194 | #ifdef NEEDS_ATA_POWER_ON | 198 | #ifdef NEEDS_ATA_POWER_ON |
@@ -241,6 +245,8 @@ bool ide_powered(void) | |||
241 | return true; | 245 | return true; |
242 | #elif defined(GMINI_ARCH) | 246 | #elif defined(GMINI_ARCH) |
243 | return (P1 & 0x08?true:false); | 247 | return (P1 & 0x08?true:false); |
248 | #elif defined(TOSHIBA_GIGABEAT_F) | ||
249 | return false; | ||
244 | #else /* SH1 based archos */ | 250 | #else /* SH1 based archos */ |
245 | #if defined(NEEDS_ATA_POWER_ON) || defined(HAVE_ATA_POWER_OFF) | 251 | #if defined(NEEDS_ATA_POWER_ON) || defined(HAVE_ATA_POWER_OFF) |
246 | #ifdef ATA_POWER_PLAYERSTYLE | 252 | #ifdef ATA_POWER_PLAYERSTYLE |
@@ -283,6 +289,8 @@ void power_off(void) | |||
283 | #elif defined(GMINI_ARCH) | 289 | #elif defined(GMINI_ARCH) |
284 | P1 &= ~1; | 290 | P1 &= ~1; |
285 | P1CON &= ~1; | 291 | P1CON &= ~1; |
292 | #elif defined(TOSHIBA_GIGABEAT_F) | ||
293 | /* FIXME: Can we turn the device off, or only enter sleep mode? */ | ||
286 | #else | 294 | #else |
287 | #ifdef HAVE_POWEROFF_ON_PBDR | 295 | #ifdef HAVE_POWEROFF_ON_PBDR |
288 | and_b(~0x10, &PBDRL); | 296 | and_b(~0x10, &PBDRL); |