bl61x_pac/pds/
pds_stat.rs1#[doc = "Register `pds_stat` reader"]
2pub type R = crate::R<PDS_STAT_SPEC>;
3#[doc = "Register `pds_stat` writer"]
4pub type W = crate::W<PDS_STAT_SPEC>;
5#[doc = "Field `ro_pds_state` reader - "]
6pub type RO_PDS_STATE_R = crate::FieldReader;
7#[doc = "Field `ro_pds_state` writer - "]
8pub type RO_PDS_STATE_W<'a, REG> = crate::FieldWriter<'a, REG, 5>;
9#[doc = "Field `ro_pds_rf_state` reader - "]
10pub type RO_PDS_RF_STATE_R = crate::FieldReader;
11#[doc = "Field `ro_pds_rf_state` writer - "]
12pub type RO_PDS_RF_STATE_W<'a, REG> = crate::FieldWriter<'a, REG, 5>;
13#[doc = "Field `pds_reset_event` reader - "]
14pub type PDS_RESET_EVENT_R = crate::FieldReader;
15#[doc = "Field `pds_reset_event` writer - "]
16pub type PDS_RESET_EVENT_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
17#[doc = "Field `pds_clr_reset_event` reader - "]
18pub type PDS_CLR_RESET_EVENT_R = crate::BitReader;
19#[doc = "Field `pds_clr_reset_event` writer - "]
20pub type PDS_CLR_RESET_EVENT_W<'a, REG> = crate::BitWriter<'a, REG>;
21impl R {
22 #[doc = "Bits 0:4"]
23 #[inline(always)]
24 pub fn ro_pds_state(&self) -> RO_PDS_STATE_R {
25 RO_PDS_STATE_R::new((self.bits & 0x1f) as u8)
26 }
27 #[doc = "Bits 8:12"]
28 #[inline(always)]
29 pub fn ro_pds_rf_state(&self) -> RO_PDS_RF_STATE_R {
30 RO_PDS_RF_STATE_R::new(((self.bits >> 8) & 0x1f) as u8)
31 }
32 #[doc = "Bits 24:26"]
33 #[inline(always)]
34 pub fn pds_reset_event(&self) -> PDS_RESET_EVENT_R {
35 PDS_RESET_EVENT_R::new(((self.bits >> 24) & 7) as u8)
36 }
37 #[doc = "Bit 31"]
38 #[inline(always)]
39 pub fn pds_clr_reset_event(&self) -> PDS_CLR_RESET_EVENT_R {
40 PDS_CLR_RESET_EVENT_R::new(((self.bits >> 31) & 1) != 0)
41 }
42}
43impl W {
44 #[doc = "Bits 0:4"]
45 #[inline(always)]
46 #[must_use]
47 pub fn ro_pds_state(&mut self) -> RO_PDS_STATE_W<PDS_STAT_SPEC> {
48 RO_PDS_STATE_W::new(self, 0)
49 }
50 #[doc = "Bits 8:12"]
51 #[inline(always)]
52 #[must_use]
53 pub fn ro_pds_rf_state(&mut self) -> RO_PDS_RF_STATE_W<PDS_STAT_SPEC> {
54 RO_PDS_RF_STATE_W::new(self, 8)
55 }
56 #[doc = "Bits 24:26"]
57 #[inline(always)]
58 #[must_use]
59 pub fn pds_reset_event(&mut self) -> PDS_RESET_EVENT_W<PDS_STAT_SPEC> {
60 PDS_RESET_EVENT_W::new(self, 24)
61 }
62 #[doc = "Bit 31"]
63 #[inline(always)]
64 #[must_use]
65 pub fn pds_clr_reset_event(&mut self) -> PDS_CLR_RESET_EVENT_W<PDS_STAT_SPEC> {
66 PDS_CLR_RESET_EVENT_W::new(self, 31)
67 }
68 #[doc = r" Writes raw bits to the register."]
69 #[doc = r""]
70 #[doc = r" # Safety"]
71 #[doc = r""]
72 #[doc = r" Passing incorrect value can cause undefined behaviour. See reference manual"]
73 #[inline(always)]
74 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
75 self.bits = bits;
76 self
77 }
78}
79#[doc = "pds_stat.\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`pds_stat::R`](R). You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`pds_stat::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
80pub struct PDS_STAT_SPEC;
81impl crate::RegisterSpec for PDS_STAT_SPEC {
82 type Ux = u32;
83}
84#[doc = "`read()` method returns [`pds_stat::R`](R) reader structure"]
85impl crate::Readable for PDS_STAT_SPEC {}
86#[doc = "`write(|w| ..)` method takes [`pds_stat::W`](W) writer structure"]
87impl crate::Writable for PDS_STAT_SPEC {
88 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
89 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
90}
91#[doc = "`reset()` method sets pds_stat to value 0"]
92impl crate::Resettable for PDS_STAT_SPEC {
93 const RESET_VALUE: Self::Ux = 0;
94}