xmc4700/ccu80_cc80/
fpc.rs

1#[doc = "Register `FPC` reader"]
2pub type R = crate::R<FPC_SPEC>;
3#[doc = "Register `FPC` writer"]
4pub type W = crate::W<FPC_SPEC>;
5#[doc = "Field `PCMP` reader - Floating Prescaler Compare Value"]
6pub type PCMP_R = crate::FieldReader;
7#[doc = "Field `PVAL` reader - Actual Prescaler Value"]
8pub type PVAL_R = crate::FieldReader;
9#[doc = "Field `PVAL` writer - Actual Prescaler Value"]
10pub type PVAL_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
11impl R {
12    #[doc = "Bits 0:3 - Floating Prescaler Compare Value"]
13    #[inline(always)]
14    pub fn pcmp(&self) -> PCMP_R {
15        PCMP_R::new((self.bits & 0x0f) as u8)
16    }
17    #[doc = "Bits 8:11 - Actual Prescaler Value"]
18    #[inline(always)]
19    pub fn pval(&self) -> PVAL_R {
20        PVAL_R::new(((self.bits >> 8) & 0x0f) as u8)
21    }
22}
23impl W {
24    #[doc = "Bits 8:11 - Actual Prescaler Value"]
25    #[inline(always)]
26    pub fn pval(&mut self) -> PVAL_W<FPC_SPEC> {
27        PVAL_W::new(self, 8)
28    }
29}
30#[doc = "Floating Prescaler Control\n\nYou can [`read`](crate::Reg::read) this register and get [`fpc::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`fpc::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
31pub struct FPC_SPEC;
32impl crate::RegisterSpec for FPC_SPEC {
33    type Ux = u32;
34}
35#[doc = "`read()` method returns [`fpc::R`](R) reader structure"]
36impl crate::Readable for FPC_SPEC {}
37#[doc = "`write(|w| ..)` method takes [`fpc::W`](W) writer structure"]
38impl crate::Writable for FPC_SPEC {
39    type Safety = crate::Unsafe;
40    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
41    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
42}
43#[doc = "`reset()` method sets FPC to value 0"]
44impl crate::Resettable for FPC_SPEC {
45    const RESET_VALUE: u32 = 0;
46}