1 |
872a81da
|
(no author)
|
#ifndef _OPENPCD_H
|
2 |
|
|
#define _OPENPCD_H
|
3 |
|
|
|
4 |
ae585a40
|
(no author)
|
#include <openpcd.h>
|
5 |
|
|
|
6 |
49be558f
|
(no author)
|
#define Hz
|
7 |
|
|
#define kHz *1000 Hz
|
8 |
|
|
#define MHz *1000 kHz
|
9 |
|
|
#define MCLK (48 MHz)
|
10 |
|
|
|
11 |
a914cae2
|
laforge
|
#define USB_VENDOR_ID OPENPCD_VENDOR_ID
|
12 |
49be558f
|
(no author)
|
|
13 |
50b1aff6
|
Harald Welte
|
#if defined(OLIMEX) || defined(SIMTRACE)
|
14 |
caf50003
|
(no author)
|
#define OPENPCD_PIO_LED2 AT91C_PIO_PA17
|
15 |
|
|
#define OPENPCD_PIO_LED1 AT91C_PIO_PA18
|
16 |
ae585a40
|
(no author)
|
#define OPENPCD_PIO_UDP_CNX AT91C_PIO_PA24
|
17 |
50b1aff6
|
Harald Welte
|
#define OPENPCD_PIO_UDP_PUPv4 AT91C_PIO_PA16
|
18 |
|
|
#define PIO_BOOTLDR AT91C_PIO_PA19 /* B1 used as bootloader switch */
|
19 |
|
|
#define USB_PRODUCT_ID SIMTRACE_PRODUCT_ID
|
20 |
41333333
|
(no author)
|
#else
|
21 |
7b041f45
|
(no author)
|
#if defined(PCD)
|
22 |
caf50003
|
(no author)
|
#define OPENPCD_PIO_UDP_CNX AT91C_PIO_PA15
|
23 |
49be558f
|
(no author)
|
#define OPENPCD_PIO_UDP_PUP AT91C_PIO_PA22
|
24 |
d1dd3611
|
laforge
|
#define OPENPCD_PIO_UDP_PUPv4 AT91C_PIO_PA16
|
25 |
caf50003
|
(no author)
|
#define OPENPCD_PIO_LED1 AT91C_PIO_PA25
|
26 |
|
|
#define OPENPCD_PIO_LED2 AT91C_PIO_PA26
|
27 |
ad18651c
|
(no author)
|
#define PIO_BOOTLDR AT91C_PIO_PA27
|
28 |
a914cae2
|
laforge
|
#define USB_PRODUCT_ID OPENPCD_PRODUCT_ID
|
29 |
7b041f45
|
(no author)
|
#elif defined(PICC)
|
30 |
|
|
#define OPENPCD_PIO_UDP_CNX NO_UDP_CNX
|
31 |
6c6b1878
|
laforge
|
#define OPENPCD_PIO_UDP_PUPv4 AT91C_PIO_PA16
|
32 |
7b041f45
|
(no author)
|
#define OPENPCD_PIO_LED1 AT91C_PIO_PA25
|
33 |
|
|
#define OPENPCD_PIO_LED2 AT91C_PIO_PA12
|
34 |
ad18651c
|
(no author)
|
#define PIO_BOOTLDR AT91C_PIO_PA6
|
35 |
a914cae2
|
laforge
|
#define USB_PRODUCT_ID OPENPICC_PRODUCT_ID
|
36 |
7b041f45
|
(no author)
|
#else
|
37 |
|
|
#error "unknown PCB"
|
38 |
|
|
#endif
|
39 |
41333333
|
(no author)
|
#endif
|
40 |
|
|
|
41 |
d1dd3611
|
laforge
|
|
42 |
caf50003
|
(no author)
|
#define OPENPCD_IRQ_RC632 AT91C_ID_IRQ1
|
43 |
|
|
|
44 |
a2aa489d
|
(no author)
|
/* PIO A mapping for OpenPCD v0.2
|
45 |
|
|
*
|
46 |
|
|
* PA0 TIOA0 B O CARRIER_DIV_HELP
|
47 |
|
|
* PA1 TIOB1 B O CARRIER_DIV
|
48 |
|
|
* PA2 PA2 P I N/C
|
49 |
|
|
* PA3 TWD A I/O I2C
|
50 |
|
|
*
|
51 |
|
|
* PA4 TWCK A O I2C
|
52 |
|
|
* PA5 PA5 P O RFID_RESET
|
53 |
|
|
* PA6 PA6 P I N/C
|
54 |
|
|
* PA7 PA7 P I N/C
|
55 |
|
|
*
|
56 |
|
|
* PA8 PA8 P I N/C
|
57 |
|
|
* PA9 DRXD A I Debug
|
58 |
|
|
* PA10 DTXD A O Debug
|
59 |
|
|
* PA11 NPCS0 A O SPI Slave Select
|
60 |
|
|
*
|
61 |
|
|
* PA12 MISO A I SPi Master In
|
62 |
|
|
* PA13 MOSI A O SPI Maste Out
|
63 |
|
|
* PA14 SPCK A O SPI Clock
|
64 |
|
|
* PA15 P I N/C
|
65 |
|
|
*
|
66 |
49be558f
|
(no author)
|
* PA16 PA16 P O UDP_PUP (disabled)
|
67 |
a2aa489d
|
(no author)
|
* PA17 TD A O MFIN *
|
68 |
|
|
* PA18 RD A I MFOUT
|
69 |
|
|
* PA19 RK A I CARRIER_DIV
|
70 |
|
|
*
|
71 |
|
|
* PA20 PA20 P I AB_DETECT
|
72 |
|
|
* PA21 PA21 P I N/C
|
73 |
|
|
* PA22 PA22 P I UDP_PUP
|
74 |
|
|
* PA23 PWM0 B O MFIN *
|
75 |
|
|
*
|
76 |
|
|
* PA24 P I N/C
|
77 |
|
|
* PA25 PA25 P O LED1
|
78 |
|
|
* PA26 PA26 P O LED2
|
79 |
|
|
* PA27 PA27 P I BOOTLDR_SW
|
80 |
|
|
*
|
81 |
|
|
* PA28 TCLK1 B I PIO_CARRIER
|
82 |
|
|
* PA29 TCLK2 B I CARRIER_DIV_HELP
|
83 |
|
|
* PA30 IRQ1 A I RC632_IRQ
|
84 |
|
|
* PA31 PA31 P O TRIGGER
|
85 |
|
|
*
|
86 |
|
|
* => PIO_PSR = 0x8f7181e4 (= PIO_PER)
|
87 |
|
|
* => PIO_OSR = 0x86010020 (= PIO_OER)
|
88 |
|
|
* => PIO_ASR = 0x400e7e18
|
89 |
|
|
* => PIO_BSR = 0x30800003
|
90 |
|
|
*
|
91 |
|
|
* * MFIN connected to both SSC and PWM output !!!
|
92 |
|
|
*/
|
93 |
|
|
|
94 |
bc7d72bf
|
(no author)
|
#define OPENPCD_PIO_CDIV_HELP_OUT AT91C_PA0_TIOA0
|
95 |
|
|
#define OPENPCD_PIO_CDIV_HELP_IN AT91C_PA29_TCLK2
|
96 |
|
|
#define OPENPCD_PIO_MFIN_PWM AT91C_PA23_PWM0
|
97 |
|
|
#define OPENPCD_PIO_CARRIER_DIV_OUT AT91C_PA1_TIOB0
|
98 |
|
|
#define OPENPCD_PIO_MFIN_SSC_TX AT91C_PA17_TD
|
99 |
|
|
#define OPENPCD_PIO_MFOUT_SSC_RX AT91C_PA18_RD
|
100 |
|
|
#define OPENPCD_PIO_SSP_CKIN AT91C_PA19_RK
|
101 |
|
|
#define OPENPCD_PIO_RC632_RESET AT91C_PIO_PA5
|
102 |
|
|
#define OPENPCD_PIO_TRIGGER AT91C_PIO_PA31
|
103 |
|
|
#define OPENPCD_PIO_CARRIER_IN AT91C_PA28_TCLK1
|
104 |
872a81da
|
(no author)
|
|
105 |
4cceea07
|
(no author)
|
|
106 |
7b041f45
|
(no author)
|
/* PIO Definition PICCSIM v0.3 (modified)
|
107 |
4cceea07
|
(no author)
|
*
|
108 |
|
|
* PA0 TIOA0 B O CARRIER_DIV_HELP
|
109 |
|
|
* PA1 TIOB1 B O SSC_CLOCK
|
110 |
|
|
* PA2 PA2 P O LOAD1
|
111 |
|
|
* PA3 PA3 P O LOAD2
|
112 |
7b041f45
|
(no author)
|
*
|
113 |
|
|
* PA4 PA4 P I PLL_LOCK
|
114 |
4cceea07
|
(no author)
|
* PA5 PA5 P O nSLAVE_RESET
|
115 |
|
|
* PA6 PA6 P I BOOTLOADER_SW
|
116 |
|
|
* PA7 PA7 P I N/C
|
117 |
7b041f45
|
(no author)
|
*
|
118 |
4cceea07
|
(no author)
|
* PA8 PA8 P O SPI_SS2 (Comparator)
|
119 |
|
|
* PA9 DRXD A I Debug
|
120 |
|
|
* PA10 DTXD A O Debug
|
121 |
|
|
* PA11 NPCS0 A O SPI_SS1 (Gain)
|
122 |
7b041f45
|
(no author)
|
*
|
123 |
|
|
* PA12 PA12 P O LED2 red
|
124 |
4cceea07
|
(no author)
|
* PA13 MOSI A O SPI Master Out
|
125 |
|
|
* PA14 SPCK A O SPI Clock
|
126 |
7b041f45
|
(no author)
|
* PA15 TF A I SSC Tx Frame
|
127 |
|
|
*
|
128 |
4cceea07
|
(no author)
|
* PA16 PA16 P O UDP_PUP (old)
|
129 |
fbc2ed57
|
(no author)
|
* PA17 TD A O SSC Tx Data (MOD) *
|
130 |
4cceea07
|
(no author)
|
* PA18 RD A I SSC Rx Data (SSC_DATA)
|
131 |
|
|
* PA19 RK A I SSC Rx Clock (SSC_CLOCK)
|
132 |
7b041f45
|
(no author)
|
*
|
133 |
4cceea07
|
(no author)
|
* PA20 PA20 P I AB_DETECT
|
134 |
|
|
* PA21 PA21 P I N/C
|
135 |
|
|
* PA22 PA22 P I N/C
|
136 |
fbc2ed57
|
(no author)
|
* PA23 PWM0 B O PWM Output (MOD) *
|
137 |
7b041f45
|
(no author)
|
*
|
138 |
4cceea07
|
(no author)
|
* PA24 PA24 P O PLL_INHIBIT
|
139 |
|
|
* PA25 PA25 P O LED1 green
|
140 |
7b041f45
|
(no author)
|
* PA26 TIOA2 B O TC FDT output (-> SPI Tx Frame)
|
141 |
4cceea07
|
(no author)
|
* PA27 TIOB2 B I DATA
|
142 |
7b041f45
|
(no author)
|
*
|
143 |
4cceea07
|
(no author)
|
* PA28 TCLK1 B I CARRIER
|
144 |
|
|
* PA29 TCLK2 B I CARRIER_DIV_HELP
|
145 |
|
|
* PA30 PA30 P I N/C
|
146 |
|
|
* PA31 PA31 P I N/C
|
147 |
|
|
*
|
148 |
|
|
*/
|
149 |
|
|
|
150 |
b0317c72
|
(no author)
|
#define OPENPICC_PIO_LOAD1 AT91C_PIO_PA2
|
151 |
|
|
#define OPENPICC_PIO_LOAD2 AT91C_PIO_PA3
|
152 |
fbc2ed57
|
(no author)
|
#define OPENPICC_PIO_nSLAVE_RESET AT91C_PIO_PA5
|
153 |
4cceea07
|
(no author)
|
#define OPENPICC_PIO_BOOTLDR AT91C_PIO_PA6
|
154 |
|
|
#define OPENPICC_PIO_SS2_DT_THRESH AT91C_PIO_PA8
|
155 |
|
|
#define OPENPICC_PIO_SS1_GAIN AT91C_PIO_PA11
|
156 |
7b041f45
|
(no author)
|
#define OPENPICC_PIO_PLL_LOCK AT91C_PIO_PA4
|
157 |
4cceea07
|
(no author)
|
|
158 |
6c6b1878
|
laforge
|
#define OPENPICC_PIO_FRAME AT91C_PIO_PA20
|
159 |
|
|
#define OPENPICC_PIO_SSC_DATA_CONTROL AT91C_PIO_PA21
|
160 |
|
|
#define OPENPICC_PIO_AB_DETECT AT91C_PIO_PA22
|
161 |
4cceea07
|
(no author)
|
#define OPENPICC_PIO_PLL_INHIBIT AT91C_PIO_PA24
|
162 |
b0317c72
|
(no author)
|
|
163 |
|
|
#define OPENPICC_ADC_FIELD_STRENGTH AT91C_ADC_CH4
|
164 |
|
|
#define OPENPICC_ADC_PLL_DEM AT91C_ADC_CH5
|
165 |
|
|
#define OPENPICC_ADC_AN1 AT91C_ADC_CH6
|
166 |
|
|
#define OPENPICC_ADC_AN2 AT91C_ADC_CH7
|
167 |
|
|
|
168 |
83a235b3
|
(no author)
|
#define OPENPCD_IRQ_PRIO_SPI AT91C_AIC_PRIOR_HIGHEST
|
169 |
52985be4
|
(no author)
|
#define OPENPCD_IRQ_PRIO_SSC (AT91C_AIC_PRIOR_HIGHEST-1)
|
170 |
bfff30bf
|
laforge
|
#define OPENPCD_IRQ_PRIO_SYS (AT91C_AIC_PRIOR_HIGHEST-2)
|
171 |
50b1aff6
|
Harald Welte
|
#define OPENPCD_IRQ_PRIO_USART (AT91C_AIC_PRIOR_HIGHEST-3)
|
172 |
bfff30bf
|
laforge
|
#define OPENPCD_IRQ_PRIO_TC_FDT (AT91C_AIC_PRIOR_LOWEST+3)
|
173 |
4cceea07
|
(no author)
|
#define OPENPCD_IRQ_PRIO_UDP (AT91C_AIC_PRIOR_LOWEST+2)
|
174 |
|
|
#define OPENPCD_IRQ_PRIO_PIT (AT91C_AIC_PRIOR_LOWEST+1)
|
175 |
83a235b3
|
(no author)
|
#define OPENPCD_IRQ_PRIO_RC632 AT91C_AIC_PRIOR_LOWEST
|
176 |
|
|
|
177 |
872a81da
|
(no author)
|
#endif /* _OPENPCD_H */
|