esp32p4/ledc/
timer_cnt_cap.rs1#[doc = "Register `TIMER%s_CNT_CAP` reader"]
2pub type R = crate::R<TIMER_CNT_CAP_SPEC>;
3#[doc = "Field `TIMER_CNT_CAP` reader - Represents the captured LEDC timer%s count value."]
4pub type TIMER_CNT_CAP_R = crate::FieldReader<u32>;
5impl R {
6 #[doc = "Bits 0:19 - Represents the captured LEDC timer%s count value."]
7 #[inline(always)]
8 pub fn timer_cnt_cap(&self) -> TIMER_CNT_CAP_R {
9 TIMER_CNT_CAP_R::new(self.bits & 0x000f_ffff)
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("TIMER_CNT_CAP")
16 .field(
17 "timer_cnt_cap",
18 &format_args!("{}", self.timer_cnt_cap().bits()),
19 )
20 .finish()
21 }
22}
23#[cfg(feature = "impl-register-debug")]
24impl core::fmt::Debug for crate::generic::Reg<TIMER_CNT_CAP_SPEC> {
25 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
26 core::fmt::Debug::fmt(&self.read(), f)
27 }
28}
29#[doc = "Ledc timer%s captured count value register.\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`timer_cnt_cap::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
30pub struct TIMER_CNT_CAP_SPEC;
31impl crate::RegisterSpec for TIMER_CNT_CAP_SPEC {
32 type Ux = u32;
33}
34#[doc = "`read()` method returns [`timer_cnt_cap::R`](R) reader structure"]
35impl crate::Readable for TIMER_CNT_CAP_SPEC {}
36#[doc = "`reset()` method sets TIMER%s_CNT_CAP to value 0"]
37impl crate::Resettable for TIMER_CNT_CAP_SPEC {
38 const RESET_VALUE: u32 = 0;
39}