atsamd11c/sysctrl/
dpllctrla.rs
1#[doc = "Register `DPLLCTRLA` reader"]
2pub type R = crate::R<DpllctrlaSpec>;
3#[doc = "Register `DPLLCTRLA` writer"]
4pub type W = crate::W<DpllctrlaSpec>;
5#[doc = "Field `ENABLE` reader - DPLL Enable"]
6pub type EnableR = crate::BitReader;
7#[doc = "Field `ENABLE` writer - DPLL Enable"]
8pub type EnableW<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `RUNSTDBY` reader - Run in Standby"]
10pub type RunstdbyR = crate::BitReader;
11#[doc = "Field `RUNSTDBY` writer - Run in Standby"]
12pub type RunstdbyW<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `ONDEMAND` reader - On Demand Clock Activation"]
14pub type OndemandR = crate::BitReader;
15#[doc = "Field `ONDEMAND` writer - On Demand Clock Activation"]
16pub type OndemandW<'a, REG> = crate::BitWriter<'a, REG>;
17impl R {
18 #[doc = "Bit 1 - DPLL Enable"]
19 #[inline(always)]
20 pub fn enable(&self) -> EnableR {
21 EnableR::new(((self.bits >> 1) & 1) != 0)
22 }
23 #[doc = "Bit 6 - Run in Standby"]
24 #[inline(always)]
25 pub fn runstdby(&self) -> RunstdbyR {
26 RunstdbyR::new(((self.bits >> 6) & 1) != 0)
27 }
28 #[doc = "Bit 7 - On Demand Clock Activation"]
29 #[inline(always)]
30 pub fn ondemand(&self) -> OndemandR {
31 OndemandR::new(((self.bits >> 7) & 1) != 0)
32 }
33}
34impl W {
35 #[doc = "Bit 1 - DPLL Enable"]
36 #[inline(always)]
37 #[must_use]
38 pub fn enable(&mut self) -> EnableW<DpllctrlaSpec> {
39 EnableW::new(self, 1)
40 }
41 #[doc = "Bit 6 - Run in Standby"]
42 #[inline(always)]
43 #[must_use]
44 pub fn runstdby(&mut self) -> RunstdbyW<DpllctrlaSpec> {
45 RunstdbyW::new(self, 6)
46 }
47 #[doc = "Bit 7 - On Demand Clock Activation"]
48 #[inline(always)]
49 #[must_use]
50 pub fn ondemand(&mut self) -> OndemandW<DpllctrlaSpec> {
51 OndemandW::new(self, 7)
52 }
53}
54#[doc = "DPLL Control A\n\nYou can [`read`](crate::Reg::read) this register and get [`dpllctrla::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`dpllctrla::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
55pub struct DpllctrlaSpec;
56impl crate::RegisterSpec for DpllctrlaSpec {
57 type Ux = u8;
58}
59#[doc = "`read()` method returns [`dpllctrla::R`](R) reader structure"]
60impl crate::Readable for DpllctrlaSpec {}
61#[doc = "`write(|w| ..)` method takes [`dpllctrla::W`](W) writer structure"]
62impl crate::Writable for DpllctrlaSpec {
63 type Safety = crate::Unsafe;
64 const ZERO_TO_MODIFY_FIELDS_BITMAP: u8 = 0;
65 const ONE_TO_MODIFY_FIELDS_BITMAP: u8 = 0;
66}
67#[doc = "`reset()` method sets DPLLCTRLA to value 0x80"]
68impl crate::Resettable for DpllctrlaSpec {
69 const RESET_VALUE: u8 = 0x80;
70}