Enum stm32_hal2::timer::MasterModeSelection
source · [−]#[repr(u8)]
pub enum MasterModeSelection {
Reset,
Enable,
Update,
ComparePulse,
Compare1,
Compare2,
Compare3,
Compare4,
}
Expand description
These bits allow selected information to be sent in master mode to slave timers for synchronization (TRGO). Sets CR2 register, MMS field.
Variants
Reset
Tthe UG bit from the TIMx_EGR register is used as trigger output (TRGO). If the reset is generated by the trigger input (slave mode controller configured in reset mode) then the signal on TRGO is delayed compared to the actual reset.
Enable
the Counter Enable signal CNT_EN is used as trigger output (TRGO). It is useful to start several timers at the same time or to control a window in which a slave timer is enable. The Counter Enable signal is generated by a logic AND between CEN control bit and the trigger input when configured in gated mode. When the Counter Enable signal is controlled by the trigger input, there is a delay on TRGO, except if the master/slave mode is selected (see the MSM bit description in TIMx_SMCR register).
Update
The update event is selected as trigger output (TRGO). For instance a master timer can then be used as a prescaler for a slave timer.
ComparePulse
Compare Pulse - The trigger output send a positive pulse when the CC1IF flag is to be set (even if it was already high), as soon as a capture or a compare match occurred. (TRGO).
Compare1
OC1REF signal is used as trigger output (TRGO)
Compare2
OC2REF signal is used as trigger output (TRGO)
Compare3
OC3REF signal is used as trigger output (TRGO)
Compare4
OC4REF signal is used as trigger output (TRGO)
Trait Implementations
sourceimpl Clone for MasterModeSelection
impl Clone for MasterModeSelection
sourcefn clone(&self) -> MasterModeSelection
fn clone(&self) -> MasterModeSelection
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Copy for MasterModeSelection
Auto Trait Implementations
impl RefUnwindSafe for MasterModeSelection
impl Send for MasterModeSelection
impl Sync for MasterModeSelection
impl Unpin for MasterModeSelection
impl UnwindSafe for MasterModeSelection
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more