1#[doc = "Register `EVD_CFG` reader"]
2pub type R = crate::R<EvdCfgSpec>;
3#[doc = "Register `EVD_CFG` writer"]
4pub type W = crate::W<EvdCfgSpec>;
5#[doc = "Field `EVDISO` reader - External Voltage Domain Isolation"]
6pub type EvdisoR = crate::FieldReader;
7#[doc = "Field `EVDISO` writer - External Voltage Domain Isolation"]
8pub type EvdisoW<'a, REG> = crate::FieldWriter<'a, REG, 3>;
9#[doc = "Field `EVDLPISO` reader - External Voltage Domain Low-Power Isolation"]
10pub type EvdlpisoR = crate::FieldReader;
11#[doc = "Field `EVDLPISO` writer - External Voltage Domain Low-Power Isolation"]
12pub type EvdlpisoW<'a, REG> = crate::FieldWriter<'a, REG, 3>;
13#[doc = "Field `EVDSTAT` reader - External Voltage Domain Status"]
14pub type EvdstatR = crate::FieldReader;
15impl R {
16 #[doc = "Bits 0:2 - External Voltage Domain Isolation"]
17 #[inline(always)]
18 pub fn evdiso(&self) -> EvdisoR {
19 EvdisoR::new((self.bits & 7) as u8)
20 }
21 #[doc = "Bits 8:10 - External Voltage Domain Low-Power Isolation"]
22 #[inline(always)]
23 pub fn evdlpiso(&self) -> EvdlpisoR {
24 EvdlpisoR::new(((self.bits >> 8) & 7) as u8)
25 }
26 #[doc = "Bits 16:18 - External Voltage Domain Status"]
27 #[inline(always)]
28 pub fn evdstat(&self) -> EvdstatR {
29 EvdstatR::new(((self.bits >> 16) & 7) as u8)
30 }
31}
32#[cfg(feature = "debug")]
33impl core::fmt::Debug for R {
34 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
35 f.debug_struct("EVD_CFG")
36 .field("evdiso", &self.evdiso())
37 .field("evdlpiso", &self.evdlpiso())
38 .field("evdstat", &self.evdstat())
39 .finish()
40 }
41}
42impl W {
43 #[doc = "Bits 0:2 - External Voltage Domain Isolation"]
44 #[inline(always)]
45 pub fn evdiso(&mut self) -> EvdisoW<'_, EvdCfgSpec> {
46 EvdisoW::new(self, 0)
47 }
48 #[doc = "Bits 8:10 - External Voltage Domain Low-Power Isolation"]
49 #[inline(always)]
50 pub fn evdlpiso(&mut self) -> EvdlpisoW<'_, EvdCfgSpec> {
51 EvdlpisoW::new(self, 8)
52 }
53}
54#[doc = "External Voltage Domain Configuration\n\nYou can [`read`](crate::Reg::read) this register and get [`evd_cfg::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`evd_cfg::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
55pub struct EvdCfgSpec;
56impl crate::RegisterSpec for EvdCfgSpec {
57 type Ux = u32;
58}
59#[doc = "`read()` method returns [`evd_cfg::R`](R) reader structure"]
60impl crate::Readable for EvdCfgSpec {}
61#[doc = "`write(|w| ..)` method takes [`evd_cfg::W`](W) writer structure"]
62impl crate::Writable for EvdCfgSpec {
63 type Safety = crate::Unsafe;
64}
65#[doc = "`reset()` method sets EVD_CFG to value 0"]
66impl crate::Resettable for EvdCfgSpec {}