Add header flash module.
[bertos.git] / bertos / cpu / arm / drv / i2c_at91.h
index ecf4974e59ac29efd5332652a3193e7c2fb6a492..88b5ab5508451de9fe2b10d96749463321de912d 100644 (file)
  * 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 <asterix@develer.com>
  *
- * \author Francesco Sacchi <batt@develer.com>
  */
 
+#ifndef I2C_AT91_H
+#define I2C_AT91_H
 
-#ifndef DRV_AT91_TWI_H
-#define DRV_AT91_TWI_H
+#include <drv/i2c.h>
 
-#include <cfg/compiler.h>
-
-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 */