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_rdy` writer - "]
50pub type XTAL_RDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, TSEN_SPEC, bool, O>;
51#[doc = "Field `xtal_inn_cfg_en_aon` reader - "]
52pub type XTAL_INN_CFG_EN_AON_R = crate::BitReader<bool>;
53#[doc = "Field `xtal_inn_cfg_en_aon` writer - "]
54pub type XTAL_INN_CFG_EN_AON_W<'a, const O: u8> = crate::BitWriter<'a, u32, TSEN_SPEC, bool, O>;
55#[doc = "Field `xtal_rdy_int_sel_aon` reader - "]
56pub type XTAL_RDY_INT_SEL_AON_R = crate::FieldReader<u8, u8>;
57#[doc = "Field `xtal_rdy_int_sel_aon` writer - "]
58pub type XTAL_RDY_INT_SEL_AON_W<'a, const O: u8> =
59 crate::FieldWriter<'a, u32, TSEN_SPEC, u8, u8, 2, O>;
60impl R {
61 #[doc = "Bits 0:11"]
62 #[inline(always)]
63 pub fn tsen_refcode_corner(&self) -> TSEN_REFCODE_CORNER_R {
64 TSEN_REFCODE_CORNER_R::new((self.bits & 0x0fff) as u16)
65 }
66 #[doc = "Bits 16:27"]
67 #[inline(always)]
68 pub fn tsen_refcode_rfcal(&self) -> TSEN_REFCODE_RFCAL_R {
69 TSEN_REFCODE_RFCAL_R::new(((self.bits >> 16) & 0x0fff) as u16)
70 }
71 #[doc = "Bit 28"]
72 #[inline(always)]
73 pub fn xtal_rdy(&self) -> XTAL_RDY_R {
74 XTAL_RDY_R::new(((self.bits >> 28) & 1) != 0)
75 }
76 #[doc = "Bit 29"]
77 #[inline(always)]
78 pub fn xtal_inn_cfg_en_aon(&self) -> XTAL_INN_CFG_EN_AON_R {
79 XTAL_INN_CFG_EN_AON_R::new(((self.bits >> 29) & 1) != 0)
80 }
81 #[doc = "Bits 30:31"]
82 #[inline(always)]
83 pub fn xtal_rdy_int_sel_aon(&self) -> XTAL_RDY_INT_SEL_AON_R {
84 XTAL_RDY_INT_SEL_AON_R::new(((self.bits >> 30) & 3) as u8)
85 }
86}
87impl W {
88 #[doc = "Bits 0:11"]
89 #[inline(always)]
90 #[must_use]
91 pub fn tsen_refcode_corner(&mut self) -> TSEN_REFCODE_CORNER_W<0> {
92 TSEN_REFCODE_CORNER_W::new(self)
93 }
94 #[doc = "Bits 16:27"]
95 #[inline(always)]
96 #[must_use]
97 pub fn tsen_refcode_rfcal(&mut self) -> TSEN_REFCODE_RFCAL_W<16> {
98 TSEN_REFCODE_RFCAL_W::new(self)
99 }
100 #[doc = "Bit 28"]
101 #[inline(always)]
102 #[must_use]
103 pub fn xtal_rdy(&mut self) -> XTAL_RDY_W<28> {
104 XTAL_RDY_W::new(self)
105 }
106 #[doc = "Bit 29"]
107 #[inline(always)]
108 #[must_use]
109 pub fn xtal_inn_cfg_en_aon(&mut self) -> XTAL_INN_CFG_EN_AON_W<29> {
110 XTAL_INN_CFG_EN_AON_W::new(self)
111 }
112 #[doc = "Bits 30:31"]
113 #[inline(always)]
114 #[must_use]
115 pub fn xtal_rdy_int_sel_aon(&mut self) -> XTAL_RDY_INT_SEL_AON_W<30> {
116 XTAL_RDY_INT_SEL_AON_W::new(self)
117 }
118 #[doc = "Writes raw bits to the register."]
119 #[inline(always)]
120 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
121 self.0.bits(bits);
122 self
123 }
124}
125#[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"]
126pub struct TSEN_SPEC;
127impl crate::RegisterSpec for TSEN_SPEC {
128 type Ux = u32;
129}
130#[doc = "`read()` method returns [tsen::R](R) reader structure"]
131impl crate::Readable for TSEN_SPEC {
132 type Reader = R;
133}
134#[doc = "`write(|w| ..)` method takes [tsen::W](W) writer structure"]
135impl crate::Writable for TSEN_SPEC {
136 type Writer = W;
137 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
138 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
139}
140#[doc = "`reset()` method sets tsen to value 0"]
141impl crate::Resettable for TSEN_SPEC {
142 const RESET_VALUE: Self::Ux = 0;
143}