1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 05:12:57 +01:00

boards: use explicit GCLK_SRC defines

This commit is contained in:
Benjamin Valentin 2020-01-17 13:51:57 +01:00 committed by Benjamin Valentin
parent 38b6ee56f3
commit c4e0ed4b79
21 changed files with 112 additions and 112 deletions

View File

@ -48,7 +48,7 @@ static const uart_conf_t uart_config[] = {
.rx_pad = UART_PAD_RX_3,
.tx_pad = UART_PAD_TX_2,
.flags = UART_FLAG_NONE,
.gclk_src = 0
.gclk_src = SAM0_GCLK_MAIN,
},
{ /* LoRa module */
.dev = &SERCOM4->USART,
@ -62,7 +62,7 @@ static const uart_conf_t uart_config[] = {
.rx_pad = UART_PAD_RX_3,
.tx_pad = UART_PAD_TX_0,
.flags = UART_FLAG_NONE,
.gclk_src = 0
.gclk_src = SAM0_GCLK_MAIN,
},
};
@ -88,7 +88,7 @@ static const spi_conf_t spi_config[] = {
.clk_mux = GPIO_MUX_C,
.miso_pad = SPI_PAD_MISO_3,
.mosi_pad = SPI_PAD_MOSI_0_SCK_1,
.gclk_src = 0,
.gclk_src = SAM0_GCLK_MAIN,
}
};

View File

@ -90,10 +90,10 @@ static const tc32_conf_t timer_config[] = {
.pm_mask = PM_APBCMASK_TC3,
.gclk_ctrl = GCLK_CLKCTRL_ID_TCC2_TC3,
#if CLOCK_USE_PLL || CLOCK_USE_XOSC32_DFLL
.gclk_src = 1,
.gclk_src = SAM0_GCLK_1MHZ,
.prescaler = TC_CTRLA_PRESCALER_DIV1,
#else
.gclk_src = 0,
.gclk_src = SAM0_GCLK_MAIN,
.prescaler = TC_CTRLA_PRESCALER_DIV8,
#endif
.flags = TC_CTRLA_MODE_COUNT16,
@ -104,10 +104,10 @@ static const tc32_conf_t timer_config[] = {
.pm_mask = PM_APBCMASK_TC4 | PM_APBCMASK_TC5,
.gclk_ctrl = GCLK_CLKCTRL_ID_TC4_TC5,
#if CLOCK_USE_PLL || CLOCK_USE_XOSC32_DFLL
.gclk_src = 1,
.gclk_src = SAM0_GCLK_1MHZ,
.prescaler = TC_CTRLA_PRESCALER_DIV1,
#else
.gclk_src = 0,
.gclk_src = SAM0_GCLK_MAIN,
.prescaler = TC_CTRLA_PRESCALER_DIV8,
#endif
.flags = TC_CTRLA_MODE_COUNT32,
@ -140,7 +140,7 @@ static const uart_conf_t uart_config[] = {
.rx_pad = UART_PAD_RX_3,
.tx_pad = UART_PAD_TX_2,
.flags = UART_FLAG_NONE,
.gclk_src = 0
.gclk_src = SAM0_GCLK_MAIN,
},
{
.dev = &SERCOM0->USART,
@ -154,7 +154,7 @@ static const uart_conf_t uart_config[] = {
.rx_pad = UART_PAD_RX_3,
.tx_pad = UART_PAD_TX_2,
.flags = UART_FLAG_NONE,
.gclk_src = 0
.gclk_src = SAM0_GCLK_MAIN,
}
};
@ -238,7 +238,7 @@ static const spi_conf_t spi_config[] = {
.clk_mux = GPIO_MUX_D,
.miso_pad = SPI_PAD_MISO_0,
.mosi_pad = SPI_PAD_MOSI_2_SCK_3,
.gclk_src = 0
.gclk_src = SAM0_GCLK_MAIN,
}
};
@ -257,7 +257,7 @@ static const i2c_conf_t i2c_config[] = {
.scl_pin = GPIO_PIN(PA, 23),
.sda_pin = GPIO_PIN(PA, 22),
.mux = GPIO_MUX_C,
.gclk_src = 0,
.gclk_src = SAM0_GCLK_MAIN,
.flags = I2C_FLAG_NONE
}
};
@ -295,7 +295,7 @@ static const sam0_common_usb_config_t sam_usbdev_config[] = {
.dp = GPIO_PIN(PA, 25),
.d_mux = GPIO_MUX_G,
.device = &USB->DEVICE,
.gclk_src = 0
.gclk_src = SAM0_GCLK_MAIN,
}
};
/** @} */

View File

@ -48,7 +48,7 @@ static const uart_conf_t uart_config[] = {
.rx_pad = UART_PAD_RX_3,
.tx_pad = UART_PAD_TX_2,
.flags = UART_FLAG_NONE,
.gclk_src = 0
.gclk_src = SAM0_GCLK_MAIN,
}
};
@ -73,7 +73,7 @@ static const spi_conf_t spi_config[] = {
.clk_mux = GPIO_MUX_C,
.miso_pad = SPI_PAD_MISO_3,
.mosi_pad = SPI_PAD_MOSI_0_SCK_1,
.gclk_src = 0
.gclk_src = SAM0_GCLK_MAIN,
},
{
.dev = &SERCOM2->SPI,
@ -85,7 +85,7 @@ static const spi_conf_t spi_config[] = {
.clk_mux = GPIO_MUX_C,
.miso_pad = SPI_PAD_MISO_3,
.mosi_pad = SPI_PAD_MOSI_0_SCK_1,
.gclk_src = 0
.gclk_src = SAM0_GCLK_MAIN,
}
};

View File

@ -90,10 +90,10 @@ static const tc32_conf_t timer_config[] = {
.pm_mask = PM_APBCMASK_TC3,
.gclk_ctrl = GCLK_CLKCTRL_ID_TCC2_TC3,
#if CLOCK_USE_PLL || CLOCK_USE_XOSC32_DFLL
.gclk_src = 1,
.gclk_src = SAM0_GCLK_1MHZ,
.prescaler = TC_CTRLA_PRESCALER_DIV1,
#else
.gclk_src = 0,
.gclk_src = SAM0_GCLK_MAIN,
.prescaler = TC_CTRLA_PRESCALER_DIV8,
#endif
.flags = TC_CTRLA_MODE_COUNT16,
@ -104,10 +104,10 @@ static const tc32_conf_t timer_config[] = {
.pm_mask = PM_APBCMASK_TC4 | PM_APBCMASK_TC5,
.gclk_ctrl = GCLK_CLKCTRL_ID_TC4_TC5,
#if CLOCK_USE_PLL || CLOCK_USE_XOSC32_DFLL
.gclk_src = 1,
.gclk_src = SAM0_GCLK_1MHZ,
.prescaler = TC_CTRLA_PRESCALER_DIV1,
#else
.gclk_src = 0,
.gclk_src = SAM0_GCLK_MAIN,
.prescaler = TC_CTRLA_PRESCALER_DIV8,
#endif
.flags = TC_CTRLA_MODE_COUNT32,
@ -184,7 +184,7 @@ static const i2c_conf_t i2c_config[] = {
.scl_pin = GPIO_PIN(PA, 9),
.sda_pin = GPIO_PIN(PA, 8),
.mux = GPIO_MUX_C,
.gclk_src = 0,
.gclk_src = SAM0_GCLK_MAIN,
.flags = I2C_FLAG_NONE
}
};
@ -221,7 +221,7 @@ static const sam0_common_usb_config_t sam_usbdev_config[] = {
.dp = GPIO_PIN(PA, 25),
.d_mux = GPIO_MUX_G,
.device = &USB->DEVICE,
.gclk_src = 0
.gclk_src = SAM0_GCLK_MAIN,
}
};
/** @} */

View File

@ -42,7 +42,7 @@ static const tc32_conf_t timer_config[] = {
.mclk = &MCLK->APBCMASK.reg,
.mclk_mask = MCLK_APBCMASK_TC0 | MCLK_APBCMASK_TC1,
.gclk_id = TC0_GCLK_ID,
.gclk_src = 0,
.gclk_src = SAM0_GCLK_MAIN,
.prescaler = TC_CTRLA_PRESCALER(4),
.flags = TC_CTRLA_MODE_COUNT32,
}
@ -71,7 +71,7 @@ static const uart_conf_t uart_config[] = {
.rx_pad = UART_PAD_RX_3,
.tx_pad = UART_PAD_TX_2,
.flags = UART_FLAG_NONE,
.gclk_src = 0
.gclk_src = SAM0_GCLK_MAIN,
}
};
@ -97,7 +97,7 @@ static const spi_conf_t spi_config[] = {
.clk_mux = GPIO_MUX_D,
.miso_pad = SPI_PAD_MISO_0,
.mosi_pad = SPI_PAD_MOSI_2_SCK_3,
.gclk_src = 0
.gclk_src = SAM0_GCLK_MAIN,
}
};
@ -115,7 +115,7 @@ static const i2c_conf_t i2c_config[] = {
.scl_pin = GPIO_PIN(PA, 17),
.sda_pin = GPIO_PIN(PA, 16),
.mux = GPIO_MUX_C,
.gclk_src = 0,
.gclk_src = SAM0_GCLK_MAIN,
.flags = I2C_FLAG_NONE
}
};

View File

@ -43,7 +43,7 @@ static const spi_conf_t spi_config[] = {
.clk_mux = GPIO_MUX_D,
.miso_pad = SPI_PAD_MISO_0,
.mosi_pad = SPI_PAD_MOSI_2_SCK_3,
.gclk_src = 0
.gclk_src = SAM0_GCLK_MAIN,
},
};

View File

@ -39,10 +39,10 @@ static const tc32_conf_t timer_config[] = {
.pm_mask = PM_APBCMASK_TC3,
.gclk_ctrl = GCLK_CLKCTRL_ID_TCC2_TC3,
#if CLOCK_USE_PLL || CLOCK_USE_XOSC32_DFLL
.gclk_src = 1,
.gclk_src = SAM0_GCLK_1MHZ,
.prescaler = TC_CTRLA_PRESCALER_DIV1,
#else
.gclk_src = 0,
.gclk_src = SAM0_GCLK_MAIN,
.prescaler = TC_CTRLA_PRESCALER_DIV8,
#endif
.flags = TC_CTRLA_MODE_COUNT16,
@ -53,10 +53,10 @@ static const tc32_conf_t timer_config[] = {
.pm_mask = PM_APBCMASK_TC4 | PM_APBCMASK_TC5,
.gclk_ctrl = GCLK_CLKCTRL_ID_TC4_TC5,
#if CLOCK_USE_PLL || CLOCK_USE_XOSC32_DFLL
.gclk_src = 1,
.gclk_src = SAM0_GCLK_1MHZ,
.prescaler = TC_CTRLA_PRESCALER_DIV1,
#else
.gclk_src = 0,
.gclk_src = SAM0_GCLK_MAIN,
.prescaler = TC_CTRLA_PRESCALER_DIV8,
#endif
.flags = TC_CTRLA_MODE_COUNT32,

View File

@ -38,7 +38,7 @@ static const sam0_common_usb_config_t sam_usbdev_config[] = {
.dp = GPIO_PIN(PA, 25),
.d_mux = GPIO_MUX_G,
.device = &USB->DEVICE,
.gclk_src = 0
.gclk_src = SAM0_GCLK_MAIN,
}
};
/** @} */

View File

@ -85,10 +85,10 @@ static const tc32_conf_t timer_config[] = {
.pm_mask = PM_APBCMASK_TC3,
.gclk_ctrl = GCLK_CLKCTRL_ID_TCC2_TC3,
#if CLOCK_USE_PLL || CLOCK_USE_XOSC32_DFLL
.gclk_src = 1,
.gclk_src = SAM0_GCLK_1MHZ,
.prescaler = TC_CTRLA_PRESCALER_DIV1,
#else
.gclk_src = 0,
.gclk_src = SAM0_GCLK_MAIN,
.prescaler = TC_CTRLA_PRESCALER_DIV8,
#endif
.flags = TC_CTRLA_MODE_COUNT16,
@ -99,10 +99,10 @@ static const tc32_conf_t timer_config[] = {
.pm_mask = PM_APBCMASK_TC4 | PM_APBCMASK_TC5,
.gclk_ctrl = GCLK_CLKCTRL_ID_TC4_TC5,
#if CLOCK_USE_PLL || CLOCK_USE_XOSC32_DFLL
.gclk_src = 1,
.gclk_src = SAM0_GCLK_1MHZ,
.prescaler = TC_CTRLA_PRESCALER_DIV1,
#else
.gclk_src = 0,
.gclk_src = SAM0_GCLK_MAIN,
.prescaler = TC_CTRLA_PRESCALER_DIV8,
#endif
.flags = TC_CTRLA_MODE_COUNT32,
@ -135,7 +135,7 @@ static const uart_conf_t uart_config[] = {
.rx_pad = UART_PAD_RX_3,
.tx_pad = UART_PAD_TX_2,
.flags = UART_FLAG_NONE,
.gclk_src = 0,
.gclk_src = SAM0_GCLK_MAIN,
}
};
@ -219,7 +219,7 @@ static const spi_conf_t spi_config[] = {
.clk_mux = GPIO_MUX_D,
.miso_pad = SPI_PAD_MISO_0,
.mosi_pad = SPI_PAD_MOSI_2_SCK_3,
.gclk_src = 0
.gclk_src = SAM0_GCLK_MAIN,
}
};
@ -237,7 +237,7 @@ static const i2c_conf_t i2c_config[] = {
.scl_pin = GPIO_PIN(PA, 23),
.sda_pin = GPIO_PIN(PA, 22),
.mux = GPIO_MUX_C,
.gclk_src = 0,
.gclk_src = SAM0_GCLK_MAIN,
.flags = I2C_FLAG_NONE
}
};
@ -274,7 +274,7 @@ static const sam0_common_usb_config_t sam_usbdev_config[] = {
.dp = GPIO_PIN(PA, 25),
.d_mux = GPIO_MUX_G,
.device = &USB->DEVICE,
.gclk_src = 0
.gclk_src = SAM0_GCLK_MAIN,
}
};
/** @} */

View File

@ -118,10 +118,10 @@ static const tc32_conf_t timer_config[] = {
.pm_mask = PM_APBCMASK_TC3,
.gclk_ctrl = GCLK_CLKCTRL_ID_TCC2_TC3,
#if CLOCK_USE_PLL || CLOCK_USE_XOSC32_DFLL
.gclk_src = 1,
.gclk_src = SAM0_GCLK_1MHZ,
.prescaler = TC_CTRLA_PRESCALER_DIV1,
#else
.gclk_src = 0,
.gclk_src = SAM0_GCLK_MAIN,
.prescaler = TC_CTRLA_PRESCALER_DIV8,
#endif
.flags = TC_CTRLA_MODE_COUNT16,
@ -132,10 +132,10 @@ static const tc32_conf_t timer_config[] = {
.pm_mask = PM_APBCMASK_TC4 | PM_APBCMASK_TC5,
.gclk_ctrl = GCLK_CLKCTRL_ID_TC4_TC5,
#if CLOCK_USE_PLL || CLOCK_USE_XOSC32_DFLL
.gclk_src = 1,
.gclk_src = SAM0_GCLK_1MHZ,
.prescaler = TC_CTRLA_PRESCALER_DIV1,
#else
.gclk_src = 0,
.gclk_src = SAM0_GCLK_MAIN,
.prescaler = TC_CTRLA_PRESCALER_DIV8,
#endif
.flags = TC_CTRLA_MODE_COUNT32,
@ -218,7 +218,7 @@ static const spi_conf_t spi_config[] = {
.clk_mux = GPIO_MUX_F,
.miso_pad = SPI_PAD_MISO_0,
.mosi_pad = SPI_PAD_MOSI_2_SCK_3,
.gclk_src = 0,
.gclk_src = SAM0_GCLK_MAIN,
}
};
@ -236,7 +236,7 @@ static const i2c_conf_t i2c_config[] = {
.scl_pin = GPIO_PIN(PA, 17),
.sda_pin = GPIO_PIN(PA, 16),
.mux = GPIO_MUX_D,
.gclk_src = 0,
.gclk_src = SAM0_GCLK_MAIN,
.flags = I2C_FLAG_NONE
}
};

View File

@ -96,10 +96,10 @@ static const tc32_conf_t timer_config[] = {
.pm_mask = PM_APBCMASK_TC3,
.gclk_ctrl = GCLK_CLKCTRL_ID_TCC2_TC3,
#if CLOCK_USE_PLL || CLOCK_USE_XOSC32_DFLL
.gclk_src = 1,
.gclk_src = SAM0_GCLK_1MHZ,
.prescaler = TC_CTRLA_PRESCALER_DIV1,
#else
.gclk_src = 0,
.gclk_src = SAM0_GCLK_MAIN,
.prescaler = TC_CTRLA_PRESCALER_DIV8,
#endif
.flags = TC_CTRLA_MODE_COUNT16,
@ -110,10 +110,10 @@ static const tc32_conf_t timer_config[] = {
.pm_mask = PM_APBCMASK_TC4 | PM_APBCMASK_TC5,
.gclk_ctrl = GCLK_CLKCTRL_ID_TC4_TC5,
#if CLOCK_USE_PLL || CLOCK_USE_XOSC32_DFLL
.gclk_src = 1,
.gclk_src = SAM0_GCLK_1MHZ,
.prescaler = TC_CTRLA_PRESCALER_DIV1,
#else
.gclk_src = 0,
.gclk_src = SAM0_GCLK_MAIN,
.prescaler = TC_CTRLA_PRESCALER_DIV8,
#endif
.flags = TC_CTRLA_MODE_COUNT32,
@ -146,7 +146,7 @@ static const uart_conf_t uart_config[] = {
.rx_pad = UART_PAD_RX_1,
.tx_pad = UART_PAD_TX_0,
.flags = UART_FLAG_NONE,
.gclk_src = 0
.gclk_src = SAM0_GCLK_MAIN,
},
{ /* EXT1 */
.dev = &SERCOM4->USART,
@ -160,7 +160,7 @@ static const uart_conf_t uart_config[] = {
.rx_pad = UART_PAD_RX_1,
.tx_pad = UART_PAD_TX_0,
.flags = UART_FLAG_NONE,
.gclk_src = 0
.gclk_src = SAM0_GCLK_MAIN,
},
{ /* EXT2/3 */
.dev = &SERCOM4->USART,
@ -174,7 +174,7 @@ static const uart_conf_t uart_config[] = {
.rx_pad = UART_PAD_RX_3,
.tx_pad = UART_PAD_TX_2,
.flags = UART_FLAG_NONE,
.gclk_src = 0
.gclk_src = SAM0_GCLK_MAIN,
}
};
@ -243,7 +243,7 @@ static const spi_conf_t spi_config[] = {
.clk_mux = GPIO_MUX_D,
.miso_pad = SPI_PAD_MISO_0,
.mosi_pad = SPI_PAD_MOSI_2_SCK_3,
.gclk_src = 0
.gclk_src = SAM0_GCLK_MAIN,
},
{ /* EXT2 */
.dev = &SERCOM1->SPI,
@ -255,7 +255,7 @@ static const spi_conf_t spi_config[] = {
.clk_mux = GPIO_MUX_C,
.miso_pad = SPI_PAD_MISO_0,
.mosi_pad = SPI_PAD_MOSI_2_SCK_3,
.gclk_src = 0
.gclk_src = SAM0_GCLK_MAIN,
},
{ /* EXT3 */
.dev = &SERCOM5->SPI,
@ -267,7 +267,7 @@ static const spi_conf_t spi_config[] = {
.clk_mux = GPIO_MUX_D,
.miso_pad = SPI_PAD_MISO_0,
.mosi_pad = SPI_PAD_MOSI_2_SCK_3,
.gclk_src = 0
.gclk_src = SAM0_GCLK_MAIN,
}
};
@ -285,7 +285,7 @@ static const i2c_conf_t i2c_config[] = {
.scl_pin = GPIO_PIN(PA, 9),
.sda_pin = GPIO_PIN(PA, 8),
.mux = GPIO_MUX_D,
.gclk_src = 0,
.gclk_src = SAM0_GCLK_MAIN,
.flags = I2C_FLAG_NONE
}
};

View File

@ -42,7 +42,7 @@ static const tc32_conf_t timer_config[] = {
.mclk = &MCLK->APBAMASK.reg,
.mclk_mask = MCLK_APBAMASK_TC0 | MCLK_APBAMASK_TC1,
.gclk_id = TC0_GCLK_ID,
.gclk_src = 5,
.gclk_src = SAM0_GCLK_8MHZ,
.prescaler = TC_CTRLA_PRESCALER_DIV8,
.flags = TC_CTRLA_MODE_COUNT32,
},
@ -52,7 +52,7 @@ static const tc32_conf_t timer_config[] = {
.mclk = &MCLK->APBBMASK.reg,
.mclk_mask = MCLK_APBBMASK_TC2 | MCLK_APBBMASK_TC3,
.gclk_id = TC2_GCLK_ID,
.gclk_src = 5,
.gclk_src = SAM0_GCLK_8MHZ,
.prescaler = TC_CTRLA_PRESCALER_DIV8,
.flags = TC_CTRLA_MODE_COUNT32,
}
@ -86,7 +86,7 @@ static const uart_conf_t uart_config[] = {
.rx_pad = UART_PAD_RX_1,
.tx_pad = UART_PAD_TX_0,
.flags = UART_FLAG_NONE,
.gclk_src = 0
.gclk_src = SAM0_GCLK_MAIN,
}
};
@ -112,7 +112,7 @@ static const spi_conf_t spi_config[] = {
.clk_mux = GPIO_MUX_C,
.miso_pad = SPI_PAD_MISO_3,
.mosi_pad = SPI_PAD_MOSI_0_SCK_1,
.gclk_src = 0
.gclk_src = SAM0_GCLK_MAIN,
}
};
@ -131,7 +131,7 @@ static const i2c_conf_t i2c_config[] = {
.scl_pin = GPIO_PIN(PD, 9),
.sda_pin = GPIO_PIN(PD, 8),
.mux = GPIO_MUX_C,
.gclk_src = 6,
.gclk_src = SAM0_GCLK_48MHZ,
.flags = I2C_FLAG_NONE
}
};
@ -167,7 +167,7 @@ static const sam0_common_usb_config_t sam_usbdev_config[] = {
.dp = GPIO_PIN(PA, 25),
.d_mux = GPIO_MUX_H,
.device = &USB->DEVICE,
.gclk_src = 6
.gclk_src = SAM0_GCLK_48MHZ,
}
};

View File

@ -45,7 +45,7 @@ static const tc32_conf_t timer_config[] = {
.mclk = &MCLK->APBCMASK.reg,
.mclk_mask = MCLK_APBCMASK_TC0 | MCLK_APBCMASK_TC1,
.gclk_id = TC0_GCLK_ID,
.gclk_src = 0,
.gclk_src = SAM0_GCLK_MAIN,
.prescaler = TC_CTRLA_PRESCALER(4),
.flags = TC_CTRLA_MODE_COUNT32,
}
@ -74,7 +74,7 @@ static const uart_conf_t uart_config[] = {
.rx_pad = UART_PAD_RX_1,
.tx_pad = UART_PAD_TX_0,
.flags = UART_FLAG_NONE,
.gclk_src = 0
.gclk_src = SAM0_GCLK_MAIN,
},
{ /* EXT1 header */
.dev = &SERCOM4->USART,
@ -88,7 +88,7 @@ static const uart_conf_t uart_config[] = {
.rx_pad = UART_PAD_RX_1,
.tx_pad = UART_PAD_TX_0,
.flags = UART_FLAG_NONE,
.gclk_src = 0
.gclk_src = SAM0_GCLK_MAIN,
}
};
@ -114,7 +114,7 @@ static const spi_conf_t spi_config[] = {
.clk_mux = GPIO_MUX_D,
.miso_pad = SPI_PAD_MISO_0,
.mosi_pad = SPI_PAD_MOSI_2_SCK_3,
.gclk_src = 0
.gclk_src = SAM0_GCLK_MAIN,
}
};
@ -132,7 +132,7 @@ static const i2c_conf_t i2c_config[] = {
.scl_pin = GPIO_PIN(PA, 9),
.sda_pin = GPIO_PIN(PA, 8),
.mux = GPIO_MUX_D,
.gclk_src = 0,
.gclk_src = SAM0_GCLK_MAIN,
.flags = I2C_FLAG_NONE
}
};

View File

@ -96,10 +96,10 @@ static const tc32_conf_t timer_config[] = {
.pm_mask = PM_APBCMASK_TC3,
.gclk_ctrl = GCLK_CLKCTRL_ID_TCC2_TC3,
#if CLOCK_USE_PLL || CLOCK_USE_XOSC32_DFLL
.gclk_src = 1,
.gclk_src = SAM0_GCLK_1MHZ,
.prescaler = TC_CTRLA_PRESCALER_DIV1,
#else
.gclk_src = 0,
.gclk_src = SAM0_GCLK_MAIN,
.prescaler = TC_CTRLA_PRESCALER_DIV8,
#endif
.flags = TC_CTRLA_MODE_COUNT16,
@ -110,10 +110,10 @@ static const tc32_conf_t timer_config[] = {
.pm_mask = PM_APBCMASK_TC4 | PM_APBCMASK_TC5,
.gclk_ctrl = GCLK_CLKCTRL_ID_TC4_TC5,
#if CLOCK_USE_PLL || CLOCK_USE_XOSC32_DFLL
.gclk_src = 1,
.gclk_src = SAM0_GCLK_1MHZ,
.prescaler = TC_CTRLA_PRESCALER_DIV1,
#else
.gclk_src = 0,
.gclk_src = SAM0_GCLK_MAIN,
.prescaler = TC_CTRLA_PRESCALER_DIV8,
#endif
.flags = TC_CTRLA_MODE_COUNT32,
@ -146,7 +146,7 @@ static const uart_conf_t uart_config[] = {
.rx_pad = UART_PAD_RX_1,
.tx_pad = UART_PAD_TX_0,
.flags = UART_FLAG_NONE,
.gclk_src = 0
.gclk_src = SAM0_GCLK_MAIN,
},
{
.dev = &SERCOM5->USART,
@ -160,7 +160,7 @@ static const uart_conf_t uart_config[] = {
.rx_pad = UART_PAD_RX_1,
.tx_pad = UART_PAD_TX_0,
.flags = UART_FLAG_NONE,
.gclk_src = 0
.gclk_src = SAM0_GCLK_MAIN,
}
};
@ -221,7 +221,7 @@ static const spi_conf_t spi_config[] = {
.clk_mux = GPIO_MUX_F,
.miso_pad = SPI_PAD_MISO_0,
.mosi_pad = SPI_PAD_MOSI_2_SCK_3,
.gclk_src = 0
.gclk_src = SAM0_GCLK_MAIN,
},
{
.dev = &SERCOM5->SPI,
@ -233,7 +233,7 @@ static const spi_conf_t spi_config[] = {
.clk_mux = GPIO_MUX_D,
.miso_pad = SPI_PAD_MISO_0,
.mosi_pad = SPI_PAD_MOSI_2_SCK_3,
.gclk_src = 0
.gclk_src = SAM0_GCLK_MAIN,
}
};
@ -251,7 +251,7 @@ static const i2c_conf_t i2c_config[] = {
.scl_pin = GPIO_PIN(PA, 17),
.sda_pin = GPIO_PIN(PA, 16),
.mux = GPIO_MUX_D,
.gclk_src = 0,
.gclk_src = SAM0_GCLK_MAIN,
.flags = I2C_FLAG_NONE
}
};
@ -309,7 +309,7 @@ static const sam0_common_usb_config_t sam_usbdev_config[] = {
.dp = GPIO_PIN(PA, 25),
.d_mux = GPIO_MUX_G,
.device = &USB->DEVICE,
.gclk_src = 0
.gclk_src = SAM0_GCLK_MAIN,
}
};
/** @} */

View File

@ -41,7 +41,7 @@ static const tc32_conf_t timer_config[] = {
.mclk = &MCLK->APBCMASK.reg,
.mclk_mask = MCLK_APBCMASK_TC0 | MCLK_APBCMASK_TC1,
.gclk_id = TC0_GCLK_ID,
.gclk_src = 0,
.gclk_src = SAM0_GCLK_MAIN,
.prescaler = TC_CTRLA_PRESCALER(4),
.flags = TC_CTRLA_MODE_COUNT32,
}
@ -70,7 +70,7 @@ static const uart_conf_t uart_config[] = {
.rx_pad = UART_PAD_RX_1,
.tx_pad = UART_PAD_TX_0,
.flags = UART_FLAG_NONE,
.gclk_src = 0
.gclk_src = SAM0_GCLK_MAIN,
}
};
@ -95,7 +95,7 @@ static const spi_conf_t spi_config[] = {
.clk_mux = GPIO_MUX_F,
.miso_pad = SPI_PAD_MISO_0,
.mosi_pad = SPI_PAD_MOSI_2_SCK_3,
.gclk_src = 0
.gclk_src = SAM0_GCLK_MAIN,
}
};
@ -113,7 +113,7 @@ static const i2c_conf_t i2c_config[] = {
.scl_pin = GPIO_PIN(PA, 17),
.sda_pin = GPIO_PIN(PA, 16),
.mux = GPIO_MUX_C,
.gclk_src = 0,
.gclk_src = SAM0_GCLK_MAIN,
.flags = I2C_FLAG_NONE
}
};

View File

@ -42,7 +42,7 @@ static const tc32_conf_t timer_config[] = {
.mclk = &MCLK->APBCMASK.reg,
.mclk_mask = MCLK_APBCMASK_TC0 | MCLK_APBCMASK_TC1,
.gclk_id = TC0_GCLK_ID,
.gclk_src = 0,
.gclk_src = SAM0_GCLK_MAIN,
.prescaler = TC_CTRLA_PRESCALER(4),
.flags = TC_CTRLA_MODE_COUNT32,
}
@ -72,7 +72,7 @@ static const uart_conf_t uart_config[] = {
.rx_pad = UART_PAD_RX_1,
.tx_pad = UART_PAD_TX_0,
.flags = UART_FLAG_NONE,
.gclk_src = 0
.gclk_src = SAM0_GCLK_MAIN,
}
};
@ -97,7 +97,7 @@ static const spi_conf_t spi_config[] = {
.clk_mux = GPIO_MUX_F,
.miso_pad = SPI_PAD_MISO_0,
.mosi_pad = SPI_PAD_MOSI_2_SCK_3,
.gclk_src = 0
.gclk_src = SAM0_GCLK_MAIN,
}
};
@ -115,7 +115,7 @@ static const i2c_conf_t i2c_config[] = {
.scl_pin = GPIO_PIN(PA, 17),
.sda_pin = GPIO_PIN(PA, 16),
.mux = GPIO_MUX_C,
.gclk_src = 0,
.gclk_src = SAM0_GCLK_MAIN,
.flags = I2C_FLAG_NONE
}
};

View File

@ -86,10 +86,10 @@ static const tc32_conf_t timer_config[] = {
.pm_mask = PM_APBCMASK_TC3,
.gclk_ctrl = GCLK_CLKCTRL_ID_TCC2_TC3,
#if CLOCK_USE_PLL || CLOCK_USE_XOSC32_DFLL
.gclk_src = 1,
.gclk_src = SAM0_GCLK_1MHZ,
.prescaler = TC_CTRLA_PRESCALER_DIV1,
#else
.gclk_src = 0,
.gclk_src = SAM0_GCLK_MAIN,
.prescaler = TC_CTRLA_PRESCALER_DIV8,
#endif
.flags = TC_CTRLA_MODE_COUNT16,
@ -100,10 +100,10 @@ static const tc32_conf_t timer_config[] = {
.pm_mask = PM_APBCMASK_TC4 | PM_APBCMASK_TC5,
.gclk_ctrl = GCLK_CLKCTRL_ID_TC4_TC5,
#if CLOCK_USE_PLL || CLOCK_USE_XOSC32_DFLL
.gclk_src = 1,
.gclk_src = SAM0_GCLK_1MHZ,
.prescaler = TC_CTRLA_PRESCALER_DIV1,
#else
.gclk_src = 0,
.gclk_src = SAM0_GCLK_MAIN,
.prescaler = TC_CTRLA_PRESCALER_DIV8,
#endif
.flags = TC_CTRLA_MODE_COUNT32,
@ -136,7 +136,7 @@ static const uart_conf_t uart_config[] = {
.rx_pad = UART_PAD_RX_1,
.tx_pad = UART_PAD_TX_0,
.flags = UART_FLAG_NONE,
.gclk_src = 0,
.gclk_src = SAM0_GCLK_MAIN,
},
{
.dev = &SERCOM4->USART,
@ -150,7 +150,7 @@ static const uart_conf_t uart_config[] = {
.rx_pad = UART_PAD_RX_1,
.tx_pad = UART_PAD_TX_0,
.flags = UART_FLAG_NONE,
.gclk_src = 0,
.gclk_src = SAM0_GCLK_MAIN,
}
};
@ -176,7 +176,7 @@ static const spi_conf_t spi_config[] = {
.clk_mux = GPIO_MUX_C,
.miso_pad = SPI_PAD_MISO_3,
.mosi_pad = SPI_PAD_MOSI_0_SCK_1,
.gclk_src = 0
.gclk_src = SAM0_GCLK_MAIN,
}
};
@ -193,7 +193,7 @@ static const i2c_conf_t i2c_config[] = {
.scl_pin = GPIO_PIN(PA, 8),
.sda_pin = GPIO_PIN(PA, 9),
.mux = GPIO_MUX_C,
.gclk_src = 0,
.gclk_src = SAM0_GCLK_MAIN,
.flags = I2C_FLAG_NONE
},
{
@ -202,7 +202,7 @@ static const i2c_conf_t i2c_config[] = {
.scl_pin = GPIO_PIN(PA, 12),
.sda_pin = GPIO_PIN(PA, 13),
.mux = GPIO_MUX_C,
.gclk_src = 0,
.gclk_src = SAM0_GCLK_MAIN,
.flags = I2C_FLAG_NONE
}
};
@ -253,7 +253,7 @@ static const sam0_common_usb_config_t sam_usbdev_config[] = {
.dp = GPIO_PIN(PA, 25),
.d_mux = GPIO_MUX_G,
.device = &USB->DEVICE,
.gclk_src = 0
.gclk_src = SAM0_GCLK_MAIN,
}
};
/** @} */

View File

@ -52,7 +52,7 @@ static const uart_conf_t uart_config[] = {
.rx_pad = UART_PAD_RX_1,
.tx_pad = UART_PAD_TX_2,
.flags = UART_FLAG_NONE,
.gclk_src = 0
.gclk_src = SAM0_GCLK_MAIN,
},
{
.dev = &SERCOM5->USART,
@ -66,7 +66,7 @@ static const uart_conf_t uart_config[] = {
.rx_pad = UART_PAD_RX_1,
.tx_pad = UART_PAD_TX_0_RTS_2_CTS_3,
.flags = UART_FLAG_NONE,
.gclk_src = 0
.gclk_src = SAM0_GCLK_MAIN,
},
{
.dev = &SERCOM4->USART,
@ -80,7 +80,7 @@ static const uart_conf_t uart_config[] = {
.rx_pad = UART_PAD_RX_1,
.tx_pad = UART_PAD_TX_2,
.flags = UART_FLAG_NONE,
.gclk_src = 0
.gclk_src = SAM0_GCLK_MAIN,
},
{
.dev = &SERCOM1->USART,
@ -94,7 +94,7 @@ static const uart_conf_t uart_config[] = {
.rx_pad = UART_PAD_RX_1,
.tx_pad = UART_PAD_TX_2,
.flags = UART_FLAG_NONE,
.gclk_src = 0
.gclk_src = SAM0_GCLK_MAIN,
},
};
@ -189,7 +189,7 @@ static const i2c_conf_t i2c_config[] = {
.scl_pin = GPIO_PIN(PA, 13),
.sda_pin = GPIO_PIN(PA, 12),
.mux = GPIO_MUX_C,
.gclk_src = 0,
.gclk_src = SAM0_GCLK_MAIN,
.flags = I2C_FLAG_NONE
}
};

View File

@ -48,7 +48,7 @@ static const uart_conf_t uart_config[] = {
.rx_pad = UART_PAD_RX_1,
.tx_pad = UART_PAD_TX_0_RTS_2_CTS_3,
.flags = UART_FLAG_NONE,
.gclk_src = 0
.gclk_src = SAM0_GCLK_MAIN,
},
{
.dev = &SERCOM4->USART,
@ -62,7 +62,7 @@ static const uart_conf_t uart_config[] = {
.rx_pad = UART_PAD_RX_1,
.tx_pad = UART_PAD_TX_2,
.flags = UART_FLAG_NONE,
.gclk_src = 0
.gclk_src = SAM0_GCLK_MAIN,
},
{ /* Connected to RN2483 */
.dev = &SERCOM0->USART,
@ -76,7 +76,7 @@ static const uart_conf_t uart_config[] = {
.rx_pad = UART_PAD_RX_1,
.tx_pad = UART_PAD_TX_2,
.flags = UART_FLAG_NONE,
.gclk_src = 0
.gclk_src = SAM0_GCLK_MAIN,
},
};
@ -128,7 +128,7 @@ static const i2c_conf_t i2c_config[] = {
.scl_pin = GPIO_PIN(PA, 17),
.sda_pin = GPIO_PIN(PA, 16),
.mux = GPIO_MUX_C,
.gclk_src = 0,
.gclk_src = SAM0_GCLK_MAIN,
.flags = I2C_FLAG_NONE,
},
{
@ -137,7 +137,7 @@ static const i2c_conf_t i2c_config[] = {
.scl_pin = GPIO_PIN(PA, 9),
.sda_pin = GPIO_PIN(PA, 8),
.mux = GPIO_MUX_C,
.gclk_src = 0,
.gclk_src = SAM0_GCLK_MAIN,
.flags = I2C_FLAG_NONE
}
};

View File

@ -51,7 +51,7 @@ static const uart_conf_t uart_config[] = {
.rx_pad = UART_PAD_RX_1,
.tx_pad = UART_PAD_TX_0,
.flags = UART_FLAG_NONE,
.gclk_src = 0
.gclk_src = SAM0_GCLK_MAIN,
},
{
.dev = &SERCOM2->USART,
@ -65,7 +65,7 @@ static const uart_conf_t uart_config[] = {
.rx_pad = UART_PAD_RX_1,
.tx_pad = UART_PAD_TX_0,
.flags = UART_FLAG_NONE,
.gclk_src = 0
.gclk_src = SAM0_GCLK_MAIN,
},
};
@ -127,7 +127,7 @@ static const spi_conf_t spi_config[] = {
.clk_mux = GPIO_MUX_C,
.miso_pad = SPI_PAD_MISO_0,
.mosi_pad = SPI_PAD_MOSI_2_SCK_3,
.gclk_src = 0,
.gclk_src = SAM0_GCLK_MAIN,
}
};
@ -145,7 +145,7 @@ static const i2c_conf_t i2c_config[] = {
.scl_pin = GPIO_PIN(PA, 23),
.sda_pin = GPIO_PIN(PA, 22),
.mux = GPIO_MUX_C,
.gclk_src = 0,
.gclk_src = SAM0_GCLK_MAIN,
.flags = I2C_FLAG_NONE
}
};

View File

@ -54,7 +54,7 @@ static const uart_conf_t uart_config[] = {
.rx_pad = UART_PAD_RX_1,
.tx_pad = UART_PAD_TX_0,
.flags = UART_FLAG_NONE,
.gclk_src = 0
.gclk_src = SAM0_GCLK_MAIN,
},
{
.dev = &SERCOM0->USART,
@ -68,7 +68,7 @@ static const uart_conf_t uart_config[] = {
.rx_pad = UART_PAD_RX_1,
.tx_pad = UART_PAD_TX_2,
.flags = UART_FLAG_NONE,
.gclk_src = 0
.gclk_src = SAM0_GCLK_MAIN,
},
};
@ -120,7 +120,7 @@ static const i2c_conf_t i2c_config[] = {
.scl_pin = GPIO_PIN(PA, 17),
.sda_pin = GPIO_PIN(PA, 16),
.mux = GPIO_MUX_C,
.gclk_src = 0,
.gclk_src = SAM0_GCLK_MAIN,
.flags = I2C_FLAG_NONE
}
};