From 59e322911ec1030ab2184e34aeb6e362072238f7 Mon Sep 17 00:00:00 2001 From: Wilfried Chauveau Date: Thu, 31 Aug 2023 10:16:12 +0100 Subject: [PATCH] Fix trait bound to make it actually generic over countdown --- src/lib.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index d0ed06d..3b4c238 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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}, @@ -242,8 +242,10 @@ where } } -impl<'timer, P, SM, I> SmartLedsWrite for Ws2812, I> +impl<'timer, P, SM, I, C> SmartLedsWrite for Ws2812 where + C: CountDown, + C::Time: From, I: AnyPin, P: PIOExt, SM: StateMachineIndex,