From a40997aa12029f24ef0904d9af6415c975c4322f Mon Sep 17 00:00:00 2001
From: guowenxue <guowenxue@gmail.com>
Date: Tue, 07 Jul 2026 23:17:44 +0800
Subject: [PATCH] Add ex1.ws2812b example code
---
ex1.buzzer-music/Board/miscdev.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/ex1.buzzer-music/Board/miscdev.c b/ex1.buzzer-music/Board/miscdev.c
index b295827..e2cf754 100644
--- a/ex1.buzzer-music/Board/miscdev.c
+++ b/ex1.buzzer-music/Board/miscdev.c
@@ -79,7 +79,7 @@
if( which >= LedMax )
return ;
- level = status==OFF ? GPIO_PIN_SET : GPIO_PIN_RESET;
+ level = status==ON ? leds[which].active : !leds[which].active;
HAL_GPIO_WritePin(leds[which].group, leds[which].pin, level);
}
--
Gitblit v1.10.0