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_ACT_STAT` reader"]
pub type R = crate::R<DC_ACT_STAT_SPEC>;
#[doc = "SYNC0 activation state\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum S0_ACK_STATE_A {
    #[doc = "0: First SYNC0 pulse is not pending"]
    VALUE1 = 0,
    #[doc = "1: First SYNC0 pulse is pending"]
    VALUE2 = 1,
}
impl From<S0_ACK_STATE_A> for bool {
    #[inline(always)]
    fn from(variant: S0_ACK_STATE_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `S0_ACK_STATE` reader - SYNC0 activation state"]
pub type S0_ACK_STATE_R = crate::BitReader<S0_ACK_STATE_A>;
impl S0_ACK_STATE_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> S0_ACK_STATE_A {
        match self.bits {
            false => S0_ACK_STATE_A::VALUE1,
            true => S0_ACK_STATE_A::VALUE2,
        }
    }
    #[doc = "First SYNC0 pulse is not pending"]
    #[inline(always)]
    pub fn is_value1(&self) -> bool {
        *self == S0_ACK_STATE_A::VALUE1
    }
    #[doc = "First SYNC0 pulse is pending"]
    #[inline(always)]
    pub fn is_value2(&self) -> bool {
        *self == S0_ACK_STATE_A::VALUE2
    }
}
#[doc = "SYNC1 activation state\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum S1_ACK_STATE_A {
    #[doc = "0: First SYNC1 pulse is not pending"]
    VALUE1 = 0,
    #[doc = "1: First SYNC1 pulse is pending"]
    VALUE2 = 1,
}
impl From<S1_ACK_STATE_A> for bool {
    #[inline(always)]
    fn from(variant: S1_ACK_STATE_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `S1_ACK_STATE` reader - SYNC1 activation state"]
pub type S1_ACK_STATE_R = crate::BitReader<S1_ACK_STATE_A>;
impl S1_ACK_STATE_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> S1_ACK_STATE_A {
        match self.bits {
            false => S1_ACK_STATE_A::VALUE1,
            true => S1_ACK_STATE_A::VALUE2,
        }
    }
    #[doc = "First SYNC1 pulse is not pending"]
    #[inline(always)]
    pub fn is_value1(&self) -> bool {
        *self == S1_ACK_STATE_A::VALUE1
    }
    #[doc = "First SYNC1 pulse is pending"]
    #[inline(always)]
    pub fn is_value2(&self) -> bool {
        *self == S1_ACK_STATE_A::VALUE2
    }
}
#[doc = "Start Time Cyclic Operation\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum S_TIME_A {
    #[doc = "0: Start Time was within near future"]
    VALUE1 = 0,
    #[doc = "1: Start Time was out of near future (0x0981.6)"]
    VALUE2 = 1,
}
impl From<S_TIME_A> for bool {
    #[inline(always)]
    fn from(variant: S_TIME_A) -> Self {
        variant as u8 != 0
    }
}
#[doc = "Field `S_TIME` reader - Start Time Cyclic Operation"]
pub type S_TIME_R = crate::BitReader<S_TIME_A>;
impl S_TIME_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub const fn variant(&self) -> S_TIME_A {
        match self.bits {
            false => S_TIME_A::VALUE1,
            true => S_TIME_A::VALUE2,
        }
    }
    #[doc = "Start Time was within near future"]
    #[inline(always)]
    pub fn is_value1(&self) -> bool {
        *self == S_TIME_A::VALUE1
    }
    #[doc = "Start Time was out of near future (0x0981.6)"]
    #[inline(always)]
    pub fn is_value2(&self) -> bool {
        *self == S_TIME_A::VALUE2
    }
}
impl R {
    #[doc = "Bit 0 - SYNC0 activation state"]
    #[inline(always)]
    pub fn s0_ack_state(&self) -> S0_ACK_STATE_R {
        S0_ACK_STATE_R::new((self.bits & 1) != 0)
    }
    #[doc = "Bit 1 - SYNC1 activation state"]
    #[inline(always)]
    pub fn s1_ack_state(&self) -> S1_ACK_STATE_R {
        S1_ACK_STATE_R::new(((self.bits >> 1) & 1) != 0)
    }
    #[doc = "Bit 2 - Start Time Cyclic Operation"]
    #[inline(always)]
    pub fn s_time(&self) -> S_TIME_R {
        S_TIME_R::new(((self.bits >> 2) & 1) != 0)
    }
}
#[doc = "Activation Status\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`dc_act_stat::R`](R).  See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct DC_ACT_STAT_SPEC;
impl crate::RegisterSpec for DC_ACT_STAT_SPEC {
    type Ux = u8;
}
#[doc = "`read()` method returns [`dc_act_stat::R`](R) reader structure"]
impl crate::Readable for DC_ACT_STAT_SPEC {}
#[doc = "`reset()` method sets DC_ACT_STAT to value 0"]
impl crate::Resettable for DC_ACT_STAT_SPEC {
    const RESET_VALUE: u8 = 0;
}