diff options
Diffstat (limited to 'firmware/target/arm/s3c2440/i2c-s3c2440.h')
-rw-r--r-- | firmware/target/arm/s3c2440/i2c-s3c2440.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/firmware/target/arm/s3c2440/i2c-s3c2440.h b/firmware/target/arm/s3c2440/i2c-s3c2440.h new file mode 100644 index 0000000000..793ee213fd --- /dev/null +++ b/firmware/target/arm/s3c2440/i2c-s3c2440.h | |||
@@ -0,0 +1,46 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2007 by Michael Sevakis | ||
11 | * | ||
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. | ||
16 | * | ||
17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
18 | * KIND, either express or implied. | ||
19 | * | ||
20 | ****************************************************************************/ | ||
21 | |||
22 | /* chip-specific i2c functions */ | ||
23 | |||
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) | ||
29 | |||
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) | ||
40 | |||
41 | /* IICLC */ | ||
42 | #define I2C_FLT_ENB (1 << 2) | ||
43 | |||
44 | void i2c_init(void); | ||
45 | void i2c_write(int addr, const unsigned char *data, int count); | ||
46 | |||