X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fcpu%2Farm%2Fdrv%2Fi2c_at91.h;h=88b5ab5508451de9fe2b10d96749463321de912d;hb=9f1e77249c5475b19340e46b9903c66da6c6c937;hp=ecf4974e59ac29efd5332652a3193e7c2fb6a492;hpb=8ef424e8fe50a16b2ac69ddbd2ba34347f628aca;p=bertos.git diff --git a/bertos/cpu/arm/drv/i2c_at91.h b/bertos/cpu/arm/drv/i2c_at91.h index ecf4974e..88b5ab55 100644 --- a/bertos/cpu/arm/drv/i2c_at91.h +++ b/bertos/cpu/arm/drv/i2c_at91.h @@ -26,29 +26,29 @@ * invalidate any other reasons why the executable file might be covered by * the GNU General Public License. * - * Copyright 2003, 2004, 2005 Develer S.r.l. (http://www.develer.com/) + * Copyright 2010 Develer S.r.l. (http://www.develer.com/) * * --> * - * \brief Driver for the AT91 ARM TWI (implementation) + * \brief Driver for the AT91SAM7X I2C (interface) * - * \version $Id$ + * \author Daniele Basile * - * \author Francesco Sacchi */ +#ifndef I2C_AT91_H +#define I2C_AT91_H -#ifndef DRV_AT91_TWI_H -#define DRV_AT91_TWI_H +#include -#include - -typedef int16_t twi_iaddr_t; - -#define TWI_NO_IADDR (-1) +/** + * \name I2C devices enum + */ +enum +{ + I2C0, -void twi_init(void); -bool twi_read(uint8_t id, twi_iaddr_t byte1, twi_iaddr_t byte2, twi_iaddr_t byte3, void *_buf, size_t len); -bool twi_write(uint8_t id, twi_iaddr_t byte1, twi_iaddr_t byte2, twi_iaddr_t byte3, const void *_buf, size_t len); + I2C_CNT /**< Number of serial ports */ +}; -#endif /* DRV_AT91_TWI_H */ +#endif /* I2C_AT91_H */