diff --git a/src/beep.rs b/src/beep.rs index dd2771b..adc3bb3 100644 --- a/src/beep.rs +++ b/src/beep.rs @@ -9,8 +9,6 @@ use std::time::Duration; type LedcChannel
= Channel ,
@@ -19,8 +17,6 @@ pub struct Beep {
pub fn new(pin: P, timer: T, channel: C) -> Result {
return Ok(channel);
}
- pub fn toggle(&mut self) -> Result<(), EspError> {
- self.state = !self.state;
- if self.state {
- self.channel.set_duty(50)
- } else {
- self.channel.set_duty(0)
- }
- }
-
pub fn play(&mut self, rx: &mut std::sync::mpsc::Receiver