diff options
Diffstat (limited to 'firmware/export/ascodec.h')
-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 |