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 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356
#[doc = "Reader of register ASRC_INT_ENABLE"] pub type R = crate::R<u32, super::ASRC_INT_ENABLE>; #[doc = "Writer for register ASRC_INT_ENABLE"] pub type W = crate::W<u32, super::ASRC_INT_ENABLE>; #[doc = "Register ASRC_INT_ENABLE `reset()`'s with value 0x08"] impl crate::ResetValue for super::ASRC_INT_ENABLE { type Type = u32; #[inline(always)] fn reset_value() -> Self::Type { 0x08 } } #[doc = "The ASRC state/configuration update error interrupt mask\n\nValue on reset: 1"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum ASRC_UPDATE_ERR_A { #[doc = "0: This source can not set an interrupt"] INT_DIS_ASRC_UPDATE_ERR = 0, #[doc = "1: This source can set the interrupt line"] INT_EBL_ASRC_UPDATE_ERR = 1, } impl From<ASRC_UPDATE_ERR_A> for bool { #[inline(always)] fn from(variant: ASRC_UPDATE_ERR_A) -> Self { variant as u8 != 0 } } #[doc = "Reader of field `ASRC_UPDATE_ERR`"] pub type ASRC_UPDATE_ERR_R = crate::R<bool, ASRC_UPDATE_ERR_A>; impl ASRC_UPDATE_ERR_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> ASRC_UPDATE_ERR_A { match self.bits { false => ASRC_UPDATE_ERR_A::INT_DIS_ASRC_UPDATE_ERR, true => ASRC_UPDATE_ERR_A::INT_EBL_ASRC_UPDATE_ERR, } } #[doc = "Checks if the value of the field is `INT_DIS_ASRC_UPDATE_ERR`"] #[inline(always)] pub fn is_int_dis_asrc_update_err(&self) -> bool { *self == ASRC_UPDATE_ERR_A::INT_DIS_ASRC_UPDATE_ERR } #[doc = "Checks if the value of the field is `INT_EBL_ASRC_UPDATE_ERR`"] #[inline(always)] pub fn is_int_ebl_asrc_update_err(&self) -> bool { *self == ASRC_UPDATE_ERR_A::INT_EBL_ASRC_UPDATE_ERR } } #[doc = "Write proxy for field `ASRC_UPDATE_ERR`"] pub struct ASRC_UPDATE_ERR_W<'a> { w: &'a mut W, } impl<'a> ASRC_UPDATE_ERR_W<'a> { #[doc = r"Writes `variant` to the field"] #[inline(always)] pub fn variant(self, variant: ASRC_UPDATE_ERR_A) -> &'a mut W { { self.bit(variant.into()) } } #[doc = "This source can not set an interrupt"] #[inline(always)] pub fn int_dis_asrc_update_err(self) -> &'a mut W { self.variant(ASRC_UPDATE_ERR_A::INT_DIS_ASRC_UPDATE_ERR) } #[doc = "This source can set the interrupt line"] #[inline(always)] pub fn int_ebl_asrc_update_err(self) -> &'a mut W { self.variant(ASRC_UPDATE_ERR_A::INT_EBL_ASRC_UPDATE_ERR) } #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } #[doc = "The ASRC input interface error interrupt mask\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum ASRC_IN_ERR_A { #[doc = "0: This source can not set an interrupt"] INT_DIS_ASRC_IN_ERR = 0, #[doc = "1: This source can set the interrupt line"] INT_EBL_ASRC_IN_ERR = 1, } impl From<ASRC_IN_ERR_A> for bool { #[inline(always)] fn from(variant: ASRC_IN_ERR_A) -> Self { variant as u8 != 0 } } #[doc = "Reader of field `ASRC_IN_ERR`"] pub type ASRC_IN_ERR_R = crate::R<bool, ASRC_IN_ERR_A>; impl ASRC_IN_ERR_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> ASRC_IN_ERR_A { match self.bits { false => ASRC_IN_ERR_A::INT_DIS_ASRC_IN_ERR, true => ASRC_IN_ERR_A::INT_EBL_ASRC_IN_ERR, } } #[doc = "Checks if the value of the field is `INT_DIS_ASRC_IN_ERR`"] #[inline(always)] pub fn is_int_dis_asrc_in_err(&self) -> bool { *self == ASRC_IN_ERR_A::INT_DIS_ASRC_IN_ERR } #[doc = "Checks if the value of the field is `INT_EBL_ASRC_IN_ERR`"] #[inline(always)] pub fn is_int_ebl_asrc_in_err(&self) -> bool { *self == ASRC_IN_ERR_A::INT_EBL_ASRC_IN_ERR } } #[doc = "Write proxy for field `ASRC_IN_ERR`"] pub struct ASRC_IN_ERR_W<'a> { w: &'a mut W, } impl<'a> ASRC_IN_ERR_W<'a> { #[doc = r"Writes `variant` to the field"] #[inline(always)] pub fn variant(self, variant: ASRC_IN_ERR_A) -> &'a mut W { { self.bit(variant.into()) } } #[doc = "This source can not set an interrupt"] #[inline(always)] pub fn int_dis_asrc_in_err(self) -> &'a mut W { self.variant(ASRC_IN_ERR_A::INT_DIS_ASRC_IN_ERR) } #[doc = "This source can set the interrupt line"] #[inline(always)] pub fn int_ebl_asrc_in_err(self) -> &'a mut W { self.variant(ASRC_IN_ERR_A::INT_EBL_ASRC_IN_ERR) } #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } #[doc = "The ASRC_OUT register interrupt status\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum ASRC_OUT_REQ_A { #[doc = "0: This source can not set an interrupt"] INT_DIS_ASRC_OUT = 0, #[doc = "1: This source can set the interrupt line"] INT_EBL_ASRC_OUT = 1, } impl From<ASRC_OUT_REQ_A> for bool { #[inline(always)] fn from(variant: ASRC_OUT_REQ_A) -> Self { variant as u8 != 0 } } #[doc = "Reader of field `ASRC_OUT_REQ`"] pub type ASRC_OUT_REQ_R = crate::R<bool, ASRC_OUT_REQ_A>; impl ASRC_OUT_REQ_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> ASRC_OUT_REQ_A { match self.bits { false => ASRC_OUT_REQ_A::INT_DIS_ASRC_OUT, true => ASRC_OUT_REQ_A::INT_EBL_ASRC_OUT, } } #[doc = "Checks if the value of the field is `INT_DIS_ASRC_OUT`"] #[inline(always)] pub fn is_int_dis_asrc_out(&self) -> bool { *self == ASRC_OUT_REQ_A::INT_DIS_ASRC_OUT } #[doc = "Checks if the value of the field is `INT_EBL_ASRC_OUT`"] #[inline(always)] pub fn is_int_ebl_asrc_out(&self) -> bool { *self == ASRC_OUT_REQ_A::INT_EBL_ASRC_OUT } } #[doc = "Write proxy for field `ASRC_OUT_REQ`"] pub struct ASRC_OUT_REQ_W<'a> { w: &'a mut W, } impl<'a> ASRC_OUT_REQ_W<'a> { #[doc = r"Writes `variant` to the field"] #[inline(always)] pub fn variant(self, variant: ASRC_OUT_REQ_A) -> &'a mut W { { self.bit(variant.into()) } } #[doc = "This source can not set an interrupt"] #[inline(always)] pub fn int_dis_asrc_out(self) -> &'a mut W { self.variant(ASRC_OUT_REQ_A::INT_DIS_ASRC_OUT) } #[doc = "This source can set the interrupt line"] #[inline(always)] pub fn int_ebl_asrc_out(self) -> &'a mut W { self.variant(ASRC_OUT_REQ_A::INT_EBL_ASRC_OUT) } #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } #[doc = "The ASRC_IN register interrupt status\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] pub enum ASRC_IN_REQ_A { #[doc = "0: This source can not set an interrupt"] INT_DIS_ASRC_IN = 0, #[doc = "1: This source can set the interrupt line"] INT_EBL_ASRC_IN = 1, } impl From<ASRC_IN_REQ_A> for bool { #[inline(always)] fn from(variant: ASRC_IN_REQ_A) -> Self { variant as u8 != 0 } } #[doc = "Reader of field `ASRC_IN_REQ`"] pub type ASRC_IN_REQ_R = crate::R<bool, ASRC_IN_REQ_A>; impl ASRC_IN_REQ_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> ASRC_IN_REQ_A { match self.bits { false => ASRC_IN_REQ_A::INT_DIS_ASRC_IN, true => ASRC_IN_REQ_A::INT_EBL_ASRC_IN, } } #[doc = "Checks if the value of the field is `INT_DIS_ASRC_IN`"] #[inline(always)] pub fn is_int_dis_asrc_in(&self) -> bool { *self == ASRC_IN_REQ_A::INT_DIS_ASRC_IN } #[doc = "Checks if the value of the field is `INT_EBL_ASRC_IN`"] #[inline(always)] pub fn is_int_ebl_asrc_in(&self) -> bool { *self == ASRC_IN_REQ_A::INT_EBL_ASRC_IN } } #[doc = "Write proxy for field `ASRC_IN_REQ`"] pub struct ASRC_IN_REQ_W<'a> { w: &'a mut W, } impl<'a> ASRC_IN_REQ_W<'a> { #[doc = r"Writes `variant` to the field"] #[inline(always)] pub fn variant(self, variant: ASRC_IN_REQ_A) -> &'a mut W { { self.bit(variant.into()) } } #[doc = "This source can not set an interrupt"] #[inline(always)] pub fn int_dis_asrc_in(self) -> &'a mut W { self.variant(ASRC_IN_REQ_A::INT_DIS_ASRC_IN) } #[doc = "This source can set the interrupt line"] #[inline(always)] pub fn int_ebl_asrc_in(self) -> &'a mut W { self.variant(ASRC_IN_REQ_A::INT_EBL_ASRC_IN) } #[doc = r"Sets the field bit"] #[inline(always)] pub fn set_bit(self) -> &'a mut W { self.bit(true) } #[doc = r"Clears the field bit"] #[inline(always)] pub fn clear_bit(self) -> &'a mut W { self.bit(false) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } impl R { #[doc = "Bit 3 - The ASRC state/configuration update error interrupt mask"] #[inline(always)] pub fn asrc_update_err(&self) -> ASRC_UPDATE_ERR_R { ASRC_UPDATE_ERR_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 2 - The ASRC input interface error interrupt mask"] #[inline(always)] pub fn asrc_in_err(&self) -> ASRC_IN_ERR_R { ASRC_IN_ERR_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 1 - The ASRC_OUT register interrupt status"] #[inline(always)] pub fn asrc_out_req(&self) -> ASRC_OUT_REQ_R { ASRC_OUT_REQ_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - The ASRC_IN register interrupt status"] #[inline(always)] pub fn asrc_in_req(&self) -> ASRC_IN_REQ_R { ASRC_IN_REQ_R::new((self.bits & 0x01) != 0) } } impl W { #[doc = "Bit 3 - The ASRC state/configuration update error interrupt mask"] #[inline(always)] pub fn asrc_update_err(&mut self) -> ASRC_UPDATE_ERR_W { ASRC_UPDATE_ERR_W { w: self } } #[doc = "Bit 2 - The ASRC input interface error interrupt mask"] #[inline(always)] pub fn asrc_in_err(&mut self) -> ASRC_IN_ERR_W { ASRC_IN_ERR_W { w: self } } #[doc = "Bit 1 - The ASRC_OUT register interrupt status"] #[inline(always)] pub fn asrc_out_req(&mut self) -> ASRC_OUT_REQ_W { ASRC_OUT_REQ_W { w: self } } #[doc = "Bit 0 - The ASRC_IN register interrupt status"] #[inline(always)] pub fn asrc_in_req(&mut self) -> ASRC_IN_REQ_W { ASRC_IN_REQ_W { w: self } } }