diff options
Diffstat (limited to 'firmware/target/coldfire/iriver/h300/powermgmt-h300.c')
-rw-r--r-- | firmware/target/coldfire/iriver/h300/powermgmt-h300.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/firmware/target/coldfire/iriver/h300/powermgmt-h300.c b/firmware/target/coldfire/iriver/h300/powermgmt-h300.c index b2d844075e..1bf1de59d9 100644 --- a/firmware/target/coldfire/iriver/h300/powermgmt-h300.c +++ b/firmware/target/coldfire/iriver/h300/powermgmt-h300.c | |||
@@ -48,11 +48,11 @@ const unsigned short percent_to_volt_charge[11] = | |||
48 | 48 | ||
49 | /* FIX: this value is picked at random */ | 49 | /* FIX: this value is picked at random */ |
50 | #define BATTERY_SCALE_FACTOR 6000 | 50 | #define BATTERY_SCALE_FACTOR 6000 |
51 | /* full-scale ADC readout (2^8) in millivolt */ | 51 | /* full-scale ADC readout (2^10) in millivolt */ |
52 | 52 | ||
53 | /* Returns battery voltage from ADC [millivolts] */ | 53 | /* Returns battery voltage from ADC [millivolts] */ |
54 | unsigned int battery_adc_voltage(void) | 54 | unsigned int battery_adc_voltage(void) |
55 | { | 55 | { |
56 | return (adc_read(ADC_UNREG_POWER) * BATTERY_SCALE_FACTOR) >> 8; | 56 | return (adc_read(ADC_UNREG_POWER) * BATTERY_SCALE_FACTOR) >> 10; |
57 | } | 57 | } |
58 | 58 | ||