sam3x: add TWI register definitions, and add peripherals port defines.
[bertos.git] / bertos / cpu / cortex-m3 / io / sam3.h
index 54aedad01328abe29642e6fec781f514a9bc9345..e80b101a9861966b96e89474a368456d0c7a8eb9 100644 (file)
 #include "sam3_rstc.h"
 #include "sam3_adc.h"
 #include "sam3_dacc.h"
+#include "sam3_tc.h"
 
 /**
  * U(S)ART I/O pins
 /*\}*/
 
 /**
- * PIO I/O pins
+ * SPI I/O pins
  */
 /*\{*/
 #if CPU_CM3_SAM3U
        #define SPI0_MOSI   13
        #define SPI0_MISO   12
 #endif
+/*\}*/
+
+/**
+ * TWI I/O pins
+ */
+/*\{*/
+#if CPU_CM3_SAM3X
+       #define TWI0_PORT   PIOA_BASE
+       #define TWI1_PORT   PIOA_BASE
+
+       #define TWI0_PERIPH  PIO_PERIPH_A
+       #define TWI1_PERIPH  PIO_PERIPH_A
+
+       #define TWI0_TWD    17
+       #define TWI0_TWCK   18
+       #define TWI1_TWD    12
+       #define TWI1_TWCK   13
+#endif
+
 /*\}*/
 #endif /* SAM3_H */