1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
#[doc = "Reader of register DAUTHSTATUS"]
pub type R = crate::R<u32, super::DAUTHSTATUS>;
#[doc = "Possible values of the field `SID`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SID_A {
    #[doc = "Security Extension not implemented"]
    NOSEC,
    #[doc = "Secure invasive debug prohibited"]
    NO,
    #[doc = "Secure invasive debug allowed"]
    YES,
}
impl crate::ToBits<u8> for SID_A {
    #[inline(always)]
    fn _bits(&self) -> u8 {
        match *self {
            SID_A::NOSEC => 0,
            SID_A::NO => 2,
            SID_A::YES => 3,
        }
    }
}
#[doc = "Reader of field `SID`"]
pub type SID_R = crate::R<u8, SID_A>;
impl SID_R {
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> crate::Variant<u8, SID_A> {
        use crate::Variant::*;
        match self.bits {
            0 => Val(SID_A::NOSEC),
            2 => Val(SID_A::NO),
            3 => Val(SID_A::YES),
            i => Res(i),
        }
    }
    #[doc = "Checks if the value of the field is `NOSEC`"]
    #[inline(always)]
    pub fn is_nosec(&self) -> bool {
        *self == SID_A::NOSEC
    }
    #[doc = "Checks if the value of the field is `NO`"]
    #[inline(always)]
    pub fn is_no(&self) -> bool {
        *self == SID_A::NO
    }
    #[doc = "Checks if the value of the field is `YES`"]
    #[inline(always)]
    pub fn is_yes(&self) -> bool {
        *self == SID_A::YES
    }
}
#[doc = "Possible values of the field `SNID`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SNID_A {
    #[doc = "Security Extension not implemented"]
    NOSEC,
    #[doc = "Secure non-invasive debug prohibited"]
    NO,
    #[doc = "Secure non-invasive debug allowed"]
    YES,
}
impl crate::ToBits<u8> for SNID_A {
    #[inline(always)]
    fn _bits(&self) -> u8 {
        match *self {
            SNID_A::NOSEC => 0,
            SNID_A::NO => 2,
            SNID_A::YES => 3,
        }
    }
}
#[doc = "Reader of field `SNID`"]
pub type SNID_R = crate::R<u8, SNID_A>;
impl SNID_R {
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> crate::Variant<u8, SNID_A> {
        use crate::Variant::*;
        match self.bits {
            0 => Val(SNID_A::NOSEC),
            2 => Val(SNID_A::NO),
            3 => Val(SNID_A::YES),
            i => Res(i),
        }
    }
    #[doc = "Checks if the value of the field is `NOSEC`"]
    #[inline(always)]
    pub fn is_nosec(&self) -> bool {
        *self == SNID_A::NOSEC
    }
    #[doc = "Checks if the value of the field is `NO`"]
    #[inline(always)]
    pub fn is_no(&self) -> bool {
        *self == SNID_A::NO
    }
    #[doc = "Checks if the value of the field is `YES`"]
    #[inline(always)]
    pub fn is_yes(&self) -> bool {
        *self == SNID_A::YES
    }
}
impl R {
    #[doc = "Bits 4:5"]
    #[inline(always)]
    pub fn sid(&self) -> SID_R {
        SID_R::new(((self.bits >> 4) & 0x03) as u8)
    }
    #[doc = "Bits 6:7"]
    #[inline(always)]
    pub fn snid(&self) -> SNID_R {
        SNID_R::new(((self.bits >> 6) & 0x03) as u8)
    }
}