diff --git a/boards/arduino-due/include/periph_conf.h b/boards/arduino-due/include/periph_conf.h index b46d95b933cc..1dce388d692a 100644 --- a/boards/arduino-due/include/periph_conf.h +++ b/boards/arduino-due/include/periph_conf.h @@ -28,7 +28,7 @@ extern "C" { #endif /** - * @name Clock configuration + * @name Clock configuration * @{ */ /* targeted system core clock */ @@ -48,13 +48,12 @@ extern "C" { /** @} */ /** - * @name Timer peripheral configuration + * @name Timer peripheral configuration * @{ */ static const timer_conf_t timer_config[] = { - /* dev, channel 0 ID */ - { TC0, ID_TC0 }, - { TC1, ID_TC3 }, + { .dev = TC0, .id_ch0 = ID_TC0 }, + { .dev = TC1, .id_ch0 = ID_TC3 } }; #define TIMER_0_ISR isr_tc0 @@ -64,15 +63,50 @@ static const timer_conf_t timer_config[] = { /** @} */ /** - * @name UART configuration + * @name UART configuration * @{ */ static const uart_conf_t uart_config[] = { - /* device, rx port, tx port, rx pin, tx pin, mux, PMC bit, IRGn line */ - {(Uart *)UART, PIOA, PIOA, 8, 9, GPIO_MUX_A, ID_UART, UART_IRQn}, - {(Uart *)USART0, PIOA, PIOA, 10, 11, GPIO_MUX_A, ID_USART0, USART0_IRQn}, - {(Uart *)USART1, PIOA, PIOA, 12, 13, GPIO_MUX_A, ID_USART1, USART1_IRQn}, - {(Uart *)USART3, PIOD, PIOD, 4, 5, GPIO_MUX_B, ID_USART3, USART3_IRQn} + { + .dev = (Uart *)UART, + .rx_port = PIOA, + .tx_port = PIOA, + .rx_pin = 8, + .tx_pin = 9, + .mux = GPIO_MUX_A, + .pmc_id = ID_UART, + .irqn = UART_IRQn + }, + { + .dev = (Uart *)USART0, + .rx_port = PIOA, + .tx_port = PIOA, + .rx_pin = 10, + .tx_pin = 11, + .mux = GPIO_MUX_A, + .pmc_id = ID_USART0, + .irqn = USART0_IRQn + }, + { + .dev = (Uart *)USART1, + .rx_port = PIOA, + .tx_port = PIOA, + .rx_pin = 12, + .tx_pin = 13, + .mux = GPIO_MUX_A, + .pmc_id = ID_USART1, + .irqn = USART1_IRQn + }, + { + .dev = (Uart *)USART3, + .rx_port = PIOD, + .tx_port = PIOD, + .rx_pin = 4, + .tx_pin = 5, + .mux = GPIO_MUX_B, + .pmc_id = ID_USART3, + .irqn = USART3_IRQn + }, }; /* define interrupt vectors */ @@ -85,7 +119,7 @@ static const uart_conf_t uart_config[] = { /** @} */ /** -* @name SPI configuration +* @name SPI configuration * @{ */ static const spi_conf_t spi_config[] = { @@ -107,10 +141,10 @@ static const spi_conf_t spi_config[] = { * @{ */ static const pwm_chan_conf_t pwm_chan[] = { - { .pin = GPIO_PIN(PC, 21), .hwchan = 4, }, - { .pin = GPIO_PIN(PC, 22), .hwchan = 5, }, - { .pin = GPIO_PIN(PC, 23), .hwchan = 6, }, - { .pin = GPIO_PIN(PC, 24), .hwchan = 7, } + { .pin = GPIO_PIN(PC, 21), .hwchan = 4 }, + { .pin = GPIO_PIN(PC, 22), .hwchan = 5 }, + { .pin = GPIO_PIN(PC, 23), .hwchan = 6 }, + { .pin = GPIO_PIN(PC, 24), .hwchan = 7 } }; #define PWM_NUMOF (1U)