esp8266/timer/
frc2_count.rs

1#[doc = "Register `FRC2_COUNT` reader"]
2pub struct R(crate::R<FRC2_COUNT_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<FRC2_COUNT_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<FRC2_COUNT_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<FRC2_COUNT_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Field `frc2_count` reader - the current value of the counter. It is a increasingcounter."]
17pub struct FRC2_COUNT_R(crate::FieldReader<u32, u32>);
18impl FRC2_COUNT_R {
19    #[inline(always)]
20    pub(crate) fn new(bits: u32) -> Self {
21        FRC2_COUNT_R(crate::FieldReader::new(bits))
22    }
23}
24impl core::ops::Deref for FRC2_COUNT_R {
25    type Target = crate::FieldReader<u32, u32>;
26    #[inline(always)]
27    fn deref(&self) -> &Self::Target {
28        &self.0
29    }
30}
31impl R {
32    #[doc = "Bits 0:31 - the current value of the counter. It is a increasingcounter."]
33    #[inline(always)]
34    pub fn frc2_count(&self) -> FRC2_COUNT_R {
35        FRC2_COUNT_R::new(self.bits)
36    }
37}
38#[doc = "the current value of the counter. It is a increasingcounter.\n\nThis register you can [`read`]
39(crate::generic::Reg::read). See [API]
40(https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [frc2_count]
41(index.html) module"]
42pub struct FRC2_COUNT_SPEC;
43impl crate::RegisterSpec for FRC2_COUNT_SPEC {
44    type Ux = u32;
45}
46#[doc = "`read()` method returns [frc2_count::R]
47(R) reader structure"]
48impl crate::Readable for FRC2_COUNT_SPEC {
49    type Reader = R;
50}
51#[doc = "`reset()` method sets FRC2_COUNT to value 0"]
52impl crate::Resettable for FRC2_COUNT_SPEC {
53    #[inline(always)]
54    fn reset_value() -> Self::Ux {
55        0
56    }
57}