mimxrt595s/hashcrypt/
config.rs

1#[doc = "Register `CONFIG` reader"]
2pub struct R(crate::R<CONFIG_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<CONFIG_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<CONFIG_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<CONFIG_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Field `DUAL` reader - Reads 1 if 2 x 512 bit buffers, 0 if only 1 x 512 bit"]
17pub type DUAL_R = crate::BitReader<bool>;
18#[doc = "Field `DMA` reader - Reads 1 if DMA is connected"]
19pub type DMA_R = crate::BitReader<bool>;
20#[doc = "Field `AHB` reader - Reads 1 if AHB Master is enabled"]
21pub type AHB_R = crate::BitReader<bool>;
22#[doc = "Field `AES` reader - Reads 1 if AES 128 is included"]
23pub type AES_R = crate::BitReader<bool>;
24#[doc = "Field `AESKEY` reader - Reads 1 if AES 192 and 256 also included"]
25pub type AESKEY_R = crate::BitReader<bool>;
26#[doc = "Field `SECRET` reader - Reads 1 if AES Secret key is available"]
27pub type SECRET_R = crate::BitReader<bool>;
28#[doc = "Field `ICB` reader - ICB"]
29pub type ICB_R = crate::BitReader<bool>;
30impl R {
31    #[doc = "Bit 0 - Reads 1 if 2 x 512 bit buffers, 0 if only 1 x 512 bit"]
32    #[inline(always)]
33    pub fn dual(&self) -> DUAL_R {
34        DUAL_R::new((self.bits & 1) != 0)
35    }
36    #[doc = "Bit 1 - Reads 1 if DMA is connected"]
37    #[inline(always)]
38    pub fn dma(&self) -> DMA_R {
39        DMA_R::new(((self.bits >> 1) & 1) != 0)
40    }
41    #[doc = "Bit 3 - Reads 1 if AHB Master is enabled"]
42    #[inline(always)]
43    pub fn ahb(&self) -> AHB_R {
44        AHB_R::new(((self.bits >> 3) & 1) != 0)
45    }
46    #[doc = "Bit 6 - Reads 1 if AES 128 is included"]
47    #[inline(always)]
48    pub fn aes(&self) -> AES_R {
49        AES_R::new(((self.bits >> 6) & 1) != 0)
50    }
51    #[doc = "Bit 7 - Reads 1 if AES 192 and 256 also included"]
52    #[inline(always)]
53    pub fn aeskey(&self) -> AESKEY_R {
54        AESKEY_R::new(((self.bits >> 7) & 1) != 0)
55    }
56    #[doc = "Bit 8 - Reads 1 if AES Secret key is available"]
57    #[inline(always)]
58    pub fn secret(&self) -> SECRET_R {
59        SECRET_R::new(((self.bits >> 8) & 1) != 0)
60    }
61    #[doc = "Bit 11 - ICB"]
62    #[inline(always)]
63    pub fn icb(&self) -> ICB_R {
64        ICB_R::new(((self.bits >> 11) & 1) != 0)
65    }
66}
67#[doc = "Configuration\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [config](index.html) module"]
68pub struct CONFIG_SPEC;
69impl crate::RegisterSpec for CONFIG_SPEC {
70    type Ux = u32;
71}
72#[doc = "`read()` method returns [config::R](R) reader structure"]
73impl crate::Readable for CONFIG_SPEC {
74    type Reader = R;
75}
76#[doc = "`reset()` method sets CONFIG to value 0x09cb"]
77impl crate::Resettable for CONFIG_SPEC {
78    const RESET_VALUE: Self::Ux = 0x09cb;
79}