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 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404
#[doc = "Reader of register BMCR"] pub type R = crate::R<u32, super::BMCR>; #[doc = "Writer for register BMCR"] pub type W = crate::W<u32, super::BMCR>; #[doc = "Register BMCR `reset()`'s with value 0"] impl crate::ResetValue for super::BMCR { type Type = u32; #[inline(always)] fn reset_value() -> Self::Type { 0 } } #[doc = "Reader of field `BMSTAT`"] pub type BMSTAT_R = crate::R<bool, bool>; #[doc = "Write proxy for field `BMSTAT`"] pub struct BMSTAT_W<'a> { w: &'a mut W, } impl<'a> BMSTAT_W<'a> { #[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 << 31)) | (((value as u32) & 0x01) << 31); self.w } } #[doc = "Reader of field `TEBM`"] pub type TEBM_R = crate::R<bool, bool>; #[doc = "Write proxy for field `TEBM`"] pub struct TEBM_W<'a> { w: &'a mut W, } impl<'a> TEBM_W<'a> { #[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 << 21)) | (((value as u32) & 0x01) << 21); self.w } } #[doc = "Reader of field `TDBM`"] pub type TDBM_R = crate::R<bool, bool>; #[doc = "Write proxy for field `TDBM`"] pub struct TDBM_W<'a> { w: &'a mut W, } impl<'a> TDBM_W<'a> { #[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 << 20)) | (((value as u32) & 0x01) << 20); self.w } } #[doc = "Reader of field `TCBM`"] pub type TCBM_R = crate::R<bool, bool>; #[doc = "Write proxy for field `TCBM`"] pub struct TCBM_W<'a> { w: &'a mut W, } impl<'a> TCBM_W<'a> { #[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 << 19)) | (((value as u32) & 0x01) << 19); self.w } } #[doc = "Reader of field `TBBM`"] pub type TBBM_R = crate::R<bool, bool>; #[doc = "Write proxy for field `TBBM`"] pub struct TBBM_W<'a> { w: &'a mut W, } impl<'a> TBBM_W<'a> { #[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 << 18)) | (((value as u32) & 0x01) << 18); self.w } } #[doc = "Reader of field `TABM`"] pub type TABM_R = crate::R<bool, bool>; #[doc = "Write proxy for field `TABM`"] pub struct TABM_W<'a> { w: &'a mut W, } impl<'a> TABM_W<'a> { #[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 << 17)) | (((value as u32) & 0x01) << 17); self.w } } #[doc = "Reader of field `MTBM`"] pub type MTBM_R = crate::R<bool, bool>; #[doc = "Write proxy for field `MTBM`"] pub struct MTBM_W<'a> { w: &'a mut W, } impl<'a> MTBM_W<'a> { #[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 << 16)) | (((value as u32) & 0x01) << 16); self.w } } #[doc = "Reader of field `BMPREN`"] pub type BMPREN_R = crate::R<bool, bool>; #[doc = "Write proxy for field `BMPREN`"] pub struct BMPREN_W<'a> { w: &'a mut W, } impl<'a> BMPREN_W<'a> { #[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 << 10)) | (((value as u32) & 0x01) << 10); self.w } } #[doc = "Reader of field `BMPRSC`"] pub type BMPRSC_R = crate::R<u8, u8>; #[doc = "Write proxy for field `BMPRSC`"] pub struct BMPRSC_W<'a> { w: &'a mut W, } impl<'a> BMPRSC_W<'a> { #[doc = r"Writes raw bits to the field"] #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { self.w.bits = (self.w.bits & !(0x0f << 6)) | (((value as u32) & 0x0f) << 6); self.w } } #[doc = "Reader of field `BMCLK`"] pub type BMCLK_R = crate::R<u8, u8>; #[doc = "Write proxy for field `BMCLK`"] pub struct BMCLK_W<'a> { w: &'a mut W, } impl<'a> BMCLK_W<'a> { #[doc = r"Writes raw bits to the field"] #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { self.w.bits = (self.w.bits & !(0x0f << 2)) | (((value as u32) & 0x0f) << 2); self.w } } #[doc = "Reader of field `BMOM`"] pub type BMOM_R = crate::R<bool, bool>; #[doc = "Write proxy for field `BMOM`"] pub struct BMOM_W<'a> { w: &'a mut W, } impl<'a> BMOM_W<'a> { #[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 = "Reader of field `BME`"] pub type BME_R = crate::R<bool, bool>; #[doc = "Write proxy for field `BME`"] pub struct BME_W<'a> { w: &'a mut W, } impl<'a> BME_W<'a> { #[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 31 - Burst Mode Status"] #[inline(always)] pub fn bmstat(&self) -> BMSTAT_R { BMSTAT_R::new(((self.bits >> 31) & 0x01) != 0) } #[doc = "Bit 21 - Timer E Burst Mode"] #[inline(always)] pub fn tebm(&self) -> TEBM_R { TEBM_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 20 - Timer D Burst Mode"] #[inline(always)] pub fn tdbm(&self) -> TDBM_R { TDBM_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 19 - Timer C Burst Mode"] #[inline(always)] pub fn tcbm(&self) -> TCBM_R { TCBM_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 18 - Timer B Burst Mode"] #[inline(always)] pub fn tbbm(&self) -> TBBM_R { TBBM_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 17 - Timer A Burst Mode"] #[inline(always)] pub fn tabm(&self) -> TABM_R { TABM_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 16 - Master Timer Burst Mode"] #[inline(always)] pub fn mtbm(&self) -> MTBM_R { MTBM_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 10 - Burst Mode Preload Enable"] #[inline(always)] pub fn bmpren(&self) -> BMPREN_R { BMPREN_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bits 6:9 - Burst Mode Prescaler"] #[inline(always)] pub fn bmprsc(&self) -> BMPRSC_R { BMPRSC_R::new(((self.bits >> 6) & 0x0f) as u8) } #[doc = "Bits 2:5 - Burst Mode Clock source"] #[inline(always)] pub fn bmclk(&self) -> BMCLK_R { BMCLK_R::new(((self.bits >> 2) & 0x0f) as u8) } #[doc = "Bit 1 - Burst Mode operating mode"] #[inline(always)] pub fn bmom(&self) -> BMOM_R { BMOM_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - Burst Mode enable"] #[inline(always)] pub fn bme(&self) -> BME_R { BME_R::new((self.bits & 0x01) != 0) } } impl W { #[doc = "Bit 31 - Burst Mode Status"] #[inline(always)] pub fn bmstat(&mut self) -> BMSTAT_W { BMSTAT_W { w: self } } #[doc = "Bit 21 - Timer E Burst Mode"] #[inline(always)] pub fn tebm(&mut self) -> TEBM_W { TEBM_W { w: self } } #[doc = "Bit 20 - Timer D Burst Mode"] #[inline(always)] pub fn tdbm(&mut self) -> TDBM_W { TDBM_W { w: self } } #[doc = "Bit 19 - Timer C Burst Mode"] #[inline(always)] pub fn tcbm(&mut self) -> TCBM_W { TCBM_W { w: self } } #[doc = "Bit 18 - Timer B Burst Mode"] #[inline(always)] pub fn tbbm(&mut self) -> TBBM_W { TBBM_W { w: self } } #[doc = "Bit 17 - Timer A Burst Mode"] #[inline(always)] pub fn tabm(&mut self) -> TABM_W { TABM_W { w: self } } #[doc = "Bit 16 - Master Timer Burst Mode"] #[inline(always)] pub fn mtbm(&mut self) -> MTBM_W { MTBM_W { w: self } } #[doc = "Bit 10 - Burst Mode Preload Enable"] #[inline(always)] pub fn bmpren(&mut self) -> BMPREN_W { BMPREN_W { w: self } } #[doc = "Bits 6:9 - Burst Mode Prescaler"] #[inline(always)] pub fn bmprsc(&mut self) -> BMPRSC_W { BMPRSC_W { w: self } } #[doc = "Bits 2:5 - Burst Mode Clock source"] #[inline(always)] pub fn bmclk(&mut self) -> BMCLK_W { BMCLK_W { w: self } } #[doc = "Bit 1 - Burst Mode operating mode"] #[inline(always)] pub fn bmom(&mut self) -> BMOM_W { BMOM_W { w: self } } #[doc = "Bit 0 - Burst Mode enable"] #[inline(always)] pub fn bme(&mut self) -> BME_W { BME_W { w: self } } }