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 = "Register `PRUN` reader"]
pub type R = crate::R<PrunSpec>;
#[doc = "Run Bit\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Rb {
    #[doc = "0: IDLE"]
    Value1 = 0,
    #[doc = "1: Running"]
    Value2 = 1,
}
impl From<Rb> for bool {
    #[inline(always)]
    fn from(variant: Rb) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `RB` reader - Run Bit"]
pub type RbR = crate::BitReader<Rb>;
impl RbR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Rb {
        match self.bits {
            false => Rb::Value1,
            true => Rb::Value2,
        }
    }
    #[doc = "IDLE"]
    #[inline(always)]
    pub fn is_value1(&self) -> bool {
        *self == Rb::Value1
    }
    #[doc = "Running"]
    #[inline(always)]
    pub fn is_value2(&self) -> bool {
        *self == Rb::Value2
    }
}
impl R {
    #[doc = "Bit 0 - Run Bit"]
    #[inline(always)]
    pub fn rb(&self) -> RbR {
        RbR::new((self.bits & 1) != 0)
    }
}
#[doc = "POSIF Run Bit Status\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`prun::R`](R).  See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct PrunSpec;
impl crate::RegisterSpec for PrunSpec {
    type Ux = u32;
}
#[doc = "`read()` method returns [`prun::R`](R) reader structure"]
impl crate::Readable for PrunSpec {}
#[doc = "`reset()` method sets PRUN to value 0"]
impl crate::Resettable for PrunSpec {
    const RESET_VALUE: u32 = 0;
}