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
#[doc = "Reader of register INTSTAT"]
pub type R = crate::R<u32, super::INTSTAT>;
#[doc = "Writer for register INTSTAT"]
pub type W = crate::W<u32, super::INTSTAT>;
#[doc = "Register INTSTAT `reset()`'s with value 0"]
impl crate::ResetValue for super::INTSTAT {
    type Type = u32;
    #[inline(always)]
    fn reset_value() -> Self::Type {
        0
    }
}
#[doc = "If set, interrupt is caused by accelerator being done.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DONE_A {
    #[doc = "0: Not caused by accelerator being done"]
    NOT_CAUSED = 0,
    #[doc = "1: Caused by accelerator being done"]
    CAUSED = 1,
}
impl From<DONE_A> for bool {
    #[inline(always)]
    fn from(variant: DONE_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Reader of field `DONE`"]
pub type DONE_R = crate::R<bool, DONE_A>;
impl DONE_R {
    #[doc = r"Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> DONE_A {
        match self.bits {
            false => DONE_A::NOT_CAUSED,
            true => DONE_A::CAUSED,
        }
    }
    #[doc = "Checks if the value of the field is `NOT_CAUSED`"]
    #[inline(always)]
    pub fn is_not_caused(&self) -> bool {
        *self == DONE_A::NOT_CAUSED
    }
    #[doc = "Checks if the value of the field is `CAUSED`"]
    #[inline(always)]
    pub fn is_caused(&self) -> bool {
        *self == DONE_A::CAUSED
    }
}
impl R {
    #[doc = "Bit 0 - If set, interrupt is caused by accelerator being done."]
    #[inline(always)]
    pub fn done(&self) -> DONE_R {
        DONE_R::new((self.bits & 0x01) != 0)
    }
}
impl W {}