Tweaking iPod Video battery configuration. Dangerous battery level is latest reached...
[kugel-rb.git] / firmware / target / arm / s3c2440 / i2c-s3c2440.h
blob793ee213fd8039bb53483e7c8f820ba28e62ec20
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2007 by Michael Sevakis
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 /* chip-specific i2c functions */
24 /* IICCON */
25 #define I2C_ACKGEN (1 << 7)
26 #define I2C_TXCLK_512 (1 << 6)
27 #define I2C_TXRX_INTENB (1 << 5)
28 #define I2C_TXRX_INTPND (1 << 4)
30 /* IICSTAT */
31 #define I2C_MODE_MASTER (2 << 6)
32 #define I2C_MODE_TX (1 << 6)
33 #define I2C_BUSY (1 << 5)
34 #define I2C_START (1 << 5)
35 #define I2C_RXTX_ENB (1 << 4)
36 #define I2C_BUS_ARB_FAILED (1 << 3)
37 #define I2C_S_ADDR_STAT (1 << 2)
38 #define I2C_S_ADDR_MATCH (1 << 1)
39 #define I2C_ACK_L (1 << 0)
41 /* IICLC */
42 #define I2C_FLT_ENB (1 << 2)
44 void i2c_init(void);
45 void i2c_write(int addr, const unsigned char *data, int count);