Fix include problem
[kugel-rb.git] / firmware / export / i2c-pp.h
blobf126fa812de84e92639a3e1bcabdfaa9d9223eca
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * PP502X and PP5002 I2C driver
12 * Based on code from the ipodlinux project - http://ipodlinux.org/
13 * Adapted for Rockbox in November 2005
15 * Original file: linux/arch/armnommu/mach-ipod/hardware.c
17 * Copyright (c) 2003-2005 Bernard Leach (leachbj@bouncycastle.org)
19 * This program is free software; you can redistribute it and/or
20 * modify it under the terms of the GNU General Public License
21 * as published by the Free Software Foundation; either version 2
22 * of the License, or (at your option) any later version.
24 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
25 * KIND, either express or implied.
27 ****************************************************************************/
30 * PortalPlayer i2c driver
34 #ifndef _I2C_PP_H
35 #define _I2C_PP_H
37 /* TODO: Fully implement i2c driver */
39 /* To be used by drivers that need to do multiple i2c operations
40 atomically */
41 void i2c_lock(void);
42 void i2c_unlock(void);
44 int i2c_readbyte(unsigned int dev_addr, int addr);
45 int pp_i2c_send(unsigned int addr, int data0, int data1);
46 int i2c_readbytes(unsigned int dev_addr, int addr, int len, unsigned char *data);
47 int i2c_sendbytes(unsigned int dev_addr, int len, const unsigned char *data);
49 #endif