pub struct Device(/* private fields */);Expand description
Wrapper for a PWM device struct pwm_device.
Implementations§
Source§impl Device
impl Device
Sourcepub fn chip<T: PwmOps>(&self) -> &Chip<T>
pub fn chip<T: PwmOps>(&self) -> &Chip<T>
Gets a reference to the parent Chip that this device belongs to.
Sourcepub fn set_waveform(&self, wf: &Waveform, exact: bool) -> Result
pub fn set_waveform(&self, wf: &Waveform, exact: bool) -> Result
Sets the PWM waveform configuration and enables the PWM signal.
Sourcepub fn round_waveform(&self, wf: &mut Waveform) -> Result<RoundingOutcome>
pub fn round_waveform(&self, wf: &mut Waveform) -> Result<RoundingOutcome>
Queries the hardware for the configuration it would apply for a given request.
Sourcepub fn get_waveform(&self) -> Result<Waveform>
pub fn get_waveform(&self) -> Result<Waveform>
Reads the current waveform configuration directly from the hardware.
Auto Trait Implementations§
impl !Freeze for Device
impl !RefUnwindSafe for Device
impl !Send for Device
impl !Sync for Device
impl !Unpin for Device
impl UnwindSafe for Device
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
Source§impl<T> PinInit<T> for T
impl<T> PinInit<T> for T
Source§unsafe fn __pinned_init(self, slot: *mut T) -> Result<(), Infallible>
unsafe fn __pinned_init(self, slot: *mut T) -> Result<(), Infallible>
Initializes
slot. Read more