boards/c/particle-mesh: Enable PWM on the LED pins

This commit is contained in:
chrysn 2020-09-30 15:35:23 +02:00
parent 04d1eb54b2
commit 87b41e6aee
3 changed files with 20 additions and 0 deletions

View File

@ -9,6 +9,7 @@ config BOARD_COMMON_PARTICLE_MESH
select BOARD_COMMON_NRF52
select CPU_MODEL_NRF52840XXAA
select HAS_PERIPH_I2C
select HAS_PERIPH_PWM
select HAS_PERIPH_SPI
select HAS_PERIPH_UART
select HAS_PERIPH_USBDEV

View File

@ -2,6 +2,7 @@ CPU_MODEL = nrf52840xxaa
# Put defined MCU peripherals here (in alphabetical order)
FEATURES_PROVIDED += periph_i2c
FEATURES_PROVIDED += periph_pwm
FEATURES_PROVIDED += periph_spi
FEATURES_PROVIDED += periph_uart
FEATURES_PROVIDED += periph_usbdev

View File

@ -26,6 +26,8 @@
#include "cfg_rtt_default.h"
#include "cfg_timer_default.h"
#include "board.h"
#ifdef __cplusplus
extern "C" {
#endif
@ -46,6 +48,22 @@ static const spi_conf_t spi_config[] = {
#define SPI_NUMOF ARRAY_SIZE(spi_config)
/** @} */
/**
* @name PWM configuration
*
* A single PWM device is used to map the three channels of the on-board RGB
* LED
*
* @{
*/
static const pwm_conf_t pwm_config[] = {
{ NRF_PWM0, { LED0_PIN, LED1_PIN, LED2_PIN, GPIO_UNDEF } }
};
#define PWM_NUMOF ARRAY_SIZE(pwm_config)
/** @} */
#ifdef __cplusplus
}
#endif