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 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263
#[doc = "Reader of register ISR"] pub type R = crate::R<u32, super::ISR>; #[doc = "Counter direction change up to down\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum DOWN_A { #[doc = "1: Counter direction change up to down"] SET, } impl From<DOWN_A> for bool { #[inline(always)] fn from(variant: DOWN_A) -> Self { match variant { DOWN_A::SET => true, } } } #[doc = "Reader of field `DOWN`"] pub type DOWN_R = crate::R<bool, DOWN_A>; impl DOWN_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> crate::Variant<bool, DOWN_A> { use crate::Variant::*; match self.bits { true => Val(DOWN_A::SET), i => Res(i), } } #[doc = "Checks if the value of the field is `SET`"] #[inline(always)] pub fn is_set(&self) -> bool { *self == DOWN_A::SET } } #[doc = "Counter direction change down to up\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum UP_A { #[doc = "1: Counter direction change down to up"] SET, } impl From<UP_A> for bool { #[inline(always)] fn from(variant: UP_A) -> Self { match variant { UP_A::SET => true, } } } #[doc = "Reader of field `UP`"] pub type UP_R = crate::R<bool, UP_A>; impl UP_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> crate::Variant<bool, UP_A> { use crate::Variant::*; match self.bits { true => Val(UP_A::SET), i => Res(i), } } #[doc = "Checks if the value of the field is `SET`"] #[inline(always)] pub fn is_set(&self) -> bool { *self == UP_A::SET } } #[doc = "Autoreload register update OK\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum ARROK_A { #[doc = "1: Autoreload register update OK"] SET, } impl From<ARROK_A> for bool { #[inline(always)] fn from(variant: ARROK_A) -> Self { match variant { ARROK_A::SET => true, } } } #[doc = "Reader of field `ARROK`"] pub type ARROK_R = crate::R<bool, ARROK_A>; impl ARROK_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> crate::Variant<bool, ARROK_A> { use crate::Variant::*; match self.bits { true => Val(ARROK_A::SET), i => Res(i), } } #[doc = "Checks if the value of the field is `SET`"] #[inline(always)] pub fn is_set(&self) -> bool { *self == ARROK_A::SET } } #[doc = "Compare register update OK\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum CMPOK_A { #[doc = "1: Compare register update OK"] SET, } impl From<CMPOK_A> for bool { #[inline(always)] fn from(variant: CMPOK_A) -> Self { match variant { CMPOK_A::SET => true, } } } #[doc = "Reader of field `CMPOK`"] pub type CMPOK_R = crate::R<bool, CMPOK_A>; impl CMPOK_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> crate::Variant<bool, CMPOK_A> { use crate::Variant::*; match self.bits { true => Val(CMPOK_A::SET), i => Res(i), } } #[doc = "Checks if the value of the field is `SET`"] #[inline(always)] pub fn is_set(&self) -> bool { *self == CMPOK_A::SET } } #[doc = "External trigger edge event\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum EXTTRIG_A { #[doc = "1: External trigger edge event"] SET, } impl From<EXTTRIG_A> for bool { #[inline(always)] fn from(variant: EXTTRIG_A) -> Self { match variant { EXTTRIG_A::SET => true, } } } #[doc = "Reader of field `EXTTRIG`"] pub type EXTTRIG_R = crate::R<bool, EXTTRIG_A>; impl EXTTRIG_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> crate::Variant<bool, EXTTRIG_A> { use crate::Variant::*; match self.bits { true => Val(EXTTRIG_A::SET), i => Res(i), } } #[doc = "Checks if the value of the field is `SET`"] #[inline(always)] pub fn is_set(&self) -> bool { *self == EXTTRIG_A::SET } } #[doc = "Autoreload match\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum ARRM_A { #[doc = "1: Autoreload match"] SET, } impl From<ARRM_A> for bool { #[inline(always)] fn from(variant: ARRM_A) -> Self { match variant { ARRM_A::SET => true, } } } #[doc = "Reader of field `ARRM`"] pub type ARRM_R = crate::R<bool, ARRM_A>; impl ARRM_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> crate::Variant<bool, ARRM_A> { use crate::Variant::*; match self.bits { true => Val(ARRM_A::SET), i => Res(i), } } #[doc = "Checks if the value of the field is `SET`"] #[inline(always)] pub fn is_set(&self) -> bool { *self == ARRM_A::SET } } #[doc = "Compare match\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum CMPM_A { #[doc = "1: Compare match"] SET, } impl From<CMPM_A> for bool { #[inline(always)] fn from(variant: CMPM_A) -> Self { match variant { CMPM_A::SET => true, } } } #[doc = "Reader of field `CMPM`"] pub type CMPM_R = crate::R<bool, CMPM_A>; impl CMPM_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> crate::Variant<bool, CMPM_A> { use crate::Variant::*; match self.bits { true => Val(CMPM_A::SET), i => Res(i), } } #[doc = "Checks if the value of the field is `SET`"] #[inline(always)] pub fn is_set(&self) -> bool { *self == CMPM_A::SET } } impl R { #[doc = "Bit 6 - Counter direction change up to down"] #[inline(always)] pub fn down(&self) -> DOWN_R { DOWN_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 5 - Counter direction change down to up"] #[inline(always)] pub fn up(&self) -> UP_R { UP_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 4 - Autoreload register update OK"] #[inline(always)] pub fn arrok(&self) -> ARROK_R { ARROK_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 3 - Compare register update OK"] #[inline(always)] pub fn cmpok(&self) -> CMPOK_R { CMPOK_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 2 - External trigger edge event"] #[inline(always)] pub fn exttrig(&self) -> EXTTRIG_R { EXTTRIG_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 1 - Autoreload match"] #[inline(always)] pub fn arrm(&self) -> ARRM_R { ARRM_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - Compare match"] #[inline(always)] pub fn cmpm(&self) -> CMPM_R { CMPM_R::new((self.bits & 0x01) != 0) } }