cc2538_pac/aes/
aes_key3_3.rs

1#[doc = "Register `AES_KEY3_3` writer"]
2pub type W = crate::W<AesKey3_3Spec>;
3#[doc = "Field `AES_KEY3` writer - AES_KEY3\\[127:96\\]/AES_KEY2\\[255:224\\]
4For GCM: -\\[127:0\\]
5- GHASH_H - The internally calculated GHASH key is stored in these registers. Only used for modes that use the GHASH function (GCM). -\\[255:128\\]
6- This register is used to store intermediate values and is initialized with 0s when loading a new key. For CCM: -\\[255:0\\]
7- This register is used to store intermediate values. For CBC-MAC: -\\[255:0\\]
8- ZEROES - This register must remain 0."]
9pub type AesKey3W<'a, REG> = crate::FieldWriter<'a, REG, 32, u32>;
10impl W {
11    #[doc = "Bits 0:31 - AES_KEY3\\[127:96\\]/AES_KEY2\\[255:224\\]
12For GCM: -\\[127:0\\]
13- GHASH_H - The internally calculated GHASH key is stored in these registers. Only used for modes that use the GHASH function (GCM). -\\[255:128\\]
14- This register is used to store intermediate values and is initialized with 0s when loading a new key. For CCM: -\\[255:0\\]
15- This register is used to store intermediate values. For CBC-MAC: -\\[255:0\\]
16- ZEROES - This register must remain 0."]
17    #[inline(always)]
18    pub fn aes_key3(&mut self) -> AesKey3W<AesKey3_3Spec> {
19        AesKey3W::new(self, 0)
20    }
21}
22#[doc = "AES_KEY3_3 / AES_KEY2_7 Third Key / Second Key (internal, but clearable) The following registers are not accessible through the host for reading and writing. They are used to store internally calculated key information and intermediate results. However, when the host performs a write to the any of the respective AES_KEY2_n or AES_KEY3_n addresses, respectively the whole 128-bit AES_KEY2_n or AES_KEY3_n register is cleared to 0s. The AES_GHASH_H_IN_n registers (required for GHASH, which is part of GCM) are mapped to the AES_KEY2_n registers. The (intermediate) authentication result for GCM and CCM is stored in the AES_KEY3_n register.\n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`aes_key3_3::W`](W). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
23pub struct AesKey3_3Spec;
24impl crate::RegisterSpec for AesKey3_3Spec {
25    type Ux = u32;
26}
27#[doc = "`write(|w| ..)` method takes [`aes_key3_3::W`](W) writer structure"]
28impl crate::Writable for AesKey3_3Spec {
29    type Safety = crate::Unsafe;
30    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
31    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
32}
33#[doc = "`reset()` method sets AES_KEY3_3 to value 0"]
34impl crate::Resettable for AesKey3_3Spec {
35    const RESET_VALUE: u32 = 0;
36}