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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
#[doc = "Register `DC_CYC_CONT` reader"]
pub type R = crate::R<DcCycContSpec>;
#[doc = "SYNC out unit control\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Sync {
    #[doc = "0: ECAT controlled"]
    Value1 = 0,
    #[doc = "1: PDI controlled"]
    Value2 = 1,
}
impl From<Sync> for bool {
    #[inline(always)]
    fn from(variant: Sync) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `SYNC` reader - SYNC out unit control"]
pub type SyncR = crate::BitReader<Sync>;
impl SyncR {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> Sync {
        match self.bits {
            false => Sync::Value1,
            true => Sync::Value2,
        }
    }
    #[doc = "ECAT controlled"]
    #[inline(always)]
    pub fn is_value1(&self) -> bool {
        *self == Sync::Value1
    }
    #[doc = "PDI controlled"]
    #[inline(always)]
    pub fn is_value2(&self) -> bool {
        *self == Sync::Value2
    }
}
#[doc = "Latch In unit 0\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum LatchU0 {
    #[doc = "0: ECAT controlled"]
    Value1 = 0,
    #[doc = "1: PDI controlled"]
    Value2 = 1,
}
impl From<LatchU0> for bool {
    #[inline(always)]
    fn from(variant: LatchU0) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `LATCH_U0` reader - Latch In unit 0"]
pub type LatchU0R = crate::BitReader<LatchU0>;
impl LatchU0R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> LatchU0 {
        match self.bits {
            false => LatchU0::Value1,
            true => LatchU0::Value2,
        }
    }
    #[doc = "ECAT controlled"]
    #[inline(always)]
    pub fn is_value1(&self) -> bool {
        *self == LatchU0::Value1
    }
    #[doc = "PDI controlled"]
    #[inline(always)]
    pub fn is_value2(&self) -> bool {
        *self == LatchU0::Value2
    }
}
#[doc = "Latch In unit 1\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum LatchU1 {
    #[doc = "0: ECAT controlled"]
    Value1 = 0,
    #[doc = "1: PDI controlled"]
    Value2 = 1,
}
impl From<LatchU1> for bool {
    #[inline(always)]
    fn from(variant: LatchU1) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `LATCH_U1` reader - Latch In unit 1"]
pub type LatchU1R = crate::BitReader<LatchU1>;
impl LatchU1R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> LatchU1 {
        match self.bits {
            false => LatchU1::Value1,
            true => LatchU1::Value2,
        }
    }
    #[doc = "ECAT controlled"]
    #[inline(always)]
    pub fn is_value1(&self) -> bool {
        *self == LatchU1::Value1
    }
    #[doc = "PDI controlled"]
    #[inline(always)]
    pub fn is_value2(&self) -> bool {
        *self == LatchU1::Value2
    }
}
impl R {
    #[doc = "Bit 0 - SYNC out unit control"]
    #[inline(always)]
    pub fn sync(&self) -> SyncR {
        SyncR::new((self.bits & 1) != 0)
    }
    #[doc = "Bit 4 - Latch In unit 0"]
    #[inline(always)]
    pub fn latch_u0(&self) -> LatchU0R {
        LatchU0R::new(((self.bits >> 4) & 1) != 0)
    }
    #[doc = "Bit 5 - Latch In unit 1"]
    #[inline(always)]
    pub fn latch_u1(&self) -> LatchU1R {
        LatchU1R::new(((self.bits >> 5) & 1) != 0)
    }
}
#[doc = "Cyclic Unit Control\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`dc_cyc_cont::R`](R).  See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct DcCycContSpec;
impl crate::RegisterSpec for DcCycContSpec {
    type Ux = u8;
}
#[doc = "`read()` method returns [`dc_cyc_cont::R`](R) reader structure"]
impl crate::Readable for DcCycContSpec {}
#[doc = "`reset()` method sets DC_CYC_CONT to value 0"]
impl crate::Resettable for DcCycContSpec {
    const RESET_VALUE: u8 = 0;
}