bl702_pac/rf/
rf_ext_pa.rs

1#[doc = "Register `rf_ext_pa` reader"]
2pub struct R(crate::R<RF_EXT_PA_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<RF_EXT_PA_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<RF_EXT_PA_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<RF_EXT_PA_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `rf_ext_pa` writer"]
17pub struct W(crate::W<RF_EXT_PA_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<RF_EXT_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<RF_EXT_PA_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<RF_EXT_PA_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `rf_ext_pa_sb` reader - "]
38pub type RF_EXT_PA_SB_R = crate::FieldReader<u8, u8>;
39#[doc = "Field `rf_ext_pa_sb` writer - "]
40pub type RF_EXT_PA_SB_W<'a, const O: u8> =
41    crate::FieldWriter<'a, u32, RF_EXT_PA_SPEC, u8, u8, 5, O>;
42#[doc = "Field `rf_ext_pa_lotx` reader - "]
43pub type RF_EXT_PA_LOTX_R = crate::FieldReader<u8, u8>;
44#[doc = "Field `rf_ext_pa_lotx` writer - "]
45pub type RF_EXT_PA_LOTX_W<'a, const O: u8> =
46    crate::FieldWriter<'a, u32, RF_EXT_PA_SPEC, u8, u8, 5, O>;
47#[doc = "Field `rf_ext_pa_tx` reader - "]
48pub type RF_EXT_PA_TX_R = crate::FieldReader<u8, u8>;
49#[doc = "Field `rf_ext_pa_tx` writer - "]
50pub type RF_EXT_PA_TX_W<'a, const O: u8> =
51    crate::FieldWriter<'a, u32, RF_EXT_PA_SPEC, u8, u8, 5, O>;
52#[doc = "Field `rf_ext_pa_lorx` reader - "]
53pub type RF_EXT_PA_LORX_R = crate::FieldReader<u8, u8>;
54#[doc = "Field `rf_ext_pa_lorx` writer - "]
55pub type RF_EXT_PA_LORX_W<'a, const O: u8> =
56    crate::FieldWriter<'a, u32, RF_EXT_PA_SPEC, u8, u8, 5, O>;
57#[doc = "Field `rf_ext_pa_rx` reader - "]
58pub type RF_EXT_PA_RX_R = crate::FieldReader<u8, u8>;
59#[doc = "Field `rf_ext_pa_rx` writer - "]
60pub type RF_EXT_PA_RX_W<'a, const O: u8> =
61    crate::FieldWriter<'a, u32, RF_EXT_PA_SPEC, u8, u8, 5, O>;
62impl R {
63    #[doc = "Bits 0:4"]
64    #[inline(always)]
65    pub fn rf_ext_pa_sb(&self) -> RF_EXT_PA_SB_R {
66        RF_EXT_PA_SB_R::new((self.bits & 0x1f) as u8)
67    }
68    #[doc = "Bits 5:9"]
69    #[inline(always)]
70    pub fn rf_ext_pa_lotx(&self) -> RF_EXT_PA_LOTX_R {
71        RF_EXT_PA_LOTX_R::new(((self.bits >> 5) & 0x1f) as u8)
72    }
73    #[doc = "Bits 10:14"]
74    #[inline(always)]
75    pub fn rf_ext_pa_tx(&self) -> RF_EXT_PA_TX_R {
76        RF_EXT_PA_TX_R::new(((self.bits >> 10) & 0x1f) as u8)
77    }
78    #[doc = "Bits 15:19"]
79    #[inline(always)]
80    pub fn rf_ext_pa_lorx(&self) -> RF_EXT_PA_LORX_R {
81        RF_EXT_PA_LORX_R::new(((self.bits >> 15) & 0x1f) as u8)
82    }
83    #[doc = "Bits 20:24"]
84    #[inline(always)]
85    pub fn rf_ext_pa_rx(&self) -> RF_EXT_PA_RX_R {
86        RF_EXT_PA_RX_R::new(((self.bits >> 20) & 0x1f) as u8)
87    }
88}
89impl W {
90    #[doc = "Bits 0:4"]
91    #[inline(always)]
92    #[must_use]
93    pub fn rf_ext_pa_sb(&mut self) -> RF_EXT_PA_SB_W<0> {
94        RF_EXT_PA_SB_W::new(self)
95    }
96    #[doc = "Bits 5:9"]
97    #[inline(always)]
98    #[must_use]
99    pub fn rf_ext_pa_lotx(&mut self) -> RF_EXT_PA_LOTX_W<5> {
100        RF_EXT_PA_LOTX_W::new(self)
101    }
102    #[doc = "Bits 10:14"]
103    #[inline(always)]
104    #[must_use]
105    pub fn rf_ext_pa_tx(&mut self) -> RF_EXT_PA_TX_W<10> {
106        RF_EXT_PA_TX_W::new(self)
107    }
108    #[doc = "Bits 15:19"]
109    #[inline(always)]
110    #[must_use]
111    pub fn rf_ext_pa_lorx(&mut self) -> RF_EXT_PA_LORX_W<15> {
112        RF_EXT_PA_LORX_W::new(self)
113    }
114    #[doc = "Bits 20:24"]
115    #[inline(always)]
116    #[must_use]
117    pub fn rf_ext_pa_rx(&mut self) -> RF_EXT_PA_RX_W<20> {
118        RF_EXT_PA_RX_W::new(self)
119    }
120    #[doc = "Writes raw bits to the register."]
121    #[inline(always)]
122    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
123        self.0.bits(bits);
124        self
125    }
126}
127#[doc = "rf_ext_pa.\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 [rf_ext_pa](index.html) module"]
128pub struct RF_EXT_PA_SPEC;
129impl crate::RegisterSpec for RF_EXT_PA_SPEC {
130    type Ux = u32;
131}
132#[doc = "`read()` method returns [rf_ext_pa::R](R) reader structure"]
133impl crate::Readable for RF_EXT_PA_SPEC {
134    type Reader = R;
135}
136#[doc = "`write(|w| ..)` method takes [rf_ext_pa::W](W) writer structure"]
137impl crate::Writable for RF_EXT_PA_SPEC {
138    type Writer = W;
139    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
140    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
141}
142#[doc = "`reset()` method sets rf_ext_pa to value 0"]
143impl crate::Resettable for RF_EXT_PA_SPEC {
144    const RESET_VALUE: Self::Ux = 0;
145}