Skip to main content

mcxa_pac/
vbat0.rs

1#[repr(C)]
2#[cfg_attr(feature = "debug", derive(Debug))]
3#[doc = "Register block"]
4pub struct RegisterBlock {
5    verid: Verid,
6    _reserved1: [u8; 0x01fc],
7    froctla: Froctla,
8    _reserved2: [u8; 0x14],
9    frolcka: Frolcka,
10    _reserved3: [u8; 0x04],
11    froclke: Froclke,
12    _reserved4: [u8; 0x04dc],
13    wakeup: (),
14    _reserved5: [u8; 0xf8],
15    waklcka: Waklcka,
16}
17impl RegisterBlock {
18    #[doc = "0x00 - Version ID"]
19    #[inline(always)]
20    pub const fn verid(&self) -> &Verid {
21        &self.verid
22    }
23    #[doc = "0x200 - FRO16K Control A"]
24    #[inline(always)]
25    pub const fn froctla(&self) -> &Froctla {
26        &self.froctla
27    }
28    #[doc = "0x218 - FRO16K Lock A"]
29    #[inline(always)]
30    pub const fn frolcka(&self) -> &Frolcka {
31        &self.frolcka
32    }
33    #[doc = "0x220 - FRO16K Clock Enable"]
34    #[inline(always)]
35    pub const fn froclke(&self) -> &Froclke {
36        &self.froclke
37    }
38    #[doc = "0x700..0x708 - Array of registers: WAKEUPA"]
39    #[inline(always)]
40    pub const fn wakeup(&self, n: usize) -> &Wakeup {
41        #[allow(clippy::no_effect)]
42        [(); 2][n];
43        unsafe { &*core::ptr::from_ref(self).cast::<u8>().add(1792).add(8 * n).cast() }
44    }
45    #[doc = "Iterator for array of:"]
46    #[doc = "0x700..0x708 - Array of registers: WAKEUPA"]
47    #[inline(always)]
48    pub fn wakeup_iter(&self) -> impl Iterator<Item = &Wakeup> {
49        (0..2).map(move |n| unsafe { &*core::ptr::from_ref(self).cast::<u8>().add(1792).add(8 * n).cast() })
50    }
51    #[doc = "0x7f8 - Wakeup Lock A"]
52    #[inline(always)]
53    pub const fn waklcka(&self) -> &Waklcka {
54        &self.waklcka
55    }
56}
57#[doc = "VERID (r) register accessor: Version ID\n\nYou can [`read`](crate::Reg::read) this register and get [`verid::R`]. See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [`mod@verid`] module"]
58#[doc(alias = "VERID")]
59pub type Verid = crate::Reg<verid::VeridSpec>;
60#[doc = "Version ID"]
61pub mod verid;
62#[doc = "FROCTLA (rw) register accessor: FRO16K Control A\n\nYou can [`read`](crate::Reg::read) this register and get [`froctla::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`froctla::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@froctla`] module"]
63#[doc(alias = "FROCTLA")]
64pub type Froctla = crate::Reg<froctla::FroctlaSpec>;
65#[doc = "FRO16K Control A"]
66pub mod froctla;
67#[doc = "FROLCKA (rw) register accessor: FRO16K Lock A\n\nYou can [`read`](crate::Reg::read) this register and get [`frolcka::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`frolcka::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@frolcka`] module"]
68#[doc(alias = "FROLCKA")]
69pub type Frolcka = crate::Reg<frolcka::FrolckaSpec>;
70#[doc = "FRO16K Lock A"]
71pub mod frolcka;
72#[doc = "FROCLKE (rw) register accessor: FRO16K Clock Enable\n\nYou can [`read`](crate::Reg::read) this register and get [`froclke::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`froclke::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@froclke`] module"]
73#[doc(alias = "FROCLKE")]
74pub type Froclke = crate::Reg<froclke::FroclkeSpec>;
75#[doc = "FRO16K Clock Enable"]
76pub mod froclke;
77#[doc = "Array of registers: WAKEUPA"]
78pub use self::wakeup::Wakeup;
79#[doc = r"Cluster"]
80#[doc = "Array of registers: WAKEUPA"]
81pub mod wakeup;
82#[doc = "WAKLCKA (rw) register accessor: Wakeup Lock A\n\nYou can [`read`](crate::Reg::read) this register and get [`waklcka::R`]. You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`waklcka::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@waklcka`] module"]
83#[doc(alias = "WAKLCKA")]
84pub type Waklcka = crate::Reg<waklcka::WaklckaSpec>;
85#[doc = "Wakeup Lock A"]
86pub mod waklcka;