Hi
I am using NCS desktop application
I ported it to my custom board(52833),It works well
but now,my custom board has three leds,while nrf52 kbd board only has 1 led,so I want add 2 leds
but after modify the code as blew,led has not change to 3 leds but 1 led(without any change)
~~~~~~~~~~~~what I modify~~~~~~~~~~~~~~~~~~~~~~
/*DTS pin number is confirm ok*/
&pwm0 {
status = "okay";
ch0-pin = <2>;
ch0-inverted;
};
&pwm1 {
status = "okay";
ch0-pin = <28>;
ch0-inverted;
};
&pwm2 {
status = "okay";
ch0-pin = <29>;
ch0-inverted;
};
/*leds_def.h*/
static const size_t led_pins[CONFIG_DESKTOP_LED_COUNT]
[CONFIG_DESKTOP_LED_COLOR_COUNT] = {
{
DT_PROP(DT_ALIAS(pwm_0), ch0_pin)
},
{
DT_PROP(DT_ALIAS(pwm_1), ch0_pin)
},
{
DT_PROP(DT_ALIAS(pwm_2), ch0_pin)
},
};
/*config*/
CONFIG_DESKTOP_LED_COUNT 3
~~~~~~~~~~~~~~~~nordic sourcecode~~~~~~~~~~~~~~~~~~
/*DTS */
&pwm0 {
status = "okay";
ch0-pin = <30>;
ch0-inverted;
ch1-pin = <29>;
ch1-inverted;
ch2-pin = <28>;
ch2-inverted;
};
/*leds_def.h*/
static const size_t led_pins[CONFIG_DESKTOP_LED_COUNT]
[CONFIG_DESKTOP_LED_COLOR_COUNT] = {
{
DT_PROP(DT_ALIAS(pwm_0), ch0_pin)
},
};
/*config*/
CONFIG_DESKTOP_LED_COUNT 1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
BR
victor