efm32pg22_pac/efm32pg22c200/cryptoacc_s_rngctrl/
ais31status.rs1#[doc = "Register `AIS31STATUS` reader"]
2pub struct R(crate::R<AIS31STATUS_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<AIS31STATUS_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<AIS31STATUS_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<AIS31STATUS_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `AIS31STATUS` writer"]
17pub struct W(crate::W<AIS31STATUS_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<AIS31STATUS_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<AIS31STATUS_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<AIS31STATUS_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `NUMPRELIMALARMS` reader - Number of preliminary alarms"]
38pub type NUMPRELIMALARMS_R = crate::FieldReader<u16, u16>;
39#[doc = "Field `NUMPRELIMALARMS` writer - Number of preliminary alarms"]
40pub type NUMPRELIMALARMS_W<'a, const O: u8> =
41 crate::FieldWriter<'a, u32, AIS31STATUS_SPEC, u16, u16, 16, O>;
42#[doc = "Field `PRELIMNOISEALARMRNG` reader - Preliminary noise alarm RNG"]
43pub type PRELIMNOISEALARMRNG_R = crate::BitReader<bool>;
44#[doc = "Field `PRELIMNOISEALARMRNG` writer - Preliminary noise alarm RNG"]
45pub type PRELIMNOISEALARMRNG_W<'a, const O: u8> =
46 crate::BitWriter<'a, u32, AIS31STATUS_SPEC, bool, O>;
47#[doc = "Field `PRELIMNOISEALARMREP` reader - Preliminary noise alarm Rep"]
48pub type PRELIMNOISEALARMREP_R = crate::BitReader<bool>;
49#[doc = "Field `PRELIMNOISEALARMREP` writer - Preliminary noise alarm Rep"]
50pub type PRELIMNOISEALARMREP_W<'a, const O: u8> =
51 crate::BitWriter<'a, u32, AIS31STATUS_SPEC, bool, O>;
52impl R {
53 #[doc = "Bits 0:15 - Number of preliminary alarms"]
54 #[inline(always)]
55 pub fn numprelimalarms(&self) -> NUMPRELIMALARMS_R {
56 NUMPRELIMALARMS_R::new((self.bits & 0xffff) as u16)
57 }
58 #[doc = "Bit 16 - Preliminary noise alarm RNG"]
59 #[inline(always)]
60 pub fn prelimnoisealarmrng(&self) -> PRELIMNOISEALARMRNG_R {
61 PRELIMNOISEALARMRNG_R::new(((self.bits >> 16) & 1) != 0)
62 }
63 #[doc = "Bit 17 - Preliminary noise alarm Rep"]
64 #[inline(always)]
65 pub fn prelimnoisealarmrep(&self) -> PRELIMNOISEALARMREP_R {
66 PRELIMNOISEALARMREP_R::new(((self.bits >> 17) & 1) != 0)
67 }
68}
69impl W {
70 #[doc = "Bits 0:15 - Number of preliminary alarms"]
71 #[inline(always)]
72 #[must_use]
73 pub fn numprelimalarms(&mut self) -> NUMPRELIMALARMS_W<0> {
74 NUMPRELIMALARMS_W::new(self)
75 }
76 #[doc = "Bit 16 - Preliminary noise alarm RNG"]
77 #[inline(always)]
78 #[must_use]
79 pub fn prelimnoisealarmrng(&mut self) -> PRELIMNOISEALARMRNG_W<16> {
80 PRELIMNOISEALARMRNG_W::new(self)
81 }
82 #[doc = "Bit 17 - Preliminary noise alarm Rep"]
83 #[inline(always)]
84 #[must_use]
85 pub fn prelimnoisealarmrep(&mut self) -> PRELIMNOISEALARMREP_W<17> {
86 PRELIMNOISEALARMREP_W::new(self)
87 }
88 #[doc = "Writes raw bits to the register."]
89 #[inline(always)]
90 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
91 self.0.bits(bits);
92 self
93 }
94}
95#[doc = "This register is used to obtain diagnostic information about the AIS31 start-up and online tests when g_AIS31=True. Writing to this register clears all fields\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 [ais31status](index.html) module"]
96pub struct AIS31STATUS_SPEC;
97impl crate::RegisterSpec for AIS31STATUS_SPEC {
98 type Ux = u32;
99}
100#[doc = "`read()` method returns [ais31status::R](R) reader structure"]
101impl crate::Readable for AIS31STATUS_SPEC {
102 type Reader = R;
103}
104#[doc = "`write(|w| ..)` method takes [ais31status::W](W) writer structure"]
105impl crate::Writable for AIS31STATUS_SPEC {
106 type Writer = W;
107 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
108 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
109}
110#[doc = "`reset()` method sets AIS31STATUS to value 0"]
111impl crate::Resettable for AIS31STATUS_SPEC {
112 const RESET_VALUE: Self::Ux = 0;
113}