xmc4700/ccu40_cc40/
prs.rs

1#[doc = "Register `PRS` reader"]
2pub type R = crate::R<PRS_SPEC>;
3#[doc = "Register `PRS` writer"]
4pub type W = crate::W<PRS_SPEC>;
5#[doc = "Field `PRS` reader - Period Register"]
6pub type PRS_R = crate::FieldReader<u16>;
7#[doc = "Field `PRS` writer - Period Register"]
8pub type PRS_W<'a, REG> = crate::FieldWriter<'a, REG, 16, u16>;
9impl R {
10    #[doc = "Bits 0:15 - Period Register"]
11    #[inline(always)]
12    pub fn prs(&self) -> PRS_R {
13        PRS_R::new((self.bits & 0xffff) as u16)
14    }
15}
16impl W {
17    #[doc = "Bits 0:15 - Period Register"]
18    #[inline(always)]
19    pub fn prs(&mut self) -> PRS_W<PRS_SPEC> {
20        PRS_W::new(self, 0)
21    }
22}
23#[doc = "Timer Shadow Period Value\n\nYou can [`read`](crate::Reg::read) this register and get [`prs::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`prs::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
24pub struct PRS_SPEC;
25impl crate::RegisterSpec for PRS_SPEC {
26    type Ux = u32;
27}
28#[doc = "`read()` method returns [`prs::R`](R) reader structure"]
29impl crate::Readable for PRS_SPEC {}
30#[doc = "`write(|w| ..)` method takes [`prs::W`](W) writer structure"]
31impl crate::Writable for PRS_SPEC {
32    type Safety = crate::Unsafe;
33    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
34    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
35}
36#[doc = "`reset()` method sets PRS to value 0"]
37impl crate::Resettable for PRS_SPEC {
38    const RESET_VALUE: u32 = 0;
39}