Skip to content

Commit

Permalink
boards/nrf52dk: add PWM configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Semjon Kerner committed Aug 17, 2018
1 parent 7294c18 commit 909bcef
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions boards/common/nrf52xxxdk/Makefile.features
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Put defined MCU peripherals here (in alphabetical order)
FEATURES_PROVIDED += periph_gpio
FEATURES_PROVIDED += periph_i2c
FEATURES_PROVIDED += periph_pwm
FEATURES_PROVIDED += periph_rtt
FEATURES_PROVIDED += periph_spi
FEATURES_PROVIDED += periph_timer
Expand Down
15 changes: 14 additions & 1 deletion boards/common/nrf52xxxdk/include/periph_conf.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2016-2017 Freie Universität Berlin
* Copyright (C) 2016-2018 Freie Universität Berlin
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
Expand Down Expand Up @@ -108,6 +108,19 @@ static const i2c_conf_t i2c_config[] = {
#define I2C_NUMOF (sizeof(i2c_config) / sizeof(i2c_config[0]))
/** @} */

#if defined(BOARD_NRF52DK) || defined(BOARD_NRF52840DK)
/**
* @name PWM configuration
* @{
*/
static const pwm_conf_t pwm_config[] = {
{ NRF_PWM0, { 28, 29, 30, 31 } }
};
#endif

#define PWM_NUMOF (sizeof(pwm_config) / sizeof(pwm_config[0]))
/** @} */

#ifdef __cplusplus
}
#endif
Expand Down

0 comments on commit 909bcef

Please sign in to comment.