[−][src]Struct atmega_hal::simple_pwm::Timer2Pwm
Use TC2
for PWM (pins PB3
, PD3
)
Example
let mut timer2 = Timer2Pwm::new(dp.TC2, Prescaler::Prescale64); let mut d11 = pins.d11.into_output().into_pwm(&mut timer2); let mut d3 = pins.d3.into_output().into_pwm(&mut timer2); d11.set_duty(128); d11.enable();
Implementations
impl Timer2Pwm
[src]
Trait Implementations
impl PwmPinOps<Timer2Pwm> for PB3
[src]
type Duty = u8
pub fn enable(&mut self)
[src]
pub fn disable(&mut self)
[src]
pub fn get_duty(&self) -> Self::Duty
[src]
pub fn get_max_duty(&self) -> Self::Duty
[src]
pub fn set_duty(&mut self, duty: Self::Duty)
[src]
impl PwmPinOps<Timer2Pwm> for PD3
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,