mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-13 23:22:34 -05:00
Samsung YH925: Support for battery monitoring and charging. Discharge curve not yet calibrated.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22194 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
6e5448da22
commit
0f50302b1d
3 changed files with 5 additions and 6 deletions
|
|
@ -131,9 +131,9 @@
|
||||||
|
|
||||||
#define AB_REPEAT_ENABLE 1
|
#define AB_REPEAT_ENABLE 1
|
||||||
|
|
||||||
#define BATTERY_CAPACITY_DEFAULT 1550 /* default battery capacity */
|
#define BATTERY_CAPACITY_DEFAULT 900 /* default battery capacity */
|
||||||
#define BATTERY_CAPACITY_MIN 1500 /* min. capacity selectable */
|
#define BATTERY_CAPACITY_MIN 500 /* min. capacity selectable */
|
||||||
#define BATTERY_CAPACITY_MAX 3200 /* max. capacity selectable */
|
#define BATTERY_CAPACITY_MAX 1150 /* max. capacity selectable */
|
||||||
#define BATTERY_CAPACITY_INC 50 /* capacity increment */
|
#define BATTERY_CAPACITY_INC 50 /* capacity increment */
|
||||||
#define BATTERY_TYPES_COUNT 1 /* only one type */
|
#define BATTERY_TYPES_COUNT 1 /* only one type */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
#define ADC_CHANNEL_2 2
|
#define ADC_CHANNEL_2 2
|
||||||
#define ADC_CHANNEL_3 3
|
#define ADC_CHANNEL_3 3
|
||||||
|
|
||||||
#define ADC_BATTERY ADC_CHANNEL_0
|
#define ADC_BATTERY ADC_CHANNEL_1
|
||||||
/*
|
/*
|
||||||
#define ADC_UNKNOWN_1 1
|
#define ADC_UNKNOWN_1 1
|
||||||
#define ADC_REMOTE 2
|
#define ADC_REMOTE 2
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,5 @@ const unsigned short percent_to_volt_charge[11] =
|
||||||
/* Returns battery voltage from ADC [millivolts] */
|
/* Returns battery voltage from ADC [millivolts] */
|
||||||
unsigned int battery_adc_voltage(void)
|
unsigned int battery_adc_voltage(void)
|
||||||
{
|
{
|
||||||
/* return (adc_read(ADC_UNREG_POWER) * BATTERY_SCALE_FACTOR) >> 10; */
|
return (adc_read(ADC_UNREG_POWER) * BATTERY_SCALE_FACTOR) >> 10;
|
||||||
return 4100;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue