esp32p4/usb_device/
eco_cell_ctrl_apb.rs1#[doc = "Register `ECO_CELL_CTRL_APB` reader"]
2pub type R = crate::R<ECO_CELL_CTRL_APB_SPEC>;
3#[doc = "Register `ECO_CELL_CTRL_APB` writer"]
4pub type W = crate::W<ECO_CELL_CTRL_APB_SPEC>;
5#[doc = "Field `RDN_RESULT_APB` reader - Reserved."]
6pub type RDN_RESULT_APB_R = crate::BitReader;
7#[doc = "Field `RDN_ENA_APB` reader - Reserved."]
8pub type RDN_ENA_APB_R = crate::BitReader;
9#[doc = "Field `RDN_ENA_APB` writer - Reserved."]
10pub type RDN_ENA_APB_W<'a, REG> = crate::BitWriter<'a, REG>;
11impl R {
12 #[doc = "Bit 0 - Reserved."]
13 #[inline(always)]
14 pub fn rdn_result_apb(&self) -> RDN_RESULT_APB_R {
15 RDN_RESULT_APB_R::new((self.bits & 1) != 0)
16 }
17 #[doc = "Bit 1 - Reserved."]
18 #[inline(always)]
19 pub fn rdn_ena_apb(&self) -> RDN_ENA_APB_R {
20 RDN_ENA_APB_R::new(((self.bits >> 1) & 1) != 0)
21 }
22}
23#[cfg(feature = "impl-register-debug")]
24impl core::fmt::Debug for R {
25 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
26 f.debug_struct("ECO_CELL_CTRL_APB")
27 .field(
28 "rdn_result_apb",
29 &format_args!("{}", self.rdn_result_apb().bit()),
30 )
31 .field("rdn_ena_apb", &format_args!("{}", self.rdn_ena_apb().bit()))
32 .finish()
33 }
34}
35#[cfg(feature = "impl-register-debug")]
36impl core::fmt::Debug for crate::generic::Reg<ECO_CELL_CTRL_APB_SPEC> {
37 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
38 core::fmt::Debug::fmt(&self.read(), f)
39 }
40}
41impl W {
42 #[doc = "Bit 1 - Reserved."]
43 #[inline(always)]
44 #[must_use]
45 pub fn rdn_ena_apb(&mut self) -> RDN_ENA_APB_W<ECO_CELL_CTRL_APB_SPEC> {
46 RDN_ENA_APB_W::new(self, 1)
47 }
48}
49#[doc = "Reserved.\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`eco_cell_ctrl_apb::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 [`eco_cell_ctrl_apb::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
50pub struct ECO_CELL_CTRL_APB_SPEC;
51impl crate::RegisterSpec for ECO_CELL_CTRL_APB_SPEC {
52 type Ux = u32;
53}
54#[doc = "`read()` method returns [`eco_cell_ctrl_apb::R`](R) reader structure"]
55impl crate::Readable for ECO_CELL_CTRL_APB_SPEC {}
56#[doc = "`write(|w| ..)` method takes [`eco_cell_ctrl_apb::W`](W) writer structure"]
57impl crate::Writable for ECO_CELL_CTRL_APB_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 ECO_CELL_CTRL_APB to value 0"]
63impl crate::Resettable for ECO_CELL_CTRL_APB_SPEC {
64 const RESET_VALUE: u32 = 0;
65}