atsam3n4a/
uart1.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}
14impl RegisterBlock {
15    #[doc = "0x00 - Control Register"]
16    #[inline(always)]
17    pub const fn cr(&self) -> &Cr {
18        &self.cr
19    }
20    #[doc = "0x04 - Mode Register"]
21    #[inline(always)]
22    pub const fn mr(&self) -> &Mr {
23        &self.mr
24    }
25    #[doc = "0x08 - Interrupt Enable Register"]
26    #[inline(always)]
27    pub const fn ier(&self) -> &Ier {
28        &self.ier
29    }
30    #[doc = "0x0c - Interrupt Disable Register"]
31    #[inline(always)]
32    pub const fn idr(&self) -> &Idr {
33        &self.idr
34    }
35    #[doc = "0x10 - Interrupt Mask Register"]
36    #[inline(always)]
37    pub const fn imr(&self) -> &Imr {
38        &self.imr
39    }
40    #[doc = "0x14 - Status Register"]
41    #[inline(always)]
42    pub const fn sr(&self) -> &Sr {
43        &self.sr
44    }
45    #[doc = "0x18 - Receive Holding Register"]
46    #[inline(always)]
47    pub const fn rhr(&self) -> &Rhr {
48        &self.rhr
49    }
50    #[doc = "0x1c - Transmit Holding Register"]
51    #[inline(always)]
52    pub const fn thr(&self) -> &Thr {
53        &self.thr
54    }
55    #[doc = "0x20 - Baud Rate Generator Register"]
56    #[inline(always)]
57    pub const fn brgr(&self) -> &Brgr {
58        &self.brgr
59    }
60}
61#[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`]
62module"]
63#[doc(alias = "CR")]
64pub type Cr = crate::Reg<cr::CrSpec>;
65#[doc = "Control Register"]
66pub mod cr;
67#[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`]
68module"]
69#[doc(alias = "MR")]
70pub type Mr = crate::Reg<mr::MrSpec>;
71#[doc = "Mode Register"]
72pub mod mr;
73#[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`]
74module"]
75#[doc(alias = "IER")]
76pub type Ier = crate::Reg<ier::IerSpec>;
77#[doc = "Interrupt Enable Register"]
78pub mod ier;
79#[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`]
80module"]
81#[doc(alias = "IDR")]
82pub type Idr = crate::Reg<idr::IdrSpec>;
83#[doc = "Interrupt Disable Register"]
84pub mod idr;
85#[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`]
86module"]
87#[doc(alias = "IMR")]
88pub type Imr = crate::Reg<imr::ImrSpec>;
89#[doc = "Interrupt Mask Register"]
90pub mod imr;
91#[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`]
92module"]
93#[doc(alias = "SR")]
94pub type Sr = crate::Reg<sr::SrSpec>;
95#[doc = "Status Register"]
96pub mod sr;
97#[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`]
98module"]
99#[doc(alias = "RHR")]
100pub type Rhr = crate::Reg<rhr::RhrSpec>;
101#[doc = "Receive Holding Register"]
102pub mod rhr;
103#[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`]
104module"]
105#[doc(alias = "THR")]
106pub type Thr = crate::Reg<thr::ThrSpec>;
107#[doc = "Transmit Holding Register"]
108pub mod thr;
109#[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`]
110module"]
111#[doc(alias = "BRGR")]
112pub type Brgr = crate::Reg<brgr::BrgrSpec>;
113#[doc = "Baud Rate Generator Register"]
114pub mod brgr;