mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
boards/saml21-based: add usbdev configuration
Co-authored-by: dylad <dylan.laduranty@mesotic.com>
This commit is contained in:
parent
3076ee837d
commit
f4dc25c03e
@ -10,6 +10,7 @@ FEATURES_PROVIDED += periph_rtt
|
||||
FEATURES_PROVIDED += periph_spi
|
||||
FEATURES_PROVIDED += periph_timer
|
||||
FEATURES_PROVIDED += periph_uart
|
||||
FEATURES_PROVIDED += periph_usbdev
|
||||
|
||||
# Put other features for this board (in alphabetical order)
|
||||
FEATURES_PROVIDED += riotboot
|
||||
|
@ -197,6 +197,21 @@ static const adc_conf_chan_t adc_channels[] = {
|
||||
#define DAC_VREF DAC_CTRLB_REFSEL_VDDANA
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name USB peripheral configuration
|
||||
* @{
|
||||
*/
|
||||
static const sam0_common_usb_config_t sam_usbdev_config[] = {
|
||||
{
|
||||
.dm = GPIO_PIN(PA, 24),
|
||||
.dp = GPIO_PIN(PA, 25),
|
||||
.d_mux = GPIO_MUX_G,
|
||||
.device = &USB->DEVICE,
|
||||
.gclk_src = SAM0_GCLK_48MHZ,
|
||||
}
|
||||
};
|
||||
/** @} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -9,6 +9,7 @@ FEATURES_PROVIDED += periph_rtt
|
||||
FEATURES_PROVIDED += periph_spi
|
||||
FEATURES_PROVIDED += periph_timer
|
||||
FEATURES_PROVIDED += periph_uart
|
||||
FEATURES_PROVIDED += periph_usbdev
|
||||
|
||||
# Put other features for this board (in alphabetical order)
|
||||
FEATURES_PROVIDED += riotboot
|
||||
|
@ -180,6 +180,20 @@ static const adc_conf_chan_t adc_channels[] = {
|
||||
#define ADC_NUMOF ARRAY_SIZE(adc_channels)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name USB peripheral configuration
|
||||
* @{
|
||||
*/
|
||||
static const sam0_common_usb_config_t sam_usbdev_config[] = {
|
||||
{
|
||||
.dm = GPIO_PIN(PA, 24),
|
||||
.dp = GPIO_PIN(PA, 25),
|
||||
.d_mux = GPIO_MUX_G,
|
||||
.device = &USB->DEVICE,
|
||||
.gclk_src = SAM0_GCLK_48MHZ,
|
||||
}
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -10,6 +10,7 @@ FEATURES_PROVIDED += periph_rtt
|
||||
FEATURES_PROVIDED += periph_spi
|
||||
FEATURES_PROVIDED += periph_timer
|
||||
FEATURES_PROVIDED += periph_uart
|
||||
FEATURES_PROVIDED += periph_usbdev
|
||||
|
||||
# Put other features for this board (in alphabetical order)
|
||||
FEATURES_PROVIDED += riotboot
|
||||
|
@ -169,6 +169,21 @@ static const adc_conf_chan_t adc_channels[] = {
|
||||
#define ADC_NUMOF ARRAY_SIZE(adc_channels)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name USB peripheral configuration
|
||||
* @{
|
||||
*/
|
||||
static const sam0_common_usb_config_t sam_usbdev_config[] = {
|
||||
{
|
||||
.dm = GPIO_PIN(PA, 24),
|
||||
.dp = GPIO_PIN(PA, 25),
|
||||
.d_mux = GPIO_MUX_G,
|
||||
.device = &USB->DEVICE,
|
||||
.gclk_src = SAM0_GCLK_48MHZ,
|
||||
}
|
||||
};
|
||||
/** @} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user