stm32f1/stm32f103/afio/
evcr.rs1pub type R = crate::R<EVCRrs>;
3pub type W = crate::W<EVCRrs>;
5pub type PIN_R = crate::FieldReader;
7pub type PIN_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
9pub type PORT_R = crate::FieldReader;
11pub type PORT_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
13pub type EVOE_R = crate::BitReader;
15pub type EVOE_W<'a, REG> = crate::BitWriter<'a, REG>;
17impl R {
18 #[inline(always)]
20 pub fn pin(&self) -> PIN_R {
21 PIN_R::new((self.bits & 0x0f) as u8)
22 }
23 #[inline(always)]
25 pub fn port(&self) -> PORT_R {
26 PORT_R::new(((self.bits >> 4) & 7) as u8)
27 }
28 #[inline(always)]
30 pub fn evoe(&self) -> EVOE_R {
31 EVOE_R::new(((self.bits >> 7) & 1) != 0)
32 }
33}
34impl core::fmt::Debug for R {
35 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
36 f.debug_struct("EVCR")
37 .field("pin", &self.pin())
38 .field("port", &self.port())
39 .field("evoe", &self.evoe())
40 .finish()
41 }
42}
43impl W {
44 #[inline(always)]
46 pub fn pin(&mut self) -> PIN_W<EVCRrs> {
47 PIN_W::new(self, 0)
48 }
49 #[inline(always)]
51 pub fn port(&mut self) -> PORT_W<EVCRrs> {
52 PORT_W::new(self, 4)
53 }
54 #[inline(always)]
56 pub fn evoe(&mut self) -> EVOE_W<EVCRrs> {
57 EVOE_W::new(self, 7)
58 }
59}
60pub struct EVCRrs;
66impl crate::RegisterSpec for EVCRrs {
67 type Ux = u32;
68}
69impl crate::Readable for EVCRrs {}
71impl crate::Writable for EVCRrs {
73 type Safety = crate::Unsafe;
74}
75impl crate::Resettable for EVCRrs {}