stm32f1_staging/stm32f103/fsmc/
pio4.rs

1///Register `PIO4` reader
2pub type R = crate::R<PIO4rs>;
3///Register `PIO4` writer
4pub type W = crate::W<PIO4rs>;
5///Field `IOSETx` reader - IOSETx
6pub type IOSETX_R = crate::FieldReader;
7///Field `IOSETx` writer - IOSETx
8pub type IOSETX_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
9///Field `IOWAITx` reader - IOWAITx
10pub type IOWAITX_R = crate::FieldReader;
11///Field `IOWAITx` writer - IOWAITx
12pub type IOWAITX_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
13///Field `IOHOLDx` reader - IOHOLDx
14pub type IOHOLDX_R = crate::FieldReader;
15///Field `IOHOLDx` writer - IOHOLDx
16pub type IOHOLDX_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
17///Field `IOHIZx` reader - IOHIZx
18pub type IOHIZX_R = crate::FieldReader;
19///Field `IOHIZx` writer - IOHIZx
20pub type IOHIZX_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
21impl R {
22    ///Bits 0:7 - IOSETx
23    #[inline(always)]
24    pub fn iosetx(&self) -> IOSETX_R {
25        IOSETX_R::new((self.bits & 0xff) as u8)
26    }
27    ///Bits 8:15 - IOWAITx
28    #[inline(always)]
29    pub fn iowaitx(&self) -> IOWAITX_R {
30        IOWAITX_R::new(((self.bits >> 8) & 0xff) as u8)
31    }
32    ///Bits 16:23 - IOHOLDx
33    #[inline(always)]
34    pub fn ioholdx(&self) -> IOHOLDX_R {
35        IOHOLDX_R::new(((self.bits >> 16) & 0xff) as u8)
36    }
37    ///Bits 24:31 - IOHIZx
38    #[inline(always)]
39    pub fn iohizx(&self) -> IOHIZX_R {
40        IOHIZX_R::new(((self.bits >> 24) & 0xff) as u8)
41    }
42}
43impl core::fmt::Debug for R {
44    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
45        f.debug_struct("PIO4")
46            .field("iohizx", &self.iohizx())
47            .field("ioholdx", &self.ioholdx())
48            .field("iowaitx", &self.iowaitx())
49            .field("iosetx", &self.iosetx())
50            .finish()
51    }
52}
53impl W {
54    ///Bits 0:7 - IOSETx
55    #[inline(always)]
56    pub fn iosetx(&mut self) -> IOSETX_W<PIO4rs> {
57        IOSETX_W::new(self, 0)
58    }
59    ///Bits 8:15 - IOWAITx
60    #[inline(always)]
61    pub fn iowaitx(&mut self) -> IOWAITX_W<PIO4rs> {
62        IOWAITX_W::new(self, 8)
63    }
64    ///Bits 16:23 - IOHOLDx
65    #[inline(always)]
66    pub fn ioholdx(&mut self) -> IOHOLDX_W<PIO4rs> {
67        IOHOLDX_W::new(self, 16)
68    }
69    ///Bits 24:31 - IOHIZx
70    #[inline(always)]
71    pub fn iohizx(&mut self) -> IOHIZX_W<PIO4rs> {
72        IOHIZX_W::new(self, 24)
73    }
74}
75/**I/O space timing register 4
76
77You can [`read`](crate::Reg::read) this register and get [`pio4::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pio4::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
78
79See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F103.html#FSMC:PIO4)*/
80pub struct PIO4rs;
81impl crate::RegisterSpec for PIO4rs {
82    type Ux = u32;
83}
84///`read()` method returns [`pio4::R`](R) reader structure
85impl crate::Readable for PIO4rs {}
86///`write(|w| ..)` method takes [`pio4::W`](W) writer structure
87impl crate::Writable for PIO4rs {
88    type Safety = crate::Unsafe;
89}
90///`reset()` method sets PIO4 to value 0xfcfc_fcfc
91impl crate::Resettable for PIO4rs {
92    const RESET_VALUE: u32 = 0xfcfc_fcfc;
93}