1#![doc = "Peripheral access API for MIK32 microcontrollers (generated using svd2rust v0.35.0 ( ))\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.35.0/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#![allow(non_camel_case_types)]
4#![allow(non_snake_case)]
5#![no_std]
6use core::marker::PhantomData;
7use core::ops::Deref;
8#[allow(unused_imports)]
9use generic::*;
10#[doc = r"Common register and bit access and modify traits"]
11pub mod generic;
12#[cfg(feature = "rt")]
13extern "C" {}
14#[doc(hidden)]
15#[repr(C)]
16pub union Vector {
17 pub _handler: unsafe extern "C" fn(),
18 pub _reserved: usize,
19}
20#[cfg(feature = "rt")]
21#[doc(hidden)]
22#[no_mangle]
23pub static __EXTERNAL_INTERRUPTS: [Vector; 0] = [];
24#[doc = "Прямой доступ к памяти"]
25pub struct Dma {
26 _marker: PhantomData<*const ()>,
27}
28unsafe impl Send for Dma {}
29impl Dma {
30 #[doc = r"Pointer to the register block"]
31 pub const PTR: *const dma::RegisterBlock = 0x0004_0000 as *const _;
32 #[doc = r"Return the pointer to the register block"]
33 #[inline(always)]
34 pub const fn ptr() -> *const dma::RegisterBlock {
35 Self::PTR
36 }
37 #[doc = r" Steal an instance of this peripheral"]
38 #[doc = r""]
39 #[doc = r" # Safety"]
40 #[doc = r""]
41 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
42 #[doc = r" that may race with any existing instances, for example by only"]
43 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
44 #[doc = r" original peripheral and using critical sections to coordinate"]
45 #[doc = r" access between multiple new instances."]
46 #[doc = r""]
47 #[doc = r" Additionally, other software such as HALs may rely on only one"]
48 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
49 #[doc = r" no stolen instances are passed to such software."]
50 pub unsafe fn steal() -> Self {
51 Self {
52 _marker: PhantomData,
53 }
54 }
55}
56impl Deref for Dma {
57 type Target = dma::RegisterBlock;
58 #[inline(always)]
59 fn deref(&self) -> &Self::Target {
60 unsafe { &*Self::PTR }
61 }
62}
63impl core::fmt::Debug for Dma {
64 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
65 f.debug_struct("Dma").finish()
66 }
67}
68#[doc = "Прямой доступ к памяти"]
69pub mod dma;
70#[doc = "Блок управления питанием и тактированием"]
71pub struct Pm {
72 _marker: PhantomData<*const ()>,
73}
74unsafe impl Send for Pm {}
75impl Pm {
76 #[doc = r"Pointer to the register block"]
77 pub const PTR: *const pm::RegisterBlock = 0x0005_0000 as *const _;
78 #[doc = r"Return the pointer to the register block"]
79 #[inline(always)]
80 pub const fn ptr() -> *const pm::RegisterBlock {
81 Self::PTR
82 }
83 #[doc = r" Steal an instance of this peripheral"]
84 #[doc = r""]
85 #[doc = r" # Safety"]
86 #[doc = r""]
87 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
88 #[doc = r" that may race with any existing instances, for example by only"]
89 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
90 #[doc = r" original peripheral and using critical sections to coordinate"]
91 #[doc = r" access between multiple new instances."]
92 #[doc = r""]
93 #[doc = r" Additionally, other software such as HALs may rely on only one"]
94 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
95 #[doc = r" no stolen instances are passed to such software."]
96 pub unsafe fn steal() -> Self {
97 Self {
98 _marker: PhantomData,
99 }
100 }
101}
102impl Deref for Pm {
103 type Target = pm::RegisterBlock;
104 #[inline(always)]
105 fn deref(&self) -> &Self::Target {
106 unsafe { &*Self::PTR }
107 }
108}
109impl core::fmt::Debug for Pm {
110 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
111 f.debug_struct("Pm").finish()
112 }
113}
114#[doc = "Блок управления питанием и тактированием"]
115pub mod pm;
116#[doc = "Программируемый контроллер прерываний"]
117pub struct Epic {
118 _marker: PhantomData<*const ()>,
119}
120unsafe impl Send for Epic {}
121impl Epic {
122 #[doc = r"Pointer to the register block"]
123 pub const PTR: *const epic::RegisterBlock = 0x0005_0400 as *const _;
124 #[doc = r"Return the pointer to the register block"]
125 #[inline(always)]
126 pub const fn ptr() -> *const epic::RegisterBlock {
127 Self::PTR
128 }
129 #[doc = r" Steal an instance of this peripheral"]
130 #[doc = r""]
131 #[doc = r" # Safety"]
132 #[doc = r""]
133 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
134 #[doc = r" that may race with any existing instances, for example by only"]
135 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
136 #[doc = r" original peripheral and using critical sections to coordinate"]
137 #[doc = r" access between multiple new instances."]
138 #[doc = r""]
139 #[doc = r" Additionally, other software such as HALs may rely on only one"]
140 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
141 #[doc = r" no stolen instances are passed to such software."]
142 pub unsafe fn steal() -> Self {
143 Self {
144 _marker: PhantomData,
145 }
146 }
147}
148impl Deref for Epic {
149 type Target = epic::RegisterBlock;
150 #[inline(always)]
151 fn deref(&self) -> &Self::Target {
152 unsafe { &*Self::PTR }
153 }
154}
155impl core::fmt::Debug for Epic {
156 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
157 f.debug_struct("Epic").finish()
158 }
159}
160#[doc = "Программируемый контроллер прерываний"]
161pub mod epic;
162#[doc = "регистры модуля таймера_0"]
163pub struct Timer32_0 {
164 _marker: PhantomData<*const ()>,
165}
166unsafe impl Send for Timer32_0 {}
167impl Timer32_0 {
168 #[doc = r"Pointer to the register block"]
169 pub const PTR: *const timer32_0::RegisterBlock = 0x0005_0800 as *const _;
170 #[doc = r"Return the pointer to the register block"]
171 #[inline(always)]
172 pub const fn ptr() -> *const timer32_0::RegisterBlock {
173 Self::PTR
174 }
175 #[doc = r" Steal an instance of this peripheral"]
176 #[doc = r""]
177 #[doc = r" # Safety"]
178 #[doc = r""]
179 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
180 #[doc = r" that may race with any existing instances, for example by only"]
181 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
182 #[doc = r" original peripheral and using critical sections to coordinate"]
183 #[doc = r" access between multiple new instances."]
184 #[doc = r""]
185 #[doc = r" Additionally, other software such as HALs may rely on only one"]
186 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
187 #[doc = r" no stolen instances are passed to such software."]
188 pub unsafe fn steal() -> Self {
189 Self {
190 _marker: PhantomData,
191 }
192 }
193}
194impl Deref for Timer32_0 {
195 type Target = timer32_0::RegisterBlock;
196 #[inline(always)]
197 fn deref(&self) -> &Self::Target {
198 unsafe { &*Self::PTR }
199 }
200}
201impl core::fmt::Debug for Timer32_0 {
202 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
203 f.debug_struct("Timer32_0").finish()
204 }
205}
206#[doc = "регистры модуля таймера_0"]
207pub mod timer32_0;
208#[doc = "Управление монитором напряжения VCC"]
209pub struct PvdVcc {
210 _marker: PhantomData<*const ()>,
211}
212unsafe impl Send for PvdVcc {}
213impl PvdVcc {
214 #[doc = r"Pointer to the register block"]
215 pub const PTR: *const pvd_vcc::RegisterBlock = 0x0005_1800 as *const _;
216 #[doc = r"Return the pointer to the register block"]
217 #[inline(always)]
218 pub const fn ptr() -> *const pvd_vcc::RegisterBlock {
219 Self::PTR
220 }
221 #[doc = r" Steal an instance of this peripheral"]
222 #[doc = r""]
223 #[doc = r" # Safety"]
224 #[doc = r""]
225 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
226 #[doc = r" that may race with any existing instances, for example by only"]
227 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
228 #[doc = r" original peripheral and using critical sections to coordinate"]
229 #[doc = r" access between multiple new instances."]
230 #[doc = r""]
231 #[doc = r" Additionally, other software such as HALs may rely on only one"]
232 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
233 #[doc = r" no stolen instances are passed to such software."]
234 pub unsafe fn steal() -> Self {
235 Self {
236 _marker: PhantomData,
237 }
238 }
239}
240impl Deref for PvdVcc {
241 type Target = pvd_vcc::RegisterBlock;
242 #[inline(always)]
243 fn deref(&self) -> &Self::Target {
244 unsafe { &*Self::PTR }
245 }
246}
247impl core::fmt::Debug for PvdVcc {
248 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
249 f.debug_struct("PvdVcc").finish()
250 }
251}
252#[doc = "Управление монитором напряжения VCC"]
253pub mod pvd_vcc;
254#[doc = "Модуль управления функцией ввода/вывода"]
255pub struct PadConfig {
256 _marker: PhantomData<*const ()>,
257}
258unsafe impl Send for PadConfig {}
259impl PadConfig {
260 #[doc = r"Pointer to the register block"]
261 pub const PTR: *const pad_config::RegisterBlock = 0x0005_0c00 as *const _;
262 #[doc = r"Return the pointer to the register block"]
263 #[inline(always)]
264 pub const fn ptr() -> *const pad_config::RegisterBlock {
265 Self::PTR
266 }
267 #[doc = r" Steal an instance of this peripheral"]
268 #[doc = r""]
269 #[doc = r" # Safety"]
270 #[doc = r""]
271 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
272 #[doc = r" that may race with any existing instances, for example by only"]
273 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
274 #[doc = r" original peripheral and using critical sections to coordinate"]
275 #[doc = r" access between multiple new instances."]
276 #[doc = r""]
277 #[doc = r" Additionally, other software such as HALs may rely on only one"]
278 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
279 #[doc = r" no stolen instances are passed to such software."]
280 pub unsafe fn steal() -> Self {
281 Self {
282 _marker: PhantomData,
283 }
284 }
285}
286impl Deref for PadConfig {
287 type Target = pad_config::RegisterBlock;
288 #[inline(always)]
289 fn deref(&self) -> &Self::Target {
290 unsafe { &*Self::PTR }
291 }
292}
293impl core::fmt::Debug for PadConfig {
294 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
295 f.debug_struct("PadConfig").finish()
296 }
297}
298#[doc = "Модуль управления функцией ввода/вывода"]
299pub mod pad_config;
300#[doc = "Сторожевой таймер шины"]
301pub struct WdtBus {
302 _marker: PhantomData<*const ()>,
303}
304unsafe impl Send for WdtBus {}
305impl WdtBus {
306 #[doc = r"Pointer to the register block"]
307 pub const PTR: *const wdt_bus::RegisterBlock = 0x0005_1000 as *const _;
308 #[doc = r"Return the pointer to the register block"]
309 #[inline(always)]
310 pub const fn ptr() -> *const wdt_bus::RegisterBlock {
311 Self::PTR
312 }
313 #[doc = r" Steal an instance of this peripheral"]
314 #[doc = r""]
315 #[doc = r" # Safety"]
316 #[doc = r""]
317 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
318 #[doc = r" that may race with any existing instances, for example by only"]
319 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
320 #[doc = r" original peripheral and using critical sections to coordinate"]
321 #[doc = r" access between multiple new instances."]
322 #[doc = r""]
323 #[doc = r" Additionally, other software such as HALs may rely on only one"]
324 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
325 #[doc = r" no stolen instances are passed to such software."]
326 pub unsafe fn steal() -> Self {
327 Self {
328 _marker: PhantomData,
329 }
330 }
331}
332impl Deref for WdtBus {
333 type Target = wdt_bus::RegisterBlock;
334 #[inline(always)]
335 fn deref(&self) -> &Self::Target {
336 unsafe { &*Self::PTR }
337 }
338}
339impl core::fmt::Debug for WdtBus {
340 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
341 f.debug_struct("WdtBus").finish()
342 }
343}
344#[doc = "Сторожевой таймер шины"]
345pub mod wdt_bus;
346#[doc = "Контроллер блока однократно-программируемой памяти"]
347pub struct Otp {
348 _marker: PhantomData<*const ()>,
349}
350unsafe impl Send for Otp {}
351impl Otp {
352 #[doc = r"Pointer to the register block"]
353 pub const PTR: *const otp::RegisterBlock = 0x0005_1400 as *const _;
354 #[doc = r"Return the pointer to the register block"]
355 #[inline(always)]
356 pub const fn ptr() -> *const otp::RegisterBlock {
357 Self::PTR
358 }
359 #[doc = r" Steal an instance of this peripheral"]
360 #[doc = r""]
361 #[doc = r" # Safety"]
362 #[doc = r""]
363 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
364 #[doc = r" that may race with any existing instances, for example by only"]
365 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
366 #[doc = r" original peripheral and using critical sections to coordinate"]
367 #[doc = r" access between multiple new instances."]
368 #[doc = r""]
369 #[doc = r" Additionally, other software such as HALs may rely on only one"]
370 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
371 #[doc = r" no stolen instances are passed to such software."]
372 pub unsafe fn steal() -> Self {
373 Self {
374 _marker: PhantomData,
375 }
376 }
377}
378impl Deref for Otp {
379 type Target = otp::RegisterBlock;
380 #[inline(always)]
381 fn deref(&self) -> &Self::Target {
382 unsafe { &*Self::PTR }
383 }
384}
385impl core::fmt::Debug for Otp {
386 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
387 f.debug_struct("Otp").finish()
388 }
389}
390#[doc = "Контроллер блока однократно-программируемой памяти"]
391pub mod otp;
392#[doc = "Блок WakeUp - управление питанием системным доменом, управление источниками тактовых сигналов"]
393pub struct WakeUp {
394 _marker: PhantomData<*const ()>,
395}
396unsafe impl Send for WakeUp {}
397impl WakeUp {
398 #[doc = r"Pointer to the register block"]
399 pub const PTR: *const wake_up::RegisterBlock = 0x0006_0000 as *const _;
400 #[doc = r"Return the pointer to the register block"]
401 #[inline(always)]
402 pub const fn ptr() -> *const wake_up::RegisterBlock {
403 Self::PTR
404 }
405 #[doc = r" Steal an instance of this peripheral"]
406 #[doc = r""]
407 #[doc = r" # Safety"]
408 #[doc = r""]
409 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
410 #[doc = r" that may race with any existing instances, for example by only"]
411 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
412 #[doc = r" original peripheral and using critical sections to coordinate"]
413 #[doc = r" access between multiple new instances."]
414 #[doc = r""]
415 #[doc = r" Additionally, other software such as HALs may rely on only one"]
416 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
417 #[doc = r" no stolen instances are passed to such software."]
418 pub unsafe fn steal() -> Self {
419 Self {
420 _marker: PhantomData,
421 }
422 }
423}
424impl Deref for WakeUp {
425 type Target = wake_up::RegisterBlock;
426 #[inline(always)]
427 fn deref(&self) -> &Self::Target {
428 unsafe { &*Self::PTR }
429 }
430}
431impl core::fmt::Debug for WakeUp {
432 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
433 f.debug_struct("WakeUp").finish()
434 }
435}
436#[doc = "Блок WakeUp - управление питанием системным доменом, управление источниками тактовых сигналов"]
437pub mod wake_up;
438#[doc = "Часы реального времени"]
439pub struct Rtc {
440 _marker: PhantomData<*const ()>,
441}
442unsafe impl Send for Rtc {}
443impl Rtc {
444 #[doc = r"Pointer to the register block"]
445 pub const PTR: *const rtc::RegisterBlock = 0x0006_0400 as *const _;
446 #[doc = r"Return the pointer to the register block"]
447 #[inline(always)]
448 pub const fn ptr() -> *const rtc::RegisterBlock {
449 Self::PTR
450 }
451 #[doc = r" Steal an instance of this peripheral"]
452 #[doc = r""]
453 #[doc = r" # Safety"]
454 #[doc = r""]
455 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
456 #[doc = r" that may race with any existing instances, for example by only"]
457 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
458 #[doc = r" original peripheral and using critical sections to coordinate"]
459 #[doc = r" access between multiple new instances."]
460 #[doc = r""]
461 #[doc = r" Additionally, other software such as HALs may rely on only one"]
462 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
463 #[doc = r" no stolen instances are passed to such software."]
464 pub unsafe fn steal() -> Self {
465 Self {
466 _marker: PhantomData,
467 }
468 }
469}
470impl Deref for Rtc {
471 type Target = rtc::RegisterBlock;
472 #[inline(always)]
473 fn deref(&self) -> &Self::Target {
474 unsafe { &*Self::PTR }
475 }
476}
477impl core::fmt::Debug for Rtc {
478 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
479 f.debug_struct("Rtc").finish()
480 }
481}
482#[doc = "Часы реального времени"]
483pub mod rtc;
484#[doc = "Блок управления режимом загрузки"]
485pub struct BootManager {
486 _marker: PhantomData<*const ()>,
487}
488unsafe impl Send for BootManager {}
489impl BootManager {
490 #[doc = r"Pointer to the register block"]
491 pub const PTR: *const boot_manager::RegisterBlock = 0x0006_0800 as *const _;
492 #[doc = r"Return the pointer to the register block"]
493 #[inline(always)]
494 pub const fn ptr() -> *const boot_manager::RegisterBlock {
495 Self::PTR
496 }
497 #[doc = r" Steal an instance of this peripheral"]
498 #[doc = r""]
499 #[doc = r" # Safety"]
500 #[doc = r""]
501 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
502 #[doc = r" that may race with any existing instances, for example by only"]
503 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
504 #[doc = r" original peripheral and using critical sections to coordinate"]
505 #[doc = r" access between multiple new instances."]
506 #[doc = r""]
507 #[doc = r" Additionally, other software such as HALs may rely on only one"]
508 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
509 #[doc = r" no stolen instances are passed to such software."]
510 pub unsafe fn steal() -> Self {
511 Self {
512 _marker: PhantomData,
513 }
514 }
515}
516impl Deref for BootManager {
517 type Target = boot_manager::RegisterBlock;
518 #[inline(always)]
519 fn deref(&self) -> &Self::Target {
520 unsafe { &*Self::PTR }
521 }
522}
523impl core::fmt::Debug for BootManager {
524 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
525 f.debug_struct("BootManager").finish()
526 }
527}
528#[doc = "Блок управления режимом загрузки"]
529pub mod boot_manager;
530#[doc = "Контроллер SPIFI"]
531pub struct SpifiConfig {
532 _marker: PhantomData<*const ()>,
533}
534unsafe impl Send for SpifiConfig {}
535impl SpifiConfig {
536 #[doc = r"Pointer to the register block"]
537 pub const PTR: *const spifi_config::RegisterBlock = 0x0007_0000 as *const _;
538 #[doc = r"Return the pointer to the register block"]
539 #[inline(always)]
540 pub const fn ptr() -> *const spifi_config::RegisterBlock {
541 Self::PTR
542 }
543 #[doc = r" Steal an instance of this peripheral"]
544 #[doc = r""]
545 #[doc = r" # Safety"]
546 #[doc = r""]
547 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
548 #[doc = r" that may race with any existing instances, for example by only"]
549 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
550 #[doc = r" original peripheral and using critical sections to coordinate"]
551 #[doc = r" access between multiple new instances."]
552 #[doc = r""]
553 #[doc = r" Additionally, other software such as HALs may rely on only one"]
554 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
555 #[doc = r" no stolen instances are passed to such software."]
556 pub unsafe fn steal() -> Self {
557 Self {
558 _marker: PhantomData,
559 }
560 }
561}
562impl Deref for SpifiConfig {
563 type Target = spifi_config::RegisterBlock;
564 #[inline(always)]
565 fn deref(&self) -> &Self::Target {
566 unsafe { &*Self::PTR }
567 }
568}
569impl core::fmt::Debug for SpifiConfig {
570 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
571 f.debug_struct("SpifiConfig").finish()
572 }
573}
574#[doc = "Контроллер SPIFI"]
575pub mod spifi_config;
576#[doc = "Контроллер EEPROM (8Кб)"]
577pub struct EepromRegs {
578 _marker: PhantomData<*const ()>,
579}
580unsafe impl Send for EepromRegs {}
581impl EepromRegs {
582 #[doc = r"Pointer to the register block"]
583 pub const PTR: *const eeprom_regs::RegisterBlock = 0x0007_0400 as *const _;
584 #[doc = r"Return the pointer to the register block"]
585 #[inline(always)]
586 pub const fn ptr() -> *const eeprom_regs::RegisterBlock {
587 Self::PTR
588 }
589 #[doc = r" Steal an instance of this peripheral"]
590 #[doc = r""]
591 #[doc = r" # Safety"]
592 #[doc = r""]
593 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
594 #[doc = r" that may race with any existing instances, for example by only"]
595 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
596 #[doc = r" original peripheral and using critical sections to coordinate"]
597 #[doc = r" access between multiple new instances."]
598 #[doc = r""]
599 #[doc = r" Additionally, other software such as HALs may rely on only one"]
600 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
601 #[doc = r" no stolen instances are passed to such software."]
602 pub unsafe fn steal() -> Self {
603 Self {
604 _marker: PhantomData,
605 }
606 }
607}
608impl Deref for EepromRegs {
609 type Target = eeprom_regs::RegisterBlock;
610 #[inline(always)]
611 fn deref(&self) -> &Self::Target {
612 unsafe { &*Self::PTR }
613 }
614}
615impl core::fmt::Debug for EepromRegs {
616 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
617 f.debug_struct("EepromRegs").finish()
618 }
619}
620#[doc = "Контроллер EEPROM (8Кб)"]
621pub mod eeprom_regs;
622#[doc = "Крипто-блок"]
623pub struct Crypto {
624 _marker: PhantomData<*const ()>,
625}
626unsafe impl Send for Crypto {}
627impl Crypto {
628 #[doc = r"Pointer to the register block"]
629 pub const PTR: *const crypto::RegisterBlock = 0x0008_0000 as *const _;
630 #[doc = r"Return the pointer to the register block"]
631 #[inline(always)]
632 pub const fn ptr() -> *const crypto::RegisterBlock {
633 Self::PTR
634 }
635 #[doc = r" Steal an instance of this peripheral"]
636 #[doc = r""]
637 #[doc = r" # Safety"]
638 #[doc = r""]
639 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
640 #[doc = r" that may race with any existing instances, for example by only"]
641 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
642 #[doc = r" original peripheral and using critical sections to coordinate"]
643 #[doc = r" access between multiple new instances."]
644 #[doc = r""]
645 #[doc = r" Additionally, other software such as HALs may rely on only one"]
646 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
647 #[doc = r" no stolen instances are passed to such software."]
648 pub unsafe fn steal() -> Self {
649 Self {
650 _marker: PhantomData,
651 }
652 }
653}
654impl Deref for Crypto {
655 type Target = crypto::RegisterBlock;
656 #[inline(always)]
657 fn deref(&self) -> &Self::Target {
658 unsafe { &*Self::PTR }
659 }
660}
661impl core::fmt::Debug for Crypto {
662 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
663 f.debug_struct("Crypto").finish()
664 }
665}
666#[doc = "Крипто-блок"]
667pub mod crypto;
668#[doc = "Блок вычисления контрольных сумм"]
669pub struct Crc {
670 _marker: PhantomData<*const ()>,
671}
672unsafe impl Send for Crc {}
673impl Crc {
674 #[doc = r"Pointer to the register block"]
675 pub const PTR: *const crc::RegisterBlock = 0x0008_0400 as *const _;
676 #[doc = r"Return the pointer to the register block"]
677 #[inline(always)]
678 pub const fn ptr() -> *const crc::RegisterBlock {
679 Self::PTR
680 }
681 #[doc = r" Steal an instance of this peripheral"]
682 #[doc = r""]
683 #[doc = r" # Safety"]
684 #[doc = r""]
685 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
686 #[doc = r" that may race with any existing instances, for example by only"]
687 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
688 #[doc = r" original peripheral and using critical sections to coordinate"]
689 #[doc = r" access between multiple new instances."]
690 #[doc = r""]
691 #[doc = r" Additionally, other software such as HALs may rely on only one"]
692 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
693 #[doc = r" no stolen instances are passed to such software."]
694 pub unsafe fn steal() -> Self {
695 Self {
696 _marker: PhantomData,
697 }
698 }
699}
700impl Deref for Crc {
701 type Target = crc::RegisterBlock;
702 #[inline(always)]
703 fn deref(&self) -> &Self::Target {
704 unsafe { &*Self::PTR }
705 }
706}
707impl core::fmt::Debug for Crc {
708 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
709 f.debug_struct("Crc").finish()
710 }
711}
712#[doc = "Блок вычисления контрольных сумм"]
713pub mod crc;
714#[doc = "Сторожевой таймер"]
715pub struct Wdt {
716 _marker: PhantomData<*const ()>,
717}
718unsafe impl Send for Wdt {}
719impl Wdt {
720 #[doc = r"Pointer to the register block"]
721 pub const PTR: *const wdt::RegisterBlock = 0x0008_1000 as *const _;
722 #[doc = r"Return the pointer to the register block"]
723 #[inline(always)]
724 pub const fn ptr() -> *const wdt::RegisterBlock {
725 Self::PTR
726 }
727 #[doc = r" Steal an instance of this peripheral"]
728 #[doc = r""]
729 #[doc = r" # Safety"]
730 #[doc = r""]
731 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
732 #[doc = r" that may race with any existing instances, for example by only"]
733 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
734 #[doc = r" original peripheral and using critical sections to coordinate"]
735 #[doc = r" access between multiple new instances."]
736 #[doc = r""]
737 #[doc = r" Additionally, other software such as HALs may rely on only one"]
738 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
739 #[doc = r" no stolen instances are passed to such software."]
740 pub unsafe fn steal() -> Self {
741 Self {
742 _marker: PhantomData,
743 }
744 }
745}
746impl Deref for Wdt {
747 type Target = wdt::RegisterBlock;
748 #[inline(always)]
749 fn deref(&self) -> &Self::Target {
750 unsafe { &*Self::PTR }
751 }
752}
753impl core::fmt::Debug for Wdt {
754 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
755 f.debug_struct("Wdt").finish()
756 }
757}
758#[doc = "Сторожевой таймер"]
759pub mod wdt;
760#[doc = "приемо-передатчик"]
761pub struct Usart0 {
762 _marker: PhantomData<*const ()>,
763}
764unsafe impl Send for Usart0 {}
765impl Usart0 {
766 #[doc = r"Pointer to the register block"]
767 pub const PTR: *const usart_0::RegisterBlock = 0x0008_1400 as *const _;
768 #[doc = r"Return the pointer to the register block"]
769 #[inline(always)]
770 pub const fn ptr() -> *const usart_0::RegisterBlock {
771 Self::PTR
772 }
773 #[doc = r" Steal an instance of this peripheral"]
774 #[doc = r""]
775 #[doc = r" # Safety"]
776 #[doc = r""]
777 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
778 #[doc = r" that may race with any existing instances, for example by only"]
779 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
780 #[doc = r" original peripheral and using critical sections to coordinate"]
781 #[doc = r" access between multiple new instances."]
782 #[doc = r""]
783 #[doc = r" Additionally, other software such as HALs may rely on only one"]
784 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
785 #[doc = r" no stolen instances are passed to such software."]
786 pub unsafe fn steal() -> Self {
787 Self {
788 _marker: PhantomData,
789 }
790 }
791}
792impl Deref for Usart0 {
793 type Target = usart_0::RegisterBlock;
794 #[inline(always)]
795 fn deref(&self) -> &Self::Target {
796 unsafe { &*Self::PTR }
797 }
798}
799impl core::fmt::Debug for Usart0 {
800 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
801 f.debug_struct("Usart0").finish()
802 }
803}
804#[doc = "приемо-передатчик"]
805pub mod usart_0;
806#[doc = "приемо-передатчик"]
807pub struct Usart1 {
808 _marker: PhantomData<*const ()>,
809}
810unsafe impl Send for Usart1 {}
811impl Usart1 {
812 #[doc = r"Pointer to the register block"]
813 pub const PTR: *const usart_0::RegisterBlock = 0x0008_1800 as *const _;
814 #[doc = r"Return the pointer to the register block"]
815 #[inline(always)]
816 pub const fn ptr() -> *const usart_0::RegisterBlock {
817 Self::PTR
818 }
819 #[doc = r" Steal an instance of this peripheral"]
820 #[doc = r""]
821 #[doc = r" # Safety"]
822 #[doc = r""]
823 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
824 #[doc = r" that may race with any existing instances, for example by only"]
825 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
826 #[doc = r" original peripheral and using critical sections to coordinate"]
827 #[doc = r" access between multiple new instances."]
828 #[doc = r""]
829 #[doc = r" Additionally, other software such as HALs may rely on only one"]
830 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
831 #[doc = r" no stolen instances are passed to such software."]
832 pub unsafe fn steal() -> Self {
833 Self {
834 _marker: PhantomData,
835 }
836 }
837}
838impl Deref for Usart1 {
839 type Target = usart_0::RegisterBlock;
840 #[inline(always)]
841 fn deref(&self) -> &Self::Target {
842 unsafe { &*Self::PTR }
843 }
844}
845impl core::fmt::Debug for Usart1 {
846 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
847 f.debug_struct("Usart1").finish()
848 }
849}
850#[doc = "приемо-передатчик"]
851pub use usart_0 as usart_1;
852#[doc = "Регистры модуля таймера_0"]
853pub struct Timer16_0 {
854 _marker: PhantomData<*const ()>,
855}
856unsafe impl Send for Timer16_0 {}
857impl Timer16_0 {
858 #[doc = r"Pointer to the register block"]
859 pub const PTR: *const timer16_0::RegisterBlock = 0x0008_1c00 as *const _;
860 #[doc = r"Return the pointer to the register block"]
861 #[inline(always)]
862 pub const fn ptr() -> *const timer16_0::RegisterBlock {
863 Self::PTR
864 }
865 #[doc = r" Steal an instance of this peripheral"]
866 #[doc = r""]
867 #[doc = r" # Safety"]
868 #[doc = r""]
869 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
870 #[doc = r" that may race with any existing instances, for example by only"]
871 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
872 #[doc = r" original peripheral and using critical sections to coordinate"]
873 #[doc = r" access between multiple new instances."]
874 #[doc = r""]
875 #[doc = r" Additionally, other software such as HALs may rely on only one"]
876 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
877 #[doc = r" no stolen instances are passed to such software."]
878 pub unsafe fn steal() -> Self {
879 Self {
880 _marker: PhantomData,
881 }
882 }
883}
884impl Deref for Timer16_0 {
885 type Target = timer16_0::RegisterBlock;
886 #[inline(always)]
887 fn deref(&self) -> &Self::Target {
888 unsafe { &*Self::PTR }
889 }
890}
891impl core::fmt::Debug for Timer16_0 {
892 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
893 f.debug_struct("Timer16_0").finish()
894 }
895}
896#[doc = "Регистры модуля таймера_0"]
897pub mod timer16_0;
898#[doc = "Регистры модуля таймера_1"]
899pub struct Timer16_1 {
900 _marker: PhantomData<*const ()>,
901}
902unsafe impl Send for Timer16_1 {}
903impl Timer16_1 {
904 #[doc = r"Pointer to the register block"]
905 pub const PTR: *const timer16_1::RegisterBlock = 0x0008_2000 as *const _;
906 #[doc = r"Return the pointer to the register block"]
907 #[inline(always)]
908 pub const fn ptr() -> *const timer16_1::RegisterBlock {
909 Self::PTR
910 }
911 #[doc = r" Steal an instance of this peripheral"]
912 #[doc = r""]
913 #[doc = r" # Safety"]
914 #[doc = r""]
915 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
916 #[doc = r" that may race with any existing instances, for example by only"]
917 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
918 #[doc = r" original peripheral and using critical sections to coordinate"]
919 #[doc = r" access between multiple new instances."]
920 #[doc = r""]
921 #[doc = r" Additionally, other software such as HALs may rely on only one"]
922 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
923 #[doc = r" no stolen instances are passed to such software."]
924 pub unsafe fn steal() -> Self {
925 Self {
926 _marker: PhantomData,
927 }
928 }
929}
930impl Deref for Timer16_1 {
931 type Target = timer16_1::RegisterBlock;
932 #[inline(always)]
933 fn deref(&self) -> &Self::Target {
934 unsafe { &*Self::PTR }
935 }
936}
937impl core::fmt::Debug for Timer16_1 {
938 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
939 f.debug_struct("Timer16_1").finish()
940 }
941}
942#[doc = "Регистры модуля таймера_1"]
943pub mod timer16_1;
944#[doc = "Регистры модуля таймера_2"]
945pub struct Timer16_2 {
946 _marker: PhantomData<*const ()>,
947}
948unsafe impl Send for Timer16_2 {}
949impl Timer16_2 {
950 #[doc = r"Pointer to the register block"]
951 pub const PTR: *const timer16_2::RegisterBlock = 0x0008_2400 as *const _;
952 #[doc = r"Return the pointer to the register block"]
953 #[inline(always)]
954 pub const fn ptr() -> *const timer16_2::RegisterBlock {
955 Self::PTR
956 }
957 #[doc = r" Steal an instance of this peripheral"]
958 #[doc = r""]
959 #[doc = r" # Safety"]
960 #[doc = r""]
961 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
962 #[doc = r" that may race with any existing instances, for example by only"]
963 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
964 #[doc = r" original peripheral and using critical sections to coordinate"]
965 #[doc = r" access between multiple new instances."]
966 #[doc = r""]
967 #[doc = r" Additionally, other software such as HALs may rely on only one"]
968 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
969 #[doc = r" no stolen instances are passed to such software."]
970 pub unsafe fn steal() -> Self {
971 Self {
972 _marker: PhantomData,
973 }
974 }
975}
976impl Deref for Timer16_2 {
977 type Target = timer16_2::RegisterBlock;
978 #[inline(always)]
979 fn deref(&self) -> &Self::Target {
980 unsafe { &*Self::PTR }
981 }
982}
983impl core::fmt::Debug for Timer16_2 {
984 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
985 f.debug_struct("Timer16_2").finish()
986 }
987}
988#[doc = "Регистры модуля таймера_2"]
989pub mod timer16_2;
990#[doc = "регистры модуля таймера_1"]
991pub struct Timer32_1 {
992 _marker: PhantomData<*const ()>,
993}
994unsafe impl Send for Timer32_1 {}
995impl Timer32_1 {
996 #[doc = r"Pointer to the register block"]
997 pub const PTR: *const timer32_1::RegisterBlock = 0x0008_2800 as *const _;
998 #[doc = r"Return the pointer to the register block"]
999 #[inline(always)]
1000 pub const fn ptr() -> *const timer32_1::RegisterBlock {
1001 Self::PTR
1002 }
1003 #[doc = r" Steal an instance of this peripheral"]
1004 #[doc = r""]
1005 #[doc = r" # Safety"]
1006 #[doc = r""]
1007 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1008 #[doc = r" that may race with any existing instances, for example by only"]
1009 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1010 #[doc = r" original peripheral and using critical sections to coordinate"]
1011 #[doc = r" access between multiple new instances."]
1012 #[doc = r""]
1013 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1014 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1015 #[doc = r" no stolen instances are passed to such software."]
1016 pub unsafe fn steal() -> Self {
1017 Self {
1018 _marker: PhantomData,
1019 }
1020 }
1021}
1022impl Deref for Timer32_1 {
1023 type Target = timer32_1::RegisterBlock;
1024 #[inline(always)]
1025 fn deref(&self) -> &Self::Target {
1026 unsafe { &*Self::PTR }
1027 }
1028}
1029impl core::fmt::Debug for Timer32_1 {
1030 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1031 f.debug_struct("Timer32_1").finish()
1032 }
1033}
1034#[doc = "регистры модуля таймера_1"]
1035pub mod timer32_1;
1036#[doc = "регистры модуля таймера_2"]
1037pub struct Timer32_2 {
1038 _marker: PhantomData<*const ()>,
1039}
1040unsafe impl Send for Timer32_2 {}
1041impl Timer32_2 {
1042 #[doc = r"Pointer to the register block"]
1043 pub const PTR: *const timer32_2::RegisterBlock = 0x0008_2c00 as *const _;
1044 #[doc = r"Return the pointer to the register block"]
1045 #[inline(always)]
1046 pub const fn ptr() -> *const timer32_2::RegisterBlock {
1047 Self::PTR
1048 }
1049 #[doc = r" Steal an instance of this peripheral"]
1050 #[doc = r""]
1051 #[doc = r" # Safety"]
1052 #[doc = r""]
1053 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1054 #[doc = r" that may race with any existing instances, for example by only"]
1055 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1056 #[doc = r" original peripheral and using critical sections to coordinate"]
1057 #[doc = r" access between multiple new instances."]
1058 #[doc = r""]
1059 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1060 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1061 #[doc = r" no stolen instances are passed to such software."]
1062 pub unsafe fn steal() -> Self {
1063 Self {
1064 _marker: PhantomData,
1065 }
1066 }
1067}
1068impl Deref for Timer32_2 {
1069 type Target = timer32_2::RegisterBlock;
1070 #[inline(always)]
1071 fn deref(&self) -> &Self::Target {
1072 unsafe { &*Self::PTR }
1073 }
1074}
1075impl core::fmt::Debug for Timer32_2 {
1076 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1077 f.debug_struct("Timer32_2").finish()
1078 }
1079}
1080#[doc = "регистры модуля таймера_2"]
1081pub mod timer32_2;
1082#[doc = "Модуль обеспечивает взаимодействие с различными периферийными устройствами"]
1083pub struct Spi0 {
1084 _marker: PhantomData<*const ()>,
1085}
1086unsafe impl Send for Spi0 {}
1087impl Spi0 {
1088 #[doc = r"Pointer to the register block"]
1089 pub const PTR: *const spi_0::RegisterBlock = 0x0008_3000 as *const _;
1090 #[doc = r"Return the pointer to the register block"]
1091 #[inline(always)]
1092 pub const fn ptr() -> *const spi_0::RegisterBlock {
1093 Self::PTR
1094 }
1095 #[doc = r" Steal an instance of this peripheral"]
1096 #[doc = r""]
1097 #[doc = r" # Safety"]
1098 #[doc = r""]
1099 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1100 #[doc = r" that may race with any existing instances, for example by only"]
1101 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1102 #[doc = r" original peripheral and using critical sections to coordinate"]
1103 #[doc = r" access between multiple new instances."]
1104 #[doc = r""]
1105 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1106 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1107 #[doc = r" no stolen instances are passed to such software."]
1108 pub unsafe fn steal() -> Self {
1109 Self {
1110 _marker: PhantomData,
1111 }
1112 }
1113}
1114impl Deref for Spi0 {
1115 type Target = spi_0::RegisterBlock;
1116 #[inline(always)]
1117 fn deref(&self) -> &Self::Target {
1118 unsafe { &*Self::PTR }
1119 }
1120}
1121impl core::fmt::Debug for Spi0 {
1122 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1123 f.debug_struct("Spi0").finish()
1124 }
1125}
1126#[doc = "Модуль обеспечивает взаимодействие с различными периферийными устройствами"]
1127pub mod spi_0;
1128#[doc = "Модуль обеспечивает взаимодействие с различными периферийными устройствами"]
1129pub struct Spi1 {
1130 _marker: PhantomData<*const ()>,
1131}
1132unsafe impl Send for Spi1 {}
1133impl Spi1 {
1134 #[doc = r"Pointer to the register block"]
1135 pub const PTR: *const spi_1::RegisterBlock = 0x0008_3400 as *const _;
1136 #[doc = r"Return the pointer to the register block"]
1137 #[inline(always)]
1138 pub const fn ptr() -> *const spi_1::RegisterBlock {
1139 Self::PTR
1140 }
1141 #[doc = r" Steal an instance of this peripheral"]
1142 #[doc = r""]
1143 #[doc = r" # Safety"]
1144 #[doc = r""]
1145 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1146 #[doc = r" that may race with any existing instances, for example by only"]
1147 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1148 #[doc = r" original peripheral and using critical sections to coordinate"]
1149 #[doc = r" access between multiple new instances."]
1150 #[doc = r""]
1151 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1152 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1153 #[doc = r" no stolen instances are passed to such software."]
1154 pub unsafe fn steal() -> Self {
1155 Self {
1156 _marker: PhantomData,
1157 }
1158 }
1159}
1160impl Deref for Spi1 {
1161 type Target = spi_1::RegisterBlock;
1162 #[inline(always)]
1163 fn deref(&self) -> &Self::Target {
1164 unsafe { &*Self::PTR }
1165 }
1166}
1167impl core::fmt::Debug for Spi1 {
1168 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1169 f.debug_struct("Spi1").finish()
1170 }
1171}
1172#[doc = "Модуль обеспечивает взаимодействие с различными периферийными устройствами"]
1173pub mod spi_1;
1174#[doc = "Модуль обеспечивает интерфейс для связи контроллера и последовательной шины I2C"]
1175pub struct I2c0 {
1176 _marker: PhantomData<*const ()>,
1177}
1178unsafe impl Send for I2c0 {}
1179impl I2c0 {
1180 #[doc = r"Pointer to the register block"]
1181 pub const PTR: *const i2c_0::RegisterBlock = 0x0008_3800 as *const _;
1182 #[doc = r"Return the pointer to the register block"]
1183 #[inline(always)]
1184 pub const fn ptr() -> *const i2c_0::RegisterBlock {
1185 Self::PTR
1186 }
1187 #[doc = r" Steal an instance of this peripheral"]
1188 #[doc = r""]
1189 #[doc = r" # Safety"]
1190 #[doc = r""]
1191 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1192 #[doc = r" that may race with any existing instances, for example by only"]
1193 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1194 #[doc = r" original peripheral and using critical sections to coordinate"]
1195 #[doc = r" access between multiple new instances."]
1196 #[doc = r""]
1197 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1198 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1199 #[doc = r" no stolen instances are passed to such software."]
1200 pub unsafe fn steal() -> Self {
1201 Self {
1202 _marker: PhantomData,
1203 }
1204 }
1205}
1206impl Deref for I2c0 {
1207 type Target = i2c_0::RegisterBlock;
1208 #[inline(always)]
1209 fn deref(&self) -> &Self::Target {
1210 unsafe { &*Self::PTR }
1211 }
1212}
1213impl core::fmt::Debug for I2c0 {
1214 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1215 f.debug_struct("I2c0").finish()
1216 }
1217}
1218#[doc = "Модуль обеспечивает интерфейс для связи контроллера и последовательной шины I2C"]
1219pub mod i2c_0;
1220#[doc = "Модуль обеспечивает интерфейс для связи контроллера и последовательной шины I2C"]
1221pub struct I2c1 {
1222 _marker: PhantomData<*const ()>,
1223}
1224unsafe impl Send for I2c1 {}
1225impl I2c1 {
1226 #[doc = r"Pointer to the register block"]
1227 pub const PTR: *const i2c_1::RegisterBlock = 0x0008_3c00 as *const _;
1228 #[doc = r"Return the pointer to the register block"]
1229 #[inline(always)]
1230 pub const fn ptr() -> *const i2c_1::RegisterBlock {
1231 Self::PTR
1232 }
1233 #[doc = r" Steal an instance of this peripheral"]
1234 #[doc = r""]
1235 #[doc = r" # Safety"]
1236 #[doc = r""]
1237 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1238 #[doc = r" that may race with any existing instances, for example by only"]
1239 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1240 #[doc = r" original peripheral and using critical sections to coordinate"]
1241 #[doc = r" access between multiple new instances."]
1242 #[doc = r""]
1243 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1244 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1245 #[doc = r" no stolen instances are passed to such software."]
1246 pub unsafe fn steal() -> Self {
1247 Self {
1248 _marker: PhantomData,
1249 }
1250 }
1251}
1252impl Deref for I2c1 {
1253 type Target = i2c_1::RegisterBlock;
1254 #[inline(always)]
1255 fn deref(&self) -> &Self::Target {
1256 unsafe { &*Self::PTR }
1257 }
1258}
1259impl core::fmt::Debug for I2c1 {
1260 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1261 f.debug_struct("I2c1").finish()
1262 }
1263}
1264#[doc = "Модуль обеспечивает интерфейс для связи контроллера и последовательной шины I2C"]
1265pub mod i2c_1;
1266#[doc = "Модуль ввода/вывода"]
1267pub struct Gpio16_0 {
1268 _marker: PhantomData<*const ()>,
1269}
1270unsafe impl Send for Gpio16_0 {}
1271impl Gpio16_0 {
1272 #[doc = r"Pointer to the register block"]
1273 pub const PTR: *const gpio16_0::RegisterBlock = 0x0008_4000 as *const _;
1274 #[doc = r"Return the pointer to the register block"]
1275 #[inline(always)]
1276 pub const fn ptr() -> *const gpio16_0::RegisterBlock {
1277 Self::PTR
1278 }
1279 #[doc = r" Steal an instance of this peripheral"]
1280 #[doc = r""]
1281 #[doc = r" # Safety"]
1282 #[doc = r""]
1283 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1284 #[doc = r" that may race with any existing instances, for example by only"]
1285 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1286 #[doc = r" original peripheral and using critical sections to coordinate"]
1287 #[doc = r" access between multiple new instances."]
1288 #[doc = r""]
1289 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1290 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1291 #[doc = r" no stolen instances are passed to such software."]
1292 pub unsafe fn steal() -> Self {
1293 Self {
1294 _marker: PhantomData,
1295 }
1296 }
1297}
1298impl Deref for Gpio16_0 {
1299 type Target = gpio16_0::RegisterBlock;
1300 #[inline(always)]
1301 fn deref(&self) -> &Self::Target {
1302 unsafe { &*Self::PTR }
1303 }
1304}
1305impl core::fmt::Debug for Gpio16_0 {
1306 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1307 f.debug_struct("Gpio16_0").finish()
1308 }
1309}
1310#[doc = "Модуль ввода/вывода"]
1311pub mod gpio16_0;
1312#[doc = "Модуль ввода/вывода"]
1313pub struct Gpio16_1 {
1314 _marker: PhantomData<*const ()>,
1315}
1316unsafe impl Send for Gpio16_1 {}
1317impl Gpio16_1 {
1318 #[doc = r"Pointer to the register block"]
1319 pub const PTR: *const gpio16_1::RegisterBlock = 0x0008_4400 as *const _;
1320 #[doc = r"Return the pointer to the register block"]
1321 #[inline(always)]
1322 pub const fn ptr() -> *const gpio16_1::RegisterBlock {
1323 Self::PTR
1324 }
1325 #[doc = r" Steal an instance of this peripheral"]
1326 #[doc = r""]
1327 #[doc = r" # Safety"]
1328 #[doc = r""]
1329 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1330 #[doc = r" that may race with any existing instances, for example by only"]
1331 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1332 #[doc = r" original peripheral and using critical sections to coordinate"]
1333 #[doc = r" access between multiple new instances."]
1334 #[doc = r""]
1335 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1336 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1337 #[doc = r" no stolen instances are passed to such software."]
1338 pub unsafe fn steal() -> Self {
1339 Self {
1340 _marker: PhantomData,
1341 }
1342 }
1343}
1344impl Deref for Gpio16_1 {
1345 type Target = gpio16_1::RegisterBlock;
1346 #[inline(always)]
1347 fn deref(&self) -> &Self::Target {
1348 unsafe { &*Self::PTR }
1349 }
1350}
1351impl core::fmt::Debug for Gpio16_1 {
1352 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1353 f.debug_struct("Gpio16_1").finish()
1354 }
1355}
1356#[doc = "Модуль ввода/вывода"]
1357pub mod gpio16_1;
1358#[doc = "Модуль ввода/вывода"]
1359pub struct Gpio8_2 {
1360 _marker: PhantomData<*const ()>,
1361}
1362unsafe impl Send for Gpio8_2 {}
1363impl Gpio8_2 {
1364 #[doc = r"Pointer to the register block"]
1365 pub const PTR: *const gpio8_2::RegisterBlock = 0x0008_4800 as *const _;
1366 #[doc = r"Return the pointer to the register block"]
1367 #[inline(always)]
1368 pub const fn ptr() -> *const gpio8_2::RegisterBlock {
1369 Self::PTR
1370 }
1371 #[doc = r" Steal an instance of this peripheral"]
1372 #[doc = r""]
1373 #[doc = r" # Safety"]
1374 #[doc = r""]
1375 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1376 #[doc = r" that may race with any existing instances, for example by only"]
1377 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1378 #[doc = r" original peripheral and using critical sections to coordinate"]
1379 #[doc = r" access between multiple new instances."]
1380 #[doc = r""]
1381 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1382 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1383 #[doc = r" no stolen instances are passed to such software."]
1384 pub unsafe fn steal() -> Self {
1385 Self {
1386 _marker: PhantomData,
1387 }
1388 }
1389}
1390impl Deref for Gpio8_2 {
1391 type Target = gpio8_2::RegisterBlock;
1392 #[inline(always)]
1393 fn deref(&self) -> &Self::Target {
1394 unsafe { &*Self::PTR }
1395 }
1396}
1397impl core::fmt::Debug for Gpio8_2 {
1398 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1399 f.debug_struct("Gpio8_2").finish()
1400 }
1401}
1402#[doc = "Модуль ввода/вывода"]
1403pub mod gpio8_2;
1404#[doc = "Модуль формирования прерываний"]
1405pub struct GpioIrq {
1406 _marker: PhantomData<*const ()>,
1407}
1408unsafe impl Send for GpioIrq {}
1409impl GpioIrq {
1410 #[doc = r"Pointer to the register block"]
1411 pub const PTR: *const gpio_irq::RegisterBlock = 0x0008_4c00 as *const _;
1412 #[doc = r"Return the pointer to the register block"]
1413 #[inline(always)]
1414 pub const fn ptr() -> *const gpio_irq::RegisterBlock {
1415 Self::PTR
1416 }
1417 #[doc = r" Steal an instance of this peripheral"]
1418 #[doc = r""]
1419 #[doc = r" # Safety"]
1420 #[doc = r""]
1421 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1422 #[doc = r" that may race with any existing instances, for example by only"]
1423 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1424 #[doc = r" original peripheral and using critical sections to coordinate"]
1425 #[doc = r" access between multiple new instances."]
1426 #[doc = r""]
1427 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1428 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1429 #[doc = r" no stolen instances are passed to such software."]
1430 pub unsafe fn steal() -> Self {
1431 Self {
1432 _marker: PhantomData,
1433 }
1434 }
1435}
1436impl Deref for GpioIrq {
1437 type Target = gpio_irq::RegisterBlock;
1438 #[inline(always)]
1439 fn deref(&self) -> &Self::Target {
1440 unsafe { &*Self::PTR }
1441 }
1442}
1443impl core::fmt::Debug for GpioIrq {
1444 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1445 f.debug_struct("GpioIrq").finish()
1446 }
1447}
1448#[doc = "Модуль формирования прерываний"]
1449pub mod gpio_irq;
1450#[doc = "Управление ЦАП"]
1451pub struct Dac0 {
1452 _marker: PhantomData<*const ()>,
1453}
1454unsafe impl Send for Dac0 {}
1455impl Dac0 {
1456 #[doc = r"Pointer to the register block"]
1457 pub const PTR: *const dac0::RegisterBlock = 0x0008_5000 as *const _;
1458 #[doc = r"Return the pointer to the register block"]
1459 #[inline(always)]
1460 pub const fn ptr() -> *const dac0::RegisterBlock {
1461 Self::PTR
1462 }
1463 #[doc = r" Steal an instance of this peripheral"]
1464 #[doc = r""]
1465 #[doc = r" # Safety"]
1466 #[doc = r""]
1467 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1468 #[doc = r" that may race with any existing instances, for example by only"]
1469 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1470 #[doc = r" original peripheral and using critical sections to coordinate"]
1471 #[doc = r" access between multiple new instances."]
1472 #[doc = r""]
1473 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1474 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1475 #[doc = r" no stolen instances are passed to such software."]
1476 pub unsafe fn steal() -> Self {
1477 Self {
1478 _marker: PhantomData,
1479 }
1480 }
1481}
1482impl Deref for Dac0 {
1483 type Target = dac0::RegisterBlock;
1484 #[inline(always)]
1485 fn deref(&self) -> &Self::Target {
1486 unsafe { &*Self::PTR }
1487 }
1488}
1489impl core::fmt::Debug for Dac0 {
1490 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1491 f.debug_struct("Dac0").finish()
1492 }
1493}
1494#[doc = "Управление ЦАП"]
1495pub mod dac0;
1496#[doc = "Управление ЦАП"]
1497pub struct Dac1 {
1498 _marker: PhantomData<*const ()>,
1499}
1500unsafe impl Send for Dac1 {}
1501impl Dac1 {
1502 #[doc = r"Pointer to the register block"]
1503 pub const PTR: *const dac1::RegisterBlock = 0x0008_5008 as *const _;
1504 #[doc = r"Return the pointer to the register block"]
1505 #[inline(always)]
1506 pub const fn ptr() -> *const dac1::RegisterBlock {
1507 Self::PTR
1508 }
1509 #[doc = r" Steal an instance of this peripheral"]
1510 #[doc = r""]
1511 #[doc = r" # Safety"]
1512 #[doc = r""]
1513 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1514 #[doc = r" that may race with any existing instances, for example by only"]
1515 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1516 #[doc = r" original peripheral and using critical sections to coordinate"]
1517 #[doc = r" access between multiple new instances."]
1518 #[doc = r""]
1519 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1520 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1521 #[doc = r" no stolen instances are passed to such software."]
1522 pub unsafe fn steal() -> Self {
1523 Self {
1524 _marker: PhantomData,
1525 }
1526 }
1527}
1528impl Deref for Dac1 {
1529 type Target = dac1::RegisterBlock;
1530 #[inline(always)]
1531 fn deref(&self) -> &Self::Target {
1532 unsafe { &*Self::PTR }
1533 }
1534}
1535impl core::fmt::Debug for Dac1 {
1536 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1537 f.debug_struct("Dac1").finish()
1538 }
1539}
1540#[doc = "Управление ЦАП"]
1541pub mod dac1;
1542#[doc = "Управление монитором напряжения AVCC"]
1543pub struct PvdAvcc {
1544 _marker: PhantomData<*const ()>,
1545}
1546unsafe impl Send for PvdAvcc {}
1547impl PvdAvcc {
1548 #[doc = r"Pointer to the register block"]
1549 pub const PTR: *const pvd_avcc::RegisterBlock = 0x0008_5010 as *const _;
1550 #[doc = r"Return the pointer to the register block"]
1551 #[inline(always)]
1552 pub const fn ptr() -> *const pvd_avcc::RegisterBlock {
1553 Self::PTR
1554 }
1555 #[doc = r" Steal an instance of this peripheral"]
1556 #[doc = r""]
1557 #[doc = r" # Safety"]
1558 #[doc = r""]
1559 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1560 #[doc = r" that may race with any existing instances, for example by only"]
1561 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1562 #[doc = r" original peripheral and using critical sections to coordinate"]
1563 #[doc = r" access between multiple new instances."]
1564 #[doc = r""]
1565 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1566 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1567 #[doc = r" no stolen instances are passed to such software."]
1568 pub unsafe fn steal() -> Self {
1569 Self {
1570 _marker: PhantomData,
1571 }
1572 }
1573}
1574impl Deref for PvdAvcc {
1575 type Target = pvd_avcc::RegisterBlock;
1576 #[inline(always)]
1577 fn deref(&self) -> &Self::Target {
1578 unsafe { &*Self::PTR }
1579 }
1580}
1581impl core::fmt::Debug for PvdAvcc {
1582 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1583 f.debug_struct("PvdAvcc").finish()
1584 }
1585}
1586#[doc = "Управление монитором напряжения AVCC"]
1587pub mod pvd_avcc;
1588#[doc = "Управление температурным сенсором"]
1589pub struct Tsens {
1590 _marker: PhantomData<*const ()>,
1591}
1592unsafe impl Send for Tsens {}
1593impl Tsens {
1594 #[doc = r"Pointer to the register block"]
1595 pub const PTR: *const tsens::RegisterBlock = 0x0008_501c as *const _;
1596 #[doc = r"Return the pointer to the register block"]
1597 #[inline(always)]
1598 pub const fn ptr() -> *const tsens::RegisterBlock {
1599 Self::PTR
1600 }
1601 #[doc = r" Steal an instance of this peripheral"]
1602 #[doc = r""]
1603 #[doc = r" # Safety"]
1604 #[doc = r""]
1605 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1606 #[doc = r" that may race with any existing instances, for example by only"]
1607 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1608 #[doc = r" original peripheral and using critical sections to coordinate"]
1609 #[doc = r" access between multiple new instances."]
1610 #[doc = r""]
1611 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1612 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1613 #[doc = r" no stolen instances are passed to such software."]
1614 pub unsafe fn steal() -> Self {
1615 Self {
1616 _marker: PhantomData,
1617 }
1618 }
1619}
1620impl Deref for Tsens {
1621 type Target = tsens::RegisterBlock;
1622 #[inline(always)]
1623 fn deref(&self) -> &Self::Target {
1624 unsafe { &*Self::PTR }
1625 }
1626}
1627impl core::fmt::Debug for Tsens {
1628 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1629 f.debug_struct("Tsens").finish()
1630 }
1631}
1632#[doc = "Управление температурным сенсором"]
1633pub mod tsens;
1634#[doc = "Управление калибруемыми источниками напряжения и тока"]
1635pub struct RefvConfig {
1636 _marker: PhantomData<*const ()>,
1637}
1638unsafe impl Send for RefvConfig {}
1639impl RefvConfig {
1640 #[doc = r"Pointer to the register block"]
1641 pub const PTR: *const refv_config::RegisterBlock = 0x0008_5038 as *const _;
1642 #[doc = r"Return the pointer to the register block"]
1643 #[inline(always)]
1644 pub const fn ptr() -> *const refv_config::RegisterBlock {
1645 Self::PTR
1646 }
1647 #[doc = r" Steal an instance of this peripheral"]
1648 #[doc = r""]
1649 #[doc = r" # Safety"]
1650 #[doc = r""]
1651 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1652 #[doc = r" that may race with any existing instances, for example by only"]
1653 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1654 #[doc = r" original peripheral and using critical sections to coordinate"]
1655 #[doc = r" access between multiple new instances."]
1656 #[doc = r""]
1657 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1658 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1659 #[doc = r" no stolen instances are passed to such software."]
1660 pub unsafe fn steal() -> Self {
1661 Self {
1662 _marker: PhantomData,
1663 }
1664 }
1665}
1666impl Deref for RefvConfig {
1667 type Target = refv_config::RegisterBlock;
1668 #[inline(always)]
1669 fn deref(&self) -> &Self::Target {
1670 unsafe { &*Self::PTR }
1671 }
1672}
1673impl core::fmt::Debug for RefvConfig {
1674 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1675 f.debug_struct("RefvConfig").finish()
1676 }
1677}
1678#[doc = "Управление калибруемыми источниками напряжения и тока"]
1679pub mod refv_config;
1680#[doc = "Управление АЦП"]
1681pub struct Adc {
1682 _marker: PhantomData<*const ()>,
1683}
1684unsafe impl Send for Adc {}
1685impl Adc {
1686 #[doc = r"Pointer to the register block"]
1687 pub const PTR: *const adc::RegisterBlock = 0x0008_503c as *const _;
1688 #[doc = r"Return the pointer to the register block"]
1689 #[inline(always)]
1690 pub const fn ptr() -> *const adc::RegisterBlock {
1691 Self::PTR
1692 }
1693 #[doc = r" Steal an instance of this peripheral"]
1694 #[doc = r""]
1695 #[doc = r" # Safety"]
1696 #[doc = r""]
1697 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1698 #[doc = r" that may race with any existing instances, for example by only"]
1699 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1700 #[doc = r" original peripheral and using critical sections to coordinate"]
1701 #[doc = r" access between multiple new instances."]
1702 #[doc = r""]
1703 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1704 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1705 #[doc = r" no stolen instances are passed to such software."]
1706 pub unsafe fn steal() -> Self {
1707 Self {
1708 _marker: PhantomData,
1709 }
1710 }
1711}
1712impl Deref for Adc {
1713 type Target = adc::RegisterBlock;
1714 #[inline(always)]
1715 fn deref(&self) -> &Self::Target {
1716 unsafe { &*Self::PTR }
1717 }
1718}
1719impl core::fmt::Debug for Adc {
1720 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1721 f.debug_struct("Adc").finish()
1722 }
1723}
1724#[doc = "Управление АЦП"]
1725pub mod adc;
1726#[doc = "Регистры системного таймера"]
1727pub struct Scr1Timer {
1728 _marker: PhantomData<*const ()>,
1729}
1730unsafe impl Send for Scr1Timer {}
1731impl Scr1Timer {
1732 #[doc = r"Pointer to the register block"]
1733 pub const PTR: *const scr1_timer::RegisterBlock = 0x0049_0000 as *const _;
1734 #[doc = r"Return the pointer to the register block"]
1735 #[inline(always)]
1736 pub const fn ptr() -> *const scr1_timer::RegisterBlock {
1737 Self::PTR
1738 }
1739 #[doc = r" Steal an instance of this peripheral"]
1740 #[doc = r""]
1741 #[doc = r" # Safety"]
1742 #[doc = r""]
1743 #[doc = r" Ensure that the new instance of the peripheral cannot be used in a way"]
1744 #[doc = r" that may race with any existing instances, for example by only"]
1745 #[doc = r" accessing read-only or write-only registers, or by consuming the"]
1746 #[doc = r" original peripheral and using critical sections to coordinate"]
1747 #[doc = r" access between multiple new instances."]
1748 #[doc = r""]
1749 #[doc = r" Additionally, other software such as HALs may rely on only one"]
1750 #[doc = r" peripheral instance existing to ensure memory safety; ensure"]
1751 #[doc = r" no stolen instances are passed to such software."]
1752 pub unsafe fn steal() -> Self {
1753 Self {
1754 _marker: PhantomData,
1755 }
1756 }
1757}
1758impl Deref for Scr1Timer {
1759 type Target = scr1_timer::RegisterBlock;
1760 #[inline(always)]
1761 fn deref(&self) -> &Self::Target {
1762 unsafe { &*Self::PTR }
1763 }
1764}
1765impl core::fmt::Debug for Scr1Timer {
1766 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
1767 f.debug_struct("Scr1Timer").finish()
1768 }
1769}
1770#[doc = "Регистры системного таймера"]
1771pub mod scr1_timer;
1772#[unsafe(no_mangle)]
1773static mut DEVICE_PERIPHERALS: bool = false;
1774#[doc = r" All the peripherals."]
1775#[allow(non_snake_case)]
1776pub struct Peripherals {
1777 #[doc = "DMA"]
1778 pub dma: Dma,
1779 #[doc = "PM"]
1780 pub pm: Pm,
1781 #[doc = "EPIC"]
1782 pub epic: Epic,
1783 #[doc = "TIMER32_0"]
1784 pub timer32_0: Timer32_0,
1785 #[doc = "PVD_VCC"]
1786 pub pvd_vcc: PvdVcc,
1787 #[doc = "PAD_CONFIG"]
1788 pub pad_config: PadConfig,
1789 #[doc = "WDT_BUS"]
1790 pub wdt_bus: WdtBus,
1791 #[doc = "OTP"]
1792 pub otp: Otp,
1793 #[doc = "WakeUp"]
1794 pub wake_up: WakeUp,
1795 #[doc = "RTC"]
1796 pub rtc: Rtc,
1797 #[doc = "BOOT_MANAGER"]
1798 pub boot_manager: BootManager,
1799 #[doc = "SPIFI_CONFIG"]
1800 pub spifi_config: SpifiConfig,
1801 #[doc = "EEPROM_REGS"]
1802 pub eeprom_regs: EepromRegs,
1803 #[doc = "CRYPTO"]
1804 pub crypto: Crypto,
1805 #[doc = "CRC"]
1806 pub crc: Crc,
1807 #[doc = "WDT"]
1808 pub wdt: Wdt,
1809 #[doc = "USART_0"]
1810 pub usart_0: Usart0,
1811 #[doc = "USART_1"]
1812 pub usart_1: Usart1,
1813 #[doc = "TIMER16_0"]
1814 pub timer16_0: Timer16_0,
1815 #[doc = "TIMER16_1"]
1816 pub timer16_1: Timer16_1,
1817 #[doc = "TIMER16_2"]
1818 pub timer16_2: Timer16_2,
1819 #[doc = "TIMER32_1"]
1820 pub timer32_1: Timer32_1,
1821 #[doc = "TIMER32_2"]
1822 pub timer32_2: Timer32_2,
1823 #[doc = "SPI_0"]
1824 pub spi_0: Spi0,
1825 #[doc = "SPI_1"]
1826 pub spi_1: Spi1,
1827 #[doc = "I2C_0"]
1828 pub i2c_0: I2c0,
1829 #[doc = "I2C_1"]
1830 pub i2c_1: I2c1,
1831 #[doc = "GPIO16_0"]
1832 pub gpio16_0: Gpio16_0,
1833 #[doc = "GPIO16_1"]
1834 pub gpio16_1: Gpio16_1,
1835 #[doc = "GPIO8_2"]
1836 pub gpio8_2: Gpio8_2,
1837 #[doc = "GPIO_IRQ"]
1838 pub gpio_irq: GpioIrq,
1839 #[doc = "DAC0"]
1840 pub dac0: Dac0,
1841 #[doc = "DAC1"]
1842 pub dac1: Dac1,
1843 #[doc = "PVD_AVCC"]
1844 pub pvd_avcc: PvdAvcc,
1845 #[doc = "TSENS"]
1846 pub tsens: Tsens,
1847 #[doc = "REFV_CONFIG"]
1848 pub refv_config: RefvConfig,
1849 #[doc = "ADC"]
1850 pub adc: Adc,
1851 #[doc = "SCR1_TIMER"]
1852 pub scr1_timer: Scr1Timer,
1853}
1854impl Peripherals {
1855 #[doc = r" Returns all the peripherals *once*."]
1856 #[cfg(feature = "critical-section")]
1857 #[inline]
1858 pub fn take() -> Option<Self> {
1859 critical_section::with(|_| {
1860 if unsafe { DEVICE_PERIPHERALS } {
1861 return None;
1862 }
1863 Some(unsafe { Peripherals::steal() })
1864 })
1865 }
1866 #[doc = r" Unchecked version of `Peripherals::take`."]
1867 #[doc = r""]
1868 #[doc = r" # Safety"]
1869 #[doc = r""]
1870 #[doc = r" Each of the returned peripherals must be used at most once."]
1871 #[inline]
1872 pub unsafe fn steal() -> Self {
1873 unsafe { DEVICE_PERIPHERALS = true };
1874 Peripherals {
1875 dma: unsafe { Dma::steal() },
1876 pm: unsafe { Pm::steal() },
1877 epic: unsafe { Epic::steal() },
1878 timer32_0: unsafe { Timer32_0::steal() },
1879 pvd_vcc: unsafe { PvdVcc::steal() },
1880 pad_config: unsafe { PadConfig::steal() },
1881 wdt_bus: unsafe { WdtBus::steal() },
1882 otp: unsafe { Otp::steal() },
1883 wake_up: unsafe { WakeUp::steal() },
1884 rtc: unsafe { Rtc::steal() },
1885 boot_manager: unsafe { BootManager::steal() },
1886 spifi_config: unsafe { SpifiConfig::steal() },
1887 eeprom_regs: unsafe { EepromRegs::steal() },
1888 crypto: unsafe { Crypto::steal() },
1889 crc: unsafe { Crc::steal() },
1890 wdt: unsafe { Wdt::steal() },
1891 usart_0: unsafe { Usart0::steal() },
1892 usart_1: unsafe { Usart1::steal() },
1893 timer16_0: unsafe { Timer16_0::steal() },
1894 timer16_1: unsafe { Timer16_1::steal() },
1895 timer16_2: unsafe { Timer16_2::steal() },
1896 timer32_1: unsafe { Timer32_1::steal() },
1897 timer32_2: unsafe { Timer32_2::steal() },
1898 spi_0: unsafe { Spi0::steal() },
1899 spi_1: unsafe { Spi1::steal() },
1900 i2c_0: unsafe { I2c0::steal() },
1901 i2c_1: unsafe { I2c1::steal() },
1902 gpio16_0: unsafe { Gpio16_0::steal() },
1903 gpio16_1: unsafe { Gpio16_1::steal() },
1904 gpio8_2: unsafe { Gpio8_2::steal() },
1905 gpio_irq: unsafe { GpioIrq::steal() },
1906 dac0: unsafe { Dac0::steal() },
1907 dac1: unsafe { Dac1::steal() },
1908 pvd_avcc: unsafe { PvdAvcc::steal() },
1909 tsens: unsafe { Tsens::steal() },
1910 refv_config: unsafe { RefvConfig::steal() },
1911 adc: unsafe { Adc::steal() },
1912 scr1_timer: unsafe { Scr1Timer::steal() },
1913 }
1914 }
1915}