3 /*-----------------------------------------------------------------------------
\r
5 * I2C read/write functions for FX2
\r
7 *-----------------------------------------------------------------------------
\r
9 * Code taken from USRP2 firmware (GNU Radio Project), version 3.0.2,
\r
11 * Copyright 2003 Free Software Foundation, Inc.
\r
13 *-----------------------------------------------------------------------------
\r
15 * This code is part of usbjtag. usbjtag is free software; you can redistribute
\r
17 * it and/or modify it under the terms of the GNU General Public License as
\r
19 * published by the Free Software Foundation; either version 2 of the License,
\r
21 * or (at your option) any later version. usbjtag is distributed in the hope
\r
23 * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
\r
25 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
27 * GNU General Public License for more details. You should have received a
\r
29 * copy of the GNU General Public License along with this program in the file
\r
31 * COPYING; if not, write to the Free Software Foundation, Inc., 51 Franklin
\r
33 * St, Fifth Floor, Boston, MA 02110-1301 USA
\r
35 *-----------------------------------------------------------------------------
\r
47 // returns non-zero if successful, else 0
\r
49 unsigned char i2c_read (unsigned char addr, xdata unsigned char *buf, unsigned char len);
\r
53 // returns non-zero if successful, else 0
\r
55 unsigned char i2c_write (unsigned char addr, xdata const unsigned char *buf, unsigned char len);
\r
59 #endif /* _I2C_H_ */
\r