xmc4400/ppb/
fpdscr.rs

1#[doc = "Register `FPDSCR` reader"]
2pub type R = crate::R<FPDSCR_SPEC>;
3#[doc = "Register `FPDSCR` writer"]
4pub type W = crate::W<FPDSCR_SPEC>;
5#[doc = "Field `RMode` reader - Default value for FPSCR.RMode"]
6pub type RMODE_R = crate::FieldReader;
7#[doc = "Field `RMode` writer - Default value for FPSCR.RMode"]
8pub type RMODE_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
9#[doc = "Field `FZ` reader - Default value for FPSCR.FZ"]
10pub type FZ_R = crate::BitReader;
11#[doc = "Field `FZ` writer - Default value for FPSCR.FZ"]
12pub type FZ_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `DN` reader - Default value for FPSCR.DN"]
14pub type DN_R = crate::BitReader;
15#[doc = "Field `DN` writer - Default value for FPSCR.DN"]
16pub type DN_W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `AHP` reader - Default value for FPSCR.AHP"]
18pub type AHP_R = crate::BitReader;
19#[doc = "Field `AHP` writer - Default value for FPSCR.AHP"]
20pub type AHP_W<'a, REG> = crate::BitWriter<'a, REG>;
21impl R {
22    #[doc = "Bits 22:23 - Default value for FPSCR.RMode"]
23    #[inline(always)]
24    pub fn rmode(&self) -> RMODE_R {
25        RMODE_R::new(((self.bits >> 22) & 3) as u8)
26    }
27    #[doc = "Bit 24 - Default value for FPSCR.FZ"]
28    #[inline(always)]
29    pub fn fz(&self) -> FZ_R {
30        FZ_R::new(((self.bits >> 24) & 1) != 0)
31    }
32    #[doc = "Bit 25 - Default value for FPSCR.DN"]
33    #[inline(always)]
34    pub fn dn(&self) -> DN_R {
35        DN_R::new(((self.bits >> 25) & 1) != 0)
36    }
37    #[doc = "Bit 26 - Default value for FPSCR.AHP"]
38    #[inline(always)]
39    pub fn ahp(&self) -> AHP_R {
40        AHP_R::new(((self.bits >> 26) & 1) != 0)
41    }
42}
43impl W {
44    #[doc = "Bits 22:23 - Default value for FPSCR.RMode"]
45    #[inline(always)]
46    pub fn rmode(&mut self) -> RMODE_W<FPDSCR_SPEC> {
47        RMODE_W::new(self, 22)
48    }
49    #[doc = "Bit 24 - Default value for FPSCR.FZ"]
50    #[inline(always)]
51    pub fn fz(&mut self) -> FZ_W<FPDSCR_SPEC> {
52        FZ_W::new(self, 24)
53    }
54    #[doc = "Bit 25 - Default value for FPSCR.DN"]
55    #[inline(always)]
56    pub fn dn(&mut self) -> DN_W<FPDSCR_SPEC> {
57        DN_W::new(self, 25)
58    }
59    #[doc = "Bit 26 - Default value for FPSCR.AHP"]
60    #[inline(always)]
61    pub fn ahp(&mut self) -> AHP_W<FPDSCR_SPEC> {
62        AHP_W::new(self, 26)
63    }
64}
65#[doc = "Floating-point Default Status Control Register\n\nYou can [`read`](crate::Reg::read) this register and get [`fpdscr::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`fpdscr::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
66pub struct FPDSCR_SPEC;
67impl crate::RegisterSpec for FPDSCR_SPEC {
68    type Ux = u32;
69}
70#[doc = "`read()` method returns [`fpdscr::R`](R) reader structure"]
71impl crate::Readable for FPDSCR_SPEC {}
72#[doc = "`write(|w| ..)` method takes [`fpdscr::W`](W) writer structure"]
73impl crate::Writable for FPDSCR_SPEC {
74    type Safety = crate::Unsafe;
75    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
76    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
77}
78#[doc = "`reset()` method sets FPDSCR to value 0"]
79impl crate::Resettable for FPDSCR_SPEC {
80    const RESET_VALUE: u32 = 0;
81}