1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
#[doc = r"Register block"]
#[repr(C)]
pub struct RegisterBlock {
_reserved_0_i2cm: [u8; 0x31],
}
impl RegisterBlock {
#[doc = "0x00..0x31 - USART INTERNAL CLOCK Mode"]
#[inline(always)]
pub fn usart_int(&self) -> &USART_INT {
unsafe { &*(((self as *const Self) as *const u8).add(0usize) as *const USART_INT) }
}
#[doc = "0x00..0x31 - USART EXTERNAL CLOCK Mode"]
#[inline(always)]
pub fn usart_ext(&self) -> &USART_EXT {
unsafe { &*(((self as *const Self) as *const u8).add(0usize) as *const USART_EXT) }
}
#[doc = "0x00..0x31 - SPI Master Mode"]
#[inline(always)]
pub fn spim(&self) -> &SPIM {
unsafe { &*(((self as *const Self) as *const u8).add(0usize) as *const SPIM) }
}
#[doc = "0x00..0x31 - SPI Slave Mode"]
#[inline(always)]
pub fn spis(&self) -> &SPIS {
unsafe { &*(((self as *const Self) as *const u8).add(0usize) as *const SPIS) }
}
#[doc = "0x00..0x2c - I2C Slave Mode"]
#[inline(always)]
pub fn i2cs(&self) -> &I2CS {
unsafe { &*(((self as *const Self) as *const u8).add(0usize) as *const I2CS) }
}
#[doc = "0x00..0x31 - I2C Master Mode"]
#[inline(always)]
pub fn i2cm(&self) -> &I2CM {
unsafe { &*(((self as *const Self) as *const u8).add(0usize) as *const I2CM) }
}
}
#[doc = r"Register block"]
#[repr(C)]
pub struct I2CM {
#[doc = "0x00 - I2CM Control A"]
pub ctrla: crate::Reg<self::i2cm::ctrla::CTRLA_SPEC>,
#[doc = "0x04 - I2CM Control B"]
pub ctrlb: crate::Reg<self::i2cm::ctrlb::CTRLB_SPEC>,
#[doc = "0x08 - I2CM Control C"]
pub ctrlc: crate::Reg<self::i2cm::ctrlc::CTRLC_SPEC>,
#[doc = "0x0c - I2CM Baud Rate"]
pub baud: crate::Reg<self::i2cm::baud::BAUD_SPEC>,
_reserved4: [u8; 0x04],
#[doc = "0x14 - I2CM Interrupt Enable Clear"]
pub intenclr: crate::Reg<self::i2cm::intenclr::INTENCLR_SPEC>,
_reserved5: [u8; 0x01],
#[doc = "0x16 - I2CM Interrupt Enable Set"]
pub intenset: crate::Reg<self::i2cm::intenset::INTENSET_SPEC>,
_reserved6: [u8; 0x01],
#[doc = "0x18 - I2CM Interrupt Flag Status and Clear"]
pub intflag: crate::Reg<self::i2cm::intflag::INTFLAG_SPEC>,
_reserved7: [u8; 0x01],
#[doc = "0x1a - I2CM Status"]
pub status: crate::Reg<self::i2cm::status::STATUS_SPEC>,
#[doc = "0x1c - I2CM Synchronization Busy"]
pub syncbusy: crate::Reg<self::i2cm::syncbusy::SYNCBUSY_SPEC>,
_reserved9: [u8; 0x04],
#[doc = "0x24 - I2CM Address"]
pub addr: crate::Reg<self::i2cm::addr::ADDR_SPEC>,
#[doc = "0x28 - I2CM Data"]
pub data: crate::Reg<self::i2cm::data::DATA_SPEC>,
_reserved11: [u8; 0x07],
#[doc = "0x30 - I2CM Debug Control"]
pub dbgctrl: crate::Reg<self::i2cm::dbgctrl::DBGCTRL_SPEC>,
}
#[doc = r"Register block"]
#[doc = "I2C Master Mode"]
pub mod i2cm;
#[doc = r"Register block"]
#[repr(C)]
pub struct I2CS {
#[doc = "0x00 - I2CS Control A"]
pub ctrla: crate::Reg<self::i2cs::ctrla::CTRLA_SPEC>,
#[doc = "0x04 - I2CS Control B"]
pub ctrlb: crate::Reg<self::i2cs::ctrlb::CTRLB_SPEC>,
#[doc = "0x08 - I2CS Control C"]
pub ctrlc: crate::Reg<self::i2cs::ctrlc::CTRLC_SPEC>,
_reserved3: [u8; 0x08],
#[doc = "0x14 - I2CS Interrupt Enable Clear"]
pub intenclr: crate::Reg<self::i2cs::intenclr::INTENCLR_SPEC>,
_reserved4: [u8; 0x01],
#[doc = "0x16 - I2CS Interrupt Enable Set"]
pub intenset: crate::Reg<self::i2cs::intenset::INTENSET_SPEC>,
_reserved5: [u8; 0x01],
#[doc = "0x18 - I2CS Interrupt Flag Status and Clear"]
pub intflag: crate::Reg<self::i2cs::intflag::INTFLAG_SPEC>,
_reserved6: [u8; 0x01],
#[doc = "0x1a - I2CS Status"]
pub status: crate::Reg<self::i2cs::status::STATUS_SPEC>,
#[doc = "0x1c - I2CS Synchronization Busy"]
pub syncbusy: crate::Reg<self::i2cs::syncbusy::SYNCBUSY_SPEC>,
_reserved8: [u8; 0x02],
#[doc = "0x22 - I2CS Length"]
pub length: crate::Reg<self::i2cs::length::LENGTH_SPEC>,
#[doc = "0x24 - I2CS Address"]
pub addr: crate::Reg<self::i2cs::addr::ADDR_SPEC>,
#[doc = "0x28 - I2CS Data"]
pub data: crate::Reg<self::i2cs::data::DATA_SPEC>,
}
#[doc = r"Register block"]
#[doc = "I2C Slave Mode"]
pub mod i2cs;
#[doc = r"Register block"]
#[repr(C)]
pub struct SPIS {
#[doc = "0x00 - SPIS Control A"]
pub ctrla: crate::Reg<self::spis::ctrla::CTRLA_SPEC>,
#[doc = "0x04 - SPIS Control B"]
pub ctrlb: crate::Reg<self::spis::ctrlb::CTRLB_SPEC>,
#[doc = "0x08 - SPIS Control C"]
pub ctrlc: crate::Reg<self::spis::ctrlc::CTRLC_SPEC>,
#[doc = "0x0c - SPIS Baud Rate"]
pub baud: crate::Reg<self::spis::baud::BAUD_SPEC>,
_reserved4: [u8; 0x07],
#[doc = "0x14 - SPIS Interrupt Enable Clear"]
pub intenclr: crate::Reg<self::spis::intenclr::INTENCLR_SPEC>,
_reserved5: [u8; 0x01],
#[doc = "0x16 - SPIS Interrupt Enable Set"]
pub intenset: crate::Reg<self::spis::intenset::INTENSET_SPEC>,
_reserved6: [u8; 0x01],
#[doc = "0x18 - SPIS Interrupt Flag Status and Clear"]
pub intflag: crate::Reg<self::spis::intflag::INTFLAG_SPEC>,
_reserved7: [u8; 0x01],
#[doc = "0x1a - SPIS Status"]
pub status: crate::Reg<self::spis::status::STATUS_SPEC>,
#[doc = "0x1c - SPIS Synchronization Busy"]
pub syncbusy: crate::Reg<self::spis::syncbusy::SYNCBUSY_SPEC>,
_reserved9: [u8; 0x02],
#[doc = "0x22 - SPIS Length"]
pub length: crate::Reg<self::spis::length::LENGTH_SPEC>,
#[doc = "0x24 - SPIS Address"]
pub addr: crate::Reg<self::spis::addr::ADDR_SPEC>,
#[doc = "0x28 - SPIS Data"]
pub data: crate::Reg<self::spis::data::DATA_SPEC>,
_reserved12: [u8; 0x04],
#[doc = "0x30 - SPIS Debug Control"]
pub dbgctrl: crate::Reg<self::spis::dbgctrl::DBGCTRL_SPEC>,
}
#[doc = r"Register block"]
#[doc = "SPI Slave Mode"]
pub mod spis;
#[doc = r"Register block"]
#[repr(C)]
pub struct SPIM {
#[doc = "0x00 - SPIM Control A"]
pub ctrla: crate::Reg<self::spim::ctrla::CTRLA_SPEC>,
#[doc = "0x04 - SPIM Control B"]
pub ctrlb: crate::Reg<self::spim::ctrlb::CTRLB_SPEC>,
#[doc = "0x08 - SPIM Control C"]
pub ctrlc: crate::Reg<self::spim::ctrlc::CTRLC_SPEC>,
#[doc = "0x0c - SPIM Baud Rate"]
pub baud: crate::Reg<self::spim::baud::BAUD_SPEC>,
_reserved4: [u8; 0x07],
#[doc = "0x14 - SPIM Interrupt Enable Clear"]
pub intenclr: crate::Reg<self::spim::intenclr::INTENCLR_SPEC>,
_reserved5: [u8; 0x01],
#[doc = "0x16 - SPIM Interrupt Enable Set"]
pub intenset: crate::Reg<self::spim::intenset::INTENSET_SPEC>,
_reserved6: [u8; 0x01],
#[doc = "0x18 - SPIM Interrupt Flag Status and Clear"]
pub intflag: crate::Reg<self::spim::intflag::INTFLAG_SPEC>,
_reserved7: [u8; 0x01],
#[doc = "0x1a - SPIM Status"]
pub status: crate::Reg<self::spim::status::STATUS_SPEC>,
#[doc = "0x1c - SPIM Synchronization Busy"]
pub syncbusy: crate::Reg<self::spim::syncbusy::SYNCBUSY_SPEC>,
_reserved9: [u8; 0x02],
#[doc = "0x22 - SPIM Length"]
pub length: crate::Reg<self::spim::length::LENGTH_SPEC>,
#[doc = "0x24 - SPIM Address"]
pub addr: crate::Reg<self::spim::addr::ADDR_SPEC>,
#[doc = "0x28 - SPIM Data"]
pub data: crate::Reg<self::spim::data::DATA_SPEC>,
_reserved12: [u8; 0x04],
#[doc = "0x30 - SPIM Debug Control"]
pub dbgctrl: crate::Reg<self::spim::dbgctrl::DBGCTRL_SPEC>,
}
#[doc = r"Register block"]
#[doc = "SPI Master Mode"]
pub mod spim;
#[doc = r"Register block"]
#[repr(C)]
pub struct USART_EXT {
#[doc = "0x00 - USART_EXT Control A"]
pub ctrla: crate::Reg<self::usart_ext::ctrla::CTRLA_SPEC>,
#[doc = "0x04 - USART_EXT Control B"]
pub ctrlb: crate::Reg<self::usart_ext::ctrlb::CTRLB_SPEC>,
#[doc = "0x08 - USART_EXT Control C"]
pub ctrlc: crate::Reg<self::usart_ext::ctrlc::CTRLC_SPEC>,
_reserved_3_baud: [u8; 0x02],
#[doc = "0x0e - USART_EXT Receive Pulse Length"]
pub rxpl: crate::Reg<self::usart_ext::rxpl::RXPL_SPEC>,
_reserved5: [u8; 0x05],
#[doc = "0x14 - USART_EXT Interrupt Enable Clear"]
pub intenclr: crate::Reg<self::usart_ext::intenclr::INTENCLR_SPEC>,
_reserved6: [u8; 0x01],
#[doc = "0x16 - USART_EXT Interrupt Enable Set"]
pub intenset: crate::Reg<self::usart_ext::intenset::INTENSET_SPEC>,
_reserved7: [u8; 0x01],
#[doc = "0x18 - USART_EXT Interrupt Flag Status and Clear"]
pub intflag: crate::Reg<self::usart_ext::intflag::INTFLAG_SPEC>,
_reserved8: [u8; 0x01],
#[doc = "0x1a - USART_EXT Status"]
pub status: crate::Reg<self::usart_ext::status::STATUS_SPEC>,
#[doc = "0x1c - USART_EXT Synchronization Busy"]
pub syncbusy: crate::Reg<self::usart_ext::syncbusy::SYNCBUSY_SPEC>,
#[doc = "0x20 - USART_EXT Receive Error Count"]
pub rxerrcnt: crate::Reg<self::usart_ext::rxerrcnt::RXERRCNT_SPEC>,
_reserved11: [u8; 0x01],
#[doc = "0x22 - USART_EXT Length"]
pub length: crate::Reg<self::usart_ext::length::LENGTH_SPEC>,
_reserved12: [u8; 0x04],
#[doc = "0x28 - USART_EXT Data"]
pub data: crate::Reg<self::usart_ext::data::DATA_SPEC>,
_reserved13: [u8; 0x04],
#[doc = "0x30 - USART_EXT Debug Control"]
pub dbgctrl: crate::Reg<self::usart_ext::dbgctrl::DBGCTRL_SPEC>,
}
impl USART_EXT {
#[doc = "0x0c - USART_EXT Baud Rate"]
#[inline(always)]
pub fn baud_usartfp_mode(
&self,
) -> &crate::Reg<self::usart_ext::baud_usartfp_mode::BAUD_USARTFP_MODE_SPEC> {
unsafe {
&*(((self as *const Self) as *const u8).add(12usize)
as *const crate::Reg<self::usart_ext::baud_usartfp_mode::BAUD_USARTFP_MODE_SPEC>)
}
}
#[doc = "0x0c - USART_EXT Baud Rate"]
#[inline(always)]
pub fn baud_fracfp_mode(
&self,
) -> &crate::Reg<self::usart_ext::baud_fracfp_mode::BAUD_FRACFP_MODE_SPEC> {
unsafe {
&*(((self as *const Self) as *const u8).add(12usize)
as *const crate::Reg<self::usart_ext::baud_fracfp_mode::BAUD_FRACFP_MODE_SPEC>)
}
}
#[doc = "0x0c - USART_EXT Baud Rate"]
#[inline(always)]
pub fn baud_frac_mode(
&self,
) -> &crate::Reg<self::usart_ext::baud_frac_mode::BAUD_FRAC_MODE_SPEC> {
unsafe {
&*(((self as *const Self) as *const u8).add(12usize)
as *const crate::Reg<self::usart_ext::baud_frac_mode::BAUD_FRAC_MODE_SPEC>)
}
}
#[doc = "0x0c - USART_EXT Baud Rate"]
#[inline(always)]
pub fn baud(&self) -> &crate::Reg<self::usart_ext::baud::BAUD_SPEC> {
unsafe {
&*(((self as *const Self) as *const u8).add(12usize)
as *const crate::Reg<self::usart_ext::baud::BAUD_SPEC>)
}
}
}
#[doc = r"Register block"]
#[doc = "USART EXTERNAL CLOCK Mode"]
pub mod usart_ext;
#[doc = r"Register block"]
#[repr(C)]
pub struct USART_INT {
#[doc = "0x00 - USART_INT Control A"]
pub ctrla: crate::Reg<self::usart_int::ctrla::CTRLA_SPEC>,
#[doc = "0x04 - USART_INT Control B"]
pub ctrlb: crate::Reg<self::usart_int::ctrlb::CTRLB_SPEC>,
#[doc = "0x08 - USART_INT Control C"]
pub ctrlc: crate::Reg<self::usart_int::ctrlc::CTRLC_SPEC>,
_reserved_3_baud: [u8; 0x02],
#[doc = "0x0e - USART_INT Receive Pulse Length"]
pub rxpl: crate::Reg<self::usart_int::rxpl::RXPL_SPEC>,
_reserved5: [u8; 0x05],
#[doc = "0x14 - USART_INT Interrupt Enable Clear"]
pub intenclr: crate::Reg<self::usart_int::intenclr::INTENCLR_SPEC>,
_reserved6: [u8; 0x01],
#[doc = "0x16 - USART_INT Interrupt Enable Set"]
pub intenset: crate::Reg<self::usart_int::intenset::INTENSET_SPEC>,
_reserved7: [u8; 0x01],
#[doc = "0x18 - USART_INT Interrupt Flag Status and Clear"]
pub intflag: crate::Reg<self::usart_int::intflag::INTFLAG_SPEC>,
_reserved8: [u8; 0x01],
#[doc = "0x1a - USART_INT Status"]
pub status: crate::Reg<self::usart_int::status::STATUS_SPEC>,
#[doc = "0x1c - USART_INT Synchronization Busy"]
pub syncbusy: crate::Reg<self::usart_int::syncbusy::SYNCBUSY_SPEC>,
#[doc = "0x20 - USART_INT Receive Error Count"]
pub rxerrcnt: crate::Reg<self::usart_int::rxerrcnt::RXERRCNT_SPEC>,
_reserved11: [u8; 0x01],
#[doc = "0x22 - USART_INT Length"]
pub length: crate::Reg<self::usart_int::length::LENGTH_SPEC>,
_reserved12: [u8; 0x04],
#[doc = "0x28 - USART_INT Data"]
pub data: crate::Reg<self::usart_int::data::DATA_SPEC>,
_reserved13: [u8; 0x04],
#[doc = "0x30 - USART_INT Debug Control"]
pub dbgctrl: crate::Reg<self::usart_int::dbgctrl::DBGCTRL_SPEC>,
}
impl USART_INT {
#[doc = "0x0c - USART_INT Baud Rate"]
#[inline(always)]
pub fn baud_usartfp_mode(
&self,
) -> &crate::Reg<self::usart_int::baud_usartfp_mode::BAUD_USARTFP_MODE_SPEC> {
unsafe {
&*(((self as *const Self) as *const u8).add(12usize)
as *const crate::Reg<self::usart_int::baud_usartfp_mode::BAUD_USARTFP_MODE_SPEC>)
}
}
#[doc = "0x0c - USART_INT Baud Rate"]
#[inline(always)]
pub fn baud_fracfp_mode(
&self,
) -> &crate::Reg<self::usart_int::baud_fracfp_mode::BAUD_FRACFP_MODE_SPEC> {
unsafe {
&*(((self as *const Self) as *const u8).add(12usize)
as *const crate::Reg<self::usart_int::baud_fracfp_mode::BAUD_FRACFP_MODE_SPEC>)
}
}
#[doc = "0x0c - USART_INT Baud Rate"]
#[inline(always)]
pub fn baud_frac_mode(
&self,
) -> &crate::Reg<self::usart_int::baud_frac_mode::BAUD_FRAC_MODE_SPEC> {
unsafe {
&*(((self as *const Self) as *const u8).add(12usize)
as *const crate::Reg<self::usart_int::baud_frac_mode::BAUD_FRAC_MODE_SPEC>)
}
}
#[doc = "0x0c - USART_INT Baud Rate"]
#[inline(always)]
pub fn baud(&self) -> &crate::Reg<self::usart_int::baud::BAUD_SPEC> {
unsafe {
&*(((self as *const Self) as *const u8).add(12usize)
as *const crate::Reg<self::usart_int::baud::BAUD_SPEC>)
}
}
}
#[doc = r"Register block"]
#[doc = "USART INTERNAL CLOCK Mode"]
pub mod usart_int;