esp32c2/ledc/timer/
value.rs1#[doc = "Register `VALUE` reader"]
2pub type R = crate::R<VALUE_SPEC>;
3#[doc = "Field `CNT` reader - This register stores the current counter value of timer %s."]
4pub type CNT_R = crate::FieldReader<u16>;
5impl R {
6 #[doc = "Bits 0:13 - This register stores the current counter value of timer %s."]
7 #[inline(always)]
8 pub fn cnt(&self) -> CNT_R {
9 CNT_R::new((self.bits & 0x3fff) as u16)
10 }
11}
12#[cfg(feature = "impl-register-debug")]
13impl core::fmt::Debug for R {
14 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
15 f.debug_struct("VALUE").field("cnt", &self.cnt()).finish()
16 }
17}
18#[doc = "Timer 0 current counter value\n\nYou can [`read`](crate::Reg::read) this register and get [`value::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
19pub struct VALUE_SPEC;
20impl crate::RegisterSpec for VALUE_SPEC {
21 type Ux = u32;
22}
23#[doc = "`read()` method returns [`value::R`](R) reader structure"]
24impl crate::Readable for VALUE_SPEC {}
25#[doc = "`reset()` method sets VALUE to value 0"]
26impl crate::Resettable for VALUE_SPEC {
27 const RESET_VALUE: u32 = 0;
28}