esp32/i2s0/
in_link.rs

1#[doc = "Register `IN_LINK` reader"]
2pub type R = crate::R<IN_LINK_SPEC>;
3#[doc = "Register `IN_LINK` writer"]
4pub type W = crate::W<IN_LINK_SPEC>;
5#[doc = "Field `INLINK_ADDR` reader - "]
6pub type INLINK_ADDR_R = crate::FieldReader<u32>;
7#[doc = "Field `INLINK_ADDR` writer - "]
8pub type INLINK_ADDR_W<'a, REG> = crate::FieldWriter<'a, REG, 20, u32>;
9#[doc = "Field `INLINK_STOP` reader - "]
10pub type INLINK_STOP_R = crate::BitReader;
11#[doc = "Field `INLINK_STOP` writer - "]
12pub type INLINK_STOP_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `INLINK_START` reader - "]
14pub type INLINK_START_R = crate::BitReader;
15#[doc = "Field `INLINK_START` writer - "]
16pub type INLINK_START_W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `INLINK_RESTART` reader - "]
18pub type INLINK_RESTART_R = crate::BitReader;
19#[doc = "Field `INLINK_RESTART` writer - "]
20pub type INLINK_RESTART_W<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `INLINK_PARK` reader - "]
22pub type INLINK_PARK_R = crate::BitReader;
23impl R {
24    #[doc = "Bits 0:19"]
25    #[inline(always)]
26    pub fn inlink_addr(&self) -> INLINK_ADDR_R {
27        INLINK_ADDR_R::new(self.bits & 0x000f_ffff)
28    }
29    #[doc = "Bit 28"]
30    #[inline(always)]
31    pub fn inlink_stop(&self) -> INLINK_STOP_R {
32        INLINK_STOP_R::new(((self.bits >> 28) & 1) != 0)
33    }
34    #[doc = "Bit 29"]
35    #[inline(always)]
36    pub fn inlink_start(&self) -> INLINK_START_R {
37        INLINK_START_R::new(((self.bits >> 29) & 1) != 0)
38    }
39    #[doc = "Bit 30"]
40    #[inline(always)]
41    pub fn inlink_restart(&self) -> INLINK_RESTART_R {
42        INLINK_RESTART_R::new(((self.bits >> 30) & 1) != 0)
43    }
44    #[doc = "Bit 31"]
45    #[inline(always)]
46    pub fn inlink_park(&self) -> INLINK_PARK_R {
47        INLINK_PARK_R::new(((self.bits >> 31) & 1) != 0)
48    }
49}
50#[cfg(feature = "impl-register-debug")]
51impl core::fmt::Debug for R {
52    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
53        f.debug_struct("IN_LINK")
54            .field("inlink_addr", &self.inlink_addr())
55            .field("inlink_stop", &self.inlink_stop())
56            .field("inlink_start", &self.inlink_start())
57            .field("inlink_restart", &self.inlink_restart())
58            .field("inlink_park", &self.inlink_park())
59            .finish()
60    }
61}
62impl W {
63    #[doc = "Bits 0:19"]
64    #[inline(always)]
65    pub fn inlink_addr(&mut self) -> INLINK_ADDR_W<IN_LINK_SPEC> {
66        INLINK_ADDR_W::new(self, 0)
67    }
68    #[doc = "Bit 28"]
69    #[inline(always)]
70    pub fn inlink_stop(&mut self) -> INLINK_STOP_W<IN_LINK_SPEC> {
71        INLINK_STOP_W::new(self, 28)
72    }
73    #[doc = "Bit 29"]
74    #[inline(always)]
75    pub fn inlink_start(&mut self) -> INLINK_START_W<IN_LINK_SPEC> {
76        INLINK_START_W::new(self, 29)
77    }
78    #[doc = "Bit 30"]
79    #[inline(always)]
80    pub fn inlink_restart(&mut self) -> INLINK_RESTART_W<IN_LINK_SPEC> {
81        INLINK_RESTART_W::new(self, 30)
82    }
83}
84#[doc = "\n\nYou can [`read`](crate::Reg::read) this register and get [`in_link::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`in_link::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
85pub struct IN_LINK_SPEC;
86impl crate::RegisterSpec for IN_LINK_SPEC {
87    type Ux = u32;
88}
89#[doc = "`read()` method returns [`in_link::R`](R) reader structure"]
90impl crate::Readable for IN_LINK_SPEC {}
91#[doc = "`write(|w| ..)` method takes [`in_link::W`](W) writer structure"]
92impl crate::Writable for IN_LINK_SPEC {
93    type Safety = crate::Unsafe;
94}
95#[doc = "`reset()` method sets IN_LINK to value 0"]
96impl crate::Resettable for IN_LINK_SPEC {}