From 85528242844b71ac45e5331363a48a2956c38275 Mon Sep 17 00:00:00 2001 From: Rafaël Carré Date: Sun, 8 Jan 2012 01:43:16 +0000 Subject: ascodec-target.h: remove move prototypes to ascodec.h move code to ascodec*.c YPR0: use adc-as3514.c instead of duplicating it TODO: merge as3514.h and ascodec.h ? git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31626 a1c6a512-1295-4272-9138-f99709370657 --- firmware/target/arm/as3525/ascodec-as3525.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'firmware/target/arm/as3525/ascodec-as3525.c') diff --git a/firmware/target/arm/as3525/ascodec-as3525.c b/firmware/target/arm/as3525/ascodec-as3525.c index ddf6786409..be81178859 100644 --- a/firmware/target/arm/as3525/ascodec-as3525.c +++ b/firmware/target/arm/as3525/ascodec-as3525.c @@ -44,7 +44,7 @@ interrupt bit 7 is raised and DACNT is not decremented after the transfer. */ -#include "ascodec-target.h" +#include "ascodec.h" #include "clock-target.h" #include "kernel.h" #include "system.h" @@ -534,6 +534,29 @@ bool ascodec_chg_status(void) { return ascodec_enrd0_shadow & CHG_STATUS; } + +void ascodec_monitor_endofch(void) +{ + /* already enabled */ +} + +void ascodec_write_charger(int value) +{ +#if CONFIG_CPU == AS3525 + ascodec_write(AS3514_CHARGER, value); +#else + ascodec_write_pmu(AS3543_CHARGER, 1, value); +#endif +} + +int ascodec_read_charger(void) +{ +#if CONFIG_CPU == AS3525 + return ascodec_read(AS3514_CHARGER); +#else + return ascodec_read_pmu(AS3543_CHARGER, 1); +#endif +} #endif /* CONFIG_CHARGING */ /* -- cgit v1.2.3