efm32gg12b390_pac/cmu/
hfxotrimstatus.rs

1#[doc = "Register `HFXOTRIMSTATUS` reader"]
2pub struct R(crate::R<HFXOTRIMSTATUS_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<HFXOTRIMSTATUS_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<HFXOTRIMSTATUS_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<HFXOTRIMSTATUS_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Field `IBTRIMXOCORE` reader - Value of IBTRIMXOCORE Found By Automatic HFXO Peak Detection Algorithm"]
17pub type IBTRIMXOCORE_R = crate::FieldReader<u16, u16>;
18#[doc = "Field `IBTRIMXOCOREMON` reader - Value of IBTRIMXOCORE Found By Automatic HFXO Peak Detection Algorithm or Peak Monitoring Algorithm (completion of Either Algorithm Will Cause an Update of IBTRIMXOCOREMON)"]
19pub type IBTRIMXOCOREMON_R = crate::FieldReader<u16, u16>;
20#[doc = "Field `VALID` reader - Peak Detection Algorithm Found a Value for IBTRIMXOCORE"]
21pub type VALID_R = crate::BitReader<bool>;
22#[doc = "Field `MONVALID` reader - Peak Detection Algorithm or Peak Monitoring Algorithm Found a Value for IBTRIMXOCOREMON"]
23pub type MONVALID_R = crate::BitReader<bool>;
24impl R {
25    #[doc = "Bits 0:10 - Value of IBTRIMXOCORE Found By Automatic HFXO Peak Detection Algorithm"]
26    #[inline(always)]
27    pub fn ibtrimxocore(&self) -> IBTRIMXOCORE_R {
28        IBTRIMXOCORE_R::new((self.bits & 0x07ff) as u16)
29    }
30    #[doc = "Bits 16:26 - Value of IBTRIMXOCORE Found By Automatic HFXO Peak Detection Algorithm or Peak Monitoring Algorithm (completion of Either Algorithm Will Cause an Update of IBTRIMXOCOREMON)"]
31    #[inline(always)]
32    pub fn ibtrimxocoremon(&self) -> IBTRIMXOCOREMON_R {
33        IBTRIMXOCOREMON_R::new(((self.bits >> 16) & 0x07ff) as u16)
34    }
35    #[doc = "Bit 30 - Peak Detection Algorithm Found a Value for IBTRIMXOCORE"]
36    #[inline(always)]
37    pub fn valid(&self) -> VALID_R {
38        VALID_R::new(((self.bits >> 30) & 1) != 0)
39    }
40    #[doc = "Bit 31 - Peak Detection Algorithm or Peak Monitoring Algorithm Found a Value for IBTRIMXOCOREMON"]
41    #[inline(always)]
42    pub fn monvalid(&self) -> MONVALID_R {
43        MONVALID_R::new(((self.bits >> 31) & 1) != 0)
44    }
45}
46#[doc = "HFXO Trim Status\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [hfxotrimstatus](index.html) module"]
47pub struct HFXOTRIMSTATUS_SPEC;
48impl crate::RegisterSpec for HFXOTRIMSTATUS_SPEC {
49    type Ux = u32;
50}
51#[doc = "`read()` method returns [hfxotrimstatus::R](R) reader structure"]
52impl crate::Readable for HFXOTRIMSTATUS_SPEC {
53    type Reader = R;
54}
55#[doc = "`reset()` method sets HFXOTRIMSTATUS to value 0"]
56impl crate::Resettable for HFXOTRIMSTATUS_SPEC {
57    #[inline(always)]
58    fn reset_value() -> Self::Ux {
59        0
60    }
61}