pub enum VolumeType {
OnOff,
Duty,
}Expand description
Represents different volume strategies for the buzzer.
-
VolumeType::OnOff is a simple on or off volume. It’s similar as using
.mute()except that the volume control is on a second pin independent of the buzzer. -
VolumeType::Duty uses the duty as the volume control. It acts like a PWM by switching the power on and off. This may require extra logic gates in the circuit.
Variants§
OnOff
An On / Off based volume
Duty
A duty based volume where 0% is the lowest and 100% the highest.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for VolumeType
impl RefUnwindSafe for VolumeType
impl Send for VolumeType
impl Sync for VolumeType
impl Unpin for VolumeType
impl UnwindSafe for VolumeType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more