ra2a1/rtc/
r64cnt.rs

1#[doc = "Register `R64CNT` reader"]
2pub struct R(crate::R<R64CNT_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<R64CNT_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<R64CNT_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<R64CNT_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Field `F64HZ` reader - 64Hz"]
17pub type F64HZ_R = crate::BitReader<bool>;
18#[doc = "Field `F32HZ` reader - 32Hz"]
19pub type F32HZ_R = crate::BitReader<bool>;
20#[doc = "Field `F16HZ` reader - 16Hz"]
21pub type F16HZ_R = crate::BitReader<bool>;
22#[doc = "Field `F8HZ` reader - 8Hz"]
23pub type F8HZ_R = crate::BitReader<bool>;
24#[doc = "Field `F4HZ` reader - 4Hz"]
25pub type F4HZ_R = crate::BitReader<bool>;
26#[doc = "Field `F2HZ` reader - 2Hz"]
27pub type F2HZ_R = crate::BitReader<bool>;
28#[doc = "Field `F1HZ` reader - 1Hz"]
29pub type F1HZ_R = crate::BitReader<bool>;
30impl R {
31    #[doc = "Bit 0 - 64Hz"]
32    #[inline(always)]
33    pub fn f64hz(&self) -> F64HZ_R {
34        F64HZ_R::new((self.bits & 1) != 0)
35    }
36    #[doc = "Bit 1 - 32Hz"]
37    #[inline(always)]
38    pub fn f32hz(&self) -> F32HZ_R {
39        F32HZ_R::new(((self.bits >> 1) & 1) != 0)
40    }
41    #[doc = "Bit 2 - 16Hz"]
42    #[inline(always)]
43    pub fn f16hz(&self) -> F16HZ_R {
44        F16HZ_R::new(((self.bits >> 2) & 1) != 0)
45    }
46    #[doc = "Bit 3 - 8Hz"]
47    #[inline(always)]
48    pub fn f8hz(&self) -> F8HZ_R {
49        F8HZ_R::new(((self.bits >> 3) & 1) != 0)
50    }
51    #[doc = "Bit 4 - 4Hz"]
52    #[inline(always)]
53    pub fn f4hz(&self) -> F4HZ_R {
54        F4HZ_R::new(((self.bits >> 4) & 1) != 0)
55    }
56    #[doc = "Bit 5 - 2Hz"]
57    #[inline(always)]
58    pub fn f2hz(&self) -> F2HZ_R {
59        F2HZ_R::new(((self.bits >> 5) & 1) != 0)
60    }
61    #[doc = "Bit 6 - 1Hz"]
62    #[inline(always)]
63    pub fn f1hz(&self) -> F1HZ_R {
64        F1HZ_R::new(((self.bits >> 6) & 1) != 0)
65    }
66}
67#[doc = "64-Hz Counter\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [r64cnt](index.html) module"]
68pub struct R64CNT_SPEC;
69impl crate::RegisterSpec for R64CNT_SPEC {
70    type Ux = u8;
71}
72#[doc = "`read()` method returns [r64cnt::R](R) reader structure"]
73impl crate::Readable for R64CNT_SPEC {
74    type Reader = R;
75}
76#[doc = "`reset()` method sets R64CNT to value 0"]
77impl crate::Resettable for R64CNT_SPEC {
78    const RESET_VALUE: Self::Ux = 0;
79}