2007-09-22 23:17:52 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* __________ __ ___.
|
|
|
|
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
* \/ \/ \/ \/ \/
|
2008-04-09 15:25:20 +00:00
|
|
|
* $Id$
|
2007-09-22 23:17:52 +00:00
|
|
|
*
|
2008-04-09 15:25:20 +00:00
|
|
|
* Copyright (C) 2008 by Maurus Cuelenaere
|
2007-09-22 23:17:52 +00:00
|
|
|
*
|
2008-06-28 18:10:04 +00:00
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
2007-09-22 23:17:52 +00:00
|
|
|
*
|
|
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
* KIND, either express or implied.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
2011-12-05 09:53:23 +00:00
|
|
|
#ifndef I2C_DM320_H
|
|
|
|
#define I2C_DM320_H
|
|
|
|
|
|
|
|
#include "system.h"
|
|
|
|
|
2007-09-30 16:29:21 +00:00
|
|
|
void i2c_init(void);
|
2008-04-09 15:25:20 +00:00
|
|
|
int i2c_write(unsigned short address, const unsigned char *data, int count);
|
|
|
|
int i2c_read(unsigned short address, unsigned char* buf, int count);
|
2011-12-05 09:53:23 +00:00
|
|
|
|
|
|
|
#ifdef HAVE_SOFTWARE_I2C
|
|
|
|
int i2c_read_bytes(unsigned short address, unsigned short reg,
|
|
|
|
unsigned char* buf, int count);
|
2021-07-10 06:56:32 +00:00
|
|
|
int i2c_write_read_bytes(unsigned short address,
|
|
|
|
const unsigned char* buf_write, int count_write,
|
|
|
|
unsigned char* buf_read, int count_read);
|
2011-12-05 09:53:23 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|