boards: nucleo_f401re: added pwm-led0
Added onboard led to the devicetree to be supported also with pwm-led0 Signed-off-by: Dimitris Tassopoulos <dimtass@gmail.com>
This commit is contained in:
parent
7f9b85e8c3
commit
c2e9c1fa49
3 changed files with 11 additions and 1 deletions
|
@ -29,6 +29,13 @@
|
|||
};
|
||||
};
|
||||
|
||||
pwmleds {
|
||||
compatible = "pwm-leds";
|
||||
green_pwm_led: green_pwm_led {
|
||||
pwms = <&pwm2 1 0>;
|
||||
};
|
||||
};
|
||||
|
||||
gpio_keys {
|
||||
compatible = "gpio-keys";
|
||||
user_button: button {
|
||||
|
@ -40,6 +47,7 @@
|
|||
aliases {
|
||||
led0 = &green_led_2;
|
||||
sw0 = &user_button;
|
||||
pwm-led0 = &green_pwm_led;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ static const struct pin_config pinconf[] = {
|
|||
{STM32_PIN_PA3, STM32F4_PINMUX_FUNC_PA3_USART2_RX},
|
||||
#endif
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(pwm2), okay) && CONFIG_PWM
|
||||
{STM32_PIN_PA0, STM32F4_PINMUX_FUNC_PA0_PWM2_CH1},
|
||||
{STM32_PIN_PA5, STM32F4_PINMUX_FUNC_PA5_PWM2_CH1},
|
||||
#endif
|
||||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(i2c1), okay) && CONFIG_I2C
|
||||
{STM32_PIN_PB8, STM32F4_PINMUX_FUNC_PB8_I2C1_SCL},
|
||||
|
|
|
@ -77,6 +77,8 @@
|
|||
#define STM32F4_PINMUX_FUNC_PA4_ADC12_IN4 \
|
||||
STM32_MODER_ANALOG_MODE
|
||||
|
||||
#define STM32F4_PINMUX_FUNC_PA5_PWM2_CH1 \
|
||||
(STM32_PINMUX_ALT_FUNC_1 | STM32_PUSHPULL_PULLUP)
|
||||
#define STM32F4_PINMUX_FUNC_PA5_SPI1_SCK \
|
||||
(STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL | \
|
||||
STM32_OSPEEDR_VERY_HIGH_SPEED)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue