eos_s3/extm4regs/
config_fp1.rs1#[doc = "Register `CONFIG_FP1` reader"]
2pub struct R(crate::R<CONFIG_FP1_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<CONFIG_FP1_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<CONFIG_FP1_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<CONFIG_FP1_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Field `FPIDC` reader - Floating-point input denormal exception"]
17pub struct FPIDC_R(crate::FieldReader<bool, bool>);
18impl FPIDC_R {
19 #[inline(always)]
20 pub(crate) fn new(bits: bool) -> Self {
21 FPIDC_R(crate::FieldReader::new(bits))
22 }
23}
24impl core::ops::Deref for FPIDC_R {
25 type Target = crate::FieldReader<bool, bool>;
26 #[inline(always)]
27 fn deref(&self) -> &Self::Target {
28 &self.0
29 }
30}
31#[doc = "Field `FPIZC` reader - Floating-point divide-by-zero exception"]
32pub struct FPIZC_R(crate::FieldReader<bool, bool>);
33impl FPIZC_R {
34 #[inline(always)]
35 pub(crate) fn new(bits: bool) -> Self {
36 FPIZC_R(crate::FieldReader::new(bits))
37 }
38}
39impl core::ops::Deref for FPIZC_R {
40 type Target = crate::FieldReader<bool, bool>;
41 #[inline(always)]
42 fn deref(&self) -> &Self::Target {
43 &self.0
44 }
45}
46#[doc = "Field `FPIOC` reader - Floating-point invalid exception"]
47pub struct FPIOC_R(crate::FieldReader<bool, bool>);
48impl FPIOC_R {
49 #[inline(always)]
50 pub(crate) fn new(bits: bool) -> Self {
51 FPIOC_R(crate::FieldReader::new(bits))
52 }
53}
54impl core::ops::Deref for FPIOC_R {
55 type Target = crate::FieldReader<bool, bool>;
56 #[inline(always)]
57 fn deref(&self) -> &Self::Target {
58 &self.0
59 }
60}
61#[doc = "Field `FPIFC` reader - Floating-point underflow exception"]
62pub struct FPIFC_R(crate::FieldReader<bool, bool>);
63impl FPIFC_R {
64 #[inline(always)]
65 pub(crate) fn new(bits: bool) -> Self {
66 FPIFC_R(crate::FieldReader::new(bits))
67 }
68}
69impl core::ops::Deref for FPIFC_R {
70 type Target = crate::FieldReader<bool, bool>;
71 #[inline(always)]
72 fn deref(&self) -> &Self::Target {
73 &self.0
74 }
75}
76#[doc = "Field `FPOFC` reader - Floating-point overflow exception"]
77pub struct FPOFC_R(crate::FieldReader<bool, bool>);
78impl FPOFC_R {
79 #[inline(always)]
80 pub(crate) fn new(bits: bool) -> Self {
81 FPOFC_R(crate::FieldReader::new(bits))
82 }
83}
84impl core::ops::Deref for FPOFC_R {
85 type Target = crate::FieldReader<bool, bool>;
86 #[inline(always)]
87 fn deref(&self) -> &Self::Target {
88 &self.0
89 }
90}
91#[doc = "Field `FPIXC` reader - Floating-point inexact exception"]
92pub struct FPIXC_R(crate::FieldReader<bool, bool>);
93impl FPIXC_R {
94 #[inline(always)]
95 pub(crate) fn new(bits: bool) -> Self {
96 FPIXC_R(crate::FieldReader::new(bits))
97 }
98}
99impl core::ops::Deref for FPIXC_R {
100 type Target = crate::FieldReader<bool, bool>;
101 #[inline(always)]
102 fn deref(&self) -> &Self::Target {
103 &self.0
104 }
105}
106impl R {
107 #[doc = "Bit 0 - Floating-point input denormal exception"]
108 #[inline(always)]
109 pub fn fpidc(&self) -> FPIDC_R {
110 FPIDC_R::new((self.bits & 0x01) != 0)
111 }
112 #[doc = "Bit 1 - Floating-point divide-by-zero exception"]
113 #[inline(always)]
114 pub fn fpizc(&self) -> FPIZC_R {
115 FPIZC_R::new(((self.bits >> 1) & 0x01) != 0)
116 }
117 #[doc = "Bit 2 - Floating-point invalid exception"]
118 #[inline(always)]
119 pub fn fpioc(&self) -> FPIOC_R {
120 FPIOC_R::new(((self.bits >> 2) & 0x01) != 0)
121 }
122 #[doc = "Bit 3 - Floating-point underflow exception"]
123 #[inline(always)]
124 pub fn fpifc(&self) -> FPIFC_R {
125 FPIFC_R::new(((self.bits >> 3) & 0x01) != 0)
126 }
127 #[doc = "Bit 4 - Floating-point overflow exception"]
128 #[inline(always)]
129 pub fn fpofc(&self) -> FPOFC_R {
130 FPOFC_R::new(((self.bits >> 4) & 0x01) != 0)
131 }
132 #[doc = "Bit 5 - Floating-point inexact exception"]
133 #[inline(always)]
134 pub fn fpixc(&self) -> FPIXC_R {
135 FPIXC_R::new(((self.bits >> 5) & 0x01) != 0)
136 }
137}
138#[doc = "FPU configuration register 1\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [config_fp1](index.html) module"]
139pub struct CONFIG_FP1_SPEC;
140impl crate::RegisterSpec for CONFIG_FP1_SPEC {
141 type Ux = u32;
142}
143#[doc = "`read()` method returns [config_fp1::R](R) reader structure"]
144impl crate::Readable for CONFIG_FP1_SPEC {
145 type Reader = R;
146}
147#[doc = "`reset()` method sets CONFIG_FP1 to value 0"]
148impl crate::Resettable for CONFIG_FP1_SPEC {
149 #[inline(always)]
150 fn reset_value() -> Self::Ux {
151 0
152 }
153}