eos_s3/ext_regs_ffe/
cmd.rs1#[doc = "Register `CMD` writer"]
2pub struct W(crate::W<CMD_SPEC>);
3impl core::ops::Deref for W {
4 type Target = crate::W<CMD_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl core::ops::DerefMut for W {
11 #[inline(always)]
12 fn deref_mut(&mut self) -> &mut Self::Target {
13 &mut self.0
14 }
15}
16impl From<crate::W<CMD_SPEC>> for W {
17 #[inline(always)]
18 fn from(writer: crate::W<CMD_SPEC>) -> Self {
19 W(writer)
20 }
21}
22#[doc = "Field `RUN_FFE0_ONCE` writer - When a '1' is written to this location, causes the FFE to execute one complete run of its algorithm; reads as 0"]
23pub struct RUN_FFE0_ONCE_W<'a> {
24 w: &'a mut W,
25}
26impl<'a> RUN_FFE0_ONCE_W<'a> {
27 #[doc = r"Sets the field bit"]
28 #[inline(always)]
29 pub fn set_bit(self) -> &'a mut W {
30 self.bit(true)
31 }
32 #[doc = r"Clears the field bit"]
33 #[inline(always)]
34 pub fn clear_bit(self) -> &'a mut W {
35 self.bit(false)
36 }
37 #[doc = r"Writes raw bits to the field"]
38 #[inline(always)]
39 pub fn bit(self, value: bool) -> &'a mut W {
40 self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01);
41 self.w
42 }
43}
44#[doc = "Field `RUN_FFE1` writer - When a '1' is written to this location, causes the FFE1 to start; reads as 0"]
45pub struct RUN_FFE1_W<'a> {
46 w: &'a mut W,
47}
48impl<'a> RUN_FFE1_W<'a> {
49 #[doc = r"Sets the field bit"]
50 #[inline(always)]
51 pub fn set_bit(self) -> &'a mut W {
52 self.bit(true)
53 }
54 #[doc = r"Clears the field bit"]
55 #[inline(always)]
56 pub fn clear_bit(self) -> &'a mut W {
57 self.bit(false)
58 }
59 #[doc = r"Writes raw bits to the field"]
60 #[inline(always)]
61 pub fn bit(self, value: bool) -> &'a mut W {
62 self.w.bits =
63 (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1);
64 self.w
65 }
66}
67#[doc = "Field `RUN_SM0_ONCE` writer - When a '1' is written to this location, causes the SM0 to run once; reads as 0"]
68pub struct RUN_SM0_ONCE_W<'a> {
69 w: &'a mut W,
70}
71impl<'a> RUN_SM0_ONCE_W<'a> {
72 #[doc = r"Sets the field bit"]
73 #[inline(always)]
74 pub fn set_bit(self) -> &'a mut W {
75 self.bit(true)
76 }
77 #[doc = r"Clears the field bit"]
78 #[inline(always)]
79 pub fn clear_bit(self) -> &'a mut W {
80 self.bit(false)
81 }
82 #[doc = r"Writes raw bits to the field"]
83 #[inline(always)]
84 pub fn bit(self, value: bool) -> &'a mut W {
85 self.w.bits =
86 (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2);
87 self.w
88 }
89}
90#[doc = "Field `RUN_SM1_ONCE` writer - When a '1' is written to this location, causes the SM1 to run once; reads as 0"]
91pub struct RUN_SM1_ONCE_W<'a> {
92 w: &'a mut W,
93}
94impl<'a> RUN_SM1_ONCE_W<'a> {
95 #[doc = r"Sets the field bit"]
96 #[inline(always)]
97 pub fn set_bit(self) -> &'a mut W {
98 self.bit(true)
99 }
100 #[doc = r"Clears the field bit"]
101 #[inline(always)]
102 pub fn clear_bit(self) -> &'a mut W {
103 self.bit(false)
104 }
105 #[doc = r"Writes raw bits to the field"]
106 #[inline(always)]
107 pub fn bit(self, value: bool) -> &'a mut W {
108 self.w.bits =
109 (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3);
110 self.w
111 }
112}
113impl W {
114 #[doc = "Bit 0 - When a '1' is written to this location, causes the FFE to execute one complete run of its algorithm; reads as 0"]
115 #[inline(always)]
116 pub fn run_ffe0_once(&mut self) -> RUN_FFE0_ONCE_W {
117 RUN_FFE0_ONCE_W { w: self }
118 }
119 #[doc = "Bit 1 - When a '1' is written to this location, causes the FFE1 to start; reads as 0"]
120 #[inline(always)]
121 pub fn run_ffe1(&mut self) -> RUN_FFE1_W {
122 RUN_FFE1_W { w: self }
123 }
124 #[doc = "Bit 2 - When a '1' is written to this location, causes the SM0 to run once; reads as 0"]
125 #[inline(always)]
126 pub fn run_sm0_once(&mut self) -> RUN_SM0_ONCE_W {
127 RUN_SM0_ONCE_W { w: self }
128 }
129 #[doc = "Bit 3 - When a '1' is written to this location, causes the SM1 to run once; reads as 0"]
130 #[inline(always)]
131 pub fn run_sm1_once(&mut self) -> RUN_SM1_ONCE_W {
132 RUN_SM1_ONCE_W { w: self }
133 }
134 #[doc = "Writes raw bits to the register."]
135 #[inline(always)]
136 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
137 self.0.bits(bits);
138 self
139 }
140}
141#[doc = "Commands for the Flexible Fusion Engine\n\nThis register you can [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [cmd](index.html) module"]
142pub struct CMD_SPEC;
143impl crate::RegisterSpec for CMD_SPEC {
144 type Ux = u32;
145}
146#[doc = "`write(|w| ..)` method takes [cmd::W](W) writer structure"]
147impl crate::Writable for CMD_SPEC {
148 type Writer = W;
149}
150#[doc = "`reset()` method sets CMD to value 0"]
151impl crate::Resettable for CMD_SPEC {
152 #[inline(always)]
153 fn reset_value() -> Self::Ux {
154 0
155 }
156}