@@ -39,7 +39,7 @@ use esp_hal::{
39
39
gpio:: { AnyPin , Level , Output , OutputPin , Pin } ,
40
40
ledc:: {
41
41
channel:: { self , Channel , ChannelIFace } ,
42
- timer:: { self , Timer , TimerHW , TimerIFace , TimerSpeed } ,
42
+ timer:: { self , Timer , TimerIFace } ,
43
43
Ledc , LowSpeed ,
44
44
} ,
45
45
peripheral:: { Peripheral , PeripheralRef } ,
@@ -124,20 +124,15 @@ struct Volume {
124
124
}
125
125
126
126
/// A buzzer instance driven by Ledc
127
- pub struct Buzzer < ' a , S : TimerSpeed , O : OutputPin > {
128
- timer : Timer < ' a , S > ,
127
+ pub struct Buzzer < ' a , O : OutputPin > {
128
+ timer : Timer < ' a , LowSpeed > ,
129
129
channel_number : channel:: Number ,
130
130
output_pin : PeripheralRef < ' a , O > ,
131
131
delay : Delay ,
132
132
volume : Option < Volume > ,
133
133
}
134
134
135
- impl < ' a , S : TimerSpeed , O : OutputPin + Peripheral < P = O > > Buzzer < ' a , S , O >
136
- where
137
- S : TimerSpeed < ClockSourceType = timer:: LSClockSource > ,
138
- Timer < ' a , S > : TimerHW < S > ,
139
- Timer < ' a , S > : TimerIFace < LowSpeed > ,
140
- {
135
+ impl < ' a , O : OutputPin + Peripheral < P = O > > Buzzer < ' a , O > {
141
136
/// Create a new buzzer for the given pin
142
137
pub fn new (
143
138
ledc : & ' a Ledc ,
0 commit comments