Skip to main content

W

Struct W 

Source
pub struct W(/* private fields */);
Expand description

Register CAL_CTL writer

Implementations§

Source§

impl W

Source

pub fn calib_val( &mut self, ) -> FieldWriterRaw<'_, u32, CAL_CTL_SPEC, u8, u8, Unsafe, 6, 0>

Bits 0:5 - Calibration value for absolute frequency (at a fixed temperature). Each step causes 128 ticks to be added or removed each hour. Effectively that means that each step is 1.085ppm (= 128/(606032,768)) when CAL_COMP_PER_MIN is set at default value. Positive values 0x01-0x3c (1..60) add pulses, negative values remove pulses, thus giving a range of +/-65.1 ppm (limited by 60 minutes per hour, not the range of this field) when CAL_COMP_PER_MIN is set at default value . Calibration is performed hourly, starting at 59 minutes and 59 seconds, and applied as 64 ticks every 30 seconds until there have been 2*CALIB_VAL adjustments when CAL_COMP_PER_MIN is set at default value .

Source

pub fn calib_sign( &mut self, ) -> BitWriterRaw<'_, u32, CAL_CTL_SPEC, bool, BitM, 6>

Bit 6 - Calibration sign: 0= Negative sign: remove pulses (it takes more clock ticks to count one second) 1= Positive sign: add pulses (it takes less clock ticks to count one second)

Source

pub fn cal_comp_per_min( &mut self, ) -> FieldWriterRaw<'_, u32, CAL_CTL_SPEC, u8, CAL_COMP_PER_MIN_A, Safe, 2, 16>

Bits 16:17 - Select how many time calibration is performed per minute per step of 64 , each time a 64 step is added or substracted one unit 2/4/8/16*CALIB_VAL is substracted.

Source

pub fn cal_sel( &mut self, ) -> FieldWriterRaw<'_, u32, CAL_CTL_SPEC, u8, CAL_SEL_A, Safe, 2, 28>

Bits 28:29 - Select calibration wave output signal

Source

pub fn cal_out(&mut self) -> BitWriterRaw<'_, u32, CAL_CTL_SPEC, bool, BitM, 31>

Bit 31 - Output enable for wave signal for calibration and allow CALIB_VAL to be written.

Source

pub unsafe fn bits(&mut self, bits: u32) -> &mut W

Writes raw bits to the register.

Methods from Deref<Target = W<CAL_CTL_SPEC>>§

Source

pub unsafe fn bits(&mut self, bits: <REG as RegisterSpec>::Ux) -> &mut W<REG>

Writes raw bits to the register.

§Safety

Read datasheet or reference manual to find what values are allowed to pass.

Trait Implementations§

Source§

impl Deref for W

Source§

type Target = W<CAL_CTL_SPEC>

The resulting type after dereferencing.
Source§

fn deref(&self) -> &<W as Deref>::Target

Dereferences the value.
Source§

impl DerefMut for W

Source§

fn deref_mut(&mut self) -> &mut <W as Deref>::Target

Mutably dereferences the value.
Source§

impl From<W<CAL_CTL_SPEC>> for W

Source§

fn from(writer: W<CAL_CTL_SPEC>) -> W

Converts to this type from the input type.

Auto Trait Implementations§

§

impl Freeze for W

§

impl RefUnwindSafe for W

§

impl Send for W

§

impl Sync for W

§

impl Unpin for W

§

impl UnsafeUnpin for W

§

impl UnwindSafe for W

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<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

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

Source§

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>,

Source§

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.