esp32p4/hp_sys/
probeb_ctrl.rs1#[doc = "Register `PROBEB_CTRL` reader"]
2pub type R = crate::R<PROBEB_CTRL_SPEC>;
3#[doc = "Register `PROBEB_CTRL` writer"]
4pub type W = crate::W<PROBEB_CTRL_SPEC>;
5#[doc = "Field `REG_PROBE_B_MOD_SEL` reader - Tihs field is used to selec probe_group from probe_group0 to probe_group15 for module's probe_out\\[31:0\\] in b mode."]
6pub type REG_PROBE_B_MOD_SEL_R = crate::FieldReader<u16>;
7#[doc = "Field `REG_PROBE_B_MOD_SEL` writer - Tihs field is used to selec probe_group from probe_group0 to probe_group15 for module's probe_out\\[31:0\\] in b mode."]
8pub type REG_PROBE_B_MOD_SEL_W<'a, REG> = crate::FieldWriter<'a, REG, 16, u16>;
9#[doc = "Field `REG_PROBE_B_TOP_SEL` reader - Tihs field is used to select module's probe_out\\[31:0\\] as probe_out in b mode"]
10pub type REG_PROBE_B_TOP_SEL_R = crate::FieldReader;
11#[doc = "Field `REG_PROBE_B_TOP_SEL` writer - Tihs field is used to select module's probe_out\\[31:0\\] as probe_out in b mode"]
12pub type REG_PROBE_B_TOP_SEL_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
13#[doc = "Field `REG_PROBE_B_EN` reader - Set this bit to enable b mode for debug probe. 1: b mode, 0: a mode."]
14pub type REG_PROBE_B_EN_R = crate::BitReader;
15#[doc = "Field `REG_PROBE_B_EN` writer - Set this bit to enable b mode for debug probe. 1: b mode, 0: a mode."]
16pub type REG_PROBE_B_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
17impl R {
18 #[doc = "Bits 0:15 - Tihs field is used to selec probe_group from probe_group0 to probe_group15 for module's probe_out\\[31:0\\] in b mode."]
19 #[inline(always)]
20 pub fn reg_probe_b_mod_sel(&self) -> REG_PROBE_B_MOD_SEL_R {
21 REG_PROBE_B_MOD_SEL_R::new((self.bits & 0xffff) as u16)
22 }
23 #[doc = "Bits 16:23 - Tihs field is used to select module's probe_out\\[31:0\\] as probe_out in b mode"]
24 #[inline(always)]
25 pub fn reg_probe_b_top_sel(&self) -> REG_PROBE_B_TOP_SEL_R {
26 REG_PROBE_B_TOP_SEL_R::new(((self.bits >> 16) & 0xff) as u8)
27 }
28 #[doc = "Bit 24 - Set this bit to enable b mode for debug probe. 1: b mode, 0: a mode."]
29 #[inline(always)]
30 pub fn reg_probe_b_en(&self) -> REG_PROBE_B_EN_R {
31 REG_PROBE_B_EN_R::new(((self.bits >> 24) & 1) != 0)
32 }
33}
34#[cfg(feature = "impl-register-debug")]
35impl core::fmt::Debug for R {
36 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
37 f.debug_struct("PROBEB_CTRL")
38 .field(
39 "reg_probe_b_mod_sel",
40 &format_args!("{}", self.reg_probe_b_mod_sel().bits()),
41 )
42 .field(
43 "reg_probe_b_top_sel",
44 &format_args!("{}", self.reg_probe_b_top_sel().bits()),
45 )
46 .field(
47 "reg_probe_b_en",
48 &format_args!("{}", self.reg_probe_b_en().bit()),
49 )
50 .finish()
51 }
52}
53#[cfg(feature = "impl-register-debug")]
54impl core::fmt::Debug for crate::generic::Reg<PROBEB_CTRL_SPEC> {
55 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
56 core::fmt::Debug::fmt(&self.read(), f)
57 }
58}
59impl W {
60 #[doc = "Bits 0:15 - Tihs field is used to selec probe_group from probe_group0 to probe_group15 for module's probe_out\\[31:0\\] in b mode."]
61 #[inline(always)]
62 #[must_use]
63 pub fn reg_probe_b_mod_sel(&mut self) -> REG_PROBE_B_MOD_SEL_W<PROBEB_CTRL_SPEC> {
64 REG_PROBE_B_MOD_SEL_W::new(self, 0)
65 }
66 #[doc = "Bits 16:23 - Tihs field is used to select module's probe_out\\[31:0\\] as probe_out in b mode"]
67 #[inline(always)]
68 #[must_use]
69 pub fn reg_probe_b_top_sel(&mut self) -> REG_PROBE_B_TOP_SEL_W<PROBEB_CTRL_SPEC> {
70 REG_PROBE_B_TOP_SEL_W::new(self, 16)
71 }
72 #[doc = "Bit 24 - Set this bit to enable b mode for debug probe. 1: b mode, 0: a mode."]
73 #[inline(always)]
74 #[must_use]
75 pub fn reg_probe_b_en(&mut self) -> REG_PROBE_B_EN_W<PROBEB_CTRL_SPEC> {
76 REG_PROBE_B_EN_W::new(self, 24)
77 }
78}
79#[doc = "NA\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`probeb_ctrl::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 [`probeb_ctrl::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
80pub struct PROBEB_CTRL_SPEC;
81impl crate::RegisterSpec for PROBEB_CTRL_SPEC {
82 type Ux = u32;
83}
84#[doc = "`read()` method returns [`probeb_ctrl::R`](R) reader structure"]
85impl crate::Readable for PROBEB_CTRL_SPEC {}
86#[doc = "`write(|w| ..)` method takes [`probeb_ctrl::W`](W) writer structure"]
87impl crate::Writable for PROBEB_CTRL_SPEC {
88 type Safety = crate::Unsafe;
89 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
90 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
91}
92#[doc = "`reset()` method sets PROBEB_CTRL to value 0"]
93impl crate::Resettable for PROBEB_CTRL_SPEC {
94 const RESET_VALUE: u32 = 0;
95}