1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

boards/nrf9160dk: enable PWM support on onboard LEDs

Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
This commit is contained in:
Dylan Laduranty 2023-07-07 09:08:30 +02:00 committed by dylad
parent aeff14703b
commit 328d84fcf1
3 changed files with 22 additions and 1 deletions

View File

@ -12,6 +12,7 @@ config BOARD_NRF9160DK
default y
select CPU_MODEL_NRF9160
select HAS_PERIPH_I2C
select HAS_PERIPH_PWM
select HAS_PERIPH_RTT
select HAS_PERIPH_SPI
select HAS_PERIPH_TIMER

View File

@ -3,6 +3,7 @@ CPU = nrf9160
# Put defined MCU peripherals here (in alphabetical order)
FEATURES_PROVIDED += periph_i2c
FEATURES_PROVIDED += periph_pwm
FEATURES_PROVIDED += periph_rtt
FEATURES_PROVIDED += periph_spi
FEATURES_PROVIDED += periph_timer

View File

@ -116,7 +116,7 @@ static const uart_conf_t uart_config[] = {
#define UART_0_ISR (isr_uarte0_spim0_spis0_twim0_twis0) /**< UART0_IRQ */
#define UART_1_ISR (isr_uarte1_spim1_spis1_twim1_twis1) /**< UART1_IRQ */
#define UART_NUMOF ARRAY_SIZE(uart_config) /**< UART confgiguration NUMOF */
#define UART_NUMOF ARRAY_SIZE(uart_config) /**< UART configuration NUMOF */
/** @} */
/**
@ -137,6 +137,25 @@ static const uart_conf_t uart_config[] = {
#endif
/** @} */
/**
* @name PWM configuration
* @{
*/
static const pwm_conf_t pwm_config[] = {
{
.dev = NRF_PWM0_S,
.pin = {
LED0_PIN,
LED1_PIN,
LED2_PIN,
LED3_PIN
}
},
};
#define PWM_NUMOF ARRAY_SIZE(pwm_config)
/** @} */
#ifdef __cplusplus
}
#endif