esp32s3/system/
redundant_eco_ctrl.rs

1#[doc = "Register `REDUNDANT_ECO_CTRL` reader"]
2pub type R = crate::R<REDUNDANT_ECO_CTRL_SPEC>;
3#[doc = "Register `REDUNDANT_ECO_CTRL` writer"]
4pub type W = crate::W<REDUNDANT_ECO_CTRL_SPEC>;
5#[doc = "Field `REDUNDANT_ECO_DRIVE` reader - ******* Description ***********"]
6pub type REDUNDANT_ECO_DRIVE_R = crate::BitReader;
7#[doc = "Field `REDUNDANT_ECO_DRIVE` writer - ******* Description ***********"]
8pub type REDUNDANT_ECO_DRIVE_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `REDUNDANT_ECO_RESULT` reader - ******* Description ***********"]
10pub type REDUNDANT_ECO_RESULT_R = crate::BitReader;
11impl R {
12    #[doc = "Bit 0 - ******* Description ***********"]
13    #[inline(always)]
14    pub fn redundant_eco_drive(&self) -> REDUNDANT_ECO_DRIVE_R {
15        REDUNDANT_ECO_DRIVE_R::new((self.bits & 1) != 0)
16    }
17    #[doc = "Bit 1 - ******* Description ***********"]
18    #[inline(always)]
19    pub fn redundant_eco_result(&self) -> REDUNDANT_ECO_RESULT_R {
20        REDUNDANT_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("REDUNDANT_ECO_CTRL")
27            .field("redundant_eco_drive", &self.redundant_eco_drive())
28            .field("redundant_eco_result", &self.redundant_eco_result())
29            .finish()
30    }
31}
32impl W {
33    #[doc = "Bit 0 - ******* Description ***********"]
34    #[inline(always)]
35    pub fn redundant_eco_drive(&mut self) -> REDUNDANT_ECO_DRIVE_W<REDUNDANT_ECO_CTRL_SPEC> {
36        REDUNDANT_ECO_DRIVE_W::new(self, 0)
37    }
38}
39#[doc = "******* Description ***********\n\nYou can [`read`](crate::Reg::read) this register and get [`redundant_eco_ctrl::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`redundant_eco_ctrl::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
40pub struct REDUNDANT_ECO_CTRL_SPEC;
41impl crate::RegisterSpec for REDUNDANT_ECO_CTRL_SPEC {
42    type Ux = u32;
43}
44#[doc = "`read()` method returns [`redundant_eco_ctrl::R`](R) reader structure"]
45impl crate::Readable for REDUNDANT_ECO_CTRL_SPEC {}
46#[doc = "`write(|w| ..)` method takes [`redundant_eco_ctrl::W`](W) writer structure"]
47impl crate::Writable for REDUNDANT_ECO_CTRL_SPEC {
48    type Safety = crate::Unsafe;
49    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
50    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
51}
52#[doc = "`reset()` method sets REDUNDANT_ECO_CTRL to value 0"]
53impl crate::Resettable for REDUNDANT_ECO_CTRL_SPEC {
54    const RESET_VALUE: u32 = 0;
55}