summaryrefslogtreecommitdiff
path: root/firmware/drivers/power.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2003-01-16 15:11:29 +0000
committerDaniel Stenberg <daniel@haxx.se>2003-01-16 15:11:29 +0000
commitd7b4645f5c7274660c9a020f172ac54f546686b5 (patch)
treedd4506aabd67d6e4abb4ec9eebc85219a34e66f2 /firmware/drivers/power.c
parented69390542e8d4a1d8b46853807db28db28e4b46 (diff)
downloadrockbox-d7b4645f5c7274660c9a020f172ac54f546686b5.tar.gz
rockbox-d7b4645f5c7274660c9a020f172ac54f546686b5.zip
Ludovic Lange's initial code for FM Recorder, edited and adjusted by me.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3110 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers/power.c')
-rw-r--r--firmware/drivers/power.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/firmware/drivers/power.c b/firmware/drivers/power.c
index b61090ff26..bb0ec80942 100644
--- a/firmware/drivers/power.c
+++ b/firmware/drivers/power.c
@@ -31,8 +31,12 @@ bool charger_enabled = 0;
31 31
32bool charger_inserted(void) 32bool charger_inserted(void)
33{ 33{
34#ifdef ARCHOS_RECORDER 34#ifdef HAVE_CHARGE_CTRL
35#ifdef HAVE_FMADC
36 return adc_read(ADC_CHARGE_REGULATOR) < 0x1FF;
37#else
35 return adc_read(ADC_EXT_POWER) > 0x100; 38 return adc_read(ADC_EXT_POWER) > 0x100;
39#endif
36#else 40#else
37 return (PADR & 1) == 0; 41 return (PADR & 1) == 0;
38#endif 42#endif