OpenCores
URL https://opencores.org/ocsvn/gecko3/gecko3/trunk

Subversion Repositories gecko3

[/] [gecko3/] [trunk/] [GECKO3COM/] [gecko3com-fw/] [firmware/] [include/] [i2c.h] - Diff between revs 9 and 32

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 9 Rev 32
Line 35... Line 35...
#define _I2C_H_
#define _I2C_H_
 
 
/**
/**
 * i2c read function. reads a block of data with the length len
 * i2c read function. reads a block of data with the length len
 *
 *
 * \param[in] i2c_addr device adress on the i2c bus
 * \param[in] addr device adress on the i2c bus
 * \param[out] buf result buffer, contains the readed data when successful
 * \param[out] buf result buffer, contains the readed data when successful
 * \param[in] len length of the block to read
 * \param[in] len length of the block to read
 * \return returns non-zero if successful, else 0
 * \return returns non-zero if successful, else 0
 */
 */
unsigned char i2c_read (unsigned char addr, xdata unsigned char *buf, unsigned char len);
unsigned char i2c_read (unsigned char addr, xdata unsigned char *buf, unsigned char len);
 
 
/**
/**
 * i2c write function. writes a block of data with the length len
 * i2c write function. writes a block of data with the length len
 *
 *
 * \param[in] i2c_addr device adress on the i2c bus
 * \param[in] addr device adress on the i2c bus
 * \param[in] buf data buffer, contains the data to be written
 * \param[in] buf data buffer, contains the data to be written
 * \param[in] len length of the block to write
 * \param[in] len length of the block to write
 * \return returns non-zero if successful, else 0
 * \return returns non-zero if successful, else 0
 */
 */
unsigned char i2c_write (unsigned char addr, xdata const unsigned char *buf, unsigned char len);
unsigned char i2c_write (unsigned char addr, xdata const unsigned char *buf, unsigned char len);

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.