@@ -69,8 +69,8 @@ extern "C" {
69
69
#define UART_0_ISR isr_sercom0
70
70
/* UART 0 pin configuration */
71
71
#define UART_0_PORT (PORT->Group[0])
72
- #define UART_0_TX_PIN PIN_PA04
73
- #define UART_0_RX_PIN PIN_PA05
72
+ #define UART_0_TX_PIN (4)
73
+ #define UART_0_RX_PIN (5)
74
74
#define UART_0_PINS (PORT_PA04 | PORT_PA05)
75
75
#define UART_0_REF_F (8000000UL)
76
76
@@ -84,6 +84,48 @@ extern "C" {
84
84
#define UART_1_PINS
85
85
/** @} */
86
86
87
+
88
+ /**
89
+ * @name SPI configuration
90
+ * @{
91
+ */
92
+ #define SPI_NUMOF (2)
93
+ #define SPI_0_EN 1
94
+ #define SPI_1_EN 1
95
+
96
+ /* SPI0 */
97
+ #define SPI_0_DEV SERCOM4->SPI
98
+ #define SPI_IRQ_0 SERCOM4_IRQn
99
+ #define SPI_0_DOPO (1)
100
+ #define SPI_0_DIPO (0)
101
+ #define SPI_0_F_REF (8000000UL)
102
+
103
+ #define SPI_0_SCLK_DEV PORT->Group[2]
104
+ #define SPI_0_SCLK_PIN (18)
105
+
106
+ #define SPI_0_MISO_DEV PORT->Group[2]
107
+ #define SPI_0_MISO_PIN (19)
108
+
109
+ #define SPI_0_MOSI_DEV PORT->Group[1]
110
+ #define SPI_0_MOSI_PIN (30)
111
+
112
+ /* SPI1 */
113
+ #define SPI_1_DEV SERCOM5->SPI
114
+ #define SPI_IRQ_1 SERCOM5_IRQn
115
+ #define SPI_1_DOPO (1)
116
+ #define SPI_1_DIPO (2)
117
+ #define SPI_1_F_REF (8000000UL)
118
+
119
+ #define SPI_1_SCLK_DEV PORT->Group[1]
120
+ #define SPI_1_SCLK_PIN (23)
121
+
122
+ #define SPI_1_MISO_DEV PORT->Group[1]
123
+ #define SPI_1_MISO_PIN (02)
124
+
125
+ #define SPI_1_MOSI_DEV PORT->Group[1]
126
+ #define SPI_1_MOSI_PIN (22)
127
+ /** @} */
128
+
87
129
/**
88
130
* @name I2C configuration
89
131
* @{
@@ -110,36 +152,96 @@ extern "C" {
110
152
* @name Random Number Generator configuration
111
153
* @{
112
154
*/
113
- #define RANDOM_NUMOF (0U)
155
+ #define RANDOM_NUMOF (0U)
114
156
/** @} */
115
157
116
158
/**
117
159
* @name GPIO configuration
118
160
* @{
119
161
*/
120
- #define GPIO_NUMOF (4U)
121
- #define GPIO_0_EN 1
122
- #define GPIO_1_EN 1
123
- #define GPIO_2_EN 1
124
- #define GPIO_3_EN 1
162
+ #define GPIO_NUMOF (9U)
163
+ #define GPIO_0_EN 1
164
+ #define GPIO_1_EN 1
165
+ #define GPIO_2_EN 1
166
+ #define GPIO_3_EN 1
167
+ /*4-7 -> internal */
168
+ #define GPIO_4_EN 1
169
+ #define GPIO_5_EN 1
170
+ #define GPIO_6_EN 1
171
+ #define GPIO_7_EN 1
172
+ #define GPIO_8_EN 1
173
+ #define GPIO_9_EN 0
174
+ #define GPIO_10_EN 0
175
+ #define GPIO_11_EN 0
176
+
177
+ #define GPIO_12_EN 0
178
+ #define GPIO_13_EN 0
179
+ #define GPIO_14_EN 0
180
+ #define GPIO_15_EN 0
181
+
182
+ #define GPIO_NO_EXTINT (18)
125
183
126
184
/* GPIO channel 0 config */
127
- #define GPIO_0_DEV PORT->Group[0]
128
- #define GPIO_0_PIN PIN_PA13
129
- #define GPIO_0_EXTINT 13
185
+ #define GPIO_0_DEV PORT->Group[0]
186
+ #define GPIO_0_PIN (13)
187
+ #define GPIO_0_EXTINT (13)
130
188
/* GPIO channel 1 config */
131
- /* SW0 Button, configure w/ GPIO_PULLUP and GPIO_FALLING */
132
- #define GPIO_1_DEV PORT->Group[0]
133
- #define GPIO_1_PIN PIN_PA28
134
- #define GPIO_1_EXTINT 8
189
+ #define GPIO_1_DEV PORT->Group[0]
190
+ #define GPIO_1_PIN (28)
191
+ #define GPIO_1_EXTINT (8)
135
192
/* GPIO channel 2 config */
136
- #define GPIO_2_DEV PORT->Group[0]
137
- #define GPIO_2_PIN PIN_PA15
138
- #define GPIO_2_EXTINT 15
193
+ #define GPIO_2_DEV PORT->Group[0]
194
+ #define GPIO_2_PIN (15)
195
+ #define GPIO_2_EXTINT (15)
139
196
/* GPIO channel 3 config */
140
- #define GPIO_3_DEV PORT->Group[0]
141
- #define GPIO_3_PIN PIN_PA19
142
- #define GPIO_3_EXTINT 3
197
+ #define GPIO_3_DEV PORT->Group[0]
198
+ #define GPIO_3_PIN (19)
199
+ #define GPIO_3_EXTINT (3)
200
+ /* GPIO 4-7 Internal radio pins*/
201
+ /* GPIO channel 4 config radio CS*/
202
+ #define GPIO_4_DEV PORT->Group[1]
203
+ #define GPIO_4_PIN (31)
204
+ #define GPIO_4_EXTINT GPIO_NO_EXTINT
205
+ /* GPIO channel 5 config radio IRQ0*/
206
+ #define GPIO_5_DEV PORT->Group[1]
207
+ #define GPIO_5_PIN (0)
208
+ #define GPIO_5_EXTINT (0)
209
+ /* GPIO channel 6 config radio reset*/
210
+ #define GPIO_6_DEV PORT->Group[1]
211
+ #define GPIO_6_PIN (15)
212
+ #define GPIO_6_EXTINT GPIO_NO_EXTINT
213
+ /* GPIO channel 7 config radio sleep*/
214
+ #define GPIO_7_DEV PORT->Group[0]
215
+ #define GPIO_7_PIN (20)
216
+ #define GPIO_7_EXTINT GPIO_NO_EXTINT
217
+ /* GPIO channel 8 config */
218
+ #define GPIO_8_DEV PORT->Group[0]
219
+ #define GPIO_8_PIN (27)
220
+ #define GPIO_8_EXTINT GPIO_NO_EXTINT
221
+ /* GPIO channel 9 config */
222
+ #define GPIO_9_DEV
223
+ #define GPIO_9_PIN
224
+ #define GPIO_9_EXTINT
225
+ /* GPIO channel 10 config */
226
+ #define GPIO_10_DEV
227
+ #define GPIO_10_PIN
228
+ #define GPIO_10_EXTINT
229
+ /* GPIO channel 11 config */
230
+ #define GPIO_11_DEV
231
+ #define GPIO_11_PIN
232
+ #define GPIO_11_EXTINT
233
+ /* GPIO channel 12 config */
234
+ #define GPIO_12_PIN
235
+ #define GPIO_12_EXTINT
236
+ /* GPIO channel 13 config */
237
+ #define GPIO_13_PIN
238
+ #define GPIO_13_EXTINT
239
+ /* GPIO channel 14 config */
240
+ #define GPIO_14_PIN
241
+ #define GPIO_14_EXTINT
242
+ /* GPIO channel 15 config */
243
+ #define GPIO_15_PIN
244
+ #define GPIO_15_EXTINT
143
245
/** @} */
144
246
145
247
#ifdef __cplusplus
0 commit comments