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
#[doc = "Reader of register MCUSR"]
pub type R = crate::R<u8, super::MCUSR>;
#[doc = "Reader of field `PORF`"]
pub type PORF_R = crate::R<bool, bool>;
#[doc = "Reader of field `EXTRF`"]
pub type EXTRF_R = crate::R<bool, bool>;
#[doc = "Reader of field `BORF`"]
pub type BORF_R = crate::R<bool, bool>;
#[doc = "Reader of field `WDRF`"]
pub type WDRF_R = crate::R<bool, bool>;
#[doc = "Reader of field `JTRF`"]
pub type JTRF_R = crate::R<bool, bool>;
impl R {
    #[doc = "Bit 0 - Power-on reset flag"]
    #[inline(always)]
    pub fn porf(&self) -> PORF_R {
        PORF_R::new((self.bits & 0x01) != 0)
    }
    #[doc = "Bit 1 - External Reset Flag"]
    #[inline(always)]
    pub fn extrf(&self) -> EXTRF_R {
        EXTRF_R::new(((self.bits >> 1) & 0x01) != 0)
    }
    #[doc = "Bit 2 - Brown-out Reset Flag"]
    #[inline(always)]
    pub fn borf(&self) -> BORF_R {
        BORF_R::new(((self.bits >> 2) & 0x01) != 0)
    }
    #[doc = "Bit 3 - Watchdog Reset Flag"]
    #[inline(always)]
    pub fn wdrf(&self) -> WDRF_R {
        WDRF_R::new(((self.bits >> 3) & 0x01) != 0)
    }
    #[doc = "Bit 4 - JTAG Reset Flag"]
    #[inline(always)]
    pub fn jtrf(&self) -> JTRF_R {
        JTRF_R::new(((self.bits >> 4) & 0x01) != 0)
    }
}