esp32c2/systimer/unit_value/
hi.rs

1#[doc = "Register `HI` reader"]
2pub type R = crate::R<HI_SPEC>;
3#[doc = "Field `VALUE_HI` reader - timer read value high 20bits"]
4pub type VALUE_HI_R = crate::FieldReader<u32>;
5impl R {
6    #[doc = "Bits 0:19 - timer read value high 20bits"]
7    #[inline(always)]
8    pub fn value_hi(&self) -> VALUE_HI_R {
9        VALUE_HI_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("HI")
16            .field("value_hi", &self.value_hi())
17            .finish()
18    }
19}
20#[doc = "system timer unit0 value high register\n\nYou can [`read`](crate::Reg::read) this register and get [`hi::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
21pub struct HI_SPEC;
22impl crate::RegisterSpec for HI_SPEC {
23    type Ux = u32;
24}
25#[doc = "`read()` method returns [`hi::R`](R) reader structure"]
26impl crate::Readable for HI_SPEC {}
27#[doc = "`reset()` method sets HI to value 0"]
28impl crate::Resettable for HI_SPEC {
29    const RESET_VALUE: u32 = 0;
30}