aboutsummaryrefslogtreecommitdiffstats
path: root/openpcd/firmware/src/openpcd.h
diff options
context:
space:
mode:
Diffstat (limited to 'openpcd/firmware/src/openpcd.h')
-rw-r--r--openpcd/firmware/src/openpcd.h28
1 files changed, 22 insertions, 6 deletions
diff --git a/openpcd/firmware/src/openpcd.h b/openpcd/firmware/src/openpcd.h
index 0fdf9a1..bd3cfb4 100644
--- a/openpcd/firmware/src/openpcd.h
+++ b/openpcd/firmware/src/openpcd.h
@@ -15,10 +15,19 @@
#define OPENPCD_PIO_UDP_CNX AT91C_PIO_PA24
#define OPENPCD_PIO_UDP_PUP AT91C_PIO_PA16
#else
+#if defined(PCD)
#define OPENPCD_PIO_UDP_CNX AT91C_PIO_PA15
#define OPENPCD_PIO_UDP_PUP AT91C_PIO_PA22
#define OPENPCD_PIO_LED1 AT91C_PIO_PA25
#define OPENPCD_PIO_LED2 AT91C_PIO_PA26
+#elif defined(PICC)
+#define OPENPCD_PIO_UDP_CNX NO_UDP_CNX
+#define OPENPCD_PIO_UDP_PUP AT91C_PIO_PA22
+#define OPENPCD_PIO_LED1 AT91C_PIO_PA25
+#define OPENPCD_PIO_LED2 AT91C_PIO_PA12
+#else
+#error "unknown PCB"
+#endif
#endif
#define OPENPCD_IRQ_RC632 AT91C_ID_IRQ1
@@ -85,36 +94,43 @@
#define OPENPCD_PIO_CARRIER_IN AT91C_PA28_TCLK1
-/* PIO Definition PICCSIM v0.3
+/* PIO Definition PICCSIM v0.3 (modified)
*
* PA0 TIOA0 B O CARRIER_DIV_HELP
* PA1 TIOB1 B O SSC_CLOCK
* PA2 PA2 P O LOAD1
* PA3 PA3 P O LOAD2
- * PA4 PA4 P I N/C
+ *
+ * PA4 PA4 P I PLL_LOCK
* PA5 PA5 P O nSLAVE_RESET
* PA6 PA6 P I BOOTLOADER_SW
* PA7 PA7 P I N/C
+ *
* PA8 PA8 P O SPI_SS2 (Comparator)
* PA9 DRXD A I Debug
* PA10 DTXD A O Debug
* PA11 NPCS0 A O SPI_SS1 (Gain)
- * PA12 PA12 P I N/C
+ *
+ * PA12 PA12 P O LED2 red
* PA13 MOSI A O SPI Master Out
* PA14 SPCK A O SPI Clock
- * PA15 PA15 P I PLL_LOCK
+ * PA15 TF A I SSC Tx Frame
+ *
* PA16 PA16 P O UDP_PUP (old)
* PA17 TD A O SSC Tx Data (MOD) *
* PA18 RD A I SSC Rx Data (SSC_DATA)
* PA19 RK A I SSC Rx Clock (SSC_CLOCK)
+ *
* PA20 PA20 P I AB_DETECT
* PA21 PA21 P I N/C
* PA22 PA22 P I N/C
* PA23 PWM0 B O PWM Output (MOD) *
+ *
* PA24 PA24 P O PLL_INHIBIT
* PA25 PA25 P O LED1 green
- * PA26 PA26 P O LED2 red
+ * PA26 TIOA2 B O TC FDT output (-> SPI Tx Frame)
* PA27 TIOB2 B I DATA
+ *
* PA28 TCLK1 B I CARRIER
* PA29 TCLK2 B I CARRIER_DIV_HELP
* PA30 PA30 P I N/C
@@ -128,7 +144,7 @@
#define OPENPICC_PIO_BOOTLDR AT91C_PIO_PA6
#define OPENPICC_PIO_SS2_DT_THRESH AT91C_PIO_PA8
#define OPENPICC_PIO_SS1_GAIN AT91C_PIO_PA11
-#define OPENPICC_PIO_PLL_LOCK AT91C_PIO_PA15
+#define OPENPICC_PIO_PLL_LOCK AT91C_PIO_PA4
#define OPENPICC_PIO_AB_DETECT AT91C_PIO_PA20
#define OPENPICC_PIO_PLL_INHIBIT AT91C_PIO_PA24