summaryrefslogtreecommitdiff
path: root/firmware/target/arm/as3525/sansa-clip/powermgmt-target.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/as3525/sansa-clip/powermgmt-target.h')
-rw-r--r--firmware/target/arm/as3525/sansa-clip/powermgmt-target.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/firmware/target/arm/as3525/sansa-clip/powermgmt-target.h b/firmware/target/arm/as3525/sansa-clip/powermgmt-target.h
new file mode 100644
index 0000000000..691d134ffa
--- /dev/null
+++ b/firmware/target/arm/as3525/sansa-clip/powermgmt-target.h
@@ -0,0 +1,42 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2009 by Michael Sevakis
11 * Copyright (C) 2008 by Bertrik Sikken
12 *
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License
15 * as published by the Free Software Foundation; either version 2
16 * of the License, or (at your option) any later version.
17 *
18 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 * KIND, either express or implied.
20 *
21 ****************************************************************************/
22#ifndef POWERMGMT_TARGET_H
23#define POWERMGMT_TARGET_H
24
25/* Check if topped-off and monitor voltage while plugged. */
26#define BATT_FULL_VOLTAGE 4160
27#define BATT_VAUTO_RECHARGE 4100
28#define BATT_CHG_V CHG_V_4_20V
29#define BATT_CHG_I CHG_I_100MA
30#define CHARGER_TOTAL_TIMER (6*3600*2) /* about 1.5 * capacity / current */
31#define ADC_BATTERY ADC_BVDD
32
33void powermgmt_init_target(void);
34void charging_algorithm_step(void);
35void charging_algorithm_close(void);
36
37/* We want to be able to reset the averaging filter */
38#define HAVE_RESET_BATTERY_FILTER
39
40#define BATT_AVE_SAMPLES 32
41
42#endif /* POWERMGMT_TARGET_H */