atsam3u4c/
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}
21impl RegisterBlock {
22    #[doc = "0x00 - Control Register"]
23    #[inline(always)]
24    pub const fn cr(&self) -> &Cr {
25        &self.cr
26    }
27    #[doc = "0x04 - Mode Register"]
28    #[inline(always)]
29    pub const fn mr(&self) -> &Mr {
30        &self.mr
31    }
32    #[doc = "0x08 - Receive Data Register"]
33    #[inline(always)]
34    pub const fn rdr(&self) -> &Rdr {
35        &self.rdr
36    }
37    #[doc = "0x0c - Transmit Data Register"]
38    #[inline(always)]
39    pub const fn tdr(&self) -> &Tdr {
40        &self.tdr
41    }
42    #[doc = "0x10 - Status Register"]
43    #[inline(always)]
44    pub const fn sr(&self) -> &Sr {
45        &self.sr
46    }
47    #[doc = "0x14 - Interrupt Enable Register"]
48    #[inline(always)]
49    pub const fn ier(&self) -> &Ier {
50        &self.ier
51    }
52    #[doc = "0x18 - Interrupt Disable Register"]
53    #[inline(always)]
54    pub const fn idr(&self) -> &Idr {
55        &self.idr
56    }
57    #[doc = "0x1c - Interrupt Mask Register"]
58    #[inline(always)]
59    pub const fn imr(&self) -> &Imr {
60        &self.imr
61    }
62    #[doc = "0x30 - Chip Select Register 0"]
63    #[inline(always)]
64    pub const fn csr0(&self) -> &Csr0 {
65        &self.csr0
66    }
67    #[doc = "0x34 - Chip Select Register 1"]
68    #[inline(always)]
69    pub const fn csr1(&self) -> &Csr1 {
70        &self.csr1
71    }
72    #[doc = "0x38 - Chip Select Register 2"]
73    #[inline(always)]
74    pub const fn csr2(&self) -> &Csr2 {
75        &self.csr2
76    }
77    #[doc = "0x3c - Chip Select Register 3"]
78    #[inline(always)]
79    pub const fn csr3(&self) -> &Csr3 {
80        &self.csr3
81    }
82    #[doc = "0xe4 - Write Protection Control Register"]
83    #[inline(always)]
84    pub const fn wpmr(&self) -> &Wpmr {
85        &self.wpmr
86    }
87    #[doc = "0xe8 - Write Protection Status Register"]
88    #[inline(always)]
89    pub const fn wpsr(&self) -> &Wpsr {
90        &self.wpsr
91    }
92}
93#[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`]
94module"]
95#[doc(alias = "CR")]
96pub type Cr = crate::Reg<cr::CrSpec>;
97#[doc = "Control Register"]
98pub mod cr;
99#[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`]
100module"]
101#[doc(alias = "MR")]
102pub type Mr = crate::Reg<mr::MrSpec>;
103#[doc = "Mode Register"]
104pub mod mr;
105#[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`]
106module"]
107#[doc(alias = "RDR")]
108pub type Rdr = crate::Reg<rdr::RdrSpec>;
109#[doc = "Receive Data Register"]
110pub mod rdr;
111#[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`]
112module"]
113#[doc(alias = "TDR")]
114pub type Tdr = crate::Reg<tdr::TdrSpec>;
115#[doc = "Transmit Data Register"]
116pub mod tdr;
117#[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`]
118module"]
119#[doc(alias = "SR")]
120pub type Sr = crate::Reg<sr::SrSpec>;
121#[doc = "Status Register"]
122pub mod sr;
123#[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`]
124module"]
125#[doc(alias = "IER")]
126pub type Ier = crate::Reg<ier::IerSpec>;
127#[doc = "Interrupt Enable Register"]
128pub mod ier;
129#[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`]
130module"]
131#[doc(alias = "IDR")]
132pub type Idr = crate::Reg<idr::IdrSpec>;
133#[doc = "Interrupt Disable Register"]
134pub mod idr;
135#[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`]
136module"]
137#[doc(alias = "IMR")]
138pub type Imr = crate::Reg<imr::ImrSpec>;
139#[doc = "Interrupt Mask Register"]
140pub mod imr;
141#[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`]
142module"]
143#[doc(alias = "CSR0")]
144pub type Csr0 = crate::Reg<csr0::Csr0Spec>;
145#[doc = "Chip Select Register 0"]
146pub mod csr0;
147#[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`]
148module"]
149#[doc(alias = "CSR1")]
150pub type Csr1 = crate::Reg<csr1::Csr1Spec>;
151#[doc = "Chip Select Register 1"]
152pub mod csr1;
153#[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`]
154module"]
155#[doc(alias = "CSR2")]
156pub type Csr2 = crate::Reg<csr2::Csr2Spec>;
157#[doc = "Chip Select Register 2"]
158pub mod csr2;
159#[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`]
160module"]
161#[doc(alias = "CSR3")]
162pub type Csr3 = crate::Reg<csr3::Csr3Spec>;
163#[doc = "Chip Select Register 3"]
164pub mod csr3;
165#[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`]
166module"]
167#[doc(alias = "WPMR")]
168pub type Wpmr = crate::Reg<wpmr::WpmrSpec>;
169#[doc = "Write Protection Control Register"]
170pub mod wpmr;
171#[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`]
172module"]
173#[doc(alias = "WPSR")]
174pub type Wpsr = crate::Reg<wpsr::WpsrSpec>;
175#[doc = "Write Protection Status Register"]
176pub mod wpsr;