1#[repr(C)]
2#[cfg_attr(feature = "debug", derive(Debug))]
3#[doc = "Register block"]
4pub struct RegisterBlock {
5 _reserved0: [u8; 0x0c00],
6 cr: Cr,
7 sr: Sr,
8 _reserved2: [u8; 0xf8],
9 ctx: (),
10}
11impl RegisterBlock {
12 #[doc = "0xc00 - Control Register"]
13 #[inline(always)]
14 pub const fn cr(&self) -> &Cr {
15 &self.cr
16 }
17 #[doc = "0xc04 - Status Register"]
18 #[inline(always)]
19 pub const fn sr(&self) -> &Sr {
20 &self.sr
21 }
22 #[doc = "0xd00..0xd80 - no description available"]
23 #[inline(always)]
24 pub const fn ctx(&self, n: usize) -> &Ctx {
25 #[allow(clippy::no_effect)]
26 [(); 4][n];
27 unsafe {
28 &*core::ptr::from_ref(self)
29 .cast::<u8>()
30 .add(3328)
31 .add(64 * n)
32 .cast()
33 }
34 }
35 #[doc = "Iterator for array of:"]
36 #[doc = "0xd00..0xd80 - no description available"]
37 #[inline(always)]
38 pub fn ctx_iter(&self) -> impl Iterator<Item = &Ctx> {
39 (0..4).map(move |n| unsafe {
40 &*core::ptr::from_ref(self)
41 .cast::<u8>()
42 .add(3328)
43 .add(64 * n)
44 .cast()
45 })
46 }
47}
48#[doc = "CR (rw) register accessor: Control Register\n\nYou can [`read`](crate::Reg::read) this register and get [`cr::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`cr::W`]. You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@cr`]
49module"]
50#[doc(alias = "CR")]
51pub type Cr = crate::Reg<cr::CrSpec>;
52#[doc = "Control Register"]
53pub mod cr;
54#[doc = "SR (r) register accessor: Status Register\n\nYou can [`read`](crate::Reg::read) this register and get [`sr::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@sr`]
55module"]
56#[doc(alias = "SR")]
57pub type Sr = crate::Reg<sr::SrSpec>;
58#[doc = "Status Register"]
59pub mod sr;
60#[doc = "no description available"]
61pub use self::ctx::Ctx;
62#[doc = r"Cluster"]
63#[doc = "no description available"]
64pub mod ctx;