This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 35354473c6af2089cb13dcb3fd186d8c54754387
Author: Matteo Golin <[email protected]>
AuthorDate: Fri Jul 24 15:04:51 2026 -0400

    arm64/bcm2711/pwm: Fix PWM defconfigs
    
    Fix build error where PWM0 pinout selection checks would still be
    compiled even when PWM0 was not enabled.
    
    Signed-off-by: Matteo Golin <[email protected]>
---
 arch/arm64/src/bcm2711/bcm2711_pwm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm64/src/bcm2711/bcm2711_pwm.c 
b/arch/arm64/src/bcm2711/bcm2711_pwm.c
index 755bbf374e2..ffc4d4f15cc 100644
--- a/arch/arm64/src/bcm2711/bcm2711_pwm.c
+++ b/arch/arm64/src/bcm2711/bcm2711_pwm.c
@@ -44,6 +44,7 @@
 
 /* PWM0 has several options for the channels. */
 
+#ifdef CONFIG_BCM2711_PWM0
 #if CONFIG_BCM2711_PWM0_CHAN1_PIN == 12
 #define BCM2711_PWM0_CHAN1_PIN_ALT BCM_GPIO_FUNC0
 #elif CONFIG_BCM2711_PWM0_CHAN1_PIN == 18
@@ -61,6 +62,7 @@
 #else
 #error "Invalid pin selection for PWM0 channel 2!"
 #endif
+#endif /* CONFIG_BCM2711_PWM0 */
 
 /* PWM1 only has one option for the channels */
 

Reply via email to