lpc82x_pac/syscon/
pioporcap0.rs

1#[doc = "Register `PIOPORCAP0` reader"]
2pub struct R(crate::R<PIOPORCAP0_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<PIOPORCAP0_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<PIOPORCAP0_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<PIOPORCAP0_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `PIOPORCAP0` writer"]
17pub struct W(crate::W<PIOPORCAP0_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<PIOPORCAP0_SPEC>;
20    #[inline(always)]
21    fn deref(&self) -> &Self::Target {
22        &self.0
23    }
24}
25impl core::ops::DerefMut for W {
26    #[inline(always)]
27    fn deref_mut(&mut self) -> &mut Self::Target {
28        &mut self.0
29    }
30}
31impl From<crate::W<PIOPORCAP0_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<PIOPORCAP0_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `PIOSTAT` reader - State of PIO0_17 through PIO0_0 at power-on reset"]
38pub struct PIOSTAT_R(crate::FieldReader<u32, u32>);
39impl PIOSTAT_R {
40    pub(crate) fn new(bits: u32) -> Self {
41        PIOSTAT_R(crate::FieldReader::new(bits))
42    }
43}
44impl core::ops::Deref for PIOSTAT_R {
45    type Target = crate::FieldReader<u32, u32>;
46    #[inline(always)]
47    fn deref(&self) -> &Self::Target {
48        &self.0
49    }
50}
51impl R {
52    #[doc = "Bits 0:17 - State of PIO0_17 through PIO0_0 at power-on reset"]
53    #[inline(always)]
54    pub fn piostat(&self) -> PIOSTAT_R {
55        PIOSTAT_R::new((self.bits & 0x0003_ffff) as u32)
56    }
57}
58impl W {
59    #[doc = "Writes raw bits to the register."]
60    #[inline(always)]
61    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
62        self.0.bits(bits);
63        self
64    }
65}
66#[doc = "POR captured PIO status 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [pioporcap0](index.html) module"]
67pub struct PIOPORCAP0_SPEC;
68impl crate::RegisterSpec for PIOPORCAP0_SPEC {
69    type Ux = u32;
70}
71#[doc = "`read()` method returns [pioporcap0::R](R) reader structure"]
72impl crate::Readable for PIOPORCAP0_SPEC {
73    type Reader = R;
74}
75#[doc = "`write(|w| ..)` method takes [pioporcap0::W](W) writer structure"]
76impl crate::Writable for PIOPORCAP0_SPEC {
77    type Writer = W;
78}
79#[doc = "`reset()` method sets PIOPORCAP0 to value 0"]
80impl crate::Resettable for PIOPORCAP0_SPEC {
81    #[inline(always)]
82    fn reset_value() -> Self::Ux {
83        0
84    }
85}