max3263x/ioman/
spix_req.rs1#[doc = "Register `SPIX_REQ` reader"]
2pub struct R(crate::R<SPIX_REQ_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<SPIX_REQ_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<SPIX_REQ_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<SPIX_REQ_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `SPIX_REQ` writer"]
17pub struct W(crate::W<SPIX_REQ_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<SPIX_REQ_SPEC>;
20 #[inline(always)]
21 fn deref(&self) -> &Self::Target {
22 &self.0
23 }
24}
25impl core::ops::DerefMut for W {
26 #[inline(always)]
27 fn deref_mut(&mut self) -> &mut Self::Target {
28 &mut self.0
29 }
30}
31impl From<crate::W<SPIX_REQ_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<SPIX_REQ_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `core_io_req` reader - SPIX Core I/O Request"]
38pub type CORE_IO_REQ_R = crate::BitReader<bool>;
39#[doc = "Field `core_io_req` writer - SPIX Core I/O Request"]
40pub type CORE_IO_REQ_W<'a> = crate::BitWriter<'a, u32, SPIX_REQ_SPEC, bool, 4>;
41#[doc = "Field `ss0_io_req` reader - SPIX SS\\[0\\]
42I/O Request"]
43pub type SS0_IO_REQ_R = crate::BitReader<bool>;
44#[doc = "Field `ss0_io_req` writer - SPIX SS\\[0\\]
45I/O Request"]
46pub type SS0_IO_REQ_W<'a> = crate::BitWriter<'a, u32, SPIX_REQ_SPEC, bool, 8>;
47#[doc = "Field `ss1_io_req` reader - SPIX SS\\[1\\]
48I/O Request"]
49pub type SS1_IO_REQ_R = crate::BitReader<bool>;
50#[doc = "Field `ss1_io_req` writer - SPIX SS\\[1\\]
51I/O Request"]
52pub type SS1_IO_REQ_W<'a> = crate::BitWriter<'a, u32, SPIX_REQ_SPEC, bool, 9>;
53#[doc = "Field `ss2_io_req` reader - SPIX SS\\[2\\]
54I/O Request"]
55pub type SS2_IO_REQ_R = crate::BitReader<bool>;
56#[doc = "Field `ss2_io_req` writer - SPIX SS\\[2\\]
57I/O Request"]
58pub type SS2_IO_REQ_W<'a> = crate::BitWriter<'a, u32, SPIX_REQ_SPEC, bool, 10>;
59#[doc = "Field `quad_io_req` reader - SPIX Quad I/O Request"]
60pub type QUAD_IO_REQ_R = crate::BitReader<bool>;
61#[doc = "Field `quad_io_req` writer - SPIX Quad I/O Request"]
62pub type QUAD_IO_REQ_W<'a> = crate::BitWriter<'a, u32, SPIX_REQ_SPEC, bool, 12>;
63#[doc = "Field `fast_mode` reader - SPIX Fast Mode Request"]
64pub type FAST_MODE_R = crate::BitReader<bool>;
65#[doc = "Field `fast_mode` writer - SPIX Fast Mode Request"]
66pub type FAST_MODE_W<'a> = crate::BitWriter<'a, u32, SPIX_REQ_SPEC, bool, 16>;
67impl R {
68 #[doc = "Bit 4 - SPIX Core I/O Request"]
69 #[inline(always)]
70 pub fn core_io_req(&self) -> CORE_IO_REQ_R {
71 CORE_IO_REQ_R::new(((self.bits >> 4) & 1) != 0)
72 }
73 #[doc = "Bit 8 - SPIX SS\\[0\\]
74I/O Request"]
75 #[inline(always)]
76 pub fn ss0_io_req(&self) -> SS0_IO_REQ_R {
77 SS0_IO_REQ_R::new(((self.bits >> 8) & 1) != 0)
78 }
79 #[doc = "Bit 9 - SPIX SS\\[1\\]
80I/O Request"]
81 #[inline(always)]
82 pub fn ss1_io_req(&self) -> SS1_IO_REQ_R {
83 SS1_IO_REQ_R::new(((self.bits >> 9) & 1) != 0)
84 }
85 #[doc = "Bit 10 - SPIX SS\\[2\\]
86I/O Request"]
87 #[inline(always)]
88 pub fn ss2_io_req(&self) -> SS2_IO_REQ_R {
89 SS2_IO_REQ_R::new(((self.bits >> 10) & 1) != 0)
90 }
91 #[doc = "Bit 12 - SPIX Quad I/O Request"]
92 #[inline(always)]
93 pub fn quad_io_req(&self) -> QUAD_IO_REQ_R {
94 QUAD_IO_REQ_R::new(((self.bits >> 12) & 1) != 0)
95 }
96 #[doc = "Bit 16 - SPIX Fast Mode Request"]
97 #[inline(always)]
98 pub fn fast_mode(&self) -> FAST_MODE_R {
99 FAST_MODE_R::new(((self.bits >> 16) & 1) != 0)
100 }
101}
102impl W {
103 #[doc = "Bit 4 - SPIX Core I/O Request"]
104 #[inline(always)]
105 pub fn core_io_req(&mut self) -> CORE_IO_REQ_W {
106 CORE_IO_REQ_W::new(self)
107 }
108 #[doc = "Bit 8 - SPIX SS\\[0\\]
109I/O Request"]
110 #[inline(always)]
111 pub fn ss0_io_req(&mut self) -> SS0_IO_REQ_W {
112 SS0_IO_REQ_W::new(self)
113 }
114 #[doc = "Bit 9 - SPIX SS\\[1\\]
115I/O Request"]
116 #[inline(always)]
117 pub fn ss1_io_req(&mut self) -> SS1_IO_REQ_W {
118 SS1_IO_REQ_W::new(self)
119 }
120 #[doc = "Bit 10 - SPIX SS\\[2\\]
121I/O Request"]
122 #[inline(always)]
123 pub fn ss2_io_req(&mut self) -> SS2_IO_REQ_W {
124 SS2_IO_REQ_W::new(self)
125 }
126 #[doc = "Bit 12 - SPIX Quad I/O Request"]
127 #[inline(always)]
128 pub fn quad_io_req(&mut self) -> QUAD_IO_REQ_W {
129 QUAD_IO_REQ_W::new(self)
130 }
131 #[doc = "Bit 16 - SPIX Fast Mode Request"]
132 #[inline(always)]
133 pub fn fast_mode(&mut self) -> FAST_MODE_W {
134 FAST_MODE_W::new(self)
135 }
136 #[doc = "Writes raw bits to the register."]
137 #[inline(always)]
138 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
139 self.0.bits(bits);
140 self
141 }
142}
143#[doc = "SPIX I/O Mode Request\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [spix_req](index.html) module"]
144pub struct SPIX_REQ_SPEC;
145impl crate::RegisterSpec for SPIX_REQ_SPEC {
146 type Ux = u32;
147}
148#[doc = "`read()` method returns [spix_req::R](R) reader structure"]
149impl crate::Readable for SPIX_REQ_SPEC {
150 type Reader = R;
151}
152#[doc = "`write(|w| ..)` method takes [spix_req::W](W) writer structure"]
153impl crate::Writable for SPIX_REQ_SPEC {
154 type Writer = W;
155}
156#[doc = "`reset()` method sets SPIX_REQ to value 0"]
157impl crate::Resettable for SPIX_REQ_SPEC {
158 #[inline(always)]
159 fn reset_value() -> Self::Ux {
160 0
161 }
162}