atsam3s1c/
spi.rs

1#[repr(C)]
2#[doc = "Register block"]
3pub struct RegisterBlock {
4    cr: Cr,
5    mr: Mr,
6    rdr: Rdr,
7    tdr: Tdr,
8    sr: Sr,
9    ier: Ier,
10    idr: Idr,
11    imr: Imr,
12    _reserved8: [u8; 0x10],
13    csr0: Csr0,
14    csr1: Csr1,
15    csr2: Csr2,
16    csr3: Csr3,
17    _reserved12: [u8; 0xa4],
18    wpmr: Wpmr,
19    wpsr: Wpsr,
20    _reserved14: [u8; 0x14],
21    rpr: Rpr,
22    rcr: Rcr,
23    tpr: Tpr,
24    tcr: Tcr,
25    rnpr: Rnpr,
26    rncr: Rncr,
27    tnpr: Tnpr,
28    tncr: Tncr,
29    ptcr: Ptcr,
30    ptsr: Ptsr,
31}
32impl RegisterBlock {
33    #[doc = "0x00 - Control Register"]
34    #[inline(always)]
35    pub const fn cr(&self) -> &Cr {
36        &self.cr
37    }
38    #[doc = "0x04 - Mode Register"]
39    #[inline(always)]
40    pub const fn mr(&self) -> &Mr {
41        &self.mr
42    }
43    #[doc = "0x08 - Receive Data Register"]
44    #[inline(always)]
45    pub const fn rdr(&self) -> &Rdr {
46        &self.rdr
47    }
48    #[doc = "0x0c - Transmit Data Register"]
49    #[inline(always)]
50    pub const fn tdr(&self) -> &Tdr {
51        &self.tdr
52    }
53    #[doc = "0x10 - Status Register"]
54    #[inline(always)]
55    pub const fn sr(&self) -> &Sr {
56        &self.sr
57    }
58    #[doc = "0x14 - Interrupt Enable Register"]
59    #[inline(always)]
60    pub const fn ier(&self) -> &Ier {
61        &self.ier
62    }
63    #[doc = "0x18 - Interrupt Disable Register"]
64    #[inline(always)]
65    pub const fn idr(&self) -> &Idr {
66        &self.idr
67    }
68    #[doc = "0x1c - Interrupt Mask Register"]
69    #[inline(always)]
70    pub const fn imr(&self) -> &Imr {
71        &self.imr
72    }
73    #[doc = "0x30 - Chip Select Register 0"]
74    #[inline(always)]
75    pub const fn csr0(&self) -> &Csr0 {
76        &self.csr0
77    }
78    #[doc = "0x34 - Chip Select Register 1"]
79    #[inline(always)]
80    pub const fn csr1(&self) -> &Csr1 {
81        &self.csr1
82    }
83    #[doc = "0x38 - Chip Select Register 2"]
84    #[inline(always)]
85    pub const fn csr2(&self) -> &Csr2 {
86        &self.csr2
87    }
88    #[doc = "0x3c - Chip Select Register 3"]
89    #[inline(always)]
90    pub const fn csr3(&self) -> &Csr3 {
91        &self.csr3
92    }
93    #[doc = "0xe4 - Write Protection Control Register"]
94    #[inline(always)]
95    pub const fn wpmr(&self) -> &Wpmr {
96        &self.wpmr
97    }
98    #[doc = "0xe8 - Write Protection Status Register"]
99    #[inline(always)]
100    pub const fn wpsr(&self) -> &Wpsr {
101        &self.wpsr
102    }
103    #[doc = "0x100 - Receive Pointer Register"]
104    #[inline(always)]
105    pub const fn rpr(&self) -> &Rpr {
106        &self.rpr
107    }
108    #[doc = "0x104 - Receive Counter Register"]
109    #[inline(always)]
110    pub const fn rcr(&self) -> &Rcr {
111        &self.rcr
112    }
113    #[doc = "0x108 - Transmit Pointer Register"]
114    #[inline(always)]
115    pub const fn tpr(&self) -> &Tpr {
116        &self.tpr
117    }
118    #[doc = "0x10c - Transmit Counter Register"]
119    #[inline(always)]
120    pub const fn tcr(&self) -> &Tcr {
121        &self.tcr
122    }
123    #[doc = "0x110 - Receive Next Pointer Register"]
124    #[inline(always)]
125    pub const fn rnpr(&self) -> &Rnpr {
126        &self.rnpr
127    }
128    #[doc = "0x114 - Receive Next Counter Register"]
129    #[inline(always)]
130    pub const fn rncr(&self) -> &Rncr {
131        &self.rncr
132    }
133    #[doc = "0x118 - Transmit Next Pointer Register"]
134    #[inline(always)]
135    pub const fn tnpr(&self) -> &Tnpr {
136        &self.tnpr
137    }
138    #[doc = "0x11c - Transmit Next Counter Register"]
139    #[inline(always)]
140    pub const fn tncr(&self) -> &Tncr {
141        &self.tncr
142    }
143    #[doc = "0x120 - Transfer Control Register"]
144    #[inline(always)]
145    pub const fn ptcr(&self) -> &Ptcr {
146        &self.ptcr
147    }
148    #[doc = "0x124 - Transfer Status Register"]
149    #[inline(always)]
150    pub const fn ptsr(&self) -> &Ptsr {
151        &self.ptsr
152    }
153}
154#[doc = "CR (w) register accessor: Control Register\n\nYou can [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`cr::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@cr`]
155module"]
156#[doc(alias = "CR")]
157pub type Cr = crate::Reg<cr::CrSpec>;
158#[doc = "Control Register"]
159pub mod cr;
160#[doc = "MR (rw) register accessor: Mode Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`mr::R`].  You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`mr::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@mr`]
161module"]
162#[doc(alias = "MR")]
163pub type Mr = crate::Reg<mr::MrSpec>;
164#[doc = "Mode Register"]
165pub mod mr;
166#[doc = "RDR (r) register accessor: Receive Data Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`rdr::R`].  See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@rdr`]
167module"]
168#[doc(alias = "RDR")]
169pub type Rdr = crate::Reg<rdr::RdrSpec>;
170#[doc = "Receive Data Register"]
171pub mod rdr;
172#[doc = "TDR (w) register accessor: Transmit Data Register\n\nYou can [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`tdr::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@tdr`]
173module"]
174#[doc(alias = "TDR")]
175pub type Tdr = crate::Reg<tdr::TdrSpec>;
176#[doc = "Transmit Data Register"]
177pub mod tdr;
178#[doc = "SR (r) register accessor: Status Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`sr::R`].  See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@sr`]
179module"]
180#[doc(alias = "SR")]
181pub type Sr = crate::Reg<sr::SrSpec>;
182#[doc = "Status Register"]
183pub mod sr;
184#[doc = "IER (w) register accessor: Interrupt Enable Register\n\nYou can [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`ier::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@ier`]
185module"]
186#[doc(alias = "IER")]
187pub type Ier = crate::Reg<ier::IerSpec>;
188#[doc = "Interrupt Enable Register"]
189pub mod ier;
190#[doc = "IDR (w) register accessor: Interrupt Disable Register\n\nYou can [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`idr::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@idr`]
191module"]
192#[doc(alias = "IDR")]
193pub type Idr = crate::Reg<idr::IdrSpec>;
194#[doc = "Interrupt Disable Register"]
195pub mod idr;
196#[doc = "IMR (r) register accessor: Interrupt Mask Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`imr::R`].  See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@imr`]
197module"]
198#[doc(alias = "IMR")]
199pub type Imr = crate::Reg<imr::ImrSpec>;
200#[doc = "Interrupt Mask Register"]
201pub mod imr;
202#[doc = "CSR0 (rw) register accessor: Chip Select Register 0\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`csr0::R`].  You can [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`csr0::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@csr0`]
203module"]
204#[doc(alias = "CSR0")]
205pub type Csr0 = crate::Reg<csr0::Csr0Spec>;
206#[doc = "Chip Select Register 0"]
207pub mod csr0;
208#[doc = "CSR1 (rw) register accessor: Chip Select Register 1\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`csr1::R`].  You can [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`csr1::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@csr1`]
209module"]
210#[doc(alias = "CSR1")]
211pub type Csr1 = crate::Reg<csr1::Csr1Spec>;
212#[doc = "Chip Select Register 1"]
213pub mod csr1;
214#[doc = "CSR2 (rw) register accessor: Chip Select Register 2\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`csr2::R`].  You can [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`csr2::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@csr2`]
215module"]
216#[doc(alias = "CSR2")]
217pub type Csr2 = crate::Reg<csr2::Csr2Spec>;
218#[doc = "Chip Select Register 2"]
219pub mod csr2;
220#[doc = "CSR3 (rw) register accessor: Chip Select Register 3\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`csr3::R`].  You can [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`csr3::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@csr3`]
221module"]
222#[doc(alias = "CSR3")]
223pub type Csr3 = crate::Reg<csr3::Csr3Spec>;
224#[doc = "Chip Select Register 3"]
225pub mod csr3;
226#[doc = "WPMR (rw) register accessor: Write Protection Control Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`wpmr::R`].  You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`wpmr::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@wpmr`]
227module"]
228#[doc(alias = "WPMR")]
229pub type Wpmr = crate::Reg<wpmr::WpmrSpec>;
230#[doc = "Write Protection Control Register"]
231pub mod wpmr;
232#[doc = "WPSR (r) register accessor: Write Protection Status Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`wpsr::R`].  See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@wpsr`]
233module"]
234#[doc(alias = "WPSR")]
235pub type Wpsr = crate::Reg<wpsr::WpsrSpec>;
236#[doc = "Write Protection Status Register"]
237pub mod wpsr;
238#[doc = "RPR (rw) register accessor: Receive Pointer Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`rpr::R`].  You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`rpr::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@rpr`]
239module"]
240#[doc(alias = "RPR")]
241pub type Rpr = crate::Reg<rpr::RprSpec>;
242#[doc = "Receive Pointer Register"]
243pub mod rpr;
244#[doc = "RCR (rw) register accessor: Receive Counter Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`rcr::R`].  You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`rcr::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@rcr`]
245module"]
246#[doc(alias = "RCR")]
247pub type Rcr = crate::Reg<rcr::RcrSpec>;
248#[doc = "Receive Counter Register"]
249pub mod rcr;
250#[doc = "TPR (rw) register accessor: Transmit Pointer Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`tpr::R`].  You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`tpr::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@tpr`]
251module"]
252#[doc(alias = "TPR")]
253pub type Tpr = crate::Reg<tpr::TprSpec>;
254#[doc = "Transmit Pointer Register"]
255pub mod tpr;
256#[doc = "TCR (rw) register accessor: Transmit Counter Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`tcr::R`].  You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`tcr::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@tcr`]
257module"]
258#[doc(alias = "TCR")]
259pub type Tcr = crate::Reg<tcr::TcrSpec>;
260#[doc = "Transmit Counter Register"]
261pub mod tcr;
262#[doc = "RNPR (rw) register accessor: Receive Next Pointer Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`rnpr::R`].  You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`rnpr::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@rnpr`]
263module"]
264#[doc(alias = "RNPR")]
265pub type Rnpr = crate::Reg<rnpr::RnprSpec>;
266#[doc = "Receive Next Pointer Register"]
267pub mod rnpr;
268#[doc = "RNCR (rw) register accessor: Receive Next Counter Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`rncr::R`].  You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`rncr::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@rncr`]
269module"]
270#[doc(alias = "RNCR")]
271pub type Rncr = crate::Reg<rncr::RncrSpec>;
272#[doc = "Receive Next Counter Register"]
273pub mod rncr;
274#[doc = "TNPR (rw) register accessor: Transmit Next Pointer Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`tnpr::R`].  You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`tnpr::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@tnpr`]
275module"]
276#[doc(alias = "TNPR")]
277pub type Tnpr = crate::Reg<tnpr::TnprSpec>;
278#[doc = "Transmit Next Pointer Register"]
279pub mod tnpr;
280#[doc = "TNCR (rw) register accessor: Transmit Next Counter Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`tncr::R`].  You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`tncr::W`]. You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@tncr`]
281module"]
282#[doc(alias = "TNCR")]
283pub type Tncr = crate::Reg<tncr::TncrSpec>;
284#[doc = "Transmit Next Counter Register"]
285pub mod tncr;
286#[doc = "PTCR (w) register accessor: Transfer Control Register\n\nYou can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`ptcr::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@ptcr`]
287module"]
288#[doc(alias = "PTCR")]
289pub type Ptcr = crate::Reg<ptcr::PtcrSpec>;
290#[doc = "Transfer Control Register"]
291pub mod ptcr;
292#[doc = "PTSR (r) register accessor: Transfer Status Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`ptsr::R`].  See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@ptsr`]
293module"]
294#[doc(alias = "PTSR")]
295pub type Ptsr = crate::Reg<ptsr::PtsrSpec>;
296#[doc = "Transfer Status Register"]
297pub mod ptsr;