1#[doc = "Register `tsen` reader"]
2pub struct R(crate::R<TSEN_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<TSEN_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<TSEN_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<TSEN_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `tsen` writer"]
17pub struct W(crate::W<TSEN_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<TSEN_SPEC>;
20 #[inline(always)]
21 fn deref(&self) -> &Self::Target {
22 &self.0
23 }
24}
25impl core::ops::DerefMut for W {
26 #[inline(always)]
27 fn deref_mut(&mut self) -> &mut Self::Target {
28 &mut self.0
29 }
30}
31impl From<crate::W<TSEN_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<TSEN_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `tsen_refcode_corner` reader - "]
38pub type TSEN_REFCODE_CORNER_R = crate::FieldReader<u16, u16>;
39#[doc = "Field `tsen_refcode_corner` writer - "]
40pub type TSEN_REFCODE_CORNER_W<'a, const O: u8> =
41 crate::FieldWriter<'a, u32, TSEN_SPEC, u16, u16, 12, O>;
42#[doc = "Field `tsen_refcode_rfcal` reader - "]
43pub type TSEN_REFCODE_RFCAL_R = crate::FieldReader<u16, u16>;
44#[doc = "Field `tsen_refcode_rfcal` writer - "]
45pub type TSEN_REFCODE_RFCAL_W<'a, const O: u8> =
46 crate::FieldWriter<'a, u32, TSEN_SPEC, u16, u16, 12, O>;
47#[doc = "Field `xtal_rdy` reader - "]
48pub type XTAL_RDY_R = crate::BitReader<bool>;
49#[doc = "Field `xtal_inn_cfg_en_aon` reader - "]
50pub type XTAL_INN_CFG_EN_AON_R = crate::BitReader<bool>;
51#[doc = "Field `xtal_inn_cfg_en_aon` writer - "]
52pub type XTAL_INN_CFG_EN_AON_W<'a, const O: u8> = crate::BitWriter<'a, u32, TSEN_SPEC, bool, O>;
53#[doc = "Field `xtal_rdy_int_sel_aon` reader - "]
54pub type XTAL_RDY_INT_SEL_AON_R = crate::FieldReader<u8, u8>;
55#[doc = "Field `xtal_rdy_int_sel_aon` writer - "]
56pub type XTAL_RDY_INT_SEL_AON_W<'a, const O: u8> =
57 crate::FieldWriter<'a, u32, TSEN_SPEC, u8, u8, 2, O>;
58impl R {
59 #[doc = "Bits 0:11"]
60 #[inline(always)]
61 pub fn tsen_refcode_corner(&self) -> TSEN_REFCODE_CORNER_R {
62 TSEN_REFCODE_CORNER_R::new((self.bits & 0x0fff) as u16)
63 }
64 #[doc = "Bits 16:27"]
65 #[inline(always)]
66 pub fn tsen_refcode_rfcal(&self) -> TSEN_REFCODE_RFCAL_R {
67 TSEN_REFCODE_RFCAL_R::new(((self.bits >> 16) & 0x0fff) as u16)
68 }
69 #[doc = "Bit 28"]
70 #[inline(always)]
71 pub fn xtal_rdy(&self) -> XTAL_RDY_R {
72 XTAL_RDY_R::new(((self.bits >> 28) & 1) != 0)
73 }
74 #[doc = "Bit 29"]
75 #[inline(always)]
76 pub fn xtal_inn_cfg_en_aon(&self) -> XTAL_INN_CFG_EN_AON_R {
77 XTAL_INN_CFG_EN_AON_R::new(((self.bits >> 29) & 1) != 0)
78 }
79 #[doc = "Bits 30:31"]
80 #[inline(always)]
81 pub fn xtal_rdy_int_sel_aon(&self) -> XTAL_RDY_INT_SEL_AON_R {
82 XTAL_RDY_INT_SEL_AON_R::new(((self.bits >> 30) & 3) as u8)
83 }
84}
85impl W {
86 #[doc = "Bits 0:11"]
87 #[inline(always)]
88 #[must_use]
89 pub fn tsen_refcode_corner(&mut self) -> TSEN_REFCODE_CORNER_W<0> {
90 TSEN_REFCODE_CORNER_W::new(self)
91 }
92 #[doc = "Bits 16:27"]
93 #[inline(always)]
94 #[must_use]
95 pub fn tsen_refcode_rfcal(&mut self) -> TSEN_REFCODE_RFCAL_W<16> {
96 TSEN_REFCODE_RFCAL_W::new(self)
97 }
98 #[doc = "Bit 29"]
99 #[inline(always)]
100 #[must_use]
101 pub fn xtal_inn_cfg_en_aon(&mut self) -> XTAL_INN_CFG_EN_AON_W<29> {
102 XTAL_INN_CFG_EN_AON_W::new(self)
103 }
104 #[doc = "Bits 30:31"]
105 #[inline(always)]
106 #[must_use]
107 pub fn xtal_rdy_int_sel_aon(&mut self) -> XTAL_RDY_INT_SEL_AON_W<30> {
108 XTAL_RDY_INT_SEL_AON_W::new(self)
109 }
110 #[doc = "Writes raw bits to the register."]
111 #[inline(always)]
112 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
113 self.0.bits(bits);
114 self
115 }
116}
117#[doc = "tsen.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [tsen](index.html) module"]
118pub struct TSEN_SPEC;
119impl crate::RegisterSpec for TSEN_SPEC {
120 type Ux = u32;
121}
122#[doc = "`read()` method returns [tsen::R](R) reader structure"]
123impl crate::Readable for TSEN_SPEC {
124 type Reader = R;
125}
126#[doc = "`write(|w| ..)` method takes [tsen::W](W) writer structure"]
127impl crate::Writable for TSEN_SPEC {
128 type Writer = W;
129 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
130 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
131}
132#[doc = "`reset()` method sets tsen to value 0x78ff_08ff"]
133impl crate::Resettable for TSEN_SPEC {
134 const RESET_VALUE: Self::Ux = 0x78ff_08ff;
135}