summaryrefslogtreecommitdiff
path: root/firmware/export/as3514.h
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2009-01-11 10:07:22 +0000
committerMichael Sevakis <jethead71@rockbox.org>2009-01-11 10:07:22 +0000
commit7d7969114da36a99afc4d80576ff9b089cb09e50 (patch)
tree48c3c574e382d80454c28a6b77de64a64f3cedcd /firmware/export/as3514.h
parentb84fe020a5bc497cee9b88eb782c2d4a9b7be711 (diff)
downloadrockbox-7d7969114da36a99afc4d80576ff9b089cb09e50.tar.gz
rockbox-7d7969114da36a99afc4d80576ff9b089cb09e50.zip
c200v1/e200v1: Add battery charging. This should be usable on v2 players but those should be evaluated for current, endpoint voltage and whether or not accurate battery readings may always be obtained (which determines algorithm setup and behavior).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19748 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export/as3514.h')
-rw-r--r--firmware/export/as3514.h33
1 files changed, 31 insertions, 2 deletions
diff --git a/firmware/export/as3514.h b/firmware/export/as3514.h
index 07aa0ebfe2..9489d1ae0d 100644
--- a/firmware/export/as3514.h
+++ b/firmware/export/as3514.h
@@ -249,8 +249,37 @@ extern void audiohw_set_frequency(int fsel);
249#define ADC_I_MICSUP2 11 /* Current of MicSup2 for remote control detection */ 249#define ADC_I_MICSUP2 11 /* Current of MicSup2 for remote control detection */
250#define ADC_VBAT 12 /* Single cell battery voltage */ 250#define ADC_VBAT 12 /* Single cell battery voltage */
251 251
252#define ADC_UNREG_POWER ADC_BVDD /* For compatibility */ 252/* AS3514_CHARGER */
253 253#define TMPSUP_OFF (0x1 << 7)
254#define CHG_I (0x7 << 4)
255#define CHG_I_400MA (0x7 << 4)
256#define CHG_I_350MA (0x6 << 4)
257#define CHG_I_300MA (0x5 << 4)
258#define CHG_I_250MA (0x4 << 4)
259#define CHG_I_200MA (0x3 << 4)
260#define CHG_I_150MA (0x2 << 4)
261#define CHG_I_100MA (0x1 << 4)
262#define CHG_I_50MA (0x0 << 4)
263#define CHG_V (0x7 << 1)
264#define CHG_V_4_25V (0x7 << 1)
265#define CHG_V_4_20V (0x6 << 1)
266#define CHG_V_4_15V (0x5 << 1)
267#define CHG_V_4_10V (0x4 << 1)
268#define CHG_V_4_05V (0x3 << 1)
269#define CHG_V_4_00V (0x2 << 1)
270#define CHG_V_3_95V (0x1 << 1)
271#define CHG_V_3_90V (0x0 << 1)
272#define CHG_OFF (0x1 << 0)
273
274/* AS3514_IRQ_ENRD0 */
275#define CHG_TMPHIGH (0x1 << 7)
276#define CHG_ENDOFCH (0x1 << 6)
277#define CHG_STATUS (0x1 << 5)
278#define CHG_CHANGED (0x1 << 4)
279#define USB_STATUS (0x1 << 3)
280#define USB_CHANGED (0x1 << 2)
281#define RVDD_WASLOW (0x1 << 1)
282#define BVDD_ISLOW (0x1 << 0)
254 283
255#define AS3514_I2C_ADDR 0x46 284#define AS3514_I2C_ADDR 0x46
256 285