|
1 | 1 | /* |
2 | 2 | * Copyright (C) 2016 Freie Universität Berlin |
3 | | - * 2016 Inria |
| 3 | + * 2016-2017 Inria |
4 | 4 | * |
5 | 5 | * This file is subject to the terms and conditions of the GNU Lesser |
6 | 6 | * General Public License v2.1. See the file LICENSE in the top level |
7 | 7 | * directory for more details. |
8 | 8 | */ |
9 | 9 |
|
10 | 10 | /** |
11 | | - * @ingroup boards_arduino-mkr1000 |
| 11 | + * @ingroup boards_arduino-mkr-common |
12 | 12 | * @{ |
13 | 13 | * |
14 | 14 | * @file |
15 | | - * @brief Configuration of CPU peripherals for Arduino MKR1000 board |
| 15 | + * @brief Configuration of CPU peripherals for Arduino MKR boards |
16 | 16 | * |
17 | 17 | * @author Thomas Eichinger <thomas.eichinger@fu-berlin.de> |
18 | 18 | * @author Hauke Petersen <hauke.petersen@fu-berlin.de> |
|
24 | 24 | #ifndef PERIPH_CONF_H |
25 | 25 | #define PERIPH_CONF_H |
26 | 26 |
|
27 | | -#include <stdint.h> |
28 | | - |
29 | | -#include "cpu.h" |
30 | 27 | #include "periph_cpu.h" |
31 | 28 |
|
32 | 29 | #ifdef __cplusplus |
33 | 30 | extern "C" { |
34 | 31 | #endif |
35 | 32 |
|
36 | 33 | /** |
37 | | - * @brief External oscillator and clock configuration |
| 34 | + * @name External oscillator and clock configuration |
38 | 35 | * |
39 | 36 | * For selection of the used CORECLOCK, we have implemented two choices: |
40 | 37 | * |
@@ -127,32 +124,23 @@ static const uart_conf_t uart_config[] = { |
127 | 124 | * @{ |
128 | 125 | */ |
129 | 126 | #define PWM_0_EN 1 |
130 | | -#define PWM_1_EN 1 |
131 | | -#define PWM_MAX_CHANNELS 2 |
| 127 | +#define PWM_MAX_CHANNELS (2U) |
132 | 128 | /* for compatibility with test application */ |
133 | 129 | #define PWM_0_CHANNELS PWM_MAX_CHANNELS |
134 | | -#define PWM_1_CHANNELS PWM_MAX_CHANNELS |
135 | 130 |
|
136 | 131 | /* PWM device configuration */ |
137 | 132 | static const pwm_conf_t pwm_config[] = { |
138 | 133 | #if PWM_0_EN |
139 | 134 | {TCC0, { |
140 | 135 | /* GPIO pin, MUX value, TCC channel */ |
141 | | - { GPIO_PIN(PA, 8), GPIO_MUX_E, 0 }, |
142 | | - { GPIO_PIN(PA, 9), GPIO_MUX_E, 1 }, |
143 | | - }}, |
144 | | -#endif |
145 | | -#if PWM_1_EN |
146 | | - {TCC1, { |
147 | | - /* GPIO pin, MUX value, TCC channel */ |
148 | | - { GPIO_PIN(PA, 6), GPIO_MUX_E, 0 }, |
149 | | - { GPIO_PIN(PA, 7), GPIO_MUX_E, 1 }, |
150 | | - }}, |
| 136 | + { GPIO_PIN(PA, 10), GPIO_MUX_F, 2 }, /* ~2 */ |
| 137 | + { GPIO_PIN(PA, 11), GPIO_MUX_F, 3 }, /* ~3 */ |
| 138 | + }} |
151 | 139 | #endif |
152 | 140 | }; |
153 | 141 |
|
154 | 142 | /* number of devices that are actually defined */ |
155 | | -#define PWM_NUMOF (2U) |
| 143 | +#define PWM_NUMOF (sizeof(pwm_config) / sizeof(pwm_config[0])) |
156 | 144 | /** @} */ |
157 | 145 |
|
158 | 146 | /** |
@@ -204,7 +192,7 @@ static const spi_conf_t spi_config[] = { |
204 | 192 | .miso_pad = SPI_PAD_MISO_3, |
205 | 193 | .mosi_pad = SPI_PAD_MOSI_0_SCK_1 |
206 | 194 | }, |
207 | | - { /* SPI Pins connected to WINC1500 wifi module */ |
| 195 | + { |
208 | 196 | .dev = &SERCOM2->SPI, |
209 | 197 | .miso_pin = GPIO_PIN(PA, 15), |
210 | 198 | .mosi_pin = GPIO_PIN(PA, 12), |
|
0 commit comments