From 03e703d88c414ce910f5bd55f501492964c786ed Mon Sep 17 00:00:00 2001 From: Kees Bakker Date: Wed, 5 Jun 2019 23:06:53 +0200 Subject: [PATCH] sodaq-sara-aff: add usbdev feature --- boards/sodaq-sara-aff/Makefile.features | 1 + boards/sodaq-sara-aff/include/periph_conf.h | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/boards/sodaq-sara-aff/Makefile.features b/boards/sodaq-sara-aff/Makefile.features index 9cbc57488e..7fc79e64bf 100644 --- a/boards/sodaq-sara-aff/Makefile.features +++ b/boards/sodaq-sara-aff/Makefile.features @@ -6,5 +6,6 @@ FEATURES_PROVIDED += periph_rtt FEATURES_PROVIDED += periph_spi FEATURES_PROVIDED += periph_timer FEATURES_PROVIDED += periph_uart +FEATURES_PROVIDED += periph_usbdev include $(RIOTCPU)/samd21/Makefile.features diff --git a/boards/sodaq-sara-aff/include/periph_conf.h b/boards/sodaq-sara-aff/include/periph_conf.h index 320275387d..90dbde2b33 100644 --- a/boards/sodaq-sara-aff/include/periph_conf.h +++ b/boards/sodaq-sara-aff/include/periph_conf.h @@ -255,6 +255,20 @@ static const i2c_conf_t i2c_config[] = { #define RTT_RUNSTDBY (1) /* Keep RTT running in sleep states */ /** @} */ +/** + * @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, + } +}; +/** @} */ + #ifdef __cplusplus } #endif