Skip to content

Commit

Permalink
[Telink] w91 remove not connected PWM channels (project-chip#35005)
Browse files Browse the repository at this point in the history
* telink: w91 remowe PWM channels

Signed-off-by: Dmytro Kashkarov <[email protected]>

* Restyled by whitespace

---------

Signed-off-by: Dmytro Kashkarov <[email protected]>
Co-authored-by: Dmytro Kashkarov <[email protected]>
Co-authored-by: Restyled.io <[email protected]>
  • Loading branch information
3 people authored and PeterC1965 committed Aug 28, 2024
1 parent 3e3e0a1 commit 5f9821b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
5 changes: 3 additions & 2 deletions examples/platform/telink/common/src/AppTaskCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -414,8 +414,9 @@ void AppTaskCommon::InitPwms()

void AppTaskCommon::LinkPwms(PwmManager & pwmManager)
{
#if CONFIG_WS2812_STRIP || \
CONFIG_BOARD_TLSR9118BDK40D // TLSR9118BDK40D EVK buttons located on 4th PWM channel (see tlsr9118bdk40d.overlay)
#if CONFIG_BOARD_TLSR9118BDK40D // TLSR9118BDK40D EVK supports only 1 PWM channel connected to LED
pwmManager.linkPwm(PwmManager::EAppPwm_Red, 0);
#elif CONFIG_WS2812_STRIP
pwmManager.linkPwm(PwmManager::EAppPwm_Red, 0);
pwmManager.linkPwm(PwmManager::EAppPwm_Green, 1);
pwmManager.linkPwm(PwmManager::EAppPwm_Blue, 2);
Expand Down
11 changes: 1 addition & 10 deletions src/platform/telink/tlsr9118bdk40d.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,7 @@
pwm_pool {
compatible = "pwm-leds";
out {
pwms = <&pwm0 4 PWM_MSEC(1) PWM_POLARITY_NORMAL>,
<&pwm0 2 PWM_MSEC(1) PWM_POLARITY_NORMAL>,
<&pwm0 3 PWM_MSEC(1) PWM_POLARITY_NORMAL>;
pwms = <&pwm0 4 PWM_MSEC(1) PWM_POLARITY_NORMAL>;
};
};
};

&pwm0 {
/* On board RGB LEDs */
pinctrl-ch4 = <&pwm_ch4_p20_default>;
pinctrl-ch2 = <&pwm_ch2_p17_default>;
pinctrl-ch3 = <&pwm_ch3_p18_default>;
};

0 comments on commit 5f9821b

Please sign in to comment.