summaryrefslogtreecommitdiff
path: root/firmware/export/ascodec.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/export/ascodec.h')
-rw-r--r--firmware/export/ascodec.h37
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
34void ascodec_init(void) INIT_ATTR;
35void ascodec_close(void);
36
37void ascodec_lock(void);
38void ascodec_unlock(void);
39
40int ascodec_write(unsigned int index, unsigned int value);
41
42int ascodec_read(unsigned int index);
43
44int ascodec_readbytes(unsigned int index, unsigned int len, unsigned char *data);
45
46void ascodec_wait_adc_finished(void);
47
48#ifdef CONFIG_CHARGING
49bool ascodec_endofch(void);
50bool ascodec_chg_status(void);
51void ascodec_monitor_endofch(void);
52void ascodec_write_charger(int value);
53int ascodec_read_charger(void);
29#endif 54#endif
30 55
31#ifdef SAMSUNG_YPR0 56#ifdef HAVE_AS3543
32#include "ascodec-target.h" 57void ascodec_write_pmu(unsigned int index, unsigned int subreg,
58 unsigned int value);
59int ascodec_read_pmu(unsigned int index, unsigned int subreg);
33#endif 60#endif
34 61
62void ascodec_suppressor_on(bool on); /* PP-only */
63
35#endif 64#endif