diff options
author | Rafaël Carré <rafael.carre@gmail.com> | 2012-01-08 01:43:16 +0000 |
---|---|---|
committer | Rafaël Carré <rafael.carre@gmail.com> | 2012-01-08 01:43:16 +0000 |
commit | 85528242844b71ac45e5331363a48a2956c38275 (patch) | |
tree | 10d8af9068c4f12b2f8f673f3a835bb3211c2f0e /firmware/target/arm/as3525/ascodec-as3525.c | |
parent | 2737a66471a640d83aba07578bd67b811a340034 (diff) | |
download | rockbox-85528242844b71ac45e5331363a48a2956c38275.tar.gz rockbox-85528242844b71ac45e5331363a48a2956c38275.zip |
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
Diffstat (limited to 'firmware/target/arm/as3525/ascodec-as3525.c')
-rw-r--r-- | firmware/target/arm/as3525/ascodec-as3525.c | 25 |
1 files changed, 24 insertions, 1 deletions
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 @@ | |||
44 | interrupt bit 7 is raised and DACNT is not decremented after the transfer. | 44 | interrupt bit 7 is raised and DACNT is not decremented after the transfer. |
45 | */ | 45 | */ |
46 | 46 | ||
47 | #include "ascodec-target.h" | 47 | #include "ascodec.h" |
48 | #include "clock-target.h" | 48 | #include "clock-target.h" |
49 | #include "kernel.h" | 49 | #include "kernel.h" |
50 | #include "system.h" | 50 | #include "system.h" |
@@ -534,6 +534,29 @@ bool ascodec_chg_status(void) | |||
534 | { | 534 | { |
535 | return ascodec_enrd0_shadow & CHG_STATUS; | 535 | return ascodec_enrd0_shadow & CHG_STATUS; |
536 | } | 536 | } |
537 | |||
538 | void ascodec_monitor_endofch(void) | ||
539 | { | ||
540 | /* already enabled */ | ||
541 | } | ||
542 | |||
543 | void ascodec_write_charger(int value) | ||
544 | { | ||
545 | #if CONFIG_CPU == AS3525 | ||
546 | ascodec_write(AS3514_CHARGER, value); | ||
547 | #else | ||
548 | ascodec_write_pmu(AS3543_CHARGER, 1, value); | ||
549 | #endif | ||
550 | } | ||
551 | |||
552 | int ascodec_read_charger(void) | ||
553 | { | ||
554 | #if CONFIG_CPU == AS3525 | ||
555 | return ascodec_read(AS3514_CHARGER); | ||
556 | #else | ||
557 | return ascodec_read_pmu(AS3543_CHARGER, 1); | ||
558 | #endif | ||
559 | } | ||
537 | #endif /* CONFIG_CHARGING */ | 560 | #endif /* CONFIG_CHARGING */ |
538 | 561 | ||
539 | /* | 562 | /* |