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/export | |
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/export')
-rw-r--r-- | firmware/export/ascodec.h | 37 |
1 files changed, 33 insertions, 4 deletions
diff --git a/firmware/export/ascodec.h b/firmware/export/ascodec.h index 658153e420..3e104cbd07 100644 --- a/firmware/export/ascodec.h +++ b/firmware/export/ascodec.h | |||
@@ -23,13 +23,42 @@ | |||
23 | #define _ASCODEC_H | 23 | #define _ASCODEC_H |
24 | 24 | ||
25 | #include "config.h" | 25 | #include "config.h" |
26 | #include <stdbool.h> | ||
26 | 27 | ||
27 | #ifdef HAVE_AS3514 | 28 | #include "as3514.h" |
28 | #include "ascodec-target.h" | 29 | |
30 | #ifndef HAVE_AS3514 | ||
31 | # error Only for AS3514! | ||
32 | #endif | ||
33 | |||
34 | void ascodec_init(void) INIT_ATTR; | ||
35 | void ascodec_close(void); | ||
36 | |||
37 | void ascodec_lock(void); | ||
38 | void ascodec_unlock(void); | ||
39 | |||
40 | int ascodec_write(unsigned int index, unsigned int value); | ||
41 | |||
42 | int ascodec_read(unsigned int index); | ||
43 | |||
44 | int ascodec_readbytes(unsigned int index, unsigned int len, unsigned char *data); | ||
45 | |||
46 | void ascodec_wait_adc_finished(void); | ||
47 | |||
48 | #ifdef CONFIG_CHARGING | ||
49 | bool ascodec_endofch(void); | ||
50 | bool ascodec_chg_status(void); | ||
51 | void ascodec_monitor_endofch(void); | ||
52 | void ascodec_write_charger(int value); | ||
53 | int ascodec_read_charger(void); | ||
29 | #endif | 54 | #endif |
30 | 55 | ||
31 | #ifdef SAMSUNG_YPR0 | 56 | #ifdef HAVE_AS3543 |
32 | #include "ascodec-target.h" | 57 | void ascodec_write_pmu(unsigned int index, unsigned int subreg, |
58 | unsigned int value); | ||
59 | int ascodec_read_pmu(unsigned int index, unsigned int subreg); | ||
33 | #endif | 60 | #endif |
34 | 61 | ||
62 | void ascodec_suppressor_on(bool on); /* PP-only */ | ||
63 | |||
35 | #endif | 64 | #endif |