atsamd51j/sercom0/
usart_ext.rs

1#[repr(C)]
2#[doc = "USART EXTERNAL CLOCK Mode"]
3#[doc(alias = "USART_EXT")]
4pub struct UsartExt {
5    ctrla: Ctrla,
6    ctrlb: Ctrlb,
7    ctrlc: Ctrlc,
8    _reserved_3_baud: [u8; 0x02],
9    rxpl: Rxpl,
10    _reserved5: [u8; 0x05],
11    intenclr: Intenclr,
12    _reserved6: [u8; 0x01],
13    intenset: Intenset,
14    _reserved7: [u8; 0x01],
15    intflag: Intflag,
16    _reserved8: [u8; 0x01],
17    status: Status,
18    syncbusy: Syncbusy,
19    rxerrcnt: Rxerrcnt,
20    _reserved11: [u8; 0x01],
21    length: Length,
22    _reserved12: [u8; 0x04],
23    data: Data,
24    _reserved13: [u8; 0x04],
25    dbgctrl: Dbgctrl,
26}
27impl UsartExt {
28    #[doc = "0x00 - USART_EXT Control A"]
29    #[inline(always)]
30    pub const fn ctrla(&self) -> &Ctrla {
31        &self.ctrla
32    }
33    #[doc = "0x04 - USART_EXT Control B"]
34    #[inline(always)]
35    pub const fn ctrlb(&self) -> &Ctrlb {
36        &self.ctrlb
37    }
38    #[doc = "0x08 - USART_EXT Control C"]
39    #[inline(always)]
40    pub const fn ctrlc(&self) -> &Ctrlc {
41        &self.ctrlc
42    }
43    #[doc = "0x0c - USART_EXT Baud Rate"]
44    #[inline(always)]
45    pub const fn baud_usartfp_mode(&self) -> &BaudUsartfpMode {
46        unsafe { &*(self as *const Self).cast::<u8>().add(12).cast() }
47    }
48    #[doc = "0x0c - USART_EXT Baud Rate"]
49    #[inline(always)]
50    pub const fn baud_fracfp_mode(&self) -> &BaudFracfpMode {
51        unsafe { &*(self as *const Self).cast::<u8>().add(12).cast() }
52    }
53    #[doc = "0x0c - USART_EXT Baud Rate"]
54    #[inline(always)]
55    pub const fn baud_frac_mode(&self) -> &BaudFracMode {
56        unsafe { &*(self as *const Self).cast::<u8>().add(12).cast() }
57    }
58    #[doc = "0x0c - USART_EXT Baud Rate"]
59    #[inline(always)]
60    pub const fn baud(&self) -> &Baud {
61        unsafe { &*(self as *const Self).cast::<u8>().add(12).cast() }
62    }
63    #[doc = "0x0e - USART_EXT Receive Pulse Length"]
64    #[inline(always)]
65    pub const fn rxpl(&self) -> &Rxpl {
66        &self.rxpl
67    }
68    #[doc = "0x14 - USART_EXT Interrupt Enable Clear"]
69    #[inline(always)]
70    pub const fn intenclr(&self) -> &Intenclr {
71        &self.intenclr
72    }
73    #[doc = "0x16 - USART_EXT Interrupt Enable Set"]
74    #[inline(always)]
75    pub const fn intenset(&self) -> &Intenset {
76        &self.intenset
77    }
78    #[doc = "0x18 - USART_EXT Interrupt Flag Status and Clear"]
79    #[inline(always)]
80    pub const fn intflag(&self) -> &Intflag {
81        &self.intflag
82    }
83    #[doc = "0x1a - USART_EXT Status"]
84    #[inline(always)]
85    pub const fn status(&self) -> &Status {
86        &self.status
87    }
88    #[doc = "0x1c - USART_EXT Synchronization Busy"]
89    #[inline(always)]
90    pub const fn syncbusy(&self) -> &Syncbusy {
91        &self.syncbusy
92    }
93    #[doc = "0x20 - USART_EXT Receive Error Count"]
94    #[inline(always)]
95    pub const fn rxerrcnt(&self) -> &Rxerrcnt {
96        &self.rxerrcnt
97    }
98    #[doc = "0x22 - USART_EXT Length"]
99    #[inline(always)]
100    pub const fn length(&self) -> &Length {
101        &self.length
102    }
103    #[doc = "0x28 - USART_EXT Data"]
104    #[inline(always)]
105    pub const fn data(&self) -> &Data {
106        &self.data
107    }
108    #[doc = "0x30 - USART_EXT Debug Control"]
109    #[inline(always)]
110    pub const fn dbgctrl(&self) -> &Dbgctrl {
111        &self.dbgctrl
112    }
113}
114#[doc = "CTRLA (rw) register accessor: USART_EXT Control A\n\nYou can [`read`](crate::Reg::read) this register and get [`ctrla::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ctrla::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@ctrla`]
115module"]
116#[doc(alias = "CTRLA")]
117pub type Ctrla = crate::Reg<ctrla::CtrlaSpec>;
118#[doc = "USART_EXT Control A"]
119pub mod ctrla;
120#[doc = "CTRLB (rw) register accessor: USART_EXT Control B\n\nYou can [`read`](crate::Reg::read) this register and get [`ctrlb::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ctrlb::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@ctrlb`]
121module"]
122#[doc(alias = "CTRLB")]
123pub type Ctrlb = crate::Reg<ctrlb::CtrlbSpec>;
124#[doc = "USART_EXT Control B"]
125pub mod ctrlb;
126#[doc = "CTRLC (rw) register accessor: USART_EXT Control C\n\nYou can [`read`](crate::Reg::read) this register and get [`ctrlc::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`ctrlc::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@ctrlc`]
127module"]
128#[doc(alias = "CTRLC")]
129pub type Ctrlc = crate::Reg<ctrlc::CtrlcSpec>;
130#[doc = "USART_EXT Control C"]
131pub mod ctrlc;
132#[doc = "BAUD (rw) register accessor: USART_EXT Baud Rate\n\nYou can [`read`](crate::Reg::read) this register and get [`baud::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`baud::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@baud`]
133module"]
134#[doc(alias = "BAUD")]
135pub type Baud = crate::Reg<baud::BaudSpec>;
136#[doc = "USART_EXT Baud Rate"]
137pub mod baud;
138#[doc = "BAUD_FRAC_MODE (rw) register accessor: USART_EXT Baud Rate\n\nYou can [`read`](crate::Reg::read) this register and get [`baud_frac_mode::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`baud_frac_mode::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@baud_frac_mode`]
139module"]
140#[doc(alias = "BAUD_FRAC_MODE")]
141pub type BaudFracMode = crate::Reg<baud_frac_mode::BaudFracModeSpec>;
142#[doc = "USART_EXT Baud Rate"]
143pub mod baud_frac_mode;
144#[doc = "BAUD_FRACFP_MODE (rw) register accessor: USART_EXT Baud Rate\n\nYou can [`read`](crate::Reg::read) this register and get [`baud_fracfp_mode::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`baud_fracfp_mode::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@baud_fracfp_mode`]
145module"]
146#[doc(alias = "BAUD_FRACFP_MODE")]
147pub type BaudFracfpMode = crate::Reg<baud_fracfp_mode::BaudFracfpModeSpec>;
148#[doc = "USART_EXT Baud Rate"]
149pub mod baud_fracfp_mode;
150#[doc = "BAUD_USARTFP_MODE (rw) register accessor: USART_EXT Baud Rate\n\nYou can [`read`](crate::Reg::read) this register and get [`baud_usartfp_mode::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`baud_usartfp_mode::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@baud_usartfp_mode`]
151module"]
152#[doc(alias = "BAUD_USARTFP_MODE")]
153pub type BaudUsartfpMode = crate::Reg<baud_usartfp_mode::BaudUsartfpModeSpec>;
154#[doc = "USART_EXT Baud Rate"]
155pub mod baud_usartfp_mode;
156#[doc = "RXPL (rw) register accessor: USART_EXT Receive Pulse Length\n\nYou can [`read`](crate::Reg::read) this register and get [`rxpl::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`rxpl::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@rxpl`]
157module"]
158#[doc(alias = "RXPL")]
159pub type Rxpl = crate::Reg<rxpl::RxplSpec>;
160#[doc = "USART_EXT Receive Pulse Length"]
161pub mod rxpl;
162#[doc = "INTENCLR (rw) register accessor: USART_EXT Interrupt Enable Clear\n\nYou can [`read`](crate::Reg::read) this register and get [`intenclr::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`intenclr::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@intenclr`]
163module"]
164#[doc(alias = "INTENCLR")]
165pub type Intenclr = crate::Reg<intenclr::IntenclrSpec>;
166#[doc = "USART_EXT Interrupt Enable Clear"]
167pub mod intenclr;
168#[doc = "INTENSET (rw) register accessor: USART_EXT Interrupt Enable Set\n\nYou can [`read`](crate::Reg::read) this register and get [`intenset::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`intenset::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@intenset`]
169module"]
170#[doc(alias = "INTENSET")]
171pub type Intenset = crate::Reg<intenset::IntensetSpec>;
172#[doc = "USART_EXT Interrupt Enable Set"]
173pub mod intenset;
174#[doc = "INTFLAG (rw) register accessor: USART_EXT Interrupt Flag Status and Clear\n\nYou can [`read`](crate::Reg::read) this register and get [`intflag::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`intflag::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@intflag`]
175module"]
176#[doc(alias = "INTFLAG")]
177pub type Intflag = crate::Reg<intflag::IntflagSpec>;
178#[doc = "USART_EXT Interrupt Flag Status and Clear"]
179pub mod intflag;
180#[doc = "STATUS (rw) register accessor: USART_EXT Status\n\nYou can [`read`](crate::Reg::read) this register and get [`status::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`status::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@status`]
181module"]
182#[doc(alias = "STATUS")]
183pub type Status = crate::Reg<status::StatusSpec>;
184#[doc = "USART_EXT Status"]
185pub mod status;
186#[doc = "SYNCBUSY (r) register accessor: USART_EXT Synchronization Busy\n\nYou can [`read`](crate::Reg::read) this register and get [`syncbusy::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@syncbusy`]
187module"]
188#[doc(alias = "SYNCBUSY")]
189pub type Syncbusy = crate::Reg<syncbusy::SyncbusySpec>;
190#[doc = "USART_EXT Synchronization Busy"]
191pub mod syncbusy;
192#[doc = "RXERRCNT (r) register accessor: USART_EXT Receive Error Count\n\nYou can [`read`](crate::Reg::read) this register and get [`rxerrcnt::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@rxerrcnt`]
193module"]
194#[doc(alias = "RXERRCNT")]
195pub type Rxerrcnt = crate::Reg<rxerrcnt::RxerrcntSpec>;
196#[doc = "USART_EXT Receive Error Count"]
197pub mod rxerrcnt;
198#[doc = "LENGTH (rw) register accessor: USART_EXT Length\n\nYou can [`read`](crate::Reg::read) this register and get [`length::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`length::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@length`]
199module"]
200#[doc(alias = "LENGTH")]
201pub type Length = crate::Reg<length::LengthSpec>;
202#[doc = "USART_EXT Length"]
203pub mod length;
204#[doc = "DATA (rw) register accessor: USART_EXT Data\n\nYou can [`read`](crate::Reg::read) this register and get [`data::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`data::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@data`]
205module"]
206#[doc(alias = "DATA")]
207pub type Data = crate::Reg<data::DataSpec>;
208#[doc = "USART_EXT Data"]
209pub mod data;
210#[doc = "DBGCTRL (rw) register accessor: USART_EXT Debug Control\n\nYou can [`read`](crate::Reg::read) this register and get [`dbgctrl::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`dbgctrl::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@dbgctrl`]
211module"]
212#[doc(alias = "DBGCTRL")]
213pub type Dbgctrl = crate::Reg<dbgctrl::DbgctrlSpec>;
214#[doc = "USART_EXT Debug Control"]
215pub mod dbgctrl;