esp32c6_lp/lp_i2c_ana_mst/
i2c0_ctrl.rs

1#[doc = "Register `I2C0_CTRL` reader"]
2pub type R = crate::R<I2C0_CTRL_SPEC>;
3#[doc = "Register `I2C0_CTRL` writer"]
4pub type W = crate::W<I2C0_CTRL_SPEC>;
5#[doc = "Field `LP_I2C_ANA_MAST_I2C0_CTRL` reader - need_des"]
6pub type LP_I2C_ANA_MAST_I2C0_CTRL_R = crate::FieldReader<u32>;
7#[doc = "Field `LP_I2C_ANA_MAST_I2C0_CTRL` writer - need_des"]
8pub type LP_I2C_ANA_MAST_I2C0_CTRL_W<'a, REG> = crate::FieldWriter<'a, REG, 25, u32>;
9#[doc = "Field `LP_I2C_ANA_MAST_I2C0_BUSY` reader - need_des"]
10pub type LP_I2C_ANA_MAST_I2C0_BUSY_R = crate::BitReader;
11impl R {
12    #[doc = "Bits 0:24 - need_des"]
13    #[inline(always)]
14    pub fn lp_i2c_ana_mast_i2c0_ctrl(&self) -> LP_I2C_ANA_MAST_I2C0_CTRL_R {
15        LP_I2C_ANA_MAST_I2C0_CTRL_R::new(self.bits & 0x01ff_ffff)
16    }
17    #[doc = "Bit 25 - need_des"]
18    #[inline(always)]
19    pub fn lp_i2c_ana_mast_i2c0_busy(&self) -> LP_I2C_ANA_MAST_I2C0_BUSY_R {
20        LP_I2C_ANA_MAST_I2C0_BUSY_R::new(((self.bits >> 25) & 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("I2C0_CTRL")
27            .field(
28                "lp_i2c_ana_mast_i2c0_ctrl",
29                &self.lp_i2c_ana_mast_i2c0_ctrl(),
30            )
31            .field(
32                "lp_i2c_ana_mast_i2c0_busy",
33                &self.lp_i2c_ana_mast_i2c0_busy(),
34            )
35            .finish()
36    }
37}
38impl W {
39    #[doc = "Bits 0:24 - need_des"]
40    #[inline(always)]
41    #[must_use]
42    pub fn lp_i2c_ana_mast_i2c0_ctrl(&mut self) -> LP_I2C_ANA_MAST_I2C0_CTRL_W<I2C0_CTRL_SPEC> {
43        LP_I2C_ANA_MAST_I2C0_CTRL_W::new(self, 0)
44    }
45}
46#[doc = "need_des\n\nYou can [`read`](crate::Reg::read) this register and get [`i2c0_ctrl::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`i2c0_ctrl::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
47pub struct I2C0_CTRL_SPEC;
48impl crate::RegisterSpec for I2C0_CTRL_SPEC {
49    type Ux = u32;
50}
51#[doc = "`read()` method returns [`i2c0_ctrl::R`](R) reader structure"]
52impl crate::Readable for I2C0_CTRL_SPEC {}
53#[doc = "`write(|w| ..)` method takes [`i2c0_ctrl::W`](W) writer structure"]
54impl crate::Writable for I2C0_CTRL_SPEC {
55    type Safety = crate::Unsafe;
56    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
57    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
58}
59#[doc = "`reset()` method sets I2C0_CTRL to value 0"]
60impl crate::Resettable for I2C0_CTRL_SPEC {
61    const RESET_VALUE: u32 = 0;
62}