1#[doc = "Register `PIN8` reader"]
2pub type R = crate::R<PIN8_SPEC>;
3#[doc = "Register `PIN8` writer"]
4pub type W = crate::W<PIN8_SPEC>;
5#[doc = "Field `REG_GPIO_PIN8_WAKEUP_ENABLE` reader - Reserved"]
6pub type REG_GPIO_PIN8_WAKEUP_ENABLE_R = crate::BitReader;
7#[doc = "Field `REG_GPIO_PIN8_WAKEUP_ENABLE` writer - Reserved"]
8pub type REG_GPIO_PIN8_WAKEUP_ENABLE_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `REG_GPIO_PIN8_INT_TYPE` reader - Reserved"]
10pub type REG_GPIO_PIN8_INT_TYPE_R = crate::FieldReader;
11#[doc = "Field `REG_GPIO_PIN8_INT_TYPE` writer - Reserved"]
12pub type REG_GPIO_PIN8_INT_TYPE_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
13#[doc = "Field `REG_GPIO_PIN8_PAD_DRIVER` reader - Reserved"]
14pub type REG_GPIO_PIN8_PAD_DRIVER_R = crate::BitReader;
15#[doc = "Field `REG_GPIO_PIN8_PAD_DRIVER` writer - Reserved"]
16pub type REG_GPIO_PIN8_PAD_DRIVER_W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `REG_GPI8_PIN0_EDGE_WAKEUP_CLR` writer - need des"]
18pub type REG_GPI8_PIN0_EDGE_WAKEUP_CLR_W<'a, REG> = crate::BitWriter<'a, REG>;
19impl R {
20 #[doc = "Bit 0 - Reserved"]
21 #[inline(always)]
22 pub fn reg_gpio_pin8_wakeup_enable(&self) -> REG_GPIO_PIN8_WAKEUP_ENABLE_R {
23 REG_GPIO_PIN8_WAKEUP_ENABLE_R::new((self.bits & 1) != 0)
24 }
25 #[doc = "Bits 1:3 - Reserved"]
26 #[inline(always)]
27 pub fn reg_gpio_pin8_int_type(&self) -> REG_GPIO_PIN8_INT_TYPE_R {
28 REG_GPIO_PIN8_INT_TYPE_R::new(((self.bits >> 1) & 7) as u8)
29 }
30 #[doc = "Bit 4 - Reserved"]
31 #[inline(always)]
32 pub fn reg_gpio_pin8_pad_driver(&self) -> REG_GPIO_PIN8_PAD_DRIVER_R {
33 REG_GPIO_PIN8_PAD_DRIVER_R::new(((self.bits >> 4) & 1) != 0)
34 }
35}
36#[cfg(feature = "impl-register-debug")]
37impl core::fmt::Debug for R {
38 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
39 f.debug_struct("PIN8")
40 .field(
41 "reg_gpio_pin8_wakeup_enable",
42 &format_args!("{}", self.reg_gpio_pin8_wakeup_enable().bit()),
43 )
44 .field(
45 "reg_gpio_pin8_int_type",
46 &format_args!("{}", self.reg_gpio_pin8_int_type().bits()),
47 )
48 .field(
49 "reg_gpio_pin8_pad_driver",
50 &format_args!("{}", self.reg_gpio_pin8_pad_driver().bit()),
51 )
52 .finish()
53 }
54}
55#[cfg(feature = "impl-register-debug")]
56impl core::fmt::Debug for crate::generic::Reg<PIN8_SPEC> {
57 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
58 core::fmt::Debug::fmt(&self.read(), f)
59 }
60}
61impl W {
62 #[doc = "Bit 0 - Reserved"]
63 #[inline(always)]
64 #[must_use]
65 pub fn reg_gpio_pin8_wakeup_enable(&mut self) -> REG_GPIO_PIN8_WAKEUP_ENABLE_W<PIN8_SPEC> {
66 REG_GPIO_PIN8_WAKEUP_ENABLE_W::new(self, 0)
67 }
68 #[doc = "Bits 1:3 - Reserved"]
69 #[inline(always)]
70 #[must_use]
71 pub fn reg_gpio_pin8_int_type(&mut self) -> REG_GPIO_PIN8_INT_TYPE_W<PIN8_SPEC> {
72 REG_GPIO_PIN8_INT_TYPE_W::new(self, 1)
73 }
74 #[doc = "Bit 4 - Reserved"]
75 #[inline(always)]
76 #[must_use]
77 pub fn reg_gpio_pin8_pad_driver(&mut self) -> REG_GPIO_PIN8_PAD_DRIVER_W<PIN8_SPEC> {
78 REG_GPIO_PIN8_PAD_DRIVER_W::new(self, 4)
79 }
80 #[doc = "Bit 5 - need des"]
81 #[inline(always)]
82 #[must_use]
83 pub fn reg_gpi8_pin0_edge_wakeup_clr(&mut self) -> REG_GPI8_PIN0_EDGE_WAKEUP_CLR_W<PIN8_SPEC> {
84 REG_GPI8_PIN0_EDGE_WAKEUP_CLR_W::new(self, 5)
85 }
86}
87#[doc = "Reserved\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`pin8::R`](R). You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`pin8::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
88pub struct PIN8_SPEC;
89impl crate::RegisterSpec for PIN8_SPEC {
90 type Ux = u32;
91}
92#[doc = "`read()` method returns [`pin8::R`](R) reader structure"]
93impl crate::Readable for PIN8_SPEC {}
94#[doc = "`write(|w| ..)` method takes [`pin8::W`](W) writer structure"]
95impl crate::Writable for PIN8_SPEC {
96 type Safety = crate::Unsafe;
97 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
98 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
99}
100#[doc = "`reset()` method sets PIN8 to value 0"]
101impl crate::Resettable for PIN8_SPEC {
102 const RESET_VALUE: u32 = 0;
103}