mimxrt685s_pac/puf/
stat.rs

1#[doc = "Register `STAT` reader"]
2pub type R = crate::R<StatSpec>;
3#[doc = "Field `BUSY` reader - Busy"]
4pub type BusyR = crate::BitReader;
5#[doc = "Field `SUCCESS` reader - Success"]
6pub type SuccessR = crate::BitReader;
7#[doc = "Field `ERROR` reader - Error"]
8pub type ErrorR = crate::BitReader;
9#[doc = "Field `KEYINREQ` reader - Key In Request"]
10pub type KeyinreqR = crate::BitReader;
11#[doc = "Field `KEYOUTAVAIL` reader - Key Out Available"]
12pub type KeyoutavailR = crate::BitReader;
13#[doc = "Field `CODEINREQ` reader - Code In Request"]
14pub type CodeinreqR = crate::BitReader;
15#[doc = "Field `CODEOUTAVAIL` reader - Code Out Available"]
16pub type CodeoutavailR = crate::BitReader;
17impl R {
18    #[doc = "Bit 0 - Busy"]
19    #[inline(always)]
20    pub fn busy(&self) -> BusyR {
21        BusyR::new((self.bits & 1) != 0)
22    }
23    #[doc = "Bit 1 - Success"]
24    #[inline(always)]
25    pub fn success(&self) -> SuccessR {
26        SuccessR::new(((self.bits >> 1) & 1) != 0)
27    }
28    #[doc = "Bit 2 - Error"]
29    #[inline(always)]
30    pub fn error(&self) -> ErrorR {
31        ErrorR::new(((self.bits >> 2) & 1) != 0)
32    }
33    #[doc = "Bit 4 - Key In Request"]
34    #[inline(always)]
35    pub fn keyinreq(&self) -> KeyinreqR {
36        KeyinreqR::new(((self.bits >> 4) & 1) != 0)
37    }
38    #[doc = "Bit 5 - Key Out Available"]
39    #[inline(always)]
40    pub fn keyoutavail(&self) -> KeyoutavailR {
41        KeyoutavailR::new(((self.bits >> 5) & 1) != 0)
42    }
43    #[doc = "Bit 6 - Code In Request"]
44    #[inline(always)]
45    pub fn codeinreq(&self) -> CodeinreqR {
46        CodeinreqR::new(((self.bits >> 6) & 1) != 0)
47    }
48    #[doc = "Bit 7 - Code Out Available"]
49    #[inline(always)]
50    pub fn codeoutavail(&self) -> CodeoutavailR {
51        CodeoutavailR::new(((self.bits >> 7) & 1) != 0)
52    }
53}
54#[cfg(feature = "debug")]
55impl core::fmt::Debug for R {
56    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
57        f.debug_struct("STAT")
58            .field("busy", &self.busy())
59            .field("success", &self.success())
60            .field("error", &self.error())
61            .field("keyinreq", &self.keyinreq())
62            .field("keyoutavail", &self.keyoutavail())
63            .field("codeinreq", &self.codeinreq())
64            .field("codeoutavail", &self.codeoutavail())
65            .finish()
66    }
67}
68#[doc = "PUF Status\n\nYou can [`read`](crate::Reg::read) this register and get [`stat::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
69pub struct StatSpec;
70impl crate::RegisterSpec for StatSpec {
71    type Ux = u32;
72}
73#[doc = "`read()` method returns [`stat::R`](R) reader structure"]
74impl crate::Readable for StatSpec {}
75#[doc = "`reset()` method sets STAT to value 0x01"]
76impl crate::Resettable for StatSpec {
77    const RESET_VALUE: u32 = 0x01;
78}