diff --git a/boards/nrf52840dongle/Kconfig b/boards/nrf52840dongle/Kconfig index 5210842de0cf..b570c310b7d1 100644 --- a/boards/nrf52840dongle/Kconfig +++ b/boards/nrf52840dongle/Kconfig @@ -12,6 +12,7 @@ config BOARD_NRF52840DONGLE default y select BOARD_COMMON_NRF52 select CPU_MODEL_NRF52840XXAA + select HAS_PERIPH_PWM select HAS_PERIPH_UART select HAS_PERIPH_USBDEV select HAS_RADIO_NRF802154 diff --git a/boards/nrf52840dongle/Makefile.features b/boards/nrf52840dongle/Makefile.features index 0f1ff3b925aa..246eab901aaa 100644 --- a/boards/nrf52840dongle/Makefile.features +++ b/boards/nrf52840dongle/Makefile.features @@ -1,6 +1,7 @@ CPU_MODEL = nrf52840xxaa # Put defined MCU peripherals here (in alphabetical order) +FEATURES_PROVIDED += periph_pwm FEATURES_PROVIDED += periph_uart FEATURES_PROVIDED += periph_usbdev diff --git a/boards/nrf52840dongle/include/periph_conf.h b/boards/nrf52840dongle/include/periph_conf.h index e07ef4bd6ff6..3840c52ce1da 100644 --- a/boards/nrf52840dongle/include/periph_conf.h +++ b/boards/nrf52840dongle/include/periph_conf.h @@ -56,6 +56,21 @@ static const uart_conf_t uart_config[] = { #define UART_NUMOF ARRAY_SIZE(uart_config) /** @} */ +/** + * @name PWM configuration + * + * For the nRF52840-Dongle board, the PWM0 module is set to drive the LEDs LD1 + * and the channels LD2 red, green and blue in the four channels of PWM_DEV(0); + * other PWM outputs are not configured. + * + * @{ + */ +static const pwm_conf_t pwm_config[] = { + { NRF_PWM0, { GPIO_PIN(0, 6), GPIO_PIN(0, 8), GPIO_PIN(1, 9), GPIO_PIN(0, 12) } } +}; +#define PWM_NUMOF ARRAY_SIZE(pwm_config) +/** @} */ + #ifdef __cplusplus } #endif