Struct d1_pac::rtc::losc_ctrl::R

source ·
pub struct R(/* private fields */);
Expand description

Register losc_ctrl reader

Implementations§

source§

impl R

source

pub fn losc_src_sel(&self) -> LOSC_SRC_SEL_R

Bit 0 - LOSC Clock Source Select

source

pub fn rtc_src_sel(&self) -> RTC_SRC_SEL_R

Bit 1 - RTC_TIMER Clock Source Select

source

pub fn ext_losc_gsm(&self) -> EXT_LOSC_GSM_R

Bits 2:3 - External 32.768 kHz Crystal GSM

When GSM is changed, the 32K oscillation circuit will arise transient instability. If the autoswitch function (bit 15) is enabled, 32K changes to RC16M with certain probability. The GSM can influence the time of 32K starting oscillation, the more the GSM, the shorter the time of starting oscillation. So modifying GSM is not recommended.

If you need to modify the GSM, firstly disable the auto switch function (bit 15), with a delay of 50 us, then change the GSM, the 32K clock source is changed to external clock.

source

pub fn ext_losc_en(&self) -> EXT_LOSC_EN_R

Bit 4 - External 32.768 kHz Crystal Enable

source

pub fn rtc_day_acce(&self) -> RTC_DAY_ACCE_R

Bit 7 - RTC DAY access

After writing the RTC DAY register, this bit is set and it will be cleared until the real writing operation is finished. After writing the RTC DAY register, the DAY register will be refreshed for at most one second.

Note: Make sure that the bit is 0 for time configuration.

source

pub fn rtc_hhmmss_acce(&self) -> RTC_HHMMSS_ACCE_R

Bit 8 - RTC Hour Minute Second access

After writing the RTC HH-MM-SS Register, this bit is set and it will be cleared until the real writing operation is finished. After writing the RTC HH-MM-SS Register, the RTC HH-MM-SS Register will be refreshed for at most one second.

Note: Make sure that the bit is 0 for time configuration.

source

pub fn losc_auto_swt_32k_sel_en(&self) -> LOSC_AUTO_SWT_32K_SEL_EN_R

Bit 14 - LOSC auto switch 32K clk source select enable

source

pub fn losc_auto_swt_function(&self) -> LOSC_AUTO_SWT_FUNCTION_R

Bit 15 - LOSC auto switch function disable

Methods from Deref<Target = R<LOSC_CTRL_SPEC>>§

source

pub fn bits(&self) -> REG::Ux

Reads raw bits from register.

Trait Implementations§

source§

impl Deref for R

§

type Target = R<LOSC_CTRL_SPEC>

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl From<R<LOSC_CTRL_SPEC>> for R

source§

fn from(reader: R<LOSC_CTRL_SPEC>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl Freeze for R

§

impl RefUnwindSafe for R

§

impl Send for R

§

impl Sync for R

§

impl Unpin for R

§

impl UnwindSafe for R

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.