Make backup dialog modal.
[maemo-rb.git] / firmware / export / ascodec.h
blob94030a2b34db9c1d816421f6a19bdcfd7bdf40e9
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
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 ****************************************************************************/
22 #ifndef _ASCODEC_H
23 #define _ASCODEC_H
25 #include "config.h"
26 #include <stdbool.h>
28 #include "as3514.h"
30 #ifndef HAVE_AS3514
31 # error Only for AS3514!
32 #endif
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);
54 #endif
56 #ifdef HAVE_AS3543
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);
60 #endif
62 #endif