1#[doc = "Register `CWGR` reader"]
2pub type R = crate::R<CwgrSpec>;
3#[doc = "Register `CWGR` writer"]
4pub type W = crate::W<CwgrSpec>;
5#[doc = "Field `CLDIV` reader - Clock Low Divider"]
6pub type CldivR = crate::FieldReader;
7#[doc = "Field `CLDIV` writer - Clock Low Divider"]
8pub type CldivW<'a, REG> = crate::FieldWriter<'a, REG, 8>;
9#[doc = "Field `CHDIV` reader - Clock High Divider"]
10pub type ChdivR = crate::FieldReader;
11#[doc = "Field `CHDIV` writer - Clock High Divider"]
12pub type ChdivW<'a, REG> = crate::FieldWriter<'a, REG, 8>;
13#[doc = "Field `CKDIV` reader - Clock Divider"]
14pub type CkdivR = crate::FieldReader;
15#[doc = "Field `CKDIV` writer - Clock Divider"]
16pub type CkdivW<'a, REG> = crate::FieldWriter<'a, REG, 3>;
17impl R {
18    #[doc = "Bits 0:7 - Clock Low Divider"]
19    #[inline(always)]
20    pub fn cldiv(&self) -> CldivR {
21        CldivR::new((self.bits & 0xff) as u8)
22    }
23    #[doc = "Bits 8:15 - Clock High Divider"]
24    #[inline(always)]
25    pub fn chdiv(&self) -> ChdivR {
26        ChdivR::new(((self.bits >> 8) & 0xff) as u8)
27    }
28    #[doc = "Bits 16:18 - Clock Divider"]
29    #[inline(always)]
30    pub fn ckdiv(&self) -> CkdivR {
31        CkdivR::new(((self.bits >> 16) & 7) as u8)
32    }
33}
34impl W {
35    #[doc = "Bits 0:7 - Clock Low Divider"]
36    #[inline(always)]
37    #[must_use]
38    pub fn cldiv(&mut self) -> CldivW<CwgrSpec> {
39        CldivW::new(self, 0)
40    }
41    #[doc = "Bits 8:15 - Clock High Divider"]
42    #[inline(always)]
43    #[must_use]
44    pub fn chdiv(&mut self) -> ChdivW<CwgrSpec> {
45        ChdivW::new(self, 8)
46    }
47    #[doc = "Bits 16:18 - Clock Divider"]
48    #[inline(always)]
49    #[must_use]
50    pub fn ckdiv(&mut self) -> CkdivW<CwgrSpec> {
51        CkdivW::new(self, 16)
52    }
53}
54#[doc = "Clock Waveform Generator Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`cwgr::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 [`cwgr::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
55pub struct CwgrSpec;
56impl crate::RegisterSpec for CwgrSpec {
57    type Ux = u32;
58}
59#[doc = "`read()` method returns [`cwgr::R`](R) reader structure"]
60impl crate::Readable for CwgrSpec {}
61#[doc = "`write(|w| ..)` method takes [`cwgr::W`](W) writer structure"]
62impl crate::Writable for CwgrSpec {
63    type Safety = crate::Unsafe;
64    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
65    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
66}
67#[doc = "`reset()` method sets CWGR to value 0"]
68impl crate::Resettable for CwgrSpec {
69    const RESET_VALUE: u32 = 0;
70}