esp32p4/lp_i2s0/
vad_ob1.rs

1#[doc = "Register `VAD_OB1` reader"]
2pub type R = crate::R<VAD_OB1_SPEC>;
3#[doc = "Field `MAX_SIGNAL1_OB` reader - Reg max signal1 observe"]
4pub type MAX_SIGNAL1_OB_R = crate::FieldReader<u16>;
5#[doc = "Field `MAX_SIGNAL2_OB` reader - Reg max signal2 observe"]
6pub type MAX_SIGNAL2_OB_R = crate::FieldReader<u16>;
7impl R {
8    #[doc = "Bits 0:15 - Reg max signal1 observe"]
9    #[inline(always)]
10    pub fn max_signal1_ob(&self) -> MAX_SIGNAL1_OB_R {
11        MAX_SIGNAL1_OB_R::new((self.bits & 0xffff) as u16)
12    }
13    #[doc = "Bits 16:31 - Reg max signal2 observe"]
14    #[inline(always)]
15    pub fn max_signal2_ob(&self) -> MAX_SIGNAL2_OB_R {
16        MAX_SIGNAL2_OB_R::new(((self.bits >> 16) & 0xffff) as u16)
17    }
18}
19#[cfg(feature = "impl-register-debug")]
20impl core::fmt::Debug for R {
21    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
22        f.debug_struct("VAD_OB1")
23            .field(
24                "max_signal1_ob",
25                &format_args!("{}", self.max_signal1_ob().bits()),
26            )
27            .field(
28                "max_signal2_ob",
29                &format_args!("{}", self.max_signal2_ob().bits()),
30            )
31            .finish()
32    }
33}
34#[cfg(feature = "impl-register-debug")]
35impl core::fmt::Debug for crate::generic::Reg<VAD_OB1_SPEC> {
36    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
37        core::fmt::Debug::fmt(&self.read(), f)
38    }
39}
40#[doc = "I2S VAD Observe register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`vad_ob1::R`](R).  See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
41pub struct VAD_OB1_SPEC;
42impl crate::RegisterSpec for VAD_OB1_SPEC {
43    type Ux = u32;
44}
45#[doc = "`read()` method returns [`vad_ob1::R`](R) reader structure"]
46impl crate::Readable for VAD_OB1_SPEC {}
47#[doc = "`reset()` method sets VAD_OB1 to value 0"]
48impl crate::Resettable for VAD_OB1_SPEC {
49    const RESET_VALUE: u32 = 0;
50}