Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CountDown generic support #27

Merged
merged 1 commit into from
Sep 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

use cortex_m;
use embedded_hal::timer::CountDown;
use fugit::{ExtU32, HertzU32};
use fugit::{ExtU32, HertzU32, MicrosDurationU32};
use rp2040_hal::{
gpio::AnyPin,
pio::{PIOExt, StateMachineIndex, Tx, UninitStateMachine, PIO},
Expand Down Expand Up @@ -242,8 +242,10 @@ where
}
}

impl<'timer, P, SM, I> SmartLedsWrite for Ws2812<P, SM, rp2040_hal::timer::CountDown<'timer>, I>
impl<'timer, P, SM, I, C> SmartLedsWrite for Ws2812<P, SM, C, I>
where
C: CountDown,
C::Time: From<MicrosDurationU32>,
I: AnyPin<Function = P::PinFunction>,
P: PIOExt,
SM: StateMachineIndex,
Expand Down
Loading