projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix undefined behaviour.
[bertos.git]
/
bertos
/
cpu
/
arm
/
drv
/
i2c_at91.h
diff --git
a/bertos/cpu/arm/drv/i2c_at91.h
b/bertos/cpu/arm/drv/i2c_at91.h
index ecf4974e59ac29efd5332652a3193e7c2fb6a492..88b5ab5508451de9fe2b10d96749463321de912d 100644
(file)
--- 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.
*
* invalidate any other reasons why the executable file might be covered by
* the GNU General Public License.
*
- * Copyright 20
03, 2004, 2005
Develer S.r.l. (http://www.develer.com/)
+ * Copyright 20
10
Develer S.r.l. (http://www.develer.com/)
*
* -->
*
*
* -->
*
- * \brief Driver for the AT91
ARM TWI (implementation
)
+ * \brief Driver for the AT91
SAM7X 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 */