diff --git a/esp-hal-buzzer/src/lib.rs b/esp-hal-buzzer/src/lib.rs index 334d5dc..02cce56 100644 --- a/esp-hal-buzzer/src/lib.rs +++ b/esp-hal-buzzer/src/lib.rs @@ -39,7 +39,7 @@ use esp_hal::{ gpio::{AnyPin, Level, Output, OutputPin, Pin}, ledc::{ channel::{self, Channel, ChannelIFace}, - timer::{self, Timer, TimerHW, TimerIFace, TimerSpeed}, + timer::{self, Timer, TimerIFace}, Ledc, LowSpeed, }, peripheral::{Peripheral, PeripheralRef}, @@ -124,20 +124,15 @@ struct Volume { } /// A buzzer instance driven by Ledc -pub struct Buzzer<'a, S: TimerSpeed, O: OutputPin> { - timer: Timer<'a, S>, +pub struct Buzzer<'a, O: OutputPin> { + timer: Timer<'a, LowSpeed>, channel_number: channel::Number, output_pin: PeripheralRef<'a, O>, delay: Delay, volume: Option, } -impl<'a, S: TimerSpeed, O: OutputPin + Peripheral

> Buzzer<'a, S, O> -where - S: TimerSpeed, - Timer<'a, S>: TimerHW, - Timer<'a, S>: TimerIFace, -{ +impl<'a, O: OutputPin + Peripheral

> Buzzer<'a, O> { /// Create a new buzzer for the given pin pub fn new( ledc: &'a Ledc,