Skip to content

Commit b48efd3

Browse files
committed
Fix trait bound to make it actually generic over countdown
1 parent b1eddb1 commit b48efd3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/lib.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
1616
use cortex_m;
1717
use embedded_hal::timer::CountDown;
18-
use fugit::{ExtU32, HertzU32};
18+
use fugit::{ExtU32, HertzU32, MicrosDurationU32};
1919
use rp2040_hal::{
2020
gpio::AnyPin,
2121
pio::{PIOExt, StateMachineIndex, Tx, UninitStateMachine, PIO},
@@ -242,8 +242,10 @@ where
242242
}
243243
}
244244

245-
impl<'timer, P, SM, I> SmartLedsWrite for Ws2812<P, SM, rp2040_hal::timer::CountDown<'timer>, I>
245+
impl<'timer, P, SM, I, C, Time> SmartLedsWrite for Ws2812<P, SM, C, I>
246246
where
247+
Time: From<MicrosDurationU32>,
248+
C: CountDown<Time = Time>,
247249
I: AnyPin<Function = P::PinFunction>,
248250
P: PIOExt,
249251
SM: StateMachineIndex,

0 commit comments

Comments
 (0)