1#![doc = "Peripheral access API for V853 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)]
20#![no_std]
21use core::marker::PhantomData;
22use core::ops::Deref;
23#[allow(unused_imports)]
24use generic::*;
25#[doc = r"Common register and bit access and modify traits"]
26pub mod generic;
27#[doc(hidden)]
28pub mod interrupt;
29pub use self::interrupt::Interrupt;
30#[doc = "Universal Asynchronous Receiver Transmitter"]
31pub struct UART0 {
32 _marker: PhantomData<*const ()>,
33}
34unsafe impl Send for UART0 {}
35impl UART0 {
36 #[doc = r"Pointer to the register block"]
37 pub const PTR: *const uart::RegisterBlock = 0x0250_0000 as *const _;
38 #[doc = r"Return the pointer to the register block"]
39 #[inline(always)]
40 pub const fn ptr() -> *const uart::RegisterBlock {
41 Self::PTR
42 }
43}
44impl Deref for UART0 {
45 type Target = uart::RegisterBlock;
46 #[inline(always)]
47 fn deref(&self) -> &Self::Target {
48 unsafe { &*Self::PTR }
49 }
50}
51impl core::fmt::Debug for UART0 {
52 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
53 f.debug_struct("UART0").finish()
54 }
55}
56#[doc = "Universal Asynchronous Receiver Transmitter"]
57pub struct UART1 {
58 _marker: PhantomData<*const ()>,
59}
60unsafe impl Send for UART1 {}
61impl UART1 {
62 #[doc = r"Pointer to the register block"]
63 pub const PTR: *const uart::RegisterBlock = 0x0250_0400 as *const _;
64 #[doc = r"Return the pointer to the register block"]
65 #[inline(always)]
66 pub const fn ptr() -> *const uart::RegisterBlock {
67 Self::PTR
68 }
69}
70impl Deref for UART1 {
71 type Target = uart::RegisterBlock;
72 #[inline(always)]
73 fn deref(&self) -> &Self::Target {
74 unsafe { &*Self::PTR }
75 }
76}
77impl core::fmt::Debug for UART1 {
78 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
79 f.debug_struct("UART1").finish()
80 }
81}
82#[doc = "Universal Asynchronous Receiver Transmitter"]
83pub struct UART2 {
84 _marker: PhantomData<*const ()>,
85}
86unsafe impl Send for UART2 {}
87impl UART2 {
88 #[doc = r"Pointer to the register block"]
89 pub const PTR: *const uart::RegisterBlock = 0x0250_0800 as *const _;
90 #[doc = r"Return the pointer to the register block"]
91 #[inline(always)]
92 pub const fn ptr() -> *const uart::RegisterBlock {
93 Self::PTR
94 }
95}
96impl Deref for UART2 {
97 type Target = uart::RegisterBlock;
98 #[inline(always)]
99 fn deref(&self) -> &Self::Target {
100 unsafe { &*Self::PTR }
101 }
102}
103impl core::fmt::Debug for UART2 {
104 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
105 f.debug_struct("UART2").finish()
106 }
107}
108#[doc = "Universal Asynchronous Receiver Transmitter"]
109pub struct UART3 {
110 _marker: PhantomData<*const ()>,
111}
112unsafe impl Send for UART3 {}
113impl UART3 {
114 #[doc = r"Pointer to the register block"]
115 pub const PTR: *const uart::RegisterBlock = 0x0250_0c00 as *const _;
116 #[doc = r"Return the pointer to the register block"]
117 #[inline(always)]
118 pub const fn ptr() -> *const uart::RegisterBlock {
119 Self::PTR
120 }
121}
122impl Deref for UART3 {
123 type Target = uart::RegisterBlock;
124 #[inline(always)]
125 fn deref(&self) -> &Self::Target {
126 unsafe { &*Self::PTR }
127 }
128}
129impl core::fmt::Debug for UART3 {
130 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
131 f.debug_struct("UART3").finish()
132 }
133}
134#[doc = "Universal Asynchronous Receiver Transmitter"]
135pub mod uart;
136#[no_mangle]
137static mut DEVICE_PERIPHERALS: bool = false;
138#[doc = r"All the peripherals"]
139#[allow(non_snake_case)]
140pub struct Peripherals {
141 #[doc = "UART0"]
142 pub UART0: UART0,
143 #[doc = "UART1"]
144 pub UART1: UART1,
145 #[doc = "UART2"]
146 pub UART2: UART2,
147 #[doc = "UART3"]
148 pub UART3: UART3,
149}
150impl Peripherals {
151 #[doc = r"Unchecked version of `Peripherals::take`"]
152 #[inline]
153 pub unsafe fn steal() -> Self {
154 DEVICE_PERIPHERALS = true;
155 Peripherals {
156 UART0: UART0 {
157 _marker: PhantomData,
158 },
159 UART1: UART1 {
160 _marker: PhantomData,
161 },
162 UART2: UART2 {
163 _marker: PhantomData,
164 },
165 UART3: UART3 {
166 _marker: PhantomData,
167 },
168 }
169 }
170}