1#[doc = "Register `pa2` reader"]
2pub struct R(crate::R<PA2_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<PA2_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<PA2_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<PA2_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `pa2` writer"]
17pub struct W(crate::W<PA2_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<PA2_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<PA2_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<PA2_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `pa_etb_en_hw` reader - "]
38pub type PA_ETB_EN_HW_R = crate::BitReader<bool>;
39#[doc = "Field `pa_etb_en_hw` writer - "]
40pub type PA_ETB_EN_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PA2_SPEC, bool, O>;
41#[doc = "Field `pa_iet_hw` reader - "]
42pub type PA_IET_HW_R = crate::FieldReader<u8, u8>;
43#[doc = "Field `pa_iet_hw` writer - "]
44pub type PA_IET_HW_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PA2_SPEC, u8, u8, 4, O>;
45#[doc = "Field `pa_vbcore_hw` reader - "]
46pub type PA_VBCORE_HW_R = crate::FieldReader<u8, u8>;
47#[doc = "Field `pa_vbcore_hw` writer - "]
48pub type PA_VBCORE_HW_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PA2_SPEC, u8, u8, 4, O>;
49#[doc = "Field `pa_vbcas_hw` reader - "]
50pub type PA_VBCAS_HW_R = crate::FieldReader<u8, u8>;
51#[doc = "Field `pa_vbcas_hw` writer - "]
52pub type PA_VBCAS_HW_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PA2_SPEC, u8, u8, 3, O>;
53#[doc = "Field `pa_half_on_hw` reader - "]
54pub type PA_HALF_ON_HW_R = crate::BitReader<bool>;
55#[doc = "Field `pa_half_on_hw` writer - "]
56pub type PA_HALF_ON_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PA2_SPEC, bool, O>;
57#[doc = "Field `pa_ib_fix_hw` reader - "]
58pub type PA_IB_FIX_HW_R = crate::BitReader<bool>;
59#[doc = "Field `pa_ib_fix_hw` writer - "]
60pub type PA_IB_FIX_HW_W<'a, const O: u8> = crate::BitWriter<'a, u32, PA2_SPEC, bool, O>;
61impl R {
62 #[doc = "Bit 3"]
63 #[inline(always)]
64 pub fn pa_etb_en_hw(&self) -> PA_ETB_EN_HW_R {
65 PA_ETB_EN_HW_R::new(((self.bits >> 3) & 1) != 0)
66 }
67 #[doc = "Bits 4:7"]
68 #[inline(always)]
69 pub fn pa_iet_hw(&self) -> PA_IET_HW_R {
70 PA_IET_HW_R::new(((self.bits >> 4) & 0x0f) as u8)
71 }
72 #[doc = "Bits 8:11"]
73 #[inline(always)]
74 pub fn pa_vbcore_hw(&self) -> PA_VBCORE_HW_R {
75 PA_VBCORE_HW_R::new(((self.bits >> 8) & 0x0f) as u8)
76 }
77 #[doc = "Bits 12:14"]
78 #[inline(always)]
79 pub fn pa_vbcas_hw(&self) -> PA_VBCAS_HW_R {
80 PA_VBCAS_HW_R::new(((self.bits >> 12) & 7) as u8)
81 }
82 #[doc = "Bit 16"]
83 #[inline(always)]
84 pub fn pa_half_on_hw(&self) -> PA_HALF_ON_HW_R {
85 PA_HALF_ON_HW_R::new(((self.bits >> 16) & 1) != 0)
86 }
87 #[doc = "Bit 17"]
88 #[inline(always)]
89 pub fn pa_ib_fix_hw(&self) -> PA_IB_FIX_HW_R {
90 PA_IB_FIX_HW_R::new(((self.bits >> 17) & 1) != 0)
91 }
92}
93impl W {
94 #[doc = "Bit 3"]
95 #[inline(always)]
96 #[must_use]
97 pub fn pa_etb_en_hw(&mut self) -> PA_ETB_EN_HW_W<3> {
98 PA_ETB_EN_HW_W::new(self)
99 }
100 #[doc = "Bits 4:7"]
101 #[inline(always)]
102 #[must_use]
103 pub fn pa_iet_hw(&mut self) -> PA_IET_HW_W<4> {
104 PA_IET_HW_W::new(self)
105 }
106 #[doc = "Bits 8:11"]
107 #[inline(always)]
108 #[must_use]
109 pub fn pa_vbcore_hw(&mut self) -> PA_VBCORE_HW_W<8> {
110 PA_VBCORE_HW_W::new(self)
111 }
112 #[doc = "Bits 12:14"]
113 #[inline(always)]
114 #[must_use]
115 pub fn pa_vbcas_hw(&mut self) -> PA_VBCAS_HW_W<12> {
116 PA_VBCAS_HW_W::new(self)
117 }
118 #[doc = "Bit 16"]
119 #[inline(always)]
120 #[must_use]
121 pub fn pa_half_on_hw(&mut self) -> PA_HALF_ON_HW_W<16> {
122 PA_HALF_ON_HW_W::new(self)
123 }
124 #[doc = "Bit 17"]
125 #[inline(always)]
126 #[must_use]
127 pub fn pa_ib_fix_hw(&mut self) -> PA_IB_FIX_HW_W<17> {
128 PA_IB_FIX_HW_W::new(self)
129 }
130 #[doc = "Writes raw bits to the register."]
131 #[inline(always)]
132 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
133 self.0.bits(bits);
134 self
135 }
136}
137#[doc = "RX normal bias mode registers\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 [pa2](index.html) module"]
138pub struct PA2_SPEC;
139impl crate::RegisterSpec for PA2_SPEC {
140 type Ux = u32;
141}
142#[doc = "`read()` method returns [pa2::R](R) reader structure"]
143impl crate::Readable for PA2_SPEC {
144 type Reader = R;
145}
146#[doc = "`write(|w| ..)` method takes [pa2::W](W) writer structure"]
147impl crate::Writable for PA2_SPEC {
148 type Writer = W;
149 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
150 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
151}
152#[doc = "`reset()` method sets pa2 to value 0"]
153impl crate::Resettable for PA2_SPEC {
154 const RESET_VALUE: Self::Ux = 0;
155}