Trait nrf52832_hal::prelude::_embedded_hal_PwmPin[][src]

pub trait _embedded_hal_PwmPin {
    type Duty;
    fn disable(&mut self);
fn enable(&mut self);
fn get_duty(&self) -> Self::Duty;
fn get_max_duty(&self) -> Self::Duty;
fn set_duty(&mut self, duty: Self::Duty); }
Expand description

A single PWM channel / pin

See Pwm for details

Associated Types

type Duty[src]

Type for the duty methods

The implementer is free to choose a float / percentage representation (e.g. 0.0 .. 1.0) or an integer representation (e.g. 0 .. 65535)

Required methods

fn disable(&mut self)[src]

Disables a PWM channel

fn enable(&mut self)[src]

Enables a PWM channel

fn get_duty(&self) -> Self::Duty[src]

Returns the current duty cycle

fn get_max_duty(&self) -> Self::Duty[src]

Returns the maximum duty cycle value

fn set_duty(&mut self, duty: Self::Duty)[src]

Sets a new duty cycle

Implementors

impl<'a, T> PwmPin for PwmChannel<'a, T> where
    T: Instance
[src]

type Duty = u16

pub fn disable(&mut self)[src]

pub fn enable(&mut self)[src]

pub fn get_duty(&self) -> <PwmChannel<'a, T> as PwmPin>::Duty[src]

pub fn get_max_duty(&self) -> <PwmChannel<'a, T> as PwmPin>::Duty[src]

pub fn set_duty(&mut self, duty: u16)[src]

impl<'a, T> PwmPin for PwmGroup<'a, T> where
    T: Instance
[src]

type Duty = u16

pub fn disable(&mut self)[src]

pub fn enable(&mut self)[src]

pub fn get_duty(&self) -> <PwmGroup<'a, T> as PwmPin>::Duty[src]

pub fn get_max_duty(&self) -> <PwmGroup<'a, T> as PwmPin>::Duty[src]

pub fn set_duty(&mut self, duty: u16)[src]