pub struct PwmChannel { /* private fields */ }
Implementations§
Source§impl PwmChannel
impl PwmChannel
pub fn new(chip: PwmChip, channel: u8) -> Self
pub fn set_period(&self, period_ns: Duration) -> Result<(), Error>
pub fn set_duty_cycle(&self, duty_cycle_ns: Duration) -> Result<(), Error>
pub fn set_polarity(&self, polarity: Polarity)
pub fn enable(&self) -> Result<(), Error>
pub fn disable(&self) -> Result<(), Error>
Trait Implementations§
Source§impl Clone for PwmChannel
impl Clone for PwmChannel
Source§fn clone(&self) -> PwmChannel
fn clone(&self) -> PwmChannel
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for PwmChannel
impl RefUnwindSafe for PwmChannel
impl Send for PwmChannel
impl Sync for PwmChannel
impl Unpin for PwmChannel
impl UnwindSafe for PwmChannel
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