bl702_pac/pds/
pds_stat.rs

1#[doc = "Register `pds_stat` reader"]
2pub struct R(crate::R<PDS_STAT_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<PDS_STAT_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<PDS_STAT_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<PDS_STAT_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `pds_stat` writer"]
17pub struct W(crate::W<PDS_STAT_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<PDS_STAT_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<PDS_STAT_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<PDS_STAT_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `ro_pds_state` reader - "]
38pub type RO_PDS_STATE_R = crate::FieldReader<u8, u8>;
39#[doc = "Field `ro_pds_state` writer - "]
40pub type RO_PDS_STATE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PDS_STAT_SPEC, u8, u8, 4, O>;
41#[doc = "Field `ro_pds_rf_state` reader - "]
42pub type RO_PDS_RF_STATE_R = crate::FieldReader<u8, u8>;
43#[doc = "Field `ro_pds_rf_state` writer - "]
44pub type RO_PDS_RF_STATE_W<'a, const O: u8> =
45    crate::FieldWriter<'a, u32, PDS_STAT_SPEC, u8, u8, 4, O>;
46#[doc = "Field `ro_pds_pll_state` reader - "]
47pub type RO_PDS_PLL_STATE_R = crate::FieldReader<u8, u8>;
48#[doc = "Field `ro_pds_pll_state` writer - "]
49pub type RO_PDS_PLL_STATE_W<'a, const O: u8> =
50    crate::FieldWriter<'a, u32, PDS_STAT_SPEC, u8, u8, 2, O>;
51impl R {
52    #[doc = "Bits 0:3"]
53    #[inline(always)]
54    pub fn ro_pds_state(&self) -> RO_PDS_STATE_R {
55        RO_PDS_STATE_R::new((self.bits & 0x0f) as u8)
56    }
57    #[doc = "Bits 8:11"]
58    #[inline(always)]
59    pub fn ro_pds_rf_state(&self) -> RO_PDS_RF_STATE_R {
60        RO_PDS_RF_STATE_R::new(((self.bits >> 8) & 0x0f) as u8)
61    }
62    #[doc = "Bits 16:17"]
63    #[inline(always)]
64    pub fn ro_pds_pll_state(&self) -> RO_PDS_PLL_STATE_R {
65        RO_PDS_PLL_STATE_R::new(((self.bits >> 16) & 3) as u8)
66    }
67}
68impl W {
69    #[doc = "Bits 0:3"]
70    #[inline(always)]
71    #[must_use]
72    pub fn ro_pds_state(&mut self) -> RO_PDS_STATE_W<0> {
73        RO_PDS_STATE_W::new(self)
74    }
75    #[doc = "Bits 8:11"]
76    #[inline(always)]
77    #[must_use]
78    pub fn ro_pds_rf_state(&mut self) -> RO_PDS_RF_STATE_W<8> {
79        RO_PDS_RF_STATE_W::new(self)
80    }
81    #[doc = "Bits 16:17"]
82    #[inline(always)]
83    #[must_use]
84    pub fn ro_pds_pll_state(&mut self) -> RO_PDS_PLL_STATE_W<16> {
85        RO_PDS_PLL_STATE_W::new(self)
86    }
87    #[doc = "Writes raw bits to the register."]
88    #[inline(always)]
89    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
90        self.0.bits(bits);
91        self
92    }
93}
94#[doc = "pds_stat.\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 [pds_stat](index.html) module"]
95pub struct PDS_STAT_SPEC;
96impl crate::RegisterSpec for PDS_STAT_SPEC {
97    type Ux = u32;
98}
99#[doc = "`read()` method returns [pds_stat::R](R) reader structure"]
100impl crate::Readable for PDS_STAT_SPEC {
101    type Reader = R;
102}
103#[doc = "`write(|w| ..)` method takes [pds_stat::W](W) writer structure"]
104impl crate::Writable for PDS_STAT_SPEC {
105    type Writer = W;
106    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
107    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
108}
109#[doc = "`reset()` method sets pds_stat to value 0"]
110impl crate::Resettable for PDS_STAT_SPEC {
111    const RESET_VALUE: Self::Ux = 0;
112}