esp32c2/apb_ctrl/
redcy_sig1.rs

1#[doc = "Register `REDCY_SIG1` reader"]
2pub type R = crate::R<REDCY_SIG1_SPEC>;
3#[doc = "Register `REDCY_SIG1` writer"]
4pub type W = crate::W<REDCY_SIG1_SPEC>;
5#[doc = "Field `REDCY_SIG1` reader - reg_redcy_sig1"]
6pub type REDCY_SIG1_R = crate::FieldReader<u32>;
7#[doc = "Field `REDCY_SIG1` writer - reg_redcy_sig1"]
8pub type REDCY_SIG1_W<'a, REG> = crate::FieldWriter<'a, REG, 31, u32>;
9#[doc = "Field `REDCY_NANDOR` reader - reg_redcy_nandor"]
10pub type REDCY_NANDOR_R = crate::BitReader;
11impl R {
12    #[doc = "Bits 0:30 - reg_redcy_sig1"]
13    #[inline(always)]
14    pub fn redcy_sig1(&self) -> REDCY_SIG1_R {
15        REDCY_SIG1_R::new(self.bits & 0x7fff_ffff)
16    }
17    #[doc = "Bit 31 - reg_redcy_nandor"]
18    #[inline(always)]
19    pub fn redcy_nandor(&self) -> REDCY_NANDOR_R {
20        REDCY_NANDOR_R::new(((self.bits >> 31) & 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("REDCY_SIG1")
27            .field("redcy_sig1", &self.redcy_sig1())
28            .field("redcy_nandor", &self.redcy_nandor())
29            .finish()
30    }
31}
32impl W {
33    #[doc = "Bits 0:30 - reg_redcy_sig1"]
34    #[inline(always)]
35    pub fn redcy_sig1(&mut self) -> REDCY_SIG1_W<REDCY_SIG1_SPEC> {
36        REDCY_SIG1_W::new(self, 0)
37    }
38}
39#[doc = "APB_CTRL_REDCY_SIG1_REG_REG\n\nYou can [`read`](crate::Reg::read) this register and get [`redcy_sig1::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`redcy_sig1::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
40pub struct REDCY_SIG1_SPEC;
41impl crate::RegisterSpec for REDCY_SIG1_SPEC {
42    type Ux = u32;
43}
44#[doc = "`read()` method returns [`redcy_sig1::R`](R) reader structure"]
45impl crate::Readable for REDCY_SIG1_SPEC {}
46#[doc = "`write(|w| ..)` method takes [`redcy_sig1::W`](W) writer structure"]
47impl crate::Writable for REDCY_SIG1_SPEC {
48    type Safety = crate::Unsafe;
49}
50#[doc = "`reset()` method sets REDCY_SIG1 to value 0"]
51impl crate::Resettable for REDCY_SIG1_SPEC {}