esp32p4/adc/
rnd_eco_cs.rs1#[doc = "Register `RND_ECO_CS` reader"]
2pub type R = crate::R<RND_ECO_CS_SPEC>;
3#[doc = "Register `RND_ECO_CS` writer"]
4pub type W = crate::W<RND_ECO_CS_SPEC>;
5#[doc = "Field `RND_ECO_EN` reader - need_des"]
6pub type RND_ECO_EN_R = crate::BitReader;
7#[doc = "Field `RND_ECO_EN` writer - need_des"]
8pub type RND_ECO_EN_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `RND_ECO_RESULT` reader - need_des"]
10pub type RND_ECO_RESULT_R = crate::BitReader;
11impl R {
12 #[doc = "Bit 0 - need_des"]
13 #[inline(always)]
14 pub fn rnd_eco_en(&self) -> RND_ECO_EN_R {
15 RND_ECO_EN_R::new((self.bits & 1) != 0)
16 }
17 #[doc = "Bit 1 - need_des"]
18 #[inline(always)]
19 pub fn rnd_eco_result(&self) -> RND_ECO_RESULT_R {
20 RND_ECO_RESULT_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("RND_ECO_CS")
27 .field("rnd_eco_en", &format_args!("{}", self.rnd_eco_en().bit()))
28 .field(
29 "rnd_eco_result",
30 &format_args!("{}", self.rnd_eco_result().bit()),
31 )
32 .finish()
33 }
34}
35#[cfg(feature = "impl-register-debug")]
36impl core::fmt::Debug for crate::generic::Reg<RND_ECO_CS_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 0 - need_des"]
43 #[inline(always)]
44 #[must_use]
45 pub fn rnd_eco_en(&mut self) -> RND_ECO_EN_W<RND_ECO_CS_SPEC> {
46 RND_ECO_EN_W::new(self, 0)
47 }
48}
49#[doc = "Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`rnd_eco_cs::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 [`rnd_eco_cs::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
50pub struct RND_ECO_CS_SPEC;
51impl crate::RegisterSpec for RND_ECO_CS_SPEC {
52 type Ux = u32;
53}
54#[doc = "`read()` method returns [`rnd_eco_cs::R`](R) reader structure"]
55impl crate::Readable for RND_ECO_CS_SPEC {}
56#[doc = "`write(|w| ..)` method takes [`rnd_eco_cs::W`](W) writer structure"]
57impl crate::Writable for RND_ECO_CS_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 RND_ECO_CS to value 0"]
63impl crate::Resettable for RND_ECO_CS_SPEC {
64 const RESET_VALUE: u32 = 0;
65}