megatiny_hal/attiny412pac/
mod.rs1#![doc = "Peripheral access API for ATTINY412 microcontrollers (generated using svd2rust v0.24.1 ( ))\n\nYou can find an overview of the generated API [here].\n\nAPI features to be included in the [next]
2svd2rust release can be generated by cloning the svd2rust [repository], checking out the above commit, and running `cargo doc --open`.\n\n[here]: https://docs.rs/svd2rust/0.24.1/svd2rust/#peripheral-api\n[next]: https://github.com/rust-embedded/svd2rust/blob/master/CHANGELOG.md#unreleased\n[repository]: https://github.com/rust-embedded/svd2rust"]
3#![deny(const_err)]
4#![deny(dead_code)]
5#![deny(improper_ctypes)]
6#![deny(missing_docs)]
7#![deny(no_mangle_generic_items)]
8#![deny(non_shorthand_field_patterns)]
9#![deny(overflowing_literals)]
10#![deny(path_statements)]
11#![deny(patterns_in_fns_without_body)]
12#![deny(private_in_public)]
13#![deny(unconditional_recursion)]
14#![deny(unused_allocation)]
15#![deny(unused_comparisons)]
16#![deny(unused_parens)]
17#![deny(while_true)]
18#![allow(non_camel_case_types)]
19#![allow(non_snake_case)]
20use core::marker::PhantomData;
21use core::ops::Deref;
22#[doc = r"Number available in the NVIC for configuring priority"]
23pub const NVIC_PRIO_BITS: u8 = 4;
24#[allow(unused_imports)]
25use generic::*;
26#[doc = r"Common register and bit access and modify traits"]
27pub mod generic;
28#[doc(hidden)]
29pub mod interrupt;
30pub use self::interrupt::Interrupt;
31#[doc = "Analog Comparator"]
32pub struct AC0 {
33 _marker: PhantomData<*const ()>,
34}
35unsafe impl Send for AC0 {}
36impl AC0 {
37 #[doc = r"Pointer to the register block"]
38 pub const PTR: *const ac0::RegisterBlock = 0x0670 as *const _;
39 #[doc = r"Return the pointer to the register block"]
40 #[inline(always)]
41 pub const fn ptr() -> *const ac0::RegisterBlock {
42 Self::PTR
43 }
44}
45impl Deref for AC0 {
46 type Target = ac0::RegisterBlock;
47 #[inline(always)]
48 fn deref(&self) -> &Self::Target {
49 unsafe { &*Self::PTR }
50 }
51}
52impl core::fmt::Debug for AC0 {
53 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
54 f.debug_struct("AC0").finish()
55 }
56}
57#[doc = "Analog Comparator"]
58pub mod ac0;
59#[doc = "Analog to Digital Converter"]
60pub struct ADC0 {
61 _marker: PhantomData<*const ()>,
62}
63unsafe impl Send for ADC0 {}
64impl ADC0 {
65 #[doc = r"Pointer to the register block"]
66 pub const PTR: *const adc0::RegisterBlock = 0x0600 as *const _;
67 #[doc = r"Return the pointer to the register block"]
68 #[inline(always)]
69 pub const fn ptr() -> *const adc0::RegisterBlock {
70 Self::PTR
71 }
72}
73impl Deref for ADC0 {
74 type Target = adc0::RegisterBlock;
75 #[inline(always)]
76 fn deref(&self) -> &Self::Target {
77 unsafe { &*Self::PTR }
78 }
79}
80impl core::fmt::Debug for ADC0 {
81 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
82 f.debug_struct("ADC0").finish()
83 }
84}
85#[doc = "Analog to Digital Converter"]
86pub mod adc0;
87#[doc = "Bod interface"]
88pub struct BOD {
89 _marker: PhantomData<*const ()>,
90}
91unsafe impl Send for BOD {}
92impl BOD {
93 #[doc = r"Pointer to the register block"]
94 pub const PTR: *const bod::RegisterBlock = 0x80 as *const _;
95 #[doc = r"Return the pointer to the register block"]
96 #[inline(always)]
97 pub const fn ptr() -> *const bod::RegisterBlock {
98 Self::PTR
99 }
100}
101impl Deref for BOD {
102 type Target = bod::RegisterBlock;
103 #[inline(always)]
104 fn deref(&self) -> &Self::Target {
105 unsafe { &*Self::PTR }
106 }
107}
108impl core::fmt::Debug for BOD {
109 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
110 f.debug_struct("BOD").finish()
111 }
112}
113#[doc = "Bod interface"]
114pub mod bod;
115#[doc = "Configurable Custom Logic"]
116pub struct CCL {
117 _marker: PhantomData<*const ()>,
118}
119unsafe impl Send for CCL {}
120impl CCL {
121 #[doc = r"Pointer to the register block"]
122 pub const PTR: *const ccl::RegisterBlock = 0x01c0 as *const _;
123 #[doc = r"Return the pointer to the register block"]
124 #[inline(always)]
125 pub const fn ptr() -> *const ccl::RegisterBlock {
126 Self::PTR
127 }
128}
129impl Deref for CCL {
130 type Target = ccl::RegisterBlock;
131 #[inline(always)]
132 fn deref(&self) -> &Self::Target {
133 unsafe { &*Self::PTR }
134 }
135}
136impl core::fmt::Debug for CCL {
137 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
138 f.debug_struct("CCL").finish()
139 }
140}
141#[doc = "Configurable Custom Logic"]
142pub mod ccl;
143#[doc = "Clock controller"]
144pub struct CLKCTRL {
145 _marker: PhantomData<*const ()>,
146}
147unsafe impl Send for CLKCTRL {}
148impl CLKCTRL {
149 #[doc = r"Pointer to the register block"]
150 pub const PTR: *const clkctrl::RegisterBlock = 0x60 as *const _;
151 #[doc = r"Return the pointer to the register block"]
152 #[inline(always)]
153 pub const fn ptr() -> *const clkctrl::RegisterBlock {
154 Self::PTR
155 }
156}
157impl Deref for CLKCTRL {
158 type Target = clkctrl::RegisterBlock;
159 #[inline(always)]
160 fn deref(&self) -> &Self::Target {
161 unsafe { &*Self::PTR }
162 }
163}
164impl core::fmt::Debug for CLKCTRL {
165 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
166 f.debug_struct("CLKCTRL").finish()
167 }
168}
169#[doc = "Clock controller"]
170pub mod clkctrl;
171#[doc = "CPU"]
172pub struct CPU {
173 _marker: PhantomData<*const ()>,
174}
175unsafe impl Send for CPU {}
176impl CPU {
177 #[doc = r"Pointer to the register block"]
178 pub const PTR: *const cpu::RegisterBlock = 0x34 as *const _;
179 #[doc = r"Return the pointer to the register block"]
180 #[inline(always)]
181 pub const fn ptr() -> *const cpu::RegisterBlock {
182 Self::PTR
183 }
184}
185impl Deref for CPU {
186 type Target = cpu::RegisterBlock;
187 #[inline(always)]
188 fn deref(&self) -> &Self::Target {
189 unsafe { &*Self::PTR }
190 }
191}
192impl core::fmt::Debug for CPU {
193 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
194 f.debug_struct("CPU").finish()
195 }
196}
197#[doc = "CPU"]
198pub mod cpu;
199#[doc = "Interrupt Controller"]
200pub struct CPUINT {
201 _marker: PhantomData<*const ()>,
202}
203unsafe impl Send for CPUINT {}
204impl CPUINT {
205 #[doc = r"Pointer to the register block"]
206 pub const PTR: *const cpuint::RegisterBlock = 0x0110 as *const _;
207 #[doc = r"Return the pointer to the register block"]
208 #[inline(always)]
209 pub const fn ptr() -> *const cpuint::RegisterBlock {
210 Self::PTR
211 }
212}
213impl Deref for CPUINT {
214 type Target = cpuint::RegisterBlock;
215 #[inline(always)]
216 fn deref(&self) -> &Self::Target {
217 unsafe { &*Self::PTR }
218 }
219}
220impl core::fmt::Debug for CPUINT {
221 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
222 f.debug_struct("CPUINT").finish()
223 }
224}
225#[doc = "Interrupt Controller"]
226pub mod cpuint;
227#[doc = "CRCSCAN"]
228pub struct CRCSCAN {
229 _marker: PhantomData<*const ()>,
230}
231unsafe impl Send for CRCSCAN {}
232impl CRCSCAN {
233 #[doc = r"Pointer to the register block"]
234 pub const PTR: *const crcscan::RegisterBlock = 0x0120 as *const _;
235 #[doc = r"Return the pointer to the register block"]
236 #[inline(always)]
237 pub const fn ptr() -> *const crcscan::RegisterBlock {
238 Self::PTR
239 }
240}
241impl Deref for CRCSCAN {
242 type Target = crcscan::RegisterBlock;
243 #[inline(always)]
244 fn deref(&self) -> &Self::Target {
245 unsafe { &*Self::PTR }
246 }
247}
248impl core::fmt::Debug for CRCSCAN {
249 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
250 f.debug_struct("CRCSCAN").finish()
251 }
252}
253#[doc = "CRCSCAN"]
254pub mod crcscan;
255#[doc = "Digital to Analog Converter"]
256pub struct DAC0 {
257 _marker: PhantomData<*const ()>,
258}
259unsafe impl Send for DAC0 {}
260impl DAC0 {
261 #[doc = r"Pointer to the register block"]
262 pub const PTR: *const dac0::RegisterBlock = 0x0680 as *const _;
263 #[doc = r"Return the pointer to the register block"]
264 #[inline(always)]
265 pub const fn ptr() -> *const dac0::RegisterBlock {
266 Self::PTR
267 }
268}
269impl Deref for DAC0 {
270 type Target = dac0::RegisterBlock;
271 #[inline(always)]
272 fn deref(&self) -> &Self::Target {
273 unsafe { &*Self::PTR }
274 }
275}
276impl core::fmt::Debug for DAC0 {
277 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
278 f.debug_struct("DAC0").finish()
279 }
280}
281#[doc = "Digital to Analog Converter"]
282pub mod dac0;
283#[doc = "Event System"]
284pub struct EVSYS {
285 _marker: PhantomData<*const ()>,
286}
287unsafe impl Send for EVSYS {}
288impl EVSYS {
289 #[doc = r"Pointer to the register block"]
290 pub const PTR: *const evsys::RegisterBlock = 0x0180 as *const _;
291 #[doc = r"Return the pointer to the register block"]
292 #[inline(always)]
293 pub const fn ptr() -> *const evsys::RegisterBlock {
294 Self::PTR
295 }
296}
297impl Deref for EVSYS {
298 type Target = evsys::RegisterBlock;
299 #[inline(always)]
300 fn deref(&self) -> &Self::Target {
301 unsafe { &*Self::PTR }
302 }
303}
304impl core::fmt::Debug for EVSYS {
305 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
306 f.debug_struct("EVSYS").finish()
307 }
308}
309#[doc = "Event System"]
310pub mod evsys;
311#[doc = "Fuses"]
312pub struct FUSE {
313 _marker: PhantomData<*const ()>,
314}
315unsafe impl Send for FUSE {}
316impl FUSE {
317 #[doc = r"Pointer to the register block"]
318 pub const PTR: *const fuse::RegisterBlock = 0x1280 as *const _;
319 #[doc = r"Return the pointer to the register block"]
320 #[inline(always)]
321 pub const fn ptr() -> *const fuse::RegisterBlock {
322 Self::PTR
323 }
324}
325impl Deref for FUSE {
326 type Target = fuse::RegisterBlock;
327 #[inline(always)]
328 fn deref(&self) -> &Self::Target {
329 unsafe { &*Self::PTR }
330 }
331}
332impl core::fmt::Debug for FUSE {
333 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
334 f.debug_struct("FUSE").finish()
335 }
336}
337#[doc = "Fuses"]
338pub mod fuse;
339#[doc = "General Purpose IO"]
340pub struct GPIO {
341 _marker: PhantomData<*const ()>,
342}
343unsafe impl Send for GPIO {}
344impl GPIO {
345 #[doc = r"Pointer to the register block"]
346 pub const PTR: *const gpio::RegisterBlock = 0x1c as *const _;
347 #[doc = r"Return the pointer to the register block"]
348 #[inline(always)]
349 pub const fn ptr() -> *const gpio::RegisterBlock {
350 Self::PTR
351 }
352}
353impl Deref for GPIO {
354 type Target = gpio::RegisterBlock;
355 #[inline(always)]
356 fn deref(&self) -> &Self::Target {
357 unsafe { &*Self::PTR }
358 }
359}
360impl core::fmt::Debug for GPIO {
361 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
362 f.debug_struct("GPIO").finish()
363 }
364}
365#[doc = "General Purpose IO"]
366pub mod gpio;
367#[doc = "Lockbit"]
368pub struct LOCKBIT {
369 _marker: PhantomData<*const ()>,
370}
371unsafe impl Send for LOCKBIT {}
372impl LOCKBIT {
373 #[doc = r"Pointer to the register block"]
374 pub const PTR: *const lockbit::RegisterBlock = 0x128a as *const _;
375 #[doc = r"Return the pointer to the register block"]
376 #[inline(always)]
377 pub const fn ptr() -> *const lockbit::RegisterBlock {
378 Self::PTR
379 }
380}
381impl Deref for LOCKBIT {
382 type Target = lockbit::RegisterBlock;
383 #[inline(always)]
384 fn deref(&self) -> &Self::Target {
385 unsafe { &*Self::PTR }
386 }
387}
388impl core::fmt::Debug for LOCKBIT {
389 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
390 f.debug_struct("LOCKBIT").finish()
391 }
392}
393#[doc = "Lockbit"]
394pub mod lockbit;
395#[doc = "Non-volatile Memory Controller"]
396pub struct NVMCTRL {
397 _marker: PhantomData<*const ()>,
398}
399unsafe impl Send for NVMCTRL {}
400impl NVMCTRL {
401 #[doc = r"Pointer to the register block"]
402 pub const PTR: *const nvmctrl::RegisterBlock = 0x1000 as *const _;
403 #[doc = r"Return the pointer to the register block"]
404 #[inline(always)]
405 pub const fn ptr() -> *const nvmctrl::RegisterBlock {
406 Self::PTR
407 }
408}
409impl Deref for NVMCTRL {
410 type Target = nvmctrl::RegisterBlock;
411 #[inline(always)]
412 fn deref(&self) -> &Self::Target {
413 unsafe { &*Self::PTR }
414 }
415}
416impl core::fmt::Debug for NVMCTRL {
417 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
418 f.debug_struct("NVMCTRL").finish()
419 }
420}
421#[doc = "Non-volatile Memory Controller"]
422pub mod nvmctrl;
423#[doc = "I/O Ports"]
424pub struct PORTA {
425 _marker: PhantomData<*const ()>,
426}
427unsafe impl Send for PORTA {}
428impl PORTA {
429 #[doc = r"Pointer to the register block"]
430 pub const PTR: *const porta::RegisterBlock = 0x0400 as *const _;
431 #[doc = r"Return the pointer to the register block"]
432 #[inline(always)]
433 pub const fn ptr() -> *const porta::RegisterBlock {
434 Self::PTR
435 }
436}
437impl Deref for PORTA {
438 type Target = porta::RegisterBlock;
439 #[inline(always)]
440 fn deref(&self) -> &Self::Target {
441 unsafe { &*Self::PTR }
442 }
443}
444impl core::fmt::Debug for PORTA {
445 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
446 f.debug_struct("PORTA").finish()
447 }
448}
449#[doc = "I/O Ports"]
450pub mod porta;
451#[doc = "Port Multiplexer"]
452pub struct PORTMUX {
453 _marker: PhantomData<*const ()>,
454}
455unsafe impl Send for PORTMUX {}
456impl PORTMUX {
457 #[doc = r"Pointer to the register block"]
458 pub const PTR: *const portmux::RegisterBlock = 0x0200 as *const _;
459 #[doc = r"Return the pointer to the register block"]
460 #[inline(always)]
461 pub const fn ptr() -> *const portmux::RegisterBlock {
462 Self::PTR
463 }
464}
465impl Deref for PORTMUX {
466 type Target = portmux::RegisterBlock;
467 #[inline(always)]
468 fn deref(&self) -> &Self::Target {
469 unsafe { &*Self::PTR }
470 }
471}
472impl core::fmt::Debug for PORTMUX {
473 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
474 f.debug_struct("PORTMUX").finish()
475 }
476}
477#[doc = "Port Multiplexer"]
478pub mod portmux;
479#[doc = "Reset controller"]
480pub struct RSTCTRL {
481 _marker: PhantomData<*const ()>,
482}
483unsafe impl Send for RSTCTRL {}
484impl RSTCTRL {
485 #[doc = r"Pointer to the register block"]
486 pub const PTR: *const rstctrl::RegisterBlock = 0x40 as *const _;
487 #[doc = r"Return the pointer to the register block"]
488 #[inline(always)]
489 pub const fn ptr() -> *const rstctrl::RegisterBlock {
490 Self::PTR
491 }
492}
493impl Deref for RSTCTRL {
494 type Target = rstctrl::RegisterBlock;
495 #[inline(always)]
496 fn deref(&self) -> &Self::Target {
497 unsafe { &*Self::PTR }
498 }
499}
500impl core::fmt::Debug for RSTCTRL {
501 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
502 f.debug_struct("RSTCTRL").finish()
503 }
504}
505#[doc = "Reset controller"]
506pub mod rstctrl;
507#[doc = "Real-Time Counter"]
508pub struct RTC {
509 _marker: PhantomData<*const ()>,
510}
511unsafe impl Send for RTC {}
512impl RTC {
513 #[doc = r"Pointer to the register block"]
514 pub const PTR: *const rtc::RegisterBlock = 0x0140 as *const _;
515 #[doc = r"Return the pointer to the register block"]
516 #[inline(always)]
517 pub const fn ptr() -> *const rtc::RegisterBlock {
518 Self::PTR
519 }
520}
521impl Deref for RTC {
522 type Target = rtc::RegisterBlock;
523 #[inline(always)]
524 fn deref(&self) -> &Self::Target {
525 unsafe { &*Self::PTR }
526 }
527}
528impl core::fmt::Debug for RTC {
529 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
530 f.debug_struct("RTC").finish()
531 }
532}
533#[doc = "Real-Time Counter"]
534pub mod rtc;
535#[doc = "Signature row"]
536pub struct SIGROW {
537 _marker: PhantomData<*const ()>,
538}
539unsafe impl Send for SIGROW {}
540impl SIGROW {
541 #[doc = r"Pointer to the register block"]
542 pub const PTR: *const sigrow::RegisterBlock = 0x1100 as *const _;
543 #[doc = r"Return the pointer to the register block"]
544 #[inline(always)]
545 pub const fn ptr() -> *const sigrow::RegisterBlock {
546 Self::PTR
547 }
548}
549impl Deref for SIGROW {
550 type Target = sigrow::RegisterBlock;
551 #[inline(always)]
552 fn deref(&self) -> &Self::Target {
553 unsafe { &*Self::PTR }
554 }
555}
556impl core::fmt::Debug for SIGROW {
557 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
558 f.debug_struct("SIGROW").finish()
559 }
560}
561#[doc = "Signature row"]
562pub mod sigrow;
563#[doc = "Sleep Controller"]
564pub struct SLPCTRL {
565 _marker: PhantomData<*const ()>,
566}
567unsafe impl Send for SLPCTRL {}
568impl SLPCTRL {
569 #[doc = r"Pointer to the register block"]
570 pub const PTR: *const slpctrl::RegisterBlock = 0x50 as *const _;
571 #[doc = r"Return the pointer to the register block"]
572 #[inline(always)]
573 pub const fn ptr() -> *const slpctrl::RegisterBlock {
574 Self::PTR
575 }
576}
577impl Deref for SLPCTRL {
578 type Target = slpctrl::RegisterBlock;
579 #[inline(always)]
580 fn deref(&self) -> &Self::Target {
581 unsafe { &*Self::PTR }
582 }
583}
584impl core::fmt::Debug for SLPCTRL {
585 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
586 f.debug_struct("SLPCTRL").finish()
587 }
588}
589#[doc = "Sleep Controller"]
590pub mod slpctrl;
591#[doc = "Serial Peripheral Interface"]
592pub struct SPI0 {
593 _marker: PhantomData<*const ()>,
594}
595unsafe impl Send for SPI0 {}
596impl SPI0 {
597 #[doc = r"Pointer to the register block"]
598 pub const PTR: *const spi0::RegisterBlock = 0x0820 as *const _;
599 #[doc = r"Return the pointer to the register block"]
600 #[inline(always)]
601 pub const fn ptr() -> *const spi0::RegisterBlock {
602 Self::PTR
603 }
604}
605impl Deref for SPI0 {
606 type Target = spi0::RegisterBlock;
607 #[inline(always)]
608 fn deref(&self) -> &Self::Target {
609 unsafe { &*Self::PTR }
610 }
611}
612impl core::fmt::Debug for SPI0 {
613 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
614 f.debug_struct("SPI0").finish()
615 }
616}
617#[doc = "Serial Peripheral Interface"]
618pub mod spi0;
619#[doc = "System Configuration Registers"]
620pub struct SYSCFG {
621 _marker: PhantomData<*const ()>,
622}
623unsafe impl Send for SYSCFG {}
624impl SYSCFG {
625 #[doc = r"Pointer to the register block"]
626 pub const PTR: *const syscfg::RegisterBlock = 0x0f01 as *const _;
627 #[doc = r"Return the pointer to the register block"]
628 #[inline(always)]
629 pub const fn ptr() -> *const syscfg::RegisterBlock {
630 Self::PTR
631 }
632}
633impl Deref for SYSCFG {
634 type Target = syscfg::RegisterBlock;
635 #[inline(always)]
636 fn deref(&self) -> &Self::Target {
637 unsafe { &*Self::PTR }
638 }
639}
640impl core::fmt::Debug for SYSCFG {
641 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
642 f.debug_struct("SYSCFG").finish()
643 }
644}
645#[doc = "System Configuration Registers"]
646pub mod syscfg;
647#[doc = "16-bit Timer Type B"]
648pub struct TCB0 {
649 _marker: PhantomData<*const ()>,
650}
651unsafe impl Send for TCB0 {}
652impl TCB0 {
653 #[doc = r"Pointer to the register block"]
654 pub const PTR: *const tcb0::RegisterBlock = 0x0a40 as *const _;
655 #[doc = r"Return the pointer to the register block"]
656 #[inline(always)]
657 pub const fn ptr() -> *const tcb0::RegisterBlock {
658 Self::PTR
659 }
660}
661impl Deref for TCB0 {
662 type Target = tcb0::RegisterBlock;
663 #[inline(always)]
664 fn deref(&self) -> &Self::Target {
665 unsafe { &*Self::PTR }
666 }
667}
668impl core::fmt::Debug for TCB0 {
669 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
670 f.debug_struct("TCB0").finish()
671 }
672}
673#[doc = "16-bit Timer Type B"]
674pub mod tcb0;
675#[doc = "Timer Counter D"]
676pub struct TCD0 {
677 _marker: PhantomData<*const ()>,
678}
679unsafe impl Send for TCD0 {}
680impl TCD0 {
681 #[doc = r"Pointer to the register block"]
682 pub const PTR: *const tcd0::RegisterBlock = 0x0a80 as *const _;
683 #[doc = r"Return the pointer to the register block"]
684 #[inline(always)]
685 pub const fn ptr() -> *const tcd0::RegisterBlock {
686 Self::PTR
687 }
688}
689impl Deref for TCD0 {
690 type Target = tcd0::RegisterBlock;
691 #[inline(always)]
692 fn deref(&self) -> &Self::Target {
693 unsafe { &*Self::PTR }
694 }
695}
696impl core::fmt::Debug for TCD0 {
697 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
698 f.debug_struct("TCD0").finish()
699 }
700}
701#[doc = "Timer Counter D"]
702pub mod tcd0;
703#[doc = "Two-Wire Interface"]
704pub struct TWI0 {
705 _marker: PhantomData<*const ()>,
706}
707unsafe impl Send for TWI0 {}
708impl TWI0 {
709 #[doc = r"Pointer to the register block"]
710 pub const PTR: *const twi0::RegisterBlock = 0x0810 as *const _;
711 #[doc = r"Return the pointer to the register block"]
712 #[inline(always)]
713 pub const fn ptr() -> *const twi0::RegisterBlock {
714 Self::PTR
715 }
716}
717impl Deref for TWI0 {
718 type Target = twi0::RegisterBlock;
719 #[inline(always)]
720 fn deref(&self) -> &Self::Target {
721 unsafe { &*Self::PTR }
722 }
723}
724impl core::fmt::Debug for TWI0 {
725 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
726 f.debug_struct("TWI0").finish()
727 }
728}
729#[doc = "Two-Wire Interface"]
730pub mod twi0;
731#[doc = "Universal Synchronous and Asynchronous Receiver and Transmitter"]
732pub struct USART0 {
733 _marker: PhantomData<*const ()>,
734}
735unsafe impl Send for USART0 {}
736impl USART0 {
737 #[doc = r"Pointer to the register block"]
738 pub const PTR: *const usart0::RegisterBlock = 0x0800 as *const _;
739 #[doc = r"Return the pointer to the register block"]
740 #[inline(always)]
741 pub const fn ptr() -> *const usart0::RegisterBlock {
742 Self::PTR
743 }
744}
745impl Deref for USART0 {
746 type Target = usart0::RegisterBlock;
747 #[inline(always)]
748 fn deref(&self) -> &Self::Target {
749 unsafe { &*Self::PTR }
750 }
751}
752impl core::fmt::Debug for USART0 {
753 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
754 f.debug_struct("USART0").finish()
755 }
756}
757#[doc = "Universal Synchronous and Asynchronous Receiver and Transmitter"]
758pub mod usart0;
759#[doc = "User Row"]
760pub struct USERROW {
761 _marker: PhantomData<*const ()>,
762}
763unsafe impl Send for USERROW {}
764impl USERROW {
765 #[doc = r"Pointer to the register block"]
766 pub const PTR: *const userrow::RegisterBlock = 0x1300 as *const _;
767 #[doc = r"Return the pointer to the register block"]
768 #[inline(always)]
769 pub const fn ptr() -> *const userrow::RegisterBlock {
770 Self::PTR
771 }
772}
773impl Deref for USERROW {
774 type Target = userrow::RegisterBlock;
775 #[inline(always)]
776 fn deref(&self) -> &Self::Target {
777 unsafe { &*Self::PTR }
778 }
779}
780impl core::fmt::Debug for USERROW {
781 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
782 f.debug_struct("USERROW").finish()
783 }
784}
785#[doc = "User Row"]
786pub mod userrow;
787#[doc = "Virtual Ports"]
788pub struct VPORTA {
789 _marker: PhantomData<*const ()>,
790}
791unsafe impl Send for VPORTA {}
792impl VPORTA {
793 #[doc = r"Pointer to the register block"]
794 pub const PTR: *const vporta::RegisterBlock = 0 as *const _;
795 #[doc = r"Return the pointer to the register block"]
796 #[inline(always)]
797 pub const fn ptr() -> *const vporta::RegisterBlock {
798 Self::PTR
799 }
800}
801impl Deref for VPORTA {
802 type Target = vporta::RegisterBlock;
803 #[inline(always)]
804 fn deref(&self) -> &Self::Target {
805 unsafe { &*Self::PTR }
806 }
807}
808impl core::fmt::Debug for VPORTA {
809 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
810 f.debug_struct("VPORTA").finish()
811 }
812}
813#[doc = "Virtual Ports"]
814pub mod vporta;
815#[doc = "Virtual Ports"]
816pub struct VPORTB {
817 _marker: PhantomData<*const ()>,
818}
819unsafe impl Send for VPORTB {}
820impl VPORTB {
821 #[doc = r"Pointer to the register block"]
822 pub const PTR: *const vportb::RegisterBlock = 0x04 as *const _;
823 #[doc = r"Return the pointer to the register block"]
824 #[inline(always)]
825 pub const fn ptr() -> *const vportb::RegisterBlock {
826 Self::PTR
827 }
828}
829impl Deref for VPORTB {
830 type Target = vportb::RegisterBlock;
831 #[inline(always)]
832 fn deref(&self) -> &Self::Target {
833 unsafe { &*Self::PTR }
834 }
835}
836impl core::fmt::Debug for VPORTB {
837 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
838 f.debug_struct("VPORTB").finish()
839 }
840}
841#[doc = "Virtual Ports"]
842pub mod vportb;
843#[doc = "Virtual Ports"]
844pub struct VPORTC {
845 _marker: PhantomData<*const ()>,
846}
847unsafe impl Send for VPORTC {}
848impl VPORTC {
849 #[doc = r"Pointer to the register block"]
850 pub const PTR: *const vportc::RegisterBlock = 0x08 as *const _;
851 #[doc = r"Return the pointer to the register block"]
852 #[inline(always)]
853 pub const fn ptr() -> *const vportc::RegisterBlock {
854 Self::PTR
855 }
856}
857impl Deref for VPORTC {
858 type Target = vportc::RegisterBlock;
859 #[inline(always)]
860 fn deref(&self) -> &Self::Target {
861 unsafe { &*Self::PTR }
862 }
863}
864impl core::fmt::Debug for VPORTC {
865 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
866 f.debug_struct("VPORTC").finish()
867 }
868}
869#[doc = "Virtual Ports"]
870pub mod vportc;
871#[doc = "Voltage reference"]
872pub struct VREF {
873 _marker: PhantomData<*const ()>,
874}
875unsafe impl Send for VREF {}
876impl VREF {
877 #[doc = r"Pointer to the register block"]
878 pub const PTR: *const vref::RegisterBlock = 0xa0 as *const _;
879 #[doc = r"Return the pointer to the register block"]
880 #[inline(always)]
881 pub const fn ptr() -> *const vref::RegisterBlock {
882 Self::PTR
883 }
884}
885impl Deref for VREF {
886 type Target = vref::RegisterBlock;
887 #[inline(always)]
888 fn deref(&self) -> &Self::Target {
889 unsafe { &*Self::PTR }
890 }
891}
892impl core::fmt::Debug for VREF {
893 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
894 f.debug_struct("VREF").finish()
895 }
896}
897#[doc = "Voltage reference"]
898pub mod vref;
899#[doc = "Watch-Dog Timer"]
900pub struct WDT {
901 _marker: PhantomData<*const ()>,
902}
903unsafe impl Send for WDT {}
904impl WDT {
905 #[doc = r"Pointer to the register block"]
906 pub const PTR: *const wdt::RegisterBlock = 0x0100 as *const _;
907 #[doc = r"Return the pointer to the register block"]
908 #[inline(always)]
909 pub const fn ptr() -> *const wdt::RegisterBlock {
910 Self::PTR
911 }
912}
913impl Deref for WDT {
914 type Target = wdt::RegisterBlock;
915 #[inline(always)]
916 fn deref(&self) -> &Self::Target {
917 unsafe { &*Self::PTR }
918 }
919}
920impl core::fmt::Debug for WDT {
921 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
922 f.debug_struct("WDT").finish()
923 }
924}
925#[doc = "Watch-Dog Timer"]
926pub mod wdt;
927#[no_mangle]
928static mut DEVICE_PERIPHERALS: bool = false;
929#[doc = r"All the peripherals"]
930#[allow(non_snake_case)]
931pub struct Peripherals {
932 #[doc = "AC0"]
933 pub AC0: AC0,
934 #[doc = "ADC0"]
935 pub ADC0: ADC0,
936 #[doc = "BOD"]
937 pub BOD: BOD,
938 #[doc = "CCL"]
939 pub CCL: CCL,
940 #[doc = "CLKCTRL"]
941 pub CLKCTRL: CLKCTRL,
942 #[doc = "CPU"]
943 pub CPU: CPU,
944 #[doc = "CPUINT"]
945 pub CPUINT: CPUINT,
946 #[doc = "CRCSCAN"]
947 pub CRCSCAN: CRCSCAN,
948 #[doc = "DAC0"]
949 pub DAC0: DAC0,
950 #[doc = "EVSYS"]
951 pub EVSYS: EVSYS,
952 #[doc = "FUSE"]
953 pub FUSE: FUSE,
954 #[doc = "GPIO"]
955 pub GPIO: GPIO,
956 #[doc = "LOCKBIT"]
957 pub LOCKBIT: LOCKBIT,
958 #[doc = "NVMCTRL"]
959 pub NVMCTRL: NVMCTRL,
960 #[doc = "PORTA"]
961 pub PORTA: PORTA,
962 #[doc = "PORTMUX"]
963 pub PORTMUX: PORTMUX,
964 #[doc = "RSTCTRL"]
965 pub RSTCTRL: RSTCTRL,
966 #[doc = "RTC"]
967 pub RTC: RTC,
968 #[doc = "SIGROW"]
969 pub SIGROW: SIGROW,
970 #[doc = "SLPCTRL"]
971 pub SLPCTRL: SLPCTRL,
972 #[doc = "SPI0"]
973 pub SPI0: SPI0,
974 #[doc = "SYSCFG"]
975 pub SYSCFG: SYSCFG,
976 #[doc = "TCB0"]
977 pub TCB0: TCB0,
978 #[doc = "TCD0"]
979 pub TCD0: TCD0,
980 #[doc = "TWI0"]
981 pub TWI0: TWI0,
982 #[doc = "USART0"]
983 pub USART0: USART0,
984 #[doc = "USERROW"]
985 pub USERROW: USERROW,
986 #[doc = "VPORTA"]
987 pub VPORTA: VPORTA,
988 #[doc = "VPORTB"]
989 pub VPORTB: VPORTB,
990 #[doc = "VPORTC"]
991 pub VPORTC: VPORTC,
992 #[doc = "VREF"]
993 pub VREF: VREF,
994 #[doc = "WDT"]
995 pub WDT: WDT,
996}
997impl Peripherals {
998 #[doc = r"Unchecked version of `Peripherals::take`"]
999 #[inline]
1000 pub unsafe fn steal() -> Self {
1001 DEVICE_PERIPHERALS = true;
1002 Peripherals {
1003 AC0: AC0 {
1004 _marker: PhantomData,
1005 },
1006 ADC0: ADC0 {
1007 _marker: PhantomData,
1008 },
1009 BOD: BOD {
1010 _marker: PhantomData,
1011 },
1012 CCL: CCL {
1013 _marker: PhantomData,
1014 },
1015 CLKCTRL: CLKCTRL {
1016 _marker: PhantomData,
1017 },
1018 CPU: CPU {
1019 _marker: PhantomData,
1020 },
1021 CPUINT: CPUINT {
1022 _marker: PhantomData,
1023 },
1024 CRCSCAN: CRCSCAN {
1025 _marker: PhantomData,
1026 },
1027 DAC0: DAC0 {
1028 _marker: PhantomData,
1029 },
1030 EVSYS: EVSYS {
1031 _marker: PhantomData,
1032 },
1033 FUSE: FUSE {
1034 _marker: PhantomData,
1035 },
1036 GPIO: GPIO {
1037 _marker: PhantomData,
1038 },
1039 LOCKBIT: LOCKBIT {
1040 _marker: PhantomData,
1041 },
1042 NVMCTRL: NVMCTRL {
1043 _marker: PhantomData,
1044 },
1045 PORTA: PORTA {
1046 _marker: PhantomData,
1047 },
1048 PORTMUX: PORTMUX {
1049 _marker: PhantomData,
1050 },
1051 RSTCTRL: RSTCTRL {
1052 _marker: PhantomData,
1053 },
1054 RTC: RTC {
1055 _marker: PhantomData,
1056 },
1057 SIGROW: SIGROW {
1058 _marker: PhantomData,
1059 },
1060 SLPCTRL: SLPCTRL {
1061 _marker: PhantomData,
1062 },
1063 SPI0: SPI0 {
1064 _marker: PhantomData,
1065 },
1066 SYSCFG: SYSCFG {
1067 _marker: PhantomData,
1068 },
1069 TCB0: TCB0 {
1070 _marker: PhantomData,
1071 },
1072 TCD0: TCD0 {
1073 _marker: PhantomData,
1074 },
1075 TWI0: TWI0 {
1076 _marker: PhantomData,
1077 },
1078 USART0: USART0 {
1079 _marker: PhantomData,
1080 },
1081 USERROW: USERROW {
1082 _marker: PhantomData,
1083 },
1084 VPORTA: VPORTA {
1085 _marker: PhantomData,
1086 },
1087 VPORTB: VPORTB {
1088 _marker: PhantomData,
1089 },
1090 VPORTC: VPORTC {
1091 _marker: PhantomData,
1092 },
1093 VREF: VREF {
1094 _marker: PhantomData,
1095 },
1096 WDT: WDT {
1097 _marker: PhantomData,
1098 },
1099 }
1100 }
1101}