esp32c6_lp/lp_i2c_ana_mst/
device_en.rs

1#[doc = "Register `DEVICE_EN` reader"]
2pub type R = crate::R<DEVICE_EN_SPEC>;
3#[doc = "Register `DEVICE_EN` writer"]
4pub type W = crate::W<DEVICE_EN_SPEC>;
5#[doc = "Field `LP_I2C_ANA_MAST_I2C_DEVICE_EN` reader - need_des"]
6pub type LP_I2C_ANA_MAST_I2C_DEVICE_EN_R = crate::FieldReader<u16>;
7#[doc = "Field `LP_I2C_ANA_MAST_I2C_DEVICE_EN` writer - need_des"]
8pub type LP_I2C_ANA_MAST_I2C_DEVICE_EN_W<'a, REG> = crate::FieldWriter<'a, REG, 12, u16>;
9impl R {
10    #[doc = "Bits 0:11 - need_des"]
11    #[inline(always)]
12    pub fn lp_i2c_ana_mast_i2c_device_en(&self) -> LP_I2C_ANA_MAST_I2C_DEVICE_EN_R {
13        LP_I2C_ANA_MAST_I2C_DEVICE_EN_R::new((self.bits & 0x0fff) as u16)
14    }
15}
16#[cfg(feature = "impl-register-debug")]
17impl core::fmt::Debug for R {
18    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
19        f.debug_struct("DEVICE_EN")
20            .field(
21                "lp_i2c_ana_mast_i2c_device_en",
22                &self.lp_i2c_ana_mast_i2c_device_en(),
23            )
24            .finish()
25    }
26}
27impl W {
28    #[doc = "Bits 0:11 - need_des"]
29    #[inline(always)]
30    #[must_use]
31    pub fn lp_i2c_ana_mast_i2c_device_en(
32        &mut self,
33    ) -> LP_I2C_ANA_MAST_I2C_DEVICE_EN_W<DEVICE_EN_SPEC> {
34        LP_I2C_ANA_MAST_I2C_DEVICE_EN_W::new(self, 0)
35    }
36}
37#[doc = "need_des\n\nYou can [`read`](crate::Reg::read) this register and get [`device_en::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`device_en::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
38pub struct DEVICE_EN_SPEC;
39impl crate::RegisterSpec for DEVICE_EN_SPEC {
40    type Ux = u32;
41}
42#[doc = "`read()` method returns [`device_en::R`](R) reader structure"]
43impl crate::Readable for DEVICE_EN_SPEC {}
44#[doc = "`write(|w| ..)` method takes [`device_en::W`](W) writer structure"]
45impl crate::Writable for DEVICE_EN_SPEC {
46    type Safety = crate::Unsafe;
47    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
48    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
49}
50#[doc = "`reset()` method sets DEVICE_EN to value 0"]
51impl crate::Resettable for DEVICE_EN_SPEC {
52    const RESET_VALUE: u32 = 0;
53}