1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#[doc = "Register `cali_conf` reader"]
pub type R = crate::R<CALI_CONF_SPEC>;
#[doc = "Register `cali_conf` writer"]
pub type W = crate::W<CALI_CONF_SPEC>;
#[doc = "Field `CALI_RTC_MAX` reader - "]
pub type CALI_RTC_MAX_R = crate::FieldReader<u16>;
#[doc = "Field `CALI_RTC_MAX` writer - "]
pub type CALI_RTC_MAX_W<'a, REG, const O: u8> = crate::FieldWriter<'a, REG, 10, O, u16>;
#[doc = "Field `CALI_START` reader - "]
pub type CALI_START_R = crate::BitReader;
#[doc = "Field `CALI_START` writer - "]
pub type CALI_START_W<'a, REG, const O: u8> = crate::BitWriter<'a, REG, O>;
impl R {
    #[doc = "Bits 0:9"]
    #[inline(always)]
    pub fn cali_rtc_max(&self) -> CALI_RTC_MAX_R {
        CALI_RTC_MAX_R::new((self.bits & 0x03ff) as u16)
    }
    #[doc = "Bit 31"]
    #[inline(always)]
    pub fn cali_start(&self) -> CALI_START_R {
        CALI_START_R::new(((self.bits >> 31) & 1) != 0)
    }
}
#[cfg(feature = "impl-register-debug")]
impl core::fmt::Debug for R {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("cali_conf")
            .field(
                "cali_rtc_max",
                &format_args!("{}", self.cali_rtc_max().bits()),
            )
            .field("cali_start", &format_args!("{}", self.cali_start().bit()))
            .finish()
    }
}
#[cfg(feature = "impl-register-debug")]
impl core::fmt::Debug for crate::generic::Reg<CALI_CONF_SPEC> {
    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
        self.read().fmt(f)
    }
}
impl W {
    #[doc = "Bits 0:9"]
    #[inline(always)]
    #[must_use]
    pub fn cali_rtc_max(&mut self) -> CALI_RTC_MAX_W<CALI_CONF_SPEC, 0> {
        CALI_RTC_MAX_W::new(self)
    }
    #[doc = "Bit 31"]
    #[inline(always)]
    #[must_use]
    pub fn cali_start(&mut self) -> CALI_START_W<CALI_CONF_SPEC, 31> {
        CALI_START_W::new(self)
    }
    #[doc = "Writes raw bits to the register."]
    #[inline(always)]
    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
        self.bits = bits;
        self
    }
}
#[doc = "\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`cali_conf::R`](R).  You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`cali_conf::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct CALI_CONF_SPEC;
impl crate::RegisterSpec for CALI_CONF_SPEC {
    type Ux = u32;
}
#[doc = "`read()` method returns [`cali_conf::R`](R) reader structure"]
impl crate::Readable for CALI_CONF_SPEC {}
#[doc = "`write(|w| ..)` method takes [`cali_conf::W`](W) writer structure"]
impl crate::Writable for CALI_CONF_SPEC {
    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
}
#[doc = "`reset()` method sets cali_conf to value 0"]
impl crate::Resettable for CALI_CONF_SPEC {
    const RESET_VALUE: Self::Ux = 0;
}