1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2008 by Dave Chapman
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
31 # error Only for AS3514!
34 void ascodec_init(void) INIT_ATTR
;
35 void ascodec_close(void);
37 void ascodec_lock(void);
38 void ascodec_unlock(void);
40 int ascodec_write(unsigned int index
, unsigned int value
);
42 int ascodec_read(unsigned int index
);
44 int ascodec_readbytes(unsigned int index
, unsigned int len
, unsigned char *data
);
46 void ascodec_wait_adc_finished(void);
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);
57 void ascodec_write_pmu(unsigned int index
, unsigned int subreg
,
59 int ascodec_read_pmu(unsigned int index
, unsigned int subreg
);