1#[doc = "Register `pa` reader"]
2pub struct R(crate::R<PA_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<PA_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<PA_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<PA_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `pa` writer"]
17pub struct W(crate::W<PA_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<PA_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<PA_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<PA_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `pa_seri_cs_tx` reader - "]
38pub type PA_SERI_CS_TX_R = crate::FieldReader<u8, u8>;
39#[doc = "Field `pa_seri_cs_tx` writer - "]
40pub type PA_SERI_CS_TX_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PA_SPEC, u8, u8, 4, O>;
41#[doc = "Field `pa_seri_cs_rx` reader - "]
42pub type PA_SERI_CS_RX_R = crate::FieldReader<u8, u8>;
43#[doc = "Field `pa_seri_cs_rx` writer - "]
44pub type PA_SERI_CS_RX_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PA_SPEC, u8, u8, 4, O>;
45#[doc = "Field `pa_seri_cs_hw` reader - "]
46pub type PA_SERI_CS_HW_R = crate::FieldReader<u8, u8>;
47#[doc = "Field `pa_seri_cs_hw` writer - "]
48pub type PA_SERI_CS_HW_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PA_SPEC, u8, u8, 4, O>;
49#[doc = "Field `pa_para_cs` reader - "]
50pub type PA_PARA_CS_R = crate::FieldReader<u8, u8>;
51#[doc = "Field `pa_para_cs` writer - "]
52pub type PA_PARA_CS_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PA_SPEC, u8, u8, 4, O>;
53#[doc = "Field `pa_vdd11_sel` reader - "]
54pub type PA_VDD11_SEL_R = crate::FieldReader<u8, u8>;
55#[doc = "Field `pa_vdd11_sel` writer - "]
56pub type PA_VDD11_SEL_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PA_SPEC, u8, u8, 3, O>;
57#[doc = "Field `pa_ldo_bm` reader - "]
58pub type PA_LDO_BM_R = crate::FieldReader<u8, u8>;
59#[doc = "Field `pa_ldo_bm` writer - "]
60pub type PA_LDO_BM_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PA_SPEC, u8, u8, 3, O>;
61#[doc = "Field `pa_lp_en` reader - "]
62pub type PA_LP_EN_R = crate::BitReader<bool>;
63#[doc = "Field `pa_lp_en` writer - "]
64pub type PA_LP_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PA_SPEC, bool, O>;
65#[doc = "Field `pa_hp_en` reader - "]
66pub type PA_HP_EN_R = crate::BitReader<bool>;
67#[doc = "Field `pa_hp_en` writer - "]
68pub type PA_HP_EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PA_SPEC, bool, O>;
69#[doc = "Field `pa_force_short_open` reader - "]
70pub type PA_FORCE_SHORT_OPEN_R = crate::BitReader<bool>;
71#[doc = "Field `pa_force_short_open` writer - "]
72pub type PA_FORCE_SHORT_OPEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PA_SPEC, bool, O>;
73impl R {
74 #[doc = "Bits 0:3"]
75 #[inline(always)]
76 pub fn pa_seri_cs_tx(&self) -> PA_SERI_CS_TX_R {
77 PA_SERI_CS_TX_R::new((self.bits & 0x0f) as u8)
78 }
79 #[doc = "Bits 4:7"]
80 #[inline(always)]
81 pub fn pa_seri_cs_rx(&self) -> PA_SERI_CS_RX_R {
82 PA_SERI_CS_RX_R::new(((self.bits >> 4) & 0x0f) as u8)
83 }
84 #[doc = "Bits 8:11"]
85 #[inline(always)]
86 pub fn pa_seri_cs_hw(&self) -> PA_SERI_CS_HW_R {
87 PA_SERI_CS_HW_R::new(((self.bits >> 8) & 0x0f) as u8)
88 }
89 #[doc = "Bits 12:15"]
90 #[inline(always)]
91 pub fn pa_para_cs(&self) -> PA_PARA_CS_R {
92 PA_PARA_CS_R::new(((self.bits >> 12) & 0x0f) as u8)
93 }
94 #[doc = "Bits 20:22"]
95 #[inline(always)]
96 pub fn pa_vdd11_sel(&self) -> PA_VDD11_SEL_R {
97 PA_VDD11_SEL_R::new(((self.bits >> 20) & 7) as u8)
98 }
99 #[doc = "Bits 24:26"]
100 #[inline(always)]
101 pub fn pa_ldo_bm(&self) -> PA_LDO_BM_R {
102 PA_LDO_BM_R::new(((self.bits >> 24) & 7) as u8)
103 }
104 #[doc = "Bit 28"]
105 #[inline(always)]
106 pub fn pa_lp_en(&self) -> PA_LP_EN_R {
107 PA_LP_EN_R::new(((self.bits >> 28) & 1) != 0)
108 }
109 #[doc = "Bit 29"]
110 #[inline(always)]
111 pub fn pa_hp_en(&self) -> PA_HP_EN_R {
112 PA_HP_EN_R::new(((self.bits >> 29) & 1) != 0)
113 }
114 #[doc = "Bit 30"]
115 #[inline(always)]
116 pub fn pa_force_short_open(&self) -> PA_FORCE_SHORT_OPEN_R {
117 PA_FORCE_SHORT_OPEN_R::new(((self.bits >> 30) & 1) != 0)
118 }
119}
120impl W {
121 #[doc = "Bits 0:3"]
122 #[inline(always)]
123 #[must_use]
124 pub fn pa_seri_cs_tx(&mut self) -> PA_SERI_CS_TX_W<0> {
125 PA_SERI_CS_TX_W::new(self)
126 }
127 #[doc = "Bits 4:7"]
128 #[inline(always)]
129 #[must_use]
130 pub fn pa_seri_cs_rx(&mut self) -> PA_SERI_CS_RX_W<4> {
131 PA_SERI_CS_RX_W::new(self)
132 }
133 #[doc = "Bits 8:11"]
134 #[inline(always)]
135 #[must_use]
136 pub fn pa_seri_cs_hw(&mut self) -> PA_SERI_CS_HW_W<8> {
137 PA_SERI_CS_HW_W::new(self)
138 }
139 #[doc = "Bits 12:15"]
140 #[inline(always)]
141 #[must_use]
142 pub fn pa_para_cs(&mut self) -> PA_PARA_CS_W<12> {
143 PA_PARA_CS_W::new(self)
144 }
145 #[doc = "Bits 20:22"]
146 #[inline(always)]
147 #[must_use]
148 pub fn pa_vdd11_sel(&mut self) -> PA_VDD11_SEL_W<20> {
149 PA_VDD11_SEL_W::new(self)
150 }
151 #[doc = "Bits 24:26"]
152 #[inline(always)]
153 #[must_use]
154 pub fn pa_ldo_bm(&mut self) -> PA_LDO_BM_W<24> {
155 PA_LDO_BM_W::new(self)
156 }
157 #[doc = "Bit 28"]
158 #[inline(always)]
159 #[must_use]
160 pub fn pa_lp_en(&mut self) -> PA_LP_EN_W<28> {
161 PA_LP_EN_W::new(self)
162 }
163 #[doc = "Bit 29"]
164 #[inline(always)]
165 #[must_use]
166 pub fn pa_hp_en(&mut self) -> PA_HP_EN_W<29> {
167 PA_HP_EN_W::new(self)
168 }
169 #[doc = "Bit 30"]
170 #[inline(always)]
171 #[must_use]
172 pub fn pa_force_short_open(&mut self) -> PA_FORCE_SHORT_OPEN_W<30> {
173 PA_FORCE_SHORT_OPEN_W::new(self)
174 }
175 #[doc = "Writes raw bits to the register."]
176 #[inline(always)]
177 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
178 self.0.bits(bits);
179 self
180 }
181}
182#[doc = "PA register\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 [pa](index.html) module"]
183pub struct PA_SPEC;
184impl crate::RegisterSpec for PA_SPEC {
185 type Ux = u32;
186}
187#[doc = "`read()` method returns [pa::R](R) reader structure"]
188impl crate::Readable for PA_SPEC {
189 type Reader = R;
190}
191#[doc = "`write(|w| ..)` method takes [pa::W](W) writer structure"]
192impl crate::Writable for PA_SPEC {
193 type Writer = W;
194 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
195 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
196}
197#[doc = "`reset()` method sets pa to value 0"]
198impl crate::Resettable for PA_SPEC {
199 const RESET_VALUE: Self::Ux = 0;
200}