atsam4lc4c_pac/aesa/
parameter.rs

1#[doc = "Register `PARAMETER` reader"]
2pub struct R(crate::R<PARAMETER_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<PARAMETER_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<PARAMETER_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<PARAMETER_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Field `KEYSIZE` reader - Maximum Key Size"]
17pub type KEYSIZE_R = crate::FieldReader<u8, u8>;
18#[doc = "Field `OPMODE` reader - Maximum Number of Confidentiality Modes of Operation"]
19pub type OPMODE_R = crate::FieldReader<u8, u8>;
20#[doc = "Field `CTRMEAS` reader - Countermeasures"]
21pub type CTRMEAS_R = crate::BitReader<bool>;
22impl R {
23    #[doc = "Bits 0:1 - Maximum Key Size"]
24    #[inline(always)]
25    pub fn keysize(&self) -> KEYSIZE_R {
26        KEYSIZE_R::new((self.bits & 3) as u8)
27    }
28    #[doc = "Bits 2:4 - Maximum Number of Confidentiality Modes of Operation"]
29    #[inline(always)]
30    pub fn opmode(&self) -> OPMODE_R {
31        OPMODE_R::new(((self.bits >> 2) & 7) as u8)
32    }
33    #[doc = "Bit 8 - Countermeasures"]
34    #[inline(always)]
35    pub fn ctrmeas(&self) -> CTRMEAS_R {
36        CTRMEAS_R::new(((self.bits >> 8) & 1) != 0)
37    }
38}
39#[doc = "Parameter Register\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 [parameter](index.html) module"]
40pub struct PARAMETER_SPEC;
41impl crate::RegisterSpec for PARAMETER_SPEC {
42    type Ux = u32;
43}
44#[doc = "`read()` method returns [parameter::R](R) reader structure"]
45impl crate::Readable for PARAMETER_SPEC {
46    type Reader = R;
47}
48#[doc = "`reset()` method sets PARAMETER to value 0x0112"]
49impl crate::Resettable for PARAMETER_SPEC {
50    const RESET_VALUE: Self::Ux = 0x0112;
51}