1#[doc = "Reader of register TSTR"]
2pub type R = crate::R<u32, super::TSTR>;
3#[doc = "Reader of field `SU`"]
4pub type SU_R = crate::R<u8, u8>;
5#[doc = "Reader of field `ST`"]
6pub type ST_R = crate::R<u8, u8>;
7#[doc = "Reader of field `MNU`"]
8pub type MNU_R = crate::R<u8, u8>;
9#[doc = "Reader of field `MNT`"]
10pub type MNT_R = crate::R<u8, u8>;
11#[doc = "Reader of field `HU`"]
12pub type HU_R = crate::R<u8, u8>;
13#[doc = "Reader of field `HT`"]
14pub type HT_R = crate::R<u8, u8>;
15#[doc = "Reader of field `PM`"]
16pub type PM_R = crate::R<bool, bool>;
17impl R {
18 #[doc = "Bits 0:3 - Second units in BCD format"]
19 #[inline(always)]
20 pub fn su(&self) -> SU_R {
21 SU_R::new((self.bits & 0x0f) as u8)
22 }
23 #[doc = "Bits 4:6 - Second tens in BCD format"]
24 #[inline(always)]
25 pub fn st(&self) -> ST_R {
26 ST_R::new(((self.bits >> 4) & 0x07) as u8)
27 }
28 #[doc = "Bits 8:11 - Minute units in BCD format"]
29 #[inline(always)]
30 pub fn mnu(&self) -> MNU_R {
31 MNU_R::new(((self.bits >> 8) & 0x0f) as u8)
32 }
33 #[doc = "Bits 12:14 - Minute tens in BCD format"]
34 #[inline(always)]
35 pub fn mnt(&self) -> MNT_R {
36 MNT_R::new(((self.bits >> 12) & 0x07) as u8)
37 }
38 #[doc = "Bits 16:19 - Hour units in BCD format"]
39 #[inline(always)]
40 pub fn hu(&self) -> HU_R {
41 HU_R::new(((self.bits >> 16) & 0x0f) as u8)
42 }
43 #[doc = "Bits 20:21 - Hour tens in BCD format"]
44 #[inline(always)]
45 pub fn ht(&self) -> HT_R {
46 HT_R::new(((self.bits >> 20) & 0x03) as u8)
47 }
48 #[doc = "Bit 22 - AM/PM notation"]
49 #[inline(always)]
50 pub fn pm(&self) -> PM_R {
51 PM_R::new(((self.bits >> 22) & 0x01) != 0)
52 }
53}