pub trait CaptureCompare16bitInstance: GeneralPurpose16bitInstance {
Show 16 methods
// Required method
fn enable_outputs(&mut self);
// Provided methods
fn set_input_capture_filter(&mut self, channel: Channel, icf: Icf) { ... }
fn clear_input_interrupt(&mut self, channel: Channel) { ... }
fn enable_input_interrupt(&mut self, channel: Channel, enable: bool) { ... }
fn set_input_capture_prescaler(&mut self, channel: Channel, factor: u8) { ... }
fn set_input_ti_selection(
&mut self,
channel: Channel,
tisel: InputTISelection,
) { ... }
fn set_input_capture_mode(
&mut self,
channel: Channel,
mode: InputCaptureMode,
) { ... }
fn set_output_compare_mode(
&mut self,
channel: Channel,
mode: OutputCompareMode,
) { ... }
fn set_output_polarity(
&mut self,
channel: Channel,
polarity: OutputPolarity,
) { ... }
fn enable_channel(&mut self, channel: Channel, enable: bool) { ... }
fn get_channel_enable_state(&self, channel: Channel) -> bool { ... }
fn set_compare_value(&mut self, channel: Channel, value: u16) { ... }
fn get_capture_value(&mut self, channel: Channel) -> u16 { ... }
fn get_max_compare_value(&self) -> u16 { ... }
fn get_compare_value(&self, channel: Channel) -> u16 { ... }
fn set_output_compare_preload(&mut self, channel: Channel, preload: bool) { ... }
}
Expand description
Capture/Compare 16-bit timer instance.
Required Methods§
Sourcefn enable_outputs(&mut self)
fn enable_outputs(&mut self)
Enable timer outputs.
Provided Methods§
Sourcefn set_input_capture_filter(&mut self, channel: Channel, icf: Icf)
fn set_input_capture_filter(&mut self, channel: Channel, icf: Icf)
Set input capture filter.
Sourcefn clear_input_interrupt(&mut self, channel: Channel)
fn clear_input_interrupt(&mut self, channel: Channel)
Clear input interrupt.
Sourcefn enable_input_interrupt(&mut self, channel: Channel, enable: bool)
fn enable_input_interrupt(&mut self, channel: Channel, enable: bool)
Enable input interrupt.
Sourcefn set_input_capture_prescaler(&mut self, channel: Channel, factor: u8)
fn set_input_capture_prescaler(&mut self, channel: Channel, factor: u8)
Set input capture prescaler.
Sourcefn set_input_ti_selection(&mut self, channel: Channel, tisel: InputTISelection)
fn set_input_ti_selection(&mut self, channel: Channel, tisel: InputTISelection)
Set input TI selection.
Sourcefn set_input_capture_mode(&mut self, channel: Channel, mode: InputCaptureMode)
fn set_input_capture_mode(&mut self, channel: Channel, mode: InputCaptureMode)
Set input capture mode.
Sourcefn set_output_compare_mode(&mut self, channel: Channel, mode: OutputCompareMode)
fn set_output_compare_mode(&mut self, channel: Channel, mode: OutputCompareMode)
Set output compare mode.
Sourcefn set_output_polarity(&mut self, channel: Channel, polarity: OutputPolarity)
fn set_output_polarity(&mut self, channel: Channel, polarity: OutputPolarity)
Set output polarity.
Sourcefn enable_channel(&mut self, channel: Channel, enable: bool)
fn enable_channel(&mut self, channel: Channel, enable: bool)
Enable/disable a channel.
Sourcefn get_channel_enable_state(&self, channel: Channel) -> bool
fn get_channel_enable_state(&self, channel: Channel) -> bool
Get enable/disable state of a channel
Sourcefn set_compare_value(&mut self, channel: Channel, value: u16)
fn set_compare_value(&mut self, channel: Channel, value: u16)
Set compare value for a channel.
Sourcefn get_capture_value(&mut self, channel: Channel) -> u16
fn get_capture_value(&mut self, channel: Channel) -> u16
Get capture value for a channel.
Sourcefn get_max_compare_value(&self) -> u16
fn get_max_compare_value(&self) -> u16
Get max compare value. This depends on the timer frequency and the clock frequency from RCC.
Sourcefn get_compare_value(&self, channel: Channel) -> u16
fn get_compare_value(&self, channel: Channel) -> u16
Get compare value for a channel.
Sourcefn set_output_compare_preload(&mut self, channel: Channel, preload: bool)
fn set_output_compare_preload(&mut self, channel: Channel, preload: bool)
Set output compare preload.
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.