esp32c6_lp/lp_timer/
tar0_high.rs

1#[doc = "Register `TAR0_HIGH` reader"]
2pub type R = crate::R<TAR0_HIGH_SPEC>;
3#[doc = "Register `TAR0_HIGH` writer"]
4pub type W = crate::W<TAR0_HIGH_SPEC>;
5#[doc = "Field `MAIN_TIMER_TAR_HIGH0` reader - need_des"]
6pub type MAIN_TIMER_TAR_HIGH0_R = crate::FieldReader<u16>;
7#[doc = "Field `MAIN_TIMER_TAR_HIGH0` writer - need_des"]
8pub type MAIN_TIMER_TAR_HIGH0_W<'a, REG> = crate::FieldWriter<'a, REG, 16, u16>;
9#[doc = "Field `MAIN_TIMER_TAR_EN0` writer - need_des"]
10pub type MAIN_TIMER_TAR_EN0_W<'a, REG> = crate::BitWriter<'a, REG>;
11impl R {
12    #[doc = "Bits 0:15 - need_des"]
13    #[inline(always)]
14    pub fn main_timer_tar_high0(&self) -> MAIN_TIMER_TAR_HIGH0_R {
15        MAIN_TIMER_TAR_HIGH0_R::new((self.bits & 0xffff) as u16)
16    }
17}
18#[cfg(feature = "impl-register-debug")]
19impl core::fmt::Debug for R {
20    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
21        f.debug_struct("TAR0_HIGH")
22            .field("main_timer_tar_high0", &self.main_timer_tar_high0())
23            .finish()
24    }
25}
26impl W {
27    #[doc = "Bits 0:15 - need_des"]
28    #[inline(always)]
29    #[must_use]
30    pub fn main_timer_tar_high0(&mut self) -> MAIN_TIMER_TAR_HIGH0_W<TAR0_HIGH_SPEC> {
31        MAIN_TIMER_TAR_HIGH0_W::new(self, 0)
32    }
33    #[doc = "Bit 31 - need_des"]
34    #[inline(always)]
35    #[must_use]
36    pub fn main_timer_tar_en0(&mut self) -> MAIN_TIMER_TAR_EN0_W<TAR0_HIGH_SPEC> {
37        MAIN_TIMER_TAR_EN0_W::new(self, 31)
38    }
39}
40#[doc = "need_des\n\nYou can [`read`](crate::Reg::read) this register and get [`tar0_high::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`tar0_high::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
41pub struct TAR0_HIGH_SPEC;
42impl crate::RegisterSpec for TAR0_HIGH_SPEC {
43    type Ux = u32;
44}
45#[doc = "`read()` method returns [`tar0_high::R`](R) reader structure"]
46impl crate::Readable for TAR0_HIGH_SPEC {}
47#[doc = "`write(|w| ..)` method takes [`tar0_high::W`](W) writer structure"]
48impl crate::Writable for TAR0_HIGH_SPEC {
49    type Safety = crate::Unsafe;
50    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
51    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
52}
53#[doc = "`reset()` method sets TAR0_HIGH to value 0"]
54impl crate::Resettable for TAR0_HIGH_SPEC {
55    const RESET_VALUE: u32 = 0;
56}