esp32p4/lp_timer/
tar1_high.rs1#[doc = "Register `TAR1_HIGH` reader"]
2pub type R = crate::R<TAR1_HIGH_SPEC>;
3#[doc = "Register `TAR1_HIGH` writer"]
4pub type W = crate::W<TAR1_HIGH_SPEC>;
5#[doc = "Field `MAIN_TIMER_TAR_HIGH1` reader - need_des"]
6pub type MAIN_TIMER_TAR_HIGH1_R = crate::FieldReader<u16>;
7#[doc = "Field `MAIN_TIMER_TAR_HIGH1` writer - need_des"]
8pub type MAIN_TIMER_TAR_HIGH1_W<'a, REG> = crate::FieldWriter<'a, REG, 16, u16>;
9#[doc = "Field `MAIN_TIMER_TAR_EN1` writer - need_des"]
10pub type MAIN_TIMER_TAR_EN1_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_high1(&self) -> MAIN_TIMER_TAR_HIGH1_R {
15 MAIN_TIMER_TAR_HIGH1_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("TAR1_HIGH")
22 .field(
23 "main_timer_tar_high1",
24 &format_args!("{}", self.main_timer_tar_high1().bits()),
25 )
26 .finish()
27 }
28}
29#[cfg(feature = "impl-register-debug")]
30impl core::fmt::Debug for crate::generic::Reg<TAR1_HIGH_SPEC> {
31 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
32 core::fmt::Debug::fmt(&self.read(), f)
33 }
34}
35impl W {
36 #[doc = "Bits 0:15 - need_des"]
37 #[inline(always)]
38 #[must_use]
39 pub fn main_timer_tar_high1(&mut self) -> MAIN_TIMER_TAR_HIGH1_W<TAR1_HIGH_SPEC> {
40 MAIN_TIMER_TAR_HIGH1_W::new(self, 0)
41 }
42 #[doc = "Bit 31 - need_des"]
43 #[inline(always)]
44 #[must_use]
45 pub fn main_timer_tar_en1(&mut self) -> MAIN_TIMER_TAR_EN1_W<TAR1_HIGH_SPEC> {
46 MAIN_TIMER_TAR_EN1_W::new(self, 31)
47 }
48}
49#[doc = "need_des\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`tar1_high::R`](R). You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`tar1_high::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
50pub struct TAR1_HIGH_SPEC;
51impl crate::RegisterSpec for TAR1_HIGH_SPEC {
52 type Ux = u32;
53}
54#[doc = "`read()` method returns [`tar1_high::R`](R) reader structure"]
55impl crate::Readable for TAR1_HIGH_SPEC {}
56#[doc = "`write(|w| ..)` method takes [`tar1_high::W`](W) writer structure"]
57impl crate::Writable for TAR1_HIGH_SPEC {
58 type Safety = crate::Unsafe;
59 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
60 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
61}
62#[doc = "`reset()` method sets TAR1_HIGH to value 0"]
63impl crate::Resettable for TAR1_HIGH_SPEC {
64 const RESET_VALUE: u32 = 0;
65}