esp32p4/uart0/
pospulse.rs

1#[doc = "Register `POSPULSE` reader"]
2pub type R = crate::R<POSPULSE_SPEC>;
3#[doc = "Field `POSEDGE_MIN_CNT` reader - This register stores the minimal input clock count between two positive edges. It is used in boudrate-detect process."]
4pub type POSEDGE_MIN_CNT_R = crate::FieldReader<u16>;
5impl R {
6    #[doc = "Bits 0:11 - This register stores the minimal input clock count between two positive edges. It is used in boudrate-detect process."]
7    #[inline(always)]
8    pub fn posedge_min_cnt(&self) -> POSEDGE_MIN_CNT_R {
9        POSEDGE_MIN_CNT_R::new((self.bits & 0x0fff) 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("POSPULSE")
16            .field(
17                "posedge_min_cnt",
18                &format_args!("{}", self.posedge_min_cnt().bits()),
19            )
20            .finish()
21    }
22}
23#[cfg(feature = "impl-register-debug")]
24impl core::fmt::Debug for crate::generic::Reg<POSPULSE_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 = "Autobaud high pulse register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`pospulse::R`](R).  See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
30pub struct POSPULSE_SPEC;
31impl crate::RegisterSpec for POSPULSE_SPEC {
32    type Ux = u32;
33}
34#[doc = "`read()` method returns [`pospulse::R`](R) reader structure"]
35impl crate::Readable for POSPULSE_SPEC {}
36#[doc = "`reset()` method sets POSPULSE to value 0x0fff"]
37impl crate::Resettable for POSPULSE_SPEC {
38    const RESET_VALUE: u32 = 0x0fff;
39}