bl702_pac/sec_eng/
se_aes_0_endian.rs

1#[doc = "Register `se_aes_0_endian` reader"]
2pub struct R(crate::R<SE_AES_0_ENDIAN_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<SE_AES_0_ENDIAN_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<SE_AES_0_ENDIAN_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<SE_AES_0_ENDIAN_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `se_aes_0_endian` writer"]
17pub struct W(crate::W<SE_AES_0_ENDIAN_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<SE_AES_0_ENDIAN_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<SE_AES_0_ENDIAN_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<SE_AES_0_ENDIAN_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `se_aes_0_dout_endian` reader - "]
38pub type SE_AES_0_DOUT_ENDIAN_R = crate::BitReader<bool>;
39#[doc = "Field `se_aes_0_dout_endian` writer - "]
40pub type SE_AES_0_DOUT_ENDIAN_W<'a, const O: u8> =
41    crate::BitWriter<'a, u32, SE_AES_0_ENDIAN_SPEC, bool, O>;
42#[doc = "Field `se_aes_0_din_endian` reader - "]
43pub type SE_AES_0_DIN_ENDIAN_R = crate::BitReader<bool>;
44#[doc = "Field `se_aes_0_din_endian` writer - "]
45pub type SE_AES_0_DIN_ENDIAN_W<'a, const O: u8> =
46    crate::BitWriter<'a, u32, SE_AES_0_ENDIAN_SPEC, bool, O>;
47#[doc = "Field `se_aes_0_key_endian` reader - "]
48pub type SE_AES_0_KEY_ENDIAN_R = crate::BitReader<bool>;
49#[doc = "Field `se_aes_0_key_endian` writer - "]
50pub type SE_AES_0_KEY_ENDIAN_W<'a, const O: u8> =
51    crate::BitWriter<'a, u32, SE_AES_0_ENDIAN_SPEC, bool, O>;
52#[doc = "Field `se_aes_0_iv_endian` reader - "]
53pub type SE_AES_0_IV_ENDIAN_R = crate::BitReader<bool>;
54#[doc = "Field `se_aes_0_iv_endian` writer - "]
55pub type SE_AES_0_IV_ENDIAN_W<'a, const O: u8> =
56    crate::BitWriter<'a, u32, SE_AES_0_ENDIAN_SPEC, bool, O>;
57#[doc = "Field `se_aes_0_ctr_len` reader - "]
58pub type SE_AES_0_CTR_LEN_R = crate::FieldReader<u8, u8>;
59#[doc = "Field `se_aes_0_ctr_len` writer - "]
60pub type SE_AES_0_CTR_LEN_W<'a, const O: u8> =
61    crate::FieldWriter<'a, u32, SE_AES_0_ENDIAN_SPEC, u8, u8, 2, O>;
62impl R {
63    #[doc = "Bit 0"]
64    #[inline(always)]
65    pub fn se_aes_0_dout_endian(&self) -> SE_AES_0_DOUT_ENDIAN_R {
66        SE_AES_0_DOUT_ENDIAN_R::new((self.bits & 1) != 0)
67    }
68    #[doc = "Bit 1"]
69    #[inline(always)]
70    pub fn se_aes_0_din_endian(&self) -> SE_AES_0_DIN_ENDIAN_R {
71        SE_AES_0_DIN_ENDIAN_R::new(((self.bits >> 1) & 1) != 0)
72    }
73    #[doc = "Bit 2"]
74    #[inline(always)]
75    pub fn se_aes_0_key_endian(&self) -> SE_AES_0_KEY_ENDIAN_R {
76        SE_AES_0_KEY_ENDIAN_R::new(((self.bits >> 2) & 1) != 0)
77    }
78    #[doc = "Bit 3"]
79    #[inline(always)]
80    pub fn se_aes_0_iv_endian(&self) -> SE_AES_0_IV_ENDIAN_R {
81        SE_AES_0_IV_ENDIAN_R::new(((self.bits >> 3) & 1) != 0)
82    }
83    #[doc = "Bits 30:31"]
84    #[inline(always)]
85    pub fn se_aes_0_ctr_len(&self) -> SE_AES_0_CTR_LEN_R {
86        SE_AES_0_CTR_LEN_R::new(((self.bits >> 30) & 3) as u8)
87    }
88}
89impl W {
90    #[doc = "Bit 0"]
91    #[inline(always)]
92    #[must_use]
93    pub fn se_aes_0_dout_endian(&mut self) -> SE_AES_0_DOUT_ENDIAN_W<0> {
94        SE_AES_0_DOUT_ENDIAN_W::new(self)
95    }
96    #[doc = "Bit 1"]
97    #[inline(always)]
98    #[must_use]
99    pub fn se_aes_0_din_endian(&mut self) -> SE_AES_0_DIN_ENDIAN_W<1> {
100        SE_AES_0_DIN_ENDIAN_W::new(self)
101    }
102    #[doc = "Bit 2"]
103    #[inline(always)]
104    #[must_use]
105    pub fn se_aes_0_key_endian(&mut self) -> SE_AES_0_KEY_ENDIAN_W<2> {
106        SE_AES_0_KEY_ENDIAN_W::new(self)
107    }
108    #[doc = "Bit 3"]
109    #[inline(always)]
110    #[must_use]
111    pub fn se_aes_0_iv_endian(&mut self) -> SE_AES_0_IV_ENDIAN_W<3> {
112        SE_AES_0_IV_ENDIAN_W::new(self)
113    }
114    #[doc = "Bits 30:31"]
115    #[inline(always)]
116    #[must_use]
117    pub fn se_aes_0_ctr_len(&mut self) -> SE_AES_0_CTR_LEN_W<30> {
118        SE_AES_0_CTR_LEN_W::new(self)
119    }
120    #[doc = "Writes raw bits to the register."]
121    #[inline(always)]
122    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
123        self.0.bits(bits);
124        self
125    }
126}
127#[doc = "se_aes_0_endian.\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 [se_aes_0_endian](index.html) module"]
128pub struct SE_AES_0_ENDIAN_SPEC;
129impl crate::RegisterSpec for SE_AES_0_ENDIAN_SPEC {
130    type Ux = u32;
131}
132#[doc = "`read()` method returns [se_aes_0_endian::R](R) reader structure"]
133impl crate::Readable for SE_AES_0_ENDIAN_SPEC {
134    type Reader = R;
135}
136#[doc = "`write(|w| ..)` method takes [se_aes_0_endian::W](W) writer structure"]
137impl crate::Writable for SE_AES_0_ENDIAN_SPEC {
138    type Writer = W;
139    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
140    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
141}
142#[doc = "`reset()` method sets se_aes_0_endian to value 0"]
143impl crate::Resettable for SE_AES_0_ENDIAN_SPEC {
144    const RESET_VALUE: Self::Ux = 0;
145}