efm32tg11b_pac/efm32tg11b120/trng0/
status.rs1#[doc = "Register `STATUS` reader"]
2pub struct R(crate::R<STATUS_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<STATUS_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<STATUS_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<STATUS_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `STATUS` writer"]
17pub struct W(crate::W<STATUS_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<STATUS_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<STATUS_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<STATUS_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `TESTDATABUSY` reader - Test Data Busy"]
38pub type TESTDATABUSY_R = crate::BitReader<bool>;
39#[doc = "Field `REPCOUNTIF` reader - Repetition Count Test Interrupt Status"]
40pub type REPCOUNTIF_R = crate::BitReader<bool>;
41#[doc = "Field `APT64IF` reader - Adaptive Proportion test failure (64-sample window) interrupt status"]
42pub type APT64IF_R = crate::BitReader<bool>;
43#[doc = "Field `APT4096IF` reader - Adaptive Proportion test failure (4096-sample window) interrupt status"]
44pub type APT4096IF_R = crate::BitReader<bool>;
45#[doc = "Field `FULLIF` reader - FIFO Full Interrupt Status"]
46pub type FULLIF_R = crate::BitReader<bool>;
47#[doc = "Field `PREIF` reader - AIS31 Preliminary Noise Alarm interrupt status"]
48pub type PREIF_R = crate::BitReader<bool>;
49#[doc = "Field `PREIF` writer - AIS31 Preliminary Noise Alarm interrupt status"]
50pub type PREIF_W<'a, const O: u8> = crate::BitWriter<'a, u32, STATUS_SPEC, bool, O>;
51#[doc = "Field `ALMIF` reader - AIS31 Noise Alarm interrupt status"]
52pub type ALMIF_R = crate::BitReader<bool>;
53impl R {
54 #[doc = "Bit 0 - Test Data Busy"]
55 #[inline(always)]
56 pub fn testdatabusy(&self) -> TESTDATABUSY_R {
57 TESTDATABUSY_R::new((self.bits & 1) != 0)
58 }
59 #[doc = "Bit 4 - Repetition Count Test Interrupt Status"]
60 #[inline(always)]
61 pub fn repcountif(&self) -> REPCOUNTIF_R {
62 REPCOUNTIF_R::new(((self.bits >> 4) & 1) != 0)
63 }
64 #[doc = "Bit 5 - Adaptive Proportion test failure (64-sample window) interrupt status"]
65 #[inline(always)]
66 pub fn apt64if(&self) -> APT64IF_R {
67 APT64IF_R::new(((self.bits >> 5) & 1) != 0)
68 }
69 #[doc = "Bit 6 - Adaptive Proportion test failure (4096-sample window) interrupt status"]
70 #[inline(always)]
71 pub fn apt4096if(&self) -> APT4096IF_R {
72 APT4096IF_R::new(((self.bits >> 6) & 1) != 0)
73 }
74 #[doc = "Bit 7 - FIFO Full Interrupt Status"]
75 #[inline(always)]
76 pub fn fullif(&self) -> FULLIF_R {
77 FULLIF_R::new(((self.bits >> 7) & 1) != 0)
78 }
79 #[doc = "Bit 8 - AIS31 Preliminary Noise Alarm interrupt status"]
80 #[inline(always)]
81 pub fn preif(&self) -> PREIF_R {
82 PREIF_R::new(((self.bits >> 8) & 1) != 0)
83 }
84 #[doc = "Bit 9 - AIS31 Noise Alarm interrupt status"]
85 #[inline(always)]
86 pub fn almif(&self) -> ALMIF_R {
87 ALMIF_R::new(((self.bits >> 9) & 1) != 0)
88 }
89}
90impl W {
91 #[doc = "Bit 8 - AIS31 Preliminary Noise Alarm interrupt status"]
92 #[inline(always)]
93 #[must_use]
94 pub fn preif(&mut self) -> PREIF_W<8> {
95 PREIF_W::new(self)
96 }
97 #[doc = "Writes raw bits to the register."]
98 #[inline(always)]
99 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
100 self.0.bits(bits);
101 self
102 }
103}
104#[doc = "Status 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 [status](index.html) module"]
105pub struct STATUS_SPEC;
106impl crate::RegisterSpec for STATUS_SPEC {
107 type Ux = u32;
108}
109#[doc = "`read()` method returns [status::R](R) reader structure"]
110impl crate::Readable for STATUS_SPEC {
111 type Reader = R;
112}
113#[doc = "`write(|w| ..)` method takes [status::W](W) writer structure"]
114impl crate::Writable for STATUS_SPEC {
115 type Writer = W;
116 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
117 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
118}
119#[doc = "`reset()` method sets STATUS to value 0"]
120impl crate::Resettable for STATUS_SPEC {
121 const RESET_VALUE: Self::Ux = 0;
122}