tm4c129x/hib/
rtcss.rs

1#[doc = "Reader of register RTCSS"]
2pub type R = crate::R<u32, super::RTCSS>;
3#[doc = "Writer for register RTCSS"]
4pub type W = crate::W<u32, super::RTCSS>;
5#[doc = "Register RTCSS `reset()`'s with value 0"]
6impl crate::ResetValue for super::RTCSS {
7    type Type = u32;
8    #[inline(always)]
9    fn reset_value() -> Self::Type {
10        0
11    }
12}
13#[doc = "Reader of field `RTCSSC`"]
14pub type RTCSSC_R = crate::R<u16, u16>;
15#[doc = "Write proxy for field `RTCSSC`"]
16pub struct RTCSSC_W<'a> {
17    w: &'a mut W,
18}
19impl<'a> RTCSSC_W<'a> {
20    #[doc = r"Writes raw bits to the field"]
21    #[inline(always)]
22    pub unsafe fn bits(self, value: u16) -> &'a mut W {
23        self.w.bits = (self.w.bits & !0x7fff) | ((value as u32) & 0x7fff);
24        self.w
25    }
26}
27#[doc = "Reader of field `RTCSSM`"]
28pub type RTCSSM_R = crate::R<u16, u16>;
29#[doc = "Write proxy for field `RTCSSM`"]
30pub struct RTCSSM_W<'a> {
31    w: &'a mut W,
32}
33impl<'a> RTCSSM_W<'a> {
34    #[doc = r"Writes raw bits to the field"]
35    #[inline(always)]
36    pub unsafe fn bits(self, value: u16) -> &'a mut W {
37        self.w.bits = (self.w.bits & !(0x7fff << 16)) | (((value as u32) & 0x7fff) << 16);
38        self.w
39    }
40}
41impl R {
42    #[doc = "Bits 0:14 - RTC Sub Seconds Count"]
43    #[inline(always)]
44    pub fn rtcssc(&self) -> RTCSSC_R {
45        RTCSSC_R::new((self.bits & 0x7fff) as u16)
46    }
47    #[doc = "Bits 16:30 - RTC Sub Seconds Match"]
48    #[inline(always)]
49    pub fn rtcssm(&self) -> RTCSSM_R {
50        RTCSSM_R::new(((self.bits >> 16) & 0x7fff) as u16)
51    }
52}
53impl W {
54    #[doc = "Bits 0:14 - RTC Sub Seconds Count"]
55    #[inline(always)]
56    pub fn rtcssc(&mut self) -> RTCSSC_W {
57        RTCSSC_W { w: self }
58    }
59    #[doc = "Bits 16:30 - RTC Sub Seconds Match"]
60    #[inline(always)]
61    pub fn rtcssm(&mut self) -> RTCSSM_W {
62        RTCSSM_W { w: self }
63    }
64}