diff options
| author | eZio Pan <[email protected]> | 2023-12-30 12:01:08 +0800 |
|---|---|---|
| committer | eZio Pan <[email protected]> | 2023-12-30 12:01:08 +0800 |
| commit | 873ee0615147b4a4e0aacd069ce8ac8df611bbbf (patch) | |
| tree | 237c48b8a9cc17e2ae8570b08a2dc11ec6d1f567 /examples | |
| parent | 24f569821c7812714070a1ea3692b87100fc53e1 (diff) | |
some trivial fix
use less #[cfg] macro; reuse same variable
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/stm32f4/src/bin/ws2812_pwm.rs | 2 |
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 |
