Struct stm32_metapac::lptim::regs::Cr
#[repr(transparent)]pub struct Cr(pub u32);
Expand description
LPTIM control register.
Tuple Fields§
§0: u32
Implementations§
§impl Cr
impl Cr
pub fn set_enable(&mut self, val: bool)
pub fn set_enable(&mut self, val: bool)
LPTIM enable The ENABLE bit is set and cleared by software.
pub const fn sngstrt(&self) -> bool
pub const fn sngstrt(&self) -> bool
LPTIM start in Single mode This bit is set by software and cleared by hardware. In case of software start (TRIGEN[1:0] = ‘00’), setting this bit starts the LPTIM in single pulse mode. If the software start is disabled (TRIGEN[1:0] different than ‘00’), setting this bit starts the LPTIM in single pulse mode as soon as an external trigger is detected. If this bit is set when the LPTIM is in continuous counting mode, then the LPTIM stops at the following match between LPTIM_ARR and LPTIM_CNT registers. This bit can only be set when the LPTIM is enabled. It is automatically reset by hardware.
pub fn set_sngstrt(&mut self, val: bool)
pub fn set_sngstrt(&mut self, val: bool)
LPTIM start in Single mode This bit is set by software and cleared by hardware. In case of software start (TRIGEN[1:0] = ‘00’), setting this bit starts the LPTIM in single pulse mode. If the software start is disabled (TRIGEN[1:0] different than ‘00’), setting this bit starts the LPTIM in single pulse mode as soon as an external trigger is detected. If this bit is set when the LPTIM is in continuous counting mode, then the LPTIM stops at the following match between LPTIM_ARR and LPTIM_CNT registers. This bit can only be set when the LPTIM is enabled. It is automatically reset by hardware.
pub const fn cntstrt(&self) -> bool
pub const fn cntstrt(&self) -> bool
Timer start in Continuous mode This bit is set by software and cleared by hardware. In case of software start (TRIGEN[1:0] = ‘00’), setting this bit starts the LPTIM in Continuous mode. If the software start is disabled (TRIGEN[1:0] different than ‘00’), setting this bit starts the timer in Continuous mode as soon as an external trigger is detected. If this bit is set when a single pulse mode counting is ongoing, then the timer does not stop at the next match between the LPTIM_ARR and LPTIM_CNT registers and the LPTIM counter keeps counting in Continuous mode. This bit can be set only when the LPTIM is enabled. It is automatically reset by hardware.
pub fn set_cntstrt(&mut self, val: bool)
pub fn set_cntstrt(&mut self, val: bool)
Timer start in Continuous mode This bit is set by software and cleared by hardware. In case of software start (TRIGEN[1:0] = ‘00’), setting this bit starts the LPTIM in Continuous mode. If the software start is disabled (TRIGEN[1:0] different than ‘00’), setting this bit starts the timer in Continuous mode as soon as an external trigger is detected. If this bit is set when a single pulse mode counting is ongoing, then the timer does not stop at the next match between the LPTIM_ARR and LPTIM_CNT registers and the LPTIM counter keeps counting in Continuous mode. This bit can be set only when the LPTIM is enabled. It is automatically reset by hardware.
pub const fn countrst(&self) -> bool
pub const fn countrst(&self) -> bool
Counter reset This bit is set by software and cleared by hardware. When set to ‘1’ this bit triggers a synchronous reset of the LPTIM_CNT counter register. Due to the synchronous nature of this reset, it only takes place after a synchronization delay of 3 LPTimer core clock cycles (LPTimer core clock may be different from APB clock). This bit can be set only when the LPTIM is enabled. It is automatically reset by hardware. COUNTRST must never be set to ‘1’ by software before it is already cleared to ‘0’ by hardware. Software should consequently check that COUNTRST bit is already cleared to ‘0’ before attempting to set it to ‘1’.
pub fn set_countrst(&mut self, val: bool)
pub fn set_countrst(&mut self, val: bool)
Counter reset This bit is set by software and cleared by hardware. When set to ‘1’ this bit triggers a synchronous reset of the LPTIM_CNT counter register. Due to the synchronous nature of this reset, it only takes place after a synchronization delay of 3 LPTimer core clock cycles (LPTimer core clock may be different from APB clock). This bit can be set only when the LPTIM is enabled. It is automatically reset by hardware. COUNTRST must never be set to ‘1’ by software before it is already cleared to ‘0’ by hardware. Software should consequently check that COUNTRST bit is already cleared to ‘0’ before attempting to set it to ‘1’.
pub const fn rstare(&self) -> bool
pub const fn rstare(&self) -> bool
Reset after read enable This bit is set and cleared by software. When RSTARE is set to ‘1’, any read access to LPTIM_CNT register asynchronously resets LPTIM_CNT register content. This bit can be set only when the LPTIM is enabled.
pub fn set_rstare(&mut self, val: bool)
pub fn set_rstare(&mut self, val: bool)
Reset after read enable This bit is set and cleared by software. When RSTARE is set to ‘1’, any read access to LPTIM_CNT register asynchronously resets LPTIM_CNT register content. This bit can be set only when the LPTIM is enabled.
Trait Implementations§
impl Copy for Cr
impl Eq for Cr
impl StructuralPartialEq for Cr
Auto Trait Implementations§
impl Freeze for Cr
impl RefUnwindSafe for Cr
impl Send for Cr
impl Sync for Cr
impl Unpin for Cr
impl UnwindSafe for Cr
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)