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