Struct attiny_hal::simple_pwm::Timer0Pwm
source · pub struct Timer0Pwm { /* private fields */ }
Expand description
Use TC0
for PWM (pins PB0
, PB1
)
Example
let mut timer0 = Timer0Pwm::new(dp.TC0, Prescaler::Prescale64);
let mut d0 = pins.d0.into_output().into_pwm(&mut timer0);
let mut d1 = pins.d1.into_output().into_pwm(&mut timer0);
d0.set_duty(128);
d0.enable();
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Timer0Pwm
impl Send for Timer0Pwm
impl !Sync for Timer0Pwm
impl Unpin for Timer0Pwm
impl UnwindSafe for Timer0Pwm
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