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
#[doc = "Reader of register CTRLOW"] pub type R = crate::R<u32, super::CTRLOW>; #[doc = "Writer for register CTRLOW"] pub type W = crate::W<u32, super::CTRLOW>; #[doc = "Register CTRLOW `reset()`'s with value 0x0100_0000"] impl crate::ResetValue for super::CTRLOW { type Type = u32; #[inline(always)] fn reset_value() -> Self::Type { 0x0100_0000 } } #[doc = "Reader of field `CTRHR`"] pub type CTRHR_R = crate::R<u8, u8>; #[doc = "Write proxy for field `CTRHR`"] pub struct CTRHR_W<'a> { w: &'a mut W, } impl<'a> CTRHR_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 & !(0x3f << 24)) | (((value as u32) & 0x3f) << 24); self.w } } #[doc = "Reader of field `CTRMIN`"] pub type CTRMIN_R = crate::R<u8, u8>; #[doc = "Write proxy for field `CTRMIN`"] pub struct CTRMIN_W<'a> { w: &'a mut W, } impl<'a> CTRMIN_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 & !(0x7f << 16)) | (((value as u32) & 0x7f) << 16); self.w } } #[doc = "Reader of field `CTRSEC`"] pub type CTRSEC_R = crate::R<u8, u8>; #[doc = "Write proxy for field `CTRSEC`"] pub struct CTRSEC_W<'a> { w: &'a mut W, } impl<'a> CTRSEC_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 & !(0x7f << 8)) | (((value as u32) & 0x7f) << 8); self.w } } #[doc = "Reader of field `CTR100`"] pub type CTR100_R = crate::R<u8, u8>; #[doc = "Write proxy for field `CTR100`"] pub struct CTR100_W<'a> { w: &'a mut W, } impl<'a> CTR100_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 & !0xff) | ((value as u32) & 0xff); self.w } } impl R { #[doc = "Bits 24:29 - Hours Counter"] #[inline(always)] pub fn ctrhr(&self) -> CTRHR_R { CTRHR_R::new(((self.bits >> 24) & 0x3f) as u8) } #[doc = "Bits 16:22 - Minutes Counter"] #[inline(always)] pub fn ctrmin(&self) -> CTRMIN_R { CTRMIN_R::new(((self.bits >> 16) & 0x7f) as u8) } #[doc = "Bits 8:14 - Seconds Counter"] #[inline(always)] pub fn ctrsec(&self) -> CTRSEC_R { CTRSEC_R::new(((self.bits >> 8) & 0x7f) as u8) } #[doc = "Bits 0:7 - 100ths of a second Counter"] #[inline(always)] pub fn ctr100(&self) -> CTR100_R { CTR100_R::new((self.bits & 0xff) as u8) } } impl W { #[doc = "Bits 24:29 - Hours Counter"] #[inline(always)] pub fn ctrhr(&mut self) -> CTRHR_W { CTRHR_W { w: self } } #[doc = "Bits 16:22 - Minutes Counter"] #[inline(always)] pub fn ctrmin(&mut self) -> CTRMIN_W { CTRMIN_W { w: self } } #[doc = "Bits 8:14 - Seconds Counter"] #[inline(always)] pub fn ctrsec(&mut self) -> CTRSEC_W { CTRSEC_W { w: self } } #[doc = "Bits 0:7 - 100ths of a second Counter"] #[inline(always)] pub fn ctr100(&mut self) -> CTR100_W { CTR100_W { w: self } } }