1#![doc = "Peripheral access API for BL702 microcontrollers (generated using svd2rust v0.28.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.28.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#![deny(dead_code)]
4#![deny(improper_ctypes)]
5#![deny(missing_docs)]
6#![deny(no_mangle_generic_items)]
7#![deny(non_shorthand_field_patterns)]
8#![deny(overflowing_literals)]
9#![deny(path_statements)]
10#![deny(patterns_in_fns_without_body)]
11#![deny(private_in_public)]
12#![deny(unconditional_recursion)]
13#![deny(unused_allocation)]
14#![deny(unused_comparisons)]
15#![deny(unused_parens)]
16#![deny(while_true)]
17#![allow(non_camel_case_types)]
18#![allow(non_snake_case)]
19#![no_std]
20use core::marker::PhantomData;
21use core::ops::Deref;
22#[allow(unused_imports)]
23use generic::*;
24#[doc = r"Common register and bit access and modify traits"]
25pub mod generic;
26#[cfg(feature = "rt")]
27extern "C" {}
28#[doc(hidden)]
29pub union Vector {
30 pub _handler: unsafe extern "C" fn(),
31 pub _reserved: usize,
32}
33#[cfg(feature = "rt")]
34#[doc(hidden)]
35#[no_mangle]
36pub static __EXTERNAL_INTERRUPTS: [Vector; 0] = [];
37#[doc = "Global Register"]
38pub struct GLB {
39 _marker: PhantomData<*const ()>,
40}
41unsafe impl Send for GLB {}
42impl GLB {
43 #[doc = r"Pointer to the register block"]
44 pub const PTR: *const glb::RegisterBlock = 0x4000_0000 as *const _;
45 #[doc = r"Return the pointer to the register block"]
46 #[inline(always)]
47 pub const fn ptr() -> *const glb::RegisterBlock {
48 Self::PTR
49 }
50}
51impl Deref for GLB {
52 type Target = glb::RegisterBlock;
53 #[inline(always)]
54 fn deref(&self) -> &Self::Target {
55 unsafe { &*Self::PTR }
56 }
57}
58impl core::fmt::Debug for GLB {
59 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
60 f.debug_struct("GLB").finish()
61 }
62}
63#[doc = "Global Register"]
64pub mod glb;
65#[doc = "rf."]
66pub struct RF {
67 _marker: PhantomData<*const ()>,
68}
69unsafe impl Send for RF {}
70impl RF {
71 #[doc = r"Pointer to the register block"]
72 pub const PTR: *const rf::RegisterBlock = 0x4000_1000 as *const _;
73 #[doc = r"Return the pointer to the register block"]
74 #[inline(always)]
75 pub const fn ptr() -> *const rf::RegisterBlock {
76 Self::PTR
77 }
78}
79impl Deref for RF {
80 type Target = rf::RegisterBlock;
81 #[inline(always)]
82 fn deref(&self) -> &Self::Target {
83 unsafe { &*Self::PTR }
84 }
85}
86impl core::fmt::Debug for RF {
87 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
88 f.debug_struct("RF").finish()
89 }
90}
91#[doc = "rf."]
92pub mod rf;
93#[doc = "General purpose DAC/ADC/ACOMP interface control"]
94pub struct GPIP {
95 _marker: PhantomData<*const ()>,
96}
97unsafe impl Send for GPIP {}
98impl GPIP {
99 #[doc = r"Pointer to the register block"]
100 pub const PTR: *const gpip::RegisterBlock = 0x4000_2000 as *const _;
101 #[doc = r"Return the pointer to the register block"]
102 #[inline(always)]
103 pub const fn ptr() -> *const gpip::RegisterBlock {
104 Self::PTR
105 }
106}
107impl Deref for GPIP {
108 type Target = gpip::RegisterBlock;
109 #[inline(always)]
110 fn deref(&self) -> &Self::Target {
111 unsafe { &*Self::PTR }
112 }
113}
114impl core::fmt::Debug for GPIP {
115 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
116 f.debug_struct("GPIP").finish()
117 }
118}
119#[doc = "General purpose DAC/ADC/ACOMP interface control"]
120pub mod gpip;
121#[doc = "sec_dbg."]
122pub struct SEC_DBG {
123 _marker: PhantomData<*const ()>,
124}
125unsafe impl Send for SEC_DBG {}
126impl SEC_DBG {
127 #[doc = r"Pointer to the register block"]
128 pub const PTR: *const sec_dbg::RegisterBlock = 0x4000_3000 as *const _;
129 #[doc = r"Return the pointer to the register block"]
130 #[inline(always)]
131 pub const fn ptr() -> *const sec_dbg::RegisterBlock {
132 Self::PTR
133 }
134}
135impl Deref for SEC_DBG {
136 type Target = sec_dbg::RegisterBlock;
137 #[inline(always)]
138 fn deref(&self) -> &Self::Target {
139 unsafe { &*Self::PTR }
140 }
141}
142impl core::fmt::Debug for SEC_DBG {
143 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
144 f.debug_struct("SEC_DBG").finish()
145 }
146}
147#[doc = "sec_dbg."]
148pub mod sec_dbg;
149#[doc = "sec_eng."]
150pub struct SEC_ENG {
151 _marker: PhantomData<*const ()>,
152}
153unsafe impl Send for SEC_ENG {}
154impl SEC_ENG {
155 #[doc = r"Pointer to the register block"]
156 pub const PTR: *const sec_eng::RegisterBlock = 0x4000_4000 as *const _;
157 #[doc = r"Return the pointer to the register block"]
158 #[inline(always)]
159 pub const fn ptr() -> *const sec_eng::RegisterBlock {
160 Self::PTR
161 }
162}
163impl Deref for SEC_ENG {
164 type Target = sec_eng::RegisterBlock;
165 #[inline(always)]
166 fn deref(&self) -> &Self::Target {
167 unsafe { &*Self::PTR }
168 }
169}
170impl core::fmt::Debug for SEC_ENG {
171 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
172 f.debug_struct("SEC_ENG").finish()
173 }
174}
175#[doc = "sec_eng."]
176pub mod sec_eng;
177#[doc = "tzc_sec."]
178pub struct TZC_SEC {
179 _marker: PhantomData<*const ()>,
180}
181unsafe impl Send for TZC_SEC {}
182impl TZC_SEC {
183 #[doc = r"Pointer to the register block"]
184 pub const PTR: *const tzc_sec::RegisterBlock = 0x4000_5000 as *const _;
185 #[doc = r"Return the pointer to the register block"]
186 #[inline(always)]
187 pub const fn ptr() -> *const tzc_sec::RegisterBlock {
188 Self::PTR
189 }
190}
191impl Deref for TZC_SEC {
192 type Target = tzc_sec::RegisterBlock;
193 #[inline(always)]
194 fn deref(&self) -> &Self::Target {
195 unsafe { &*Self::PTR }
196 }
197}
198impl core::fmt::Debug for TZC_SEC {
199 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
200 f.debug_struct("TZC_SEC").finish()
201 }
202}
203#[doc = "tzc_sec."]
204pub mod tzc_sec;
205#[doc = "tzc_nsec."]
206pub struct TZC_NSEC {
207 _marker: PhantomData<*const ()>,
208}
209unsafe impl Send for TZC_NSEC {}
210impl TZC_NSEC {
211 #[doc = r"Pointer to the register block"]
212 pub const PTR: *const tzc_nsec::RegisterBlock = 0x4000_6000 as *const _;
213 #[doc = r"Return the pointer to the register block"]
214 #[inline(always)]
215 pub const fn ptr() -> *const tzc_nsec::RegisterBlock {
216 Self::PTR
217 }
218}
219impl Deref for TZC_NSEC {
220 type Target = tzc_nsec::RegisterBlock;
221 #[inline(always)]
222 fn deref(&self) -> &Self::Target {
223 unsafe { &*Self::PTR }
224 }
225}
226impl core::fmt::Debug for TZC_NSEC {
227 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
228 f.debug_struct("TZC_NSEC").finish()
229 }
230}
231#[doc = "tzc_nsec."]
232pub mod tzc_nsec;
233#[doc = "ef_data_0."]
234pub struct EF_DATA_0 {
235 _marker: PhantomData<*const ()>,
236}
237unsafe impl Send for EF_DATA_0 {}
238impl EF_DATA_0 {
239 #[doc = r"Pointer to the register block"]
240 pub const PTR: *const ef_data_0::RegisterBlock = 0x4000_7000 as *const _;
241 #[doc = r"Return the pointer to the register block"]
242 #[inline(always)]
243 pub const fn ptr() -> *const ef_data_0::RegisterBlock {
244 Self::PTR
245 }
246}
247impl Deref for EF_DATA_0 {
248 type Target = ef_data_0::RegisterBlock;
249 #[inline(always)]
250 fn deref(&self) -> &Self::Target {
251 unsafe { &*Self::PTR }
252 }
253}
254impl core::fmt::Debug for EF_DATA_0 {
255 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
256 f.debug_struct("EF_DATA_0").finish()
257 }
258}
259#[doc = "ef_data_0."]
260pub mod ef_data_0;
261#[doc = "ef_data_1."]
262pub struct EF_DATA_1 {
263 _marker: PhantomData<*const ()>,
264}
265unsafe impl Send for EF_DATA_1 {}
266impl EF_DATA_1 {
267 #[doc = r"Pointer to the register block"]
268 pub const PTR: *const ef_data_1::RegisterBlock = 0x4000_7000 as *const _;
269 #[doc = r"Return the pointer to the register block"]
270 #[inline(always)]
271 pub const fn ptr() -> *const ef_data_1::RegisterBlock {
272 Self::PTR
273 }
274}
275impl Deref for EF_DATA_1 {
276 type Target = ef_data_1::RegisterBlock;
277 #[inline(always)]
278 fn deref(&self) -> &Self::Target {
279 unsafe { &*Self::PTR }
280 }
281}
282impl core::fmt::Debug for EF_DATA_1 {
283 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
284 f.debug_struct("EF_DATA_1").finish()
285 }
286}
287#[doc = "ef_data_1."]
288pub mod ef_data_1;
289#[doc = "eFuse memory control"]
290pub struct EF_CTRL {
291 _marker: PhantomData<*const ()>,
292}
293unsafe impl Send for EF_CTRL {}
294impl EF_CTRL {
295 #[doc = r"Pointer to the register block"]
296 pub const PTR: *const ef_ctrl::RegisterBlock = 0x4000_7000 as *const _;
297 #[doc = r"Return the pointer to the register block"]
298 #[inline(always)]
299 pub const fn ptr() -> *const ef_ctrl::RegisterBlock {
300 Self::PTR
301 }
302}
303impl Deref for EF_CTRL {
304 type Target = ef_ctrl::RegisterBlock;
305 #[inline(always)]
306 fn deref(&self) -> &Self::Target {
307 unsafe { &*Self::PTR }
308 }
309}
310impl core::fmt::Debug for EF_CTRL {
311 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
312 f.debug_struct("EF_CTRL").finish()
313 }
314}
315#[doc = "eFuse memory control"]
316pub mod ef_ctrl;
317#[doc = "cci."]
318pub struct CCI {
319 _marker: PhantomData<*const ()>,
320}
321unsafe impl Send for CCI {}
322impl CCI {
323 #[doc = r"Pointer to the register block"]
324 pub const PTR: *const cci::RegisterBlock = 0x4000_8000 as *const _;
325 #[doc = r"Return the pointer to the register block"]
326 #[inline(always)]
327 pub const fn ptr() -> *const cci::RegisterBlock {
328 Self::PTR
329 }
330}
331impl Deref for CCI {
332 type Target = cci::RegisterBlock;
333 #[inline(always)]
334 fn deref(&self) -> &Self::Target {
335 unsafe { &*Self::PTR }
336 }
337}
338impl core::fmt::Debug for CCI {
339 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
340 f.debug_struct("CCI").finish()
341 }
342}
343#[doc = "cci."]
344pub mod cci;
345#[doc = "L1 Cache control"]
346pub struct L1C {
347 _marker: PhantomData<*const ()>,
348}
349unsafe impl Send for L1C {}
350impl L1C {
351 #[doc = r"Pointer to the register block"]
352 pub const PTR: *const l1c::RegisterBlock = 0x4000_9000 as *const _;
353 #[doc = r"Return the pointer to the register block"]
354 #[inline(always)]
355 pub const fn ptr() -> *const l1c::RegisterBlock {
356 Self::PTR
357 }
358}
359impl Deref for L1C {
360 type Target = l1c::RegisterBlock;
361 #[inline(always)]
362 fn deref(&self) -> &Self::Target {
363 unsafe { &*Self::PTR }
364 }
365}
366impl core::fmt::Debug for L1C {
367 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
368 f.debug_struct("L1C").finish()
369 }
370}
371#[doc = "L1 Cache control"]
372pub mod l1c;
373#[doc = "uart."]
374pub struct UART {
375 _marker: PhantomData<*const ()>,
376}
377unsafe impl Send for UART {}
378impl UART {
379 #[doc = r"Pointer to the register block"]
380 pub const PTR: *const uart::RegisterBlock = 0x4000_a000 as *const _;
381 #[doc = r"Return the pointer to the register block"]
382 #[inline(always)]
383 pub const fn ptr() -> *const uart::RegisterBlock {
384 Self::PTR
385 }
386}
387impl Deref for UART {
388 type Target = uart::RegisterBlock;
389 #[inline(always)]
390 fn deref(&self) -> &Self::Target {
391 unsafe { &*Self::PTR }
392 }
393}
394impl core::fmt::Debug for UART {
395 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
396 f.debug_struct("UART").finish()
397 }
398}
399#[doc = "uart."]
400pub mod uart;
401#[doc = "spi."]
402pub struct SPI {
403 _marker: PhantomData<*const ()>,
404}
405unsafe impl Send for SPI {}
406impl SPI {
407 #[doc = r"Pointer to the register block"]
408 pub const PTR: *const spi::RegisterBlock = 0x4000_a200 as *const _;
409 #[doc = r"Return the pointer to the register block"]
410 #[inline(always)]
411 pub const fn ptr() -> *const spi::RegisterBlock {
412 Self::PTR
413 }
414}
415impl Deref for SPI {
416 type Target = spi::RegisterBlock;
417 #[inline(always)]
418 fn deref(&self) -> &Self::Target {
419 unsafe { &*Self::PTR }
420 }
421}
422impl core::fmt::Debug for SPI {
423 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
424 f.debug_struct("SPI").finish()
425 }
426}
427#[doc = "spi."]
428pub mod spi;
429#[doc = "i2c."]
430pub struct I2C {
431 _marker: PhantomData<*const ()>,
432}
433unsafe impl Send for I2C {}
434impl I2C {
435 #[doc = r"Pointer to the register block"]
436 pub const PTR: *const i2c::RegisterBlock = 0x4000_a300 as *const _;
437 #[doc = r"Return the pointer to the register block"]
438 #[inline(always)]
439 pub const fn ptr() -> *const i2c::RegisterBlock {
440 Self::PTR
441 }
442}
443impl Deref for I2C {
444 type Target = i2c::RegisterBlock;
445 #[inline(always)]
446 fn deref(&self) -> &Self::Target {
447 unsafe { &*Self::PTR }
448 }
449}
450impl core::fmt::Debug for I2C {
451 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
452 f.debug_struct("I2C").finish()
453 }
454}
455#[doc = "i2c."]
456pub mod i2c;
457#[doc = "pwm."]
458pub struct PWM {
459 _marker: PhantomData<*const ()>,
460}
461unsafe impl Send for PWM {}
462impl PWM {
463 #[doc = r"Pointer to the register block"]
464 pub const PTR: *const pwm::RegisterBlock = 0x4000_a400 as *const _;
465 #[doc = r"Return the pointer to the register block"]
466 #[inline(always)]
467 pub const fn ptr() -> *const pwm::RegisterBlock {
468 Self::PTR
469 }
470}
471impl Deref for PWM {
472 type Target = pwm::RegisterBlock;
473 #[inline(always)]
474 fn deref(&self) -> &Self::Target {
475 unsafe { &*Self::PTR }
476 }
477}
478impl core::fmt::Debug for PWM {
479 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
480 f.debug_struct("PWM").finish()
481 }
482}
483#[doc = "pwm."]
484pub mod pwm;
485#[doc = "timer."]
486pub struct TIMER {
487 _marker: PhantomData<*const ()>,
488}
489unsafe impl Send for TIMER {}
490impl TIMER {
491 #[doc = r"Pointer to the register block"]
492 pub const PTR: *const timer::RegisterBlock = 0x4000_a500 as *const _;
493 #[doc = r"Return the pointer to the register block"]
494 #[inline(always)]
495 pub const fn ptr() -> *const timer::RegisterBlock {
496 Self::PTR
497 }
498}
499impl Deref for TIMER {
500 type Target = timer::RegisterBlock;
501 #[inline(always)]
502 fn deref(&self) -> &Self::Target {
503 unsafe { &*Self::PTR }
504 }
505}
506impl core::fmt::Debug for TIMER {
507 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
508 f.debug_struct("TIMER").finish()
509 }
510}
511#[doc = "timer."]
512pub mod timer;
513#[doc = "ir."]
514pub struct IR {
515 _marker: PhantomData<*const ()>,
516}
517unsafe impl Send for IR {}
518impl IR {
519 #[doc = r"Pointer to the register block"]
520 pub const PTR: *const ir::RegisterBlock = 0x4000_a600 as *const _;
521 #[doc = r"Return the pointer to the register block"]
522 #[inline(always)]
523 pub const fn ptr() -> *const ir::RegisterBlock {
524 Self::PTR
525 }
526}
527impl Deref for IR {
528 type Target = ir::RegisterBlock;
529 #[inline(always)]
530 fn deref(&self) -> &Self::Target {
531 unsafe { &*Self::PTR }
532 }
533}
534impl core::fmt::Debug for IR {
535 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
536 f.debug_struct("IR").finish()
537 }
538}
539#[doc = "ir."]
540pub mod ir;
541#[doc = "cks."]
542pub struct CKS {
543 _marker: PhantomData<*const ()>,
544}
545unsafe impl Send for CKS {}
546impl CKS {
547 #[doc = r"Pointer to the register block"]
548 pub const PTR: *const cks::RegisterBlock = 0x4000_a700 as *const _;
549 #[doc = r"Return the pointer to the register block"]
550 #[inline(always)]
551 pub const fn ptr() -> *const cks::RegisterBlock {
552 Self::PTR
553 }
554}
555impl Deref for CKS {
556 type Target = cks::RegisterBlock;
557 #[inline(always)]
558 fn deref(&self) -> &Self::Target {
559 unsafe { &*Self::PTR }
560 }
561}
562impl core::fmt::Debug for CKS {
563 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
564 f.debug_struct("CKS").finish()
565 }
566}
567#[doc = "cks."]
568pub mod cks;
569#[doc = "Quadrature decoder control"]
570pub struct QDEC {
571 _marker: PhantomData<*const ()>,
572}
573unsafe impl Send for QDEC {}
574impl QDEC {
575 #[doc = r"Pointer to the register block"]
576 pub const PTR: *const qdec::RegisterBlock = 0x4000_a800 as *const _;
577 #[doc = r"Return the pointer to the register block"]
578 #[inline(always)]
579 pub const fn ptr() -> *const qdec::RegisterBlock {
580 Self::PTR
581 }
582}
583impl Deref for QDEC {
584 type Target = qdec::RegisterBlock;
585 #[inline(always)]
586 fn deref(&self) -> &Self::Target {
587 unsafe { &*Self::PTR }
588 }
589}
590impl core::fmt::Debug for QDEC {
591 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
592 f.debug_struct("QDEC").finish()
593 }
594}
595#[doc = "Quadrature decoder control"]
596pub mod qdec;
597#[doc = "Key Scan"]
598pub struct KYS {
599 _marker: PhantomData<*const ()>,
600}
601unsafe impl Send for KYS {}
602impl KYS {
603 #[doc = r"Pointer to the register block"]
604 pub const PTR: *const kys::RegisterBlock = 0x4000_ab00 as *const _;
605 #[doc = r"Return the pointer to the register block"]
606 #[inline(always)]
607 pub const fn ptr() -> *const kys::RegisterBlock {
608 Self::PTR
609 }
610}
611impl Deref for KYS {
612 type Target = kys::RegisterBlock;
613 #[inline(always)]
614 fn deref(&self) -> &Self::Target {
615 unsafe { &*Self::PTR }
616 }
617}
618impl core::fmt::Debug for KYS {
619 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
620 f.debug_struct("KYS").finish()
621 }
622}
623#[doc = "Key Scan"]
624pub mod kys;
625#[doc = "i2s."]
626pub struct I2S {
627 _marker: PhantomData<*const ()>,
628}
629unsafe impl Send for I2S {}
630impl I2S {
631 #[doc = r"Pointer to the register block"]
632 pub const PTR: *const i2s::RegisterBlock = 0x4000_aa00 as *const _;
633 #[doc = r"Return the pointer to the register block"]
634 #[inline(always)]
635 pub const fn ptr() -> *const i2s::RegisterBlock {
636 Self::PTR
637 }
638}
639impl Deref for I2S {
640 type Target = i2s::RegisterBlock;
641 #[inline(always)]
642 fn deref(&self) -> &Self::Target {
643 unsafe { &*Self::PTR }
644 }
645}
646impl core::fmt::Debug for I2S {
647 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
648 f.debug_struct("I2S").finish()
649 }
650}
651#[doc = "i2s."]
652pub mod i2s;
653#[doc = "Camera"]
654pub struct CAM {
655 _marker: PhantomData<*const ()>,
656}
657unsafe impl Send for CAM {}
658impl CAM {
659 #[doc = r"Pointer to the register block"]
660 pub const PTR: *const cam::RegisterBlock = 0x4000_ad00 as *const _;
661 #[doc = r"Return the pointer to the register block"]
662 #[inline(always)]
663 pub const fn ptr() -> *const cam::RegisterBlock {
664 Self::PTR
665 }
666}
667impl Deref for CAM {
668 type Target = cam::RegisterBlock;
669 #[inline(always)]
670 fn deref(&self) -> &Self::Target {
671 unsafe { &*Self::PTR }
672 }
673}
674impl core::fmt::Debug for CAM {
675 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
676 f.debug_struct("CAM").finish()
677 }
678}
679#[doc = "Camera"]
680pub mod cam;
681#[doc = "mjpeg."]
682pub struct MJPEG {
683 _marker: PhantomData<*const ()>,
684}
685unsafe impl Send for MJPEG {}
686impl MJPEG {
687 #[doc = r"Pointer to the register block"]
688 pub const PTR: *const mjpeg::RegisterBlock = 0x4000_ae00 as *const _;
689 #[doc = r"Return the pointer to the register block"]
690 #[inline(always)]
691 pub const fn ptr() -> *const mjpeg::RegisterBlock {
692 Self::PTR
693 }
694}
695impl Deref for MJPEG {
696 type Target = mjpeg::RegisterBlock;
697 #[inline(always)]
698 fn deref(&self) -> &Self::Target {
699 unsafe { &*Self::PTR }
700 }
701}
702impl core::fmt::Debug for MJPEG {
703 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
704 f.debug_struct("MJPEG").finish()
705 }
706}
707#[doc = "mjpeg."]
708pub mod mjpeg;
709#[doc = "sf_ctrl."]
710pub struct SF_CTRL {
711 _marker: PhantomData<*const ()>,
712}
713unsafe impl Send for SF_CTRL {}
714impl SF_CTRL {
715 #[doc = r"Pointer to the register block"]
716 pub const PTR: *const sf_ctrl::RegisterBlock = 0x4000_b000 as *const _;
717 #[doc = r"Return the pointer to the register block"]
718 #[inline(always)]
719 pub const fn ptr() -> *const sf_ctrl::RegisterBlock {
720 Self::PTR
721 }
722}
723impl Deref for SF_CTRL {
724 type Target = sf_ctrl::RegisterBlock;
725 #[inline(always)]
726 fn deref(&self) -> &Self::Target {
727 unsafe { &*Self::PTR }
728 }
729}
730impl core::fmt::Debug for SF_CTRL {
731 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
732 f.debug_struct("SF_CTRL").finish()
733 }
734}
735#[doc = "sf_ctrl."]
736pub mod sf_ctrl;
737#[doc = "dma."]
738pub struct DMA {
739 _marker: PhantomData<*const ()>,
740}
741unsafe impl Send for DMA {}
742impl DMA {
743 #[doc = r"Pointer to the register block"]
744 pub const PTR: *const dma::RegisterBlock = 0x4000_7000 as *const _;
745 #[doc = r"Return the pointer to the register block"]
746 #[inline(always)]
747 pub const fn ptr() -> *const dma::RegisterBlock {
748 Self::PTR
749 }
750}
751impl Deref for DMA {
752 type Target = dma::RegisterBlock;
753 #[inline(always)]
754 fn deref(&self) -> &Self::Target {
755 unsafe { &*Self::PTR }
756 }
757}
758impl core::fmt::Debug for DMA {
759 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
760 f.debug_struct("DMA").finish()
761 }
762}
763#[doc = "dma."]
764pub mod dma;
765#[doc = "Ethernet MAC"]
766pub struct EMAC {
767 _marker: PhantomData<*const ()>,
768}
769unsafe impl Send for EMAC {}
770impl EMAC {
771 #[doc = r"Pointer to the register block"]
772 pub const PTR: *const emac::RegisterBlock = 0x4000_d000 as *const _;
773 #[doc = r"Return the pointer to the register block"]
774 #[inline(always)]
775 pub const fn ptr() -> *const emac::RegisterBlock {
776 Self::PTR
777 }
778}
779impl Deref for EMAC {
780 type Target = emac::RegisterBlock;
781 #[inline(always)]
782 fn deref(&self) -> &Self::Target {
783 unsafe { &*Self::PTR }
784 }
785}
786impl core::fmt::Debug for EMAC {
787 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
788 f.debug_struct("EMAC").finish()
789 }
790}
791#[doc = "Ethernet MAC"]
792pub mod emac;
793#[doc = "usb."]
794pub struct USB {
795 _marker: PhantomData<*const ()>,
796}
797unsafe impl Send for USB {}
798impl USB {
799 #[doc = r"Pointer to the register block"]
800 pub const PTR: *const usb::RegisterBlock = 0x4000_d800 as *const _;
801 #[doc = r"Return the pointer to the register block"]
802 #[inline(always)]
803 pub const fn ptr() -> *const usb::RegisterBlock {
804 Self::PTR
805 }
806}
807impl Deref for USB {
808 type Target = usb::RegisterBlock;
809 #[inline(always)]
810 fn deref(&self) -> &Self::Target {
811 unsafe { &*Self::PTR }
812 }
813}
814impl core::fmt::Debug for USB {
815 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
816 f.debug_struct("USB").finish()
817 }
818}
819#[doc = "usb."]
820pub mod usb;
821#[doc = "Sleep control (Power Down Sleep)"]
822pub struct PDS {
823 _marker: PhantomData<*const ()>,
824}
825unsafe impl Send for PDS {}
826impl PDS {
827 #[doc = r"Pointer to the register block"]
828 pub const PTR: *const pds::RegisterBlock = 0x4000_e000 as *const _;
829 #[doc = r"Return the pointer to the register block"]
830 #[inline(always)]
831 pub const fn ptr() -> *const pds::RegisterBlock {
832 Self::PTR
833 }
834}
835impl Deref for PDS {
836 type Target = pds::RegisterBlock;
837 #[inline(always)]
838 fn deref(&self) -> &Self::Target {
839 unsafe { &*Self::PTR }
840 }
841}
842impl core::fmt::Debug for PDS {
843 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
844 f.debug_struct("PDS").finish()
845 }
846}
847#[doc = "Sleep control (Power Down Sleep)"]
848pub mod pds;
849#[doc = "HBN."]
850pub struct HBN {
851 _marker: PhantomData<*const ()>,
852}
853unsafe impl Send for HBN {}
854impl HBN {
855 #[doc = r"Pointer to the register block"]
856 pub const PTR: *const hbn::RegisterBlock = 0x4000_f000 as *const _;
857 #[doc = r"Return the pointer to the register block"]
858 #[inline(always)]
859 pub const fn ptr() -> *const hbn::RegisterBlock {
860 Self::PTR
861 }
862}
863impl Deref for HBN {
864 type Target = hbn::RegisterBlock;
865 #[inline(always)]
866 fn deref(&self) -> &Self::Target {
867 unsafe { &*Self::PTR }
868 }
869}
870impl core::fmt::Debug for HBN {
871 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
872 f.debug_struct("HBN").finish()
873 }
874}
875#[doc = "HBN."]
876pub mod hbn;
877#[doc = "AON."]
878pub struct AON {
879 _marker: PhantomData<*const ()>,
880}
881unsafe impl Send for AON {}
882impl AON {
883 #[doc = r"Pointer to the register block"]
884 pub const PTR: *const aon::RegisterBlock = 0x4000_f000 as *const _;
885 #[doc = r"Return the pointer to the register block"]
886 #[inline(always)]
887 pub const fn ptr() -> *const aon::RegisterBlock {
888 Self::PTR
889 }
890}
891impl Deref for AON {
892 type Target = aon::RegisterBlock;
893 #[inline(always)]
894 fn deref(&self) -> &Self::Target {
895 unsafe { &*Self::PTR }
896 }
897}
898impl core::fmt::Debug for AON {
899 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
900 f.debug_struct("AON").finish()
901 }
902}
903#[doc = "AON."]
904pub mod aon;
905#[no_mangle]
906static mut DEVICE_PERIPHERALS: bool = false;
907#[doc = r" All the peripherals."]
908#[allow(non_snake_case)]
909pub struct Peripherals {
910 #[doc = "GLB"]
911 pub GLB: GLB,
912 #[doc = "RF"]
913 pub RF: RF,
914 #[doc = "GPIP"]
915 pub GPIP: GPIP,
916 #[doc = "SEC_DBG"]
917 pub SEC_DBG: SEC_DBG,
918 #[doc = "SEC_ENG"]
919 pub SEC_ENG: SEC_ENG,
920 #[doc = "TZC_SEC"]
921 pub TZC_SEC: TZC_SEC,
922 #[doc = "TZC_NSEC"]
923 pub TZC_NSEC: TZC_NSEC,
924 #[doc = "EF_DATA_0"]
925 pub EF_DATA_0: EF_DATA_0,
926 #[doc = "EF_DATA_1"]
927 pub EF_DATA_1: EF_DATA_1,
928 #[doc = "EF_CTRL"]
929 pub EF_CTRL: EF_CTRL,
930 #[doc = "CCI"]
931 pub CCI: CCI,
932 #[doc = "L1C"]
933 pub L1C: L1C,
934 #[doc = "UART"]
935 pub UART: UART,
936 #[doc = "SPI"]
937 pub SPI: SPI,
938 #[doc = "I2C"]
939 pub I2C: I2C,
940 #[doc = "PWM"]
941 pub PWM: PWM,
942 #[doc = "TIMER"]
943 pub TIMER: TIMER,
944 #[doc = "IR"]
945 pub IR: IR,
946 #[doc = "CKS"]
947 pub CKS: CKS,
948 #[doc = "QDEC"]
949 pub QDEC: QDEC,
950 #[doc = "KYS"]
951 pub KYS: KYS,
952 #[doc = "I2S"]
953 pub I2S: I2S,
954 #[doc = "CAM"]
955 pub CAM: CAM,
956 #[doc = "MJPEG"]
957 pub MJPEG: MJPEG,
958 #[doc = "SF_CTRL"]
959 pub SF_CTRL: SF_CTRL,
960 #[doc = "DMA"]
961 pub DMA: DMA,
962 #[doc = "EMAC"]
963 pub EMAC: EMAC,
964 #[doc = "USB"]
965 pub USB: USB,
966 #[doc = "PDS"]
967 pub PDS: PDS,
968 #[doc = "HBN"]
969 pub HBN: HBN,
970 #[doc = "AON"]
971 pub AON: AON,
972}
973impl Peripherals {
974 #[doc = r" Returns all the peripherals *once*."]
975 #[cfg(feature = "critical-section")]
976 #[inline]
977 pub fn take() -> Option<Self> {
978 critical_section::with(|_| {
979 if unsafe { DEVICE_PERIPHERALS } {
980 return None;
981 }
982 Some(unsafe { Peripherals::steal() })
983 })
984 }
985 #[doc = r" Unchecked version of `Peripherals::take`."]
986 #[doc = r""]
987 #[doc = r" # Safety"]
988 #[doc = r""]
989 #[doc = r" Each of the returned peripherals must be used at most once."]
990 #[inline]
991 pub unsafe fn steal() -> Self {
992 DEVICE_PERIPHERALS = true;
993 Peripherals {
994 GLB: GLB {
995 _marker: PhantomData,
996 },
997 RF: RF {
998 _marker: PhantomData,
999 },
1000 GPIP: GPIP {
1001 _marker: PhantomData,
1002 },
1003 SEC_DBG: SEC_DBG {
1004 _marker: PhantomData,
1005 },
1006 SEC_ENG: SEC_ENG {
1007 _marker: PhantomData,
1008 },
1009 TZC_SEC: TZC_SEC {
1010 _marker: PhantomData,
1011 },
1012 TZC_NSEC: TZC_NSEC {
1013 _marker: PhantomData,
1014 },
1015 EF_DATA_0: EF_DATA_0 {
1016 _marker: PhantomData,
1017 },
1018 EF_DATA_1: EF_DATA_1 {
1019 _marker: PhantomData,
1020 },
1021 EF_CTRL: EF_CTRL {
1022 _marker: PhantomData,
1023 },
1024 CCI: CCI {
1025 _marker: PhantomData,
1026 },
1027 L1C: L1C {
1028 _marker: PhantomData,
1029 },
1030 UART: UART {
1031 _marker: PhantomData,
1032 },
1033 SPI: SPI {
1034 _marker: PhantomData,
1035 },
1036 I2C: I2C {
1037 _marker: PhantomData,
1038 },
1039 PWM: PWM {
1040 _marker: PhantomData,
1041 },
1042 TIMER: TIMER {
1043 _marker: PhantomData,
1044 },
1045 IR: IR {
1046 _marker: PhantomData,
1047 },
1048 CKS: CKS {
1049 _marker: PhantomData,
1050 },
1051 QDEC: QDEC {
1052 _marker: PhantomData,
1053 },
1054 KYS: KYS {
1055 _marker: PhantomData,
1056 },
1057 I2S: I2S {
1058 _marker: PhantomData,
1059 },
1060 CAM: CAM {
1061 _marker: PhantomData,
1062 },
1063 MJPEG: MJPEG {
1064 _marker: PhantomData,
1065 },
1066 SF_CTRL: SF_CTRL {
1067 _marker: PhantomData,
1068 },
1069 DMA: DMA {
1070 _marker: PhantomData,
1071 },
1072 EMAC: EMAC {
1073 _marker: PhantomData,
1074 },
1075 USB: USB {
1076 _marker: PhantomData,
1077 },
1078 PDS: PDS {
1079 _marker: PhantomData,
1080 },
1081 HBN: HBN {
1082 _marker: PhantomData,
1083 },
1084 AON: AON {
1085 _marker: PhantomData,
1086 },
1087 }
1088 }
1089}