summaryrefslogtreecommitdiff
path: root/firmware/export
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/export')
-rw-r--r--firmware/export/as3514.h25
1 files changed, 18 insertions, 7 deletions
diff --git a/firmware/export/as3514.h b/firmware/export/as3514.h
index acf1344..85da144 100644
--- a/firmware/export/as3514.h
+++ b/firmware/export/as3514.h
@@ -363,14 +363,25 @@ extern void audiohw_set_sampr_dividers(int fsel);
/* AS3514_CHARGER */
#define TMPSUP_OFF (0x1 << 7)
#define CHG_I (0x7 << 4)
-#define CHG_I_400MA (0x7 << 4)
-#define CHG_I_350MA (0x6 << 4)
-#define CHG_I_300MA (0x5 << 4)
-#define CHG_I_250MA (0x4 << 4)
-#define CHG_I_200MA (0x3 << 4)
-#define CHG_I_150MA (0x2 << 4)
-#define CHG_I_100MA (0x1 << 4)
+#ifdef HAVE_AS3543 /* AS3543 uses charge current steps of 70 mA */
+#define CHG_I_55MA (0x0 << 4)
+#define CHG_I_70MA (0x1 << 4)
+#define CHG_I_140MA (0x2 << 4)
+#define CHG_I_210MA (0x3 << 4)
+#define CHG_I_280MA (0x4 << 4)
+#define CHG_I_350MA (0x5 << 4)
+#define CHG_I_420MA (0x6 << 4)
+#define CHG_I_460MA (0x7 << 4)
+#else /* AS3514 uses charge current steps of 50 mA */
#define CHG_I_50MA (0x0 << 4)
+#define CHG_I_100MA (0x1 << 4)
+#define CHG_I_150MA (0x2 << 4)
+#define CHG_I_200MA (0x3 << 4)
+#define CHG_I_250MA (0x4 << 4)
+#define CHG_I_300MA (0x5 << 4)
+#define CHG_I_350MA (0x6 << 4)
+#define CHG_I_400MA (0x7 << 4)
+#endif
#define CHG_V (0x7 << 1)
#define CHG_V_4_25V (0x7 << 1)
#define CHG_V_4_20V (0x6 << 1)