mimxrt685s_pac/puf/
intstat.rs

1#[doc = "Register `INTSTAT` reader"]
2pub type R = crate::R<IntstatSpec>;
3#[doc = "Register `INTSTAT` writer"]
4pub type W = crate::W<IntstatSpec>;
5#[doc = "Field `READY` reader - Ready"]
6pub type ReadyR = crate::BitReader;
7#[doc = "Field `READY` writer - Ready"]
8pub type ReadyW<'a, REG> = crate::BitWriter1C<'a, REG>;
9#[doc = "Field `SUCCESS` reader - Success"]
10pub type SuccessR = crate::BitReader;
11#[doc = "Field `SUCCESS` writer - Success"]
12pub type SuccessW<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `ERROR` reader - Error"]
14pub type ErrorR = crate::BitReader;
15#[doc = "Field `ERROR` writer - Error"]
16pub type ErrorW<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `KEYINREQ` reader - Key In Request"]
18pub type KeyinreqR = crate::BitReader;
19#[doc = "Field `KEYINREQ` writer - Key In Request"]
20pub type KeyinreqW<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `KEYOUTAVAIL` reader - Key Out Available"]
22pub type KeyoutavailR = crate::BitReader;
23#[doc = "Field `KEYOUTAVAIL` writer - Key Out Available"]
24pub type KeyoutavailW<'a, REG> = crate::BitWriter<'a, REG>;
25#[doc = "Field `CODEINREQ` reader - Code In Request"]
26pub type CodeinreqR = crate::BitReader;
27#[doc = "Field `CODEINREQ` writer - Code In Request"]
28pub type CodeinreqW<'a, REG> = crate::BitWriter<'a, REG>;
29#[doc = "Field `CODEOUTAVAIL` reader - Code Out Available"]
30pub type CodeoutavailR = crate::BitReader;
31#[doc = "Field `CODEOUTAVAIL` writer - Code Out Available"]
32pub type CodeoutavailW<'a, REG> = crate::BitWriter<'a, REG>;
33impl R {
34    #[doc = "Bit 0 - Ready"]
35    #[inline(always)]
36    pub fn ready(&self) -> ReadyR {
37        ReadyR::new((self.bits & 1) != 0)
38    }
39    #[doc = "Bit 1 - Success"]
40    #[inline(always)]
41    pub fn success(&self) -> SuccessR {
42        SuccessR::new(((self.bits >> 1) & 1) != 0)
43    }
44    #[doc = "Bit 2 - Error"]
45    #[inline(always)]
46    pub fn error(&self) -> ErrorR {
47        ErrorR::new(((self.bits >> 2) & 1) != 0)
48    }
49    #[doc = "Bit 4 - Key In Request"]
50    #[inline(always)]
51    pub fn keyinreq(&self) -> KeyinreqR {
52        KeyinreqR::new(((self.bits >> 4) & 1) != 0)
53    }
54    #[doc = "Bit 5 - Key Out Available"]
55    #[inline(always)]
56    pub fn keyoutavail(&self) -> KeyoutavailR {
57        KeyoutavailR::new(((self.bits >> 5) & 1) != 0)
58    }
59    #[doc = "Bit 6 - Code In Request"]
60    #[inline(always)]
61    pub fn codeinreq(&self) -> CodeinreqR {
62        CodeinreqR::new(((self.bits >> 6) & 1) != 0)
63    }
64    #[doc = "Bit 7 - Code Out Available"]
65    #[inline(always)]
66    pub fn codeoutavail(&self) -> CodeoutavailR {
67        CodeoutavailR::new(((self.bits >> 7) & 1) != 0)
68    }
69}
70#[cfg(feature = "debug")]
71impl core::fmt::Debug for R {
72    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
73        f.debug_struct("INTSTAT")
74            .field("ready", &self.ready())
75            .field("success", &self.success())
76            .field("error", &self.error())
77            .field("keyinreq", &self.keyinreq())
78            .field("keyoutavail", &self.keyoutavail())
79            .field("codeinreq", &self.codeinreq())
80            .field("codeoutavail", &self.codeoutavail())
81            .finish()
82    }
83}
84impl W {
85    #[doc = "Bit 0 - Ready"]
86    #[inline(always)]
87    pub fn ready(&mut self) -> ReadyW<IntstatSpec> {
88        ReadyW::new(self, 0)
89    }
90    #[doc = "Bit 1 - Success"]
91    #[inline(always)]
92    pub fn success(&mut self) -> SuccessW<IntstatSpec> {
93        SuccessW::new(self, 1)
94    }
95    #[doc = "Bit 2 - Error"]
96    #[inline(always)]
97    pub fn error(&mut self) -> ErrorW<IntstatSpec> {
98        ErrorW::new(self, 2)
99    }
100    #[doc = "Bit 4 - Key In Request"]
101    #[inline(always)]
102    pub fn keyinreq(&mut self) -> KeyinreqW<IntstatSpec> {
103        KeyinreqW::new(self, 4)
104    }
105    #[doc = "Bit 5 - Key Out Available"]
106    #[inline(always)]
107    pub fn keyoutavail(&mut self) -> KeyoutavailW<IntstatSpec> {
108        KeyoutavailW::new(self, 5)
109    }
110    #[doc = "Bit 6 - Code In Request"]
111    #[inline(always)]
112    pub fn codeinreq(&mut self) -> CodeinreqW<IntstatSpec> {
113        CodeinreqW::new(self, 6)
114    }
115    #[doc = "Bit 7 - Code Out Available"]
116    #[inline(always)]
117    pub fn codeoutavail(&mut self) -> CodeoutavailW<IntstatSpec> {
118        CodeoutavailW::new(self, 7)
119    }
120}
121#[doc = "PUF Interrupt Status\n\nYou can [`read`](crate::Reg::read) this register and get [`intstat::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`intstat::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
122pub struct IntstatSpec;
123impl crate::RegisterSpec for IntstatSpec {
124    type Ux = u32;
125}
126#[doc = "`read()` method returns [`intstat::R`](R) reader structure"]
127impl crate::Readable for IntstatSpec {}
128#[doc = "`write(|w| ..)` method takes [`intstat::W`](W) writer structure"]
129impl crate::Writable for IntstatSpec {
130    type Safety = crate::Unsafe;
131    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
132    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0x01;
133}
134#[doc = "`reset()` method sets INTSTAT to value 0"]
135impl crate::Resettable for IntstatSpec {
136    const RESET_VALUE: u32 = 0;
137}