Make Philips SA9200 build again

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20226 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Mark Arigo 2009-03-07 04:41:37 +00:00
parent a88d5f045f
commit da1ca5177f
4 changed files with 61 additions and 17 deletions

View file

@ -47,14 +47,3 @@ const unsigned short percent_to_volt_charge[11] =
/* Sansa Li Ion 750mAH FIXME */
3300, 3680, 3740, 3760, 3780, 3810, 3870, 3930, 3970, 4070, 4160
};
/* ADC should read 0x3ff=5.12V */
#define BATTERY_SCALE_FACTOR 5125
/* full-scale ADC readout (2^10) in millivolt */
/* Returns battery voltage from ADC [millivolts] */
unsigned int battery_adc_voltage(void)
{
return (adc_read(ADC_UNREG_POWER) * BATTERY_SCALE_FACTOR) >> 10;
}