efm32pg12_pac/trng0/
status.rs

1#[doc = "Reader of register STATUS"]
2pub type R = crate::R<u32, super::STATUS>;
3#[doc = "Writer for register STATUS"]
4pub type W = crate::W<u32, super::STATUS>;
5#[doc = "Register STATUS `reset()`'s with value 0"]
6impl crate::ResetValue for super::STATUS {
7    type Type = u32;
8    #[inline(always)]
9    fn reset_value() -> Self::Type {
10        0
11    }
12}
13#[doc = "Reader of field `TESTDATABUSY`"]
14pub type TESTDATABUSY_R = crate::R<bool, bool>;
15#[doc = "Reader of field `REPCOUNTIF`"]
16pub type REPCOUNTIF_R = crate::R<bool, bool>;
17#[doc = "Reader of field `APT64IF`"]
18pub type APT64IF_R = crate::R<bool, bool>;
19#[doc = "Reader of field `APT4096IF`"]
20pub type APT4096IF_R = crate::R<bool, bool>;
21#[doc = "Reader of field `FULLIF`"]
22pub type FULLIF_R = crate::R<bool, bool>;
23#[doc = "Reader of field `PREIF`"]
24pub type PREIF_R = crate::R<bool, bool>;
25#[doc = "Write proxy for field `PREIF`"]
26pub struct PREIF_W<'a> {
27    w: &'a mut W,
28}
29impl<'a> PREIF_W<'a> {
30    #[doc = r"Sets the field bit"]
31    #[inline(always)]
32    pub fn set_bit(self) -> &'a mut W {
33        self.bit(true)
34    }
35    #[doc = r"Clears the field bit"]
36    #[inline(always)]
37    pub fn clear_bit(self) -> &'a mut W {
38        self.bit(false)
39    }
40    #[doc = r"Writes raw bits to the field"]
41    #[inline(always)]
42    pub fn bit(self, value: bool) -> &'a mut W {
43        self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8);
44        self.w
45    }
46}
47#[doc = "Reader of field `ALMIF`"]
48pub type ALMIF_R = crate::R<bool, bool>;
49impl R {
50    #[doc = "Bit 0 - Test Data Busy"]
51    #[inline(always)]
52    pub fn testdatabusy(&self) -> TESTDATABUSY_R {
53        TESTDATABUSY_R::new((self.bits & 0x01) != 0)
54    }
55    #[doc = "Bit 4 - Repetition Count Test Interrupt Status"]
56    #[inline(always)]
57    pub fn repcountif(&self) -> REPCOUNTIF_R {
58        REPCOUNTIF_R::new(((self.bits >> 4) & 0x01) != 0)
59    }
60    #[doc = "Bit 5 - Adaptive Proportion test failure (64-sample window) interrupt status"]
61    #[inline(always)]
62    pub fn apt64if(&self) -> APT64IF_R {
63        APT64IF_R::new(((self.bits >> 5) & 0x01) != 0)
64    }
65    #[doc = "Bit 6 - Adaptive Proportion test failure (4096-sample window) interrupt status"]
66    #[inline(always)]
67    pub fn apt4096if(&self) -> APT4096IF_R {
68        APT4096IF_R::new(((self.bits >> 6) & 0x01) != 0)
69    }
70    #[doc = "Bit 7 - FIFO Full Interrupt Status"]
71    #[inline(always)]
72    pub fn fullif(&self) -> FULLIF_R {
73        FULLIF_R::new(((self.bits >> 7) & 0x01) != 0)
74    }
75    #[doc = "Bit 8 - AIS31 Preliminary Noise Alarm interrupt status"]
76    #[inline(always)]
77    pub fn preif(&self) -> PREIF_R {
78        PREIF_R::new(((self.bits >> 8) & 0x01) != 0)
79    }
80    #[doc = "Bit 9 - AIS31 Noise Alarm interrupt status"]
81    #[inline(always)]
82    pub fn almif(&self) -> ALMIF_R {
83        ALMIF_R::new(((self.bits >> 9) & 0x01) != 0)
84    }
85}
86impl W {
87    #[doc = "Bit 8 - AIS31 Preliminary Noise Alarm interrupt status"]
88    #[inline(always)]
89    pub fn preif(&mut self) -> PREIF_W {
90        PREIF_W { w: self }
91    }
92}