pub trait PwmOps: 'static + Sized {
type WfHw: Copy + Default;
// Provided methods
fn request(
_chip: &Chip<Self>,
_pwm: &Device,
_parent_dev: &Device<Bound>,
) -> Result { ... }
fn capture(
_chip: &Chip<Self>,
_pwm: &Device,
_result: &mut pwm_capture,
_timeout: usize,
_parent_dev: &Device<Bound>,
) -> Result { ... }
fn round_waveform_tohw(
_chip: &Chip<Self>,
_pwm: &Device,
_wf: &Waveform,
) -> Result<RoundedWaveform<Self::WfHw>> { ... }
fn round_waveform_fromhw(
_chip: &Chip<Self>,
_pwm: &Device,
_wfhw: &Self::WfHw,
_wf: &mut Waveform,
) -> Result { ... }
fn read_waveform(
_chip: &Chip<Self>,
_pwm: &Device,
_parent_dev: &Device<Bound>,
) -> Result<Self::WfHw> { ... }
fn write_waveform(
_chip: &Chip<Self>,
_pwm: &Device,
_wfhw: &Self::WfHw,
_parent_dev: &Device<Bound>,
) -> Result { ... }
}Expand description
Trait defining the operations for a PWM driver.
Required Associated Types§
Provided Methods§
Sourcefn request(
_chip: &Chip<Self>,
_pwm: &Device,
_parent_dev: &Device<Bound>,
) -> Result
fn request( _chip: &Chip<Self>, _pwm: &Device, _parent_dev: &Device<Bound>, ) -> Result
Optional hook for when a PWM device is requested.
Sourcefn capture(
_chip: &Chip<Self>,
_pwm: &Device,
_result: &mut pwm_capture,
_timeout: usize,
_parent_dev: &Device<Bound>,
) -> Result
fn capture( _chip: &Chip<Self>, _pwm: &Device, _result: &mut pwm_capture, _timeout: usize, _parent_dev: &Device<Bound>, ) -> Result
Optional hook for capturing a PWM signal.
Sourcefn round_waveform_tohw(
_chip: &Chip<Self>,
_pwm: &Device,
_wf: &Waveform,
) -> Result<RoundedWaveform<Self::WfHw>>
fn round_waveform_tohw( _chip: &Chip<Self>, _pwm: &Device, _wf: &Waveform, ) -> Result<RoundedWaveform<Self::WfHw>>
Convert a generic waveform to the hardware-specific representation. This is typically a pure calculation and does not perform I/O.
Sourcefn round_waveform_fromhw(
_chip: &Chip<Self>,
_pwm: &Device,
_wfhw: &Self::WfHw,
_wf: &mut Waveform,
) -> Result
fn round_waveform_fromhw( _chip: &Chip<Self>, _pwm: &Device, _wfhw: &Self::WfHw, _wf: &mut Waveform, ) -> Result
Convert a hardware-specific representation back to a generic waveform. This is typically a pure calculation and does not perform I/O.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.