aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authoreZio Pan <[email protected]>2023-12-30 12:01:08 +0800
committereZio Pan <[email protected]>2023-12-30 12:01:08 +0800
commit873ee0615147b4a4e0aacd069ce8ac8df611bbbf (patch)
tree237c48b8a9cc17e2ae8570b08a2dc11ec6d1f567 /examples
parent24f569821c7812714070a1ea3692b87100fc53e1 (diff)
some trivial fix
use less #[cfg] macro; reuse same variable
Diffstat (limited to 'examples')
-rw-r--r--examples/stm32f4/src/bin/ws2812_pwm.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/stm32f4/src/bin/ws2812_pwm.rs b/examples/stm32f4/src/bin/ws2812_pwm.rs
index 973743e49..93a89f16a 100644
--- a/examples/stm32f4/src/bin/ws2812_pwm.rs
+++ b/examples/stm32f4/src/bin/ws2812_pwm.rs
@@ -91,7 +91,7 @@ async fn main(_spawner: Spawner) {
91 91
92 loop { 92 loop {
93 for &color in color_list { 93 for &color in color_list {
94 ws2812_pwm.gen_waveform(Channel::Ch1, color).await; 94 ws2812_pwm.gen_waveform(pwm_channel, color).await;
95 // ws2812 need at least 50 us low level input to confirm the input data and change it's state 95 // ws2812 need at least 50 us low level input to confirm the input data and change it's state
96 Timer::after_micros(50).await; 96 Timer::after_micros(50).await;
97 // wait until ticker tick 97 // wait until ticker tick