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
#[doc = "Reader of register INT"] pub type R = crate::R<u32, super::INT>; #[doc = "Interrupt Identifier\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum INTID_A { #[doc = "0: No interrupt pending"] NONE, #[doc = "32768: Status Interrupt"] STATUS, } impl From<INTID_A> for u16 { #[inline(always)] fn from(variant: INTID_A) -> Self { match variant { INTID_A::NONE => 0, INTID_A::STATUS => 32768, } } } #[doc = "Reader of field `INTID`"] pub type INTID_R = crate::R<u16, INTID_A>; impl INTID_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> crate::Variant<u16, INTID_A> { use crate::Variant::*; match self.bits { 0 => Val(INTID_A::NONE), 32768 => Val(INTID_A::STATUS), i => Res(i), } } #[doc = "Checks if the value of the field is `NONE`"] #[inline(always)] pub fn is_none(&self) -> bool { *self == INTID_A::NONE } #[doc = "Checks if the value of the field is `STATUS`"] #[inline(always)] pub fn is_status(&self) -> bool { *self == INTID_A::STATUS } } impl R { #[doc = "Bits 0:15 - Interrupt Identifier"] #[inline(always)] pub fn intid(&self) -> INTID_R { INTID_R::new((self.bits & 0xffff) as u16) } }