atsam3s2c/
uart0.rs

1#[repr(C)]
2#[doc = "Register block"]
3pub struct RegisterBlock {
4    cr: Cr,
5    mr: Mr,
6    ier: Ier,
7    idr: Idr,
8    imr: Imr,
9    sr: Sr,
10    rhr: Rhr,
11    thr: Thr,
12    brgr: Brgr,
13    _reserved9: [u8; 0xdc],
14    rpr: Rpr,
15    rcr: Rcr,
16    tpr: Tpr,
17    tcr: Tcr,
18    rnpr: Rnpr,
19    rncr: Rncr,
20    tnpr: Tnpr,
21    tncr: Tncr,
22    ptcr: Ptcr,
23    ptsr: Ptsr,
24}
25impl RegisterBlock {
26    #[doc = "0x00 - Control Register"]
27    #[inline(always)]
28    pub const fn cr(&self) -> &Cr {
29        &self.cr
30    }
31    #[doc = "0x04 - Mode Register"]
32    #[inline(always)]
33    pub const fn mr(&self) -> &Mr {
34        &self.mr
35    }
36    #[doc = "0x08 - Interrupt Enable Register"]
37    #[inline(always)]
38    pub const fn ier(&self) -> &Ier {
39        &self.ier
40    }
41    #[doc = "0x0c - Interrupt Disable Register"]
42    #[inline(always)]
43    pub const fn idr(&self) -> &Idr {
44        &self.idr
45    }
46    #[doc = "0x10 - Interrupt Mask Register"]
47    #[inline(always)]
48    pub const fn imr(&self) -> &Imr {
49        &self.imr
50    }
51    #[doc = "0x14 - Status Register"]
52    #[inline(always)]
53    pub const fn sr(&self) -> &Sr {
54        &self.sr
55    }
56    #[doc = "0x18 - Receive Holding Register"]
57    #[inline(always)]
58    pub const fn rhr(&self) -> &Rhr {
59        &self.rhr
60    }
61    #[doc = "0x1c - Transmit Holding Register"]
62    #[inline(always)]
63    pub const fn thr(&self) -> &Thr {
64        &self.thr
65    }
66    #[doc = "0x20 - Baud Rate Generator Register"]
67    #[inline(always)]
68    pub const fn brgr(&self) -> &Brgr {
69        &self.brgr
70    }
71    #[doc = "0x100 - Receive Pointer Register"]
72    #[inline(always)]
73    pub const fn rpr(&self) -> &Rpr {
74        &self.rpr
75    }
76    #[doc = "0x104 - Receive Counter Register"]
77    #[inline(always)]
78    pub const fn rcr(&self) -> &Rcr {
79        &self.rcr
80    }
81    #[doc = "0x108 - Transmit Pointer Register"]
82    #[inline(always)]
83    pub const fn tpr(&self) -> &Tpr {
84        &self.tpr
85    }
86    #[doc = "0x10c - Transmit Counter Register"]
87    #[inline(always)]
88    pub const fn tcr(&self) -> &Tcr {
89        &self.tcr
90    }
91    #[doc = "0x110 - Receive Next Pointer Register"]
92    #[inline(always)]
93    pub const fn rnpr(&self) -> &Rnpr {
94        &self.rnpr
95    }
96    #[doc = "0x114 - Receive Next Counter Register"]
97    #[inline(always)]
98    pub const fn rncr(&self) -> &Rncr {
99        &self.rncr
100    }
101    #[doc = "0x118 - Transmit Next Pointer Register"]
102    #[inline(always)]
103    pub const fn tnpr(&self) -> &Tnpr {
104        &self.tnpr
105    }
106    #[doc = "0x11c - Transmit Next Counter Register"]
107    #[inline(always)]
108    pub const fn tncr(&self) -> &Tncr {
109        &self.tncr
110    }
111    #[doc = "0x120 - Transfer Control Register"]
112    #[inline(always)]
113    pub const fn ptcr(&self) -> &Ptcr {
114        &self.ptcr
115    }
116    #[doc = "0x124 - Transfer Status Register"]
117    #[inline(always)]
118    pub const fn ptsr(&self) -> &Ptsr {
119        &self.ptsr
120    }
121}
122#[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`]
123module"]
124#[doc(alias = "CR")]
125pub type Cr = crate::Reg<cr::CrSpec>;
126#[doc = "Control Register"]
127pub mod cr;
128#[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`]
129module"]
130#[doc(alias = "MR")]
131pub type Mr = crate::Reg<mr::MrSpec>;
132#[doc = "Mode Register"]
133pub mod mr;
134#[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`]
135module"]
136#[doc(alias = "IER")]
137pub type Ier = crate::Reg<ier::IerSpec>;
138#[doc = "Interrupt Enable Register"]
139pub mod ier;
140#[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`]
141module"]
142#[doc(alias = "IDR")]
143pub type Idr = crate::Reg<idr::IdrSpec>;
144#[doc = "Interrupt Disable Register"]
145pub mod idr;
146#[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`]
147module"]
148#[doc(alias = "IMR")]
149pub type Imr = crate::Reg<imr::ImrSpec>;
150#[doc = "Interrupt Mask Register"]
151pub mod imr;
152#[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`]
153module"]
154#[doc(alias = "SR")]
155pub type Sr = crate::Reg<sr::SrSpec>;
156#[doc = "Status Register"]
157pub mod sr;
158#[doc = "RHR (r) register accessor: Receive Holding Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`rhr::R`].  See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@rhr`]
159module"]
160#[doc(alias = "RHR")]
161pub type Rhr = crate::Reg<rhr::RhrSpec>;
162#[doc = "Receive Holding Register"]
163pub mod rhr;
164#[doc = "THR (w) register accessor: Transmit Holding Register\n\nYou can [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`thr::W`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@thr`]
165module"]
166#[doc(alias = "THR")]
167pub type Thr = crate::Reg<thr::ThrSpec>;
168#[doc = "Transmit Holding Register"]
169pub mod thr;
170#[doc = "BRGR (rw) register accessor: Baud Rate Generator Register\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`brgr::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 [`brgr::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@brgr`]
171module"]
172#[doc(alias = "BRGR")]
173pub type Brgr = crate::Reg<brgr::BrgrSpec>;
174#[doc = "Baud Rate Generator Register"]
175pub mod brgr;
176#[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`]
177module"]
178#[doc(alias = "RPR")]
179pub type Rpr = crate::Reg<rpr::RprSpec>;
180#[doc = "Receive Pointer Register"]
181pub mod rpr;
182#[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`]
183module"]
184#[doc(alias = "RCR")]
185pub type Rcr = crate::Reg<rcr::RcrSpec>;
186#[doc = "Receive Counter Register"]
187pub mod rcr;
188#[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`]
189module"]
190#[doc(alias = "TPR")]
191pub type Tpr = crate::Reg<tpr::TprSpec>;
192#[doc = "Transmit Pointer Register"]
193pub mod tpr;
194#[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`]
195module"]
196#[doc(alias = "TCR")]
197pub type Tcr = crate::Reg<tcr::TcrSpec>;
198#[doc = "Transmit Counter Register"]
199pub mod tcr;
200#[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`]
201module"]
202#[doc(alias = "RNPR")]
203pub type Rnpr = crate::Reg<rnpr::RnprSpec>;
204#[doc = "Receive Next Pointer Register"]
205pub mod rnpr;
206#[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`]
207module"]
208#[doc(alias = "RNCR")]
209pub type Rncr = crate::Reg<rncr::RncrSpec>;
210#[doc = "Receive Next Counter Register"]
211pub mod rncr;
212#[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`]
213module"]
214#[doc(alias = "TNPR")]
215pub type Tnpr = crate::Reg<tnpr::TnprSpec>;
216#[doc = "Transmit Next Pointer Register"]
217pub mod tnpr;
218#[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`]
219module"]
220#[doc(alias = "TNCR")]
221pub type Tncr = crate::Reg<tncr::TncrSpec>;
222#[doc = "Transmit Next Counter Register"]
223pub mod tncr;
224#[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`]
225module"]
226#[doc(alias = "PTCR")]
227pub type Ptcr = crate::Reg<ptcr::PtcrSpec>;
228#[doc = "Transfer Control Register"]
229pub mod ptcr;
230#[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`]
231module"]
232#[doc(alias = "PTSR")]
233pub type Ptsr = crate::Reg<ptsr::PtsrSpec>;
234#[doc = "Transfer Status Register"]
235pub mod ptsr;