esp32/dport/
host_inf_sel.rs1#[doc = "Register `HOST_INF_SEL` reader"]
2pub type R = crate::R<HOST_INF_SEL_SPEC>;
3#[doc = "Register `HOST_INF_SEL` writer"]
4pub type W = crate::W<HOST_INF_SEL_SPEC>;
5#[doc = "Field `PERI_IO_SWAP` reader - "]
6pub type PERI_IO_SWAP_R = crate::FieldReader;
7#[doc = "Field `PERI_IO_SWAP` writer - "]
8pub type PERI_IO_SWAP_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
9#[doc = "Field `LINK_DEVICE_SEL` reader - "]
10pub type LINK_DEVICE_SEL_R = crate::FieldReader;
11#[doc = "Field `LINK_DEVICE_SEL` writer - "]
12pub type LINK_DEVICE_SEL_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
13impl R {
14 #[doc = "Bits 0:7"]
15 #[inline(always)]
16 pub fn peri_io_swap(&self) -> PERI_IO_SWAP_R {
17 PERI_IO_SWAP_R::new((self.bits & 0xff) as u8)
18 }
19 #[doc = "Bits 8:15"]
20 #[inline(always)]
21 pub fn link_device_sel(&self) -> LINK_DEVICE_SEL_R {
22 LINK_DEVICE_SEL_R::new(((self.bits >> 8) & 0xff) as u8)
23 }
24}
25#[cfg(feature = "impl-register-debug")]
26impl core::fmt::Debug for R {
27 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
28 f.debug_struct("HOST_INF_SEL")
29 .field("peri_io_swap", &self.peri_io_swap())
30 .field("link_device_sel", &self.link_device_sel())
31 .finish()
32 }
33}
34impl W {
35 #[doc = "Bits 0:7"]
36 #[inline(always)]
37 pub fn peri_io_swap(&mut self) -> PERI_IO_SWAP_W<HOST_INF_SEL_SPEC> {
38 PERI_IO_SWAP_W::new(self, 0)
39 }
40 #[doc = "Bits 8:15"]
41 #[inline(always)]
42 pub fn link_device_sel(&mut self) -> LINK_DEVICE_SEL_W<HOST_INF_SEL_SPEC> {
43 LINK_DEVICE_SEL_W::new(self, 8)
44 }
45}
46#[doc = "\n\nYou can [`read`](crate::Reg::read) this register and get [`host_inf_sel::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`host_inf_sel::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
47pub struct HOST_INF_SEL_SPEC;
48impl crate::RegisterSpec for HOST_INF_SEL_SPEC {
49 type Ux = u32;
50}
51#[doc = "`read()` method returns [`host_inf_sel::R`](R) reader structure"]
52impl crate::Readable for HOST_INF_SEL_SPEC {}
53#[doc = "`write(|w| ..)` method takes [`host_inf_sel::W`](W) writer structure"]
54impl crate::Writable for HOST_INF_SEL_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 HOST_INF_SEL to value 0"]
60impl crate::Resettable for HOST_INF_SEL_SPEC {
61 const RESET_VALUE: u32 = 0;
62}