feat: add display UI with splash screen, dashboard, and RSSI sparkline

Implement full SSD1306 OLED display support:
- Splash screen on boot (1.5s) with project name, version, board
- Dashboard showing radio state, config, counters, RSSI/SNR
- RSSI history sparkline (64-sample ring buffer, 2px-wide bars)
- DisplayOn/DisplayOff host commands routed via dedicated channel
- Pure render functions against generic DrawTarget (no hardware coupling)
- Display on/off control bypasses radio task entirely

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
swaitsandClaude Opus 4.6 committed 2026-03-29 20:42:54 -06:00
1 parent 7064110293
commit 3102fc747a
17624 files changed
+4564928 -38

No files matched your search

+128
View File
@@ -0,0 +1,128 @@
#[doc = "Register `APPROTECT` reader"]
pub struct R(crate::R<APPROTECT_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<APPROTECT_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<APPROTECT_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<APPROTECT_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `APPROTECT` writer"]
pub struct W(crate::W<APPROTECT_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<APPROTECT_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<APPROTECT_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<APPROTECT_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `PALL` reader - Blocks debugger read/write access to all CPU registers and memory mapped addresses"]
pub type PALL_R = crate::FieldReader<u32, PALL_A>;
#[doc = "Blocks debugger read/write access to all CPU registers and memory mapped addresses\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u32)]
pub enum PALL_A {
#[doc = "4294967295: Unprotected"]
UNPROTECTED = 4294967295,
#[doc = "0: Protected"]
PROTECTED = 0,
}
impl From<PALL_A> for u32 {
#[inline(always)]
fn from(variant: PALL_A) -> Self {
variant as _
}
}
impl PALL_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> Option<PALL_A> {
match self.bits {
4294967295 => Some(PALL_A::UNPROTECTED),
0 => Some(PALL_A::PROTECTED),
_ => None,
}
}
#[doc = "Checks if the value of the field is `UNPROTECTED`"]
#[inline(always)]
pub fn is_unprotected(&self) -> bool {
*self == PALL_A::UNPROTECTED
}
#[doc = "Checks if the value of the field is `PROTECTED`"]
#[inline(always)]
pub fn is_protected(&self) -> bool {
*self == PALL_A::PROTECTED
}
}
#[doc = "Field `PALL` writer - Blocks debugger read/write access to all CPU registers and memory mapped addresses"]
pub type PALL_W<'a, const O: u8> = crate::FieldWriter<'a, u32, APPROTECT_SPEC, u32, PALL_A, 32, O>;
impl<'a, const O: u8> PALL_W<'a, O> {
#[doc = "Unprotected"]
#[inline(always)]
pub fn unprotected(self) -> &'a mut W {
self.variant(PALL_A::UNPROTECTED)
}
#[doc = "Protected"]
#[inline(always)]
pub fn protected(self) -> &'a mut W {
self.variant(PALL_A::PROTECTED)
}
}
impl R {
#[doc = "Bits 0:31 - Blocks debugger read/write access to all CPU registers and memory mapped addresses"]
#[inline(always)]
pub fn pall(&self) -> PALL_R {
PALL_R::new(self.bits)
}
}
impl W {
#[doc = "Bits 0:31 - Blocks debugger read/write access to all CPU registers and memory mapped addresses"]
#[inline(always)]
pub fn pall(&mut self) -> PALL_W<0> {
PALL_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Access port protection\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [approtect](index.html) module"]
pub struct APPROTECT_SPEC;
impl crate::RegisterSpec for APPROTECT_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [approtect::R](R) reader structure"]
impl crate::Readable for APPROTECT_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [approtect::W](W) writer structure"]
impl crate::Writable for APPROTECT_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets APPROTECT to value 0"]
impl crate::Resettable for APPROTECT_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+129
View File
@@ -0,0 +1,129 @@
#[doc = "Register `ERASEPROTECT` reader"]
pub struct R(crate::R<ERASEPROTECT_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<ERASEPROTECT_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<ERASEPROTECT_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<ERASEPROTECT_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `ERASEPROTECT` writer"]
pub struct W(crate::W<ERASEPROTECT_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<ERASEPROTECT_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<ERASEPROTECT_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<ERASEPROTECT_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `PALL` reader - Blocks NVMC ERASEALL and CTRLAP ERASEALL functionality"]
pub type PALL_R = crate::FieldReader<u32, PALL_A>;
#[doc = "Blocks NVMC ERASEALL and CTRLAP ERASEALL functionality\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u32)]
pub enum PALL_A {
#[doc = "4294967295: Unprotected"]
UNPROTECTED = 4294967295,
#[doc = "0: Protected"]
PROTECTED = 0,
}
impl From<PALL_A> for u32 {
#[inline(always)]
fn from(variant: PALL_A) -> Self {
variant as _
}
}
impl PALL_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> Option<PALL_A> {
match self.bits {
4294967295 => Some(PALL_A::UNPROTECTED),
0 => Some(PALL_A::PROTECTED),
_ => None,
}
}
#[doc = "Checks if the value of the field is `UNPROTECTED`"]
#[inline(always)]
pub fn is_unprotected(&self) -> bool {
*self == PALL_A::UNPROTECTED
}
#[doc = "Checks if the value of the field is `PROTECTED`"]
#[inline(always)]
pub fn is_protected(&self) -> bool {
*self == PALL_A::PROTECTED
}
}
#[doc = "Field `PALL` writer - Blocks NVMC ERASEALL and CTRLAP ERASEALL functionality"]
pub type PALL_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, ERASEPROTECT_SPEC, u32, PALL_A, 32, O>;
impl<'a, const O: u8> PALL_W<'a, O> {
#[doc = "Unprotected"]
#[inline(always)]
pub fn unprotected(self) -> &'a mut W {
self.variant(PALL_A::UNPROTECTED)
}
#[doc = "Protected"]
#[inline(always)]
pub fn protected(self) -> &'a mut W {
self.variant(PALL_A::PROTECTED)
}
}
impl R {
#[doc = "Bits 0:31 - Blocks NVMC ERASEALL and CTRLAP ERASEALL functionality"]
#[inline(always)]
pub fn pall(&self) -> PALL_R {
PALL_R::new(self.bits)
}
}
impl W {
#[doc = "Bits 0:31 - Blocks NVMC ERASEALL and CTRLAP ERASEALL functionality"]
#[inline(always)]
pub fn pall(&mut self) -> PALL_W<0> {
PALL_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Erase protection\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [eraseprotect](index.html) module"]
pub struct ERASEPROTECT_SPEC;
impl crate::RegisterSpec for ERASEPROTECT_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [eraseprotect::R](R) reader structure"]
impl crate::Readable for ERASEPROTECT_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [eraseprotect::W](W) writer structure"]
impl crate::Writable for ERASEPROTECT_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets ERASEPROTECT to value 0"]
impl crate::Resettable for ERASEPROTECT_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+129
View File
@@ -0,0 +1,129 @@
#[doc = "Register `HFXOCNT` reader"]
pub struct R(crate::R<HFXOCNT_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<HFXOCNT_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<HFXOCNT_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<HFXOCNT_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `HFXOCNT` writer"]
pub struct W(crate::W<HFXOCNT_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<HFXOCNT_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<HFXOCNT_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<HFXOCNT_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `HFXOCNT` reader - HFXO startup counter. Total debounce time = HFXOCNT*64 us + 0.5 us"]
pub type HFXOCNT_R = crate::FieldReader<u8, HFXOCNT_A>;
#[doc = "HFXO startup counter. Total debounce time = HFXOCNT*64 us + 0.5 us\n\nValue on reset: 255"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum HFXOCNT_A {
#[doc = "0: Min debounce time = (0*64 us + 0.5 us)"]
MIN_DEBOUNCE_TIME = 0,
#[doc = "255: Max debounce time = (255*64 us + 0.5 us)"]
MAX_DEBOUNCE_TIME = 255,
}
impl From<HFXOCNT_A> for u8 {
#[inline(always)]
fn from(variant: HFXOCNT_A) -> Self {
variant as _
}
}
impl HFXOCNT_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> Option<HFXOCNT_A> {
match self.bits {
0 => Some(HFXOCNT_A::MIN_DEBOUNCE_TIME),
255 => Some(HFXOCNT_A::MAX_DEBOUNCE_TIME),
_ => None,
}
}
#[doc = "Checks if the value of the field is `MIN_DEBOUNCE_TIME`"]
#[inline(always)]
pub fn is_min_debounce_time(&self) -> bool {
*self == HFXOCNT_A::MIN_DEBOUNCE_TIME
}
#[doc = "Checks if the value of the field is `MAX_DEBOUNCE_TIME`"]
#[inline(always)]
pub fn is_max_debounce_time(&self) -> bool {
*self == HFXOCNT_A::MAX_DEBOUNCE_TIME
}
}
#[doc = "Field `HFXOCNT` writer - HFXO startup counter. Total debounce time = HFXOCNT*64 us + 0.5 us"]
pub type HFXOCNT_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, HFXOCNT_SPEC, u8, HFXOCNT_A, 8, O>;
impl<'a, const O: u8> HFXOCNT_W<'a, O> {
#[doc = "Min debounce time = (0*64 us + 0.5 us)"]
#[inline(always)]
pub fn min_debounce_time(self) -> &'a mut W {
self.variant(HFXOCNT_A::MIN_DEBOUNCE_TIME)
}
#[doc = "Max debounce time = (255*64 us + 0.5 us)"]
#[inline(always)]
pub fn max_debounce_time(self) -> &'a mut W {
self.variant(HFXOCNT_A::MAX_DEBOUNCE_TIME)
}
}
impl R {
#[doc = "Bits 0:7 - HFXO startup counter. Total debounce time = HFXOCNT*64 us + 0.5 us"]
#[inline(always)]
pub fn hfxocnt(&self) -> HFXOCNT_R {
HFXOCNT_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 0:7 - HFXO startup counter. Total debounce time = HFXOCNT*64 us + 0.5 us"]
#[inline(always)]
pub fn hfxocnt(&mut self) -> HFXOCNT_W<0> {
HFXOCNT_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "HFXO startup counter\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [hfxocnt](index.html) module"]
pub struct HFXOCNT_SPEC;
impl crate::RegisterSpec for HFXOCNT_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [hfxocnt::R](R) reader structure"]
impl crate::Readable for HFXOCNT_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [hfxocnt::W](W) writer structure"]
impl crate::Writable for HFXOCNT_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets HFXOCNT to value 0xffff_ffff"]
impl crate::Resettable for HFXOCNT_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0xffff_ffff
}
}
+126
View File
@@ -0,0 +1,126 @@
#[doc = "Register `HFXOSRC` reader"]
pub struct R(crate::R<HFXOSRC_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<HFXOSRC_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<HFXOSRC_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<HFXOSRC_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `HFXOSRC` writer"]
pub struct W(crate::W<HFXOSRC_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<HFXOSRC_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<HFXOSRC_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<HFXOSRC_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `HFXOSRC` reader - HFXO clock source selection"]
pub type HFXOSRC_R = crate::BitReader<HFXOSRC_A>;
#[doc = "HFXO clock source selection\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum HFXOSRC_A {
#[doc = "1: 32 MHz crystal oscillator"]
XTAL = 1,
#[doc = "0: 32 MHz temperature compensated crystal oscillator (TCXO)"]
TCXO = 0,
}
impl From<HFXOSRC_A> for bool {
#[inline(always)]
fn from(variant: HFXOSRC_A) -> Self {
variant as u8 != 0
}
}
impl HFXOSRC_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> HFXOSRC_A {
match self.bits {
true => HFXOSRC_A::XTAL,
false => HFXOSRC_A::TCXO,
}
}
#[doc = "Checks if the value of the field is `XTAL`"]
#[inline(always)]
pub fn is_xtal(&self) -> bool {
*self == HFXOSRC_A::XTAL
}
#[doc = "Checks if the value of the field is `TCXO`"]
#[inline(always)]
pub fn is_tcxo(&self) -> bool {
*self == HFXOSRC_A::TCXO
}
}
#[doc = "Field `HFXOSRC` writer - HFXO clock source selection"]
pub type HFXOSRC_W<'a, const O: u8> = crate::BitWriter<'a, u32, HFXOSRC_SPEC, HFXOSRC_A, O>;
impl<'a, const O: u8> HFXOSRC_W<'a, O> {
#[doc = "32 MHz crystal oscillator"]
#[inline(always)]
pub fn xtal(self) -> &'a mut W {
self.variant(HFXOSRC_A::XTAL)
}
#[doc = "32 MHz temperature compensated crystal oscillator (TCXO)"]
#[inline(always)]
pub fn tcxo(self) -> &'a mut W {
self.variant(HFXOSRC_A::TCXO)
}
}
impl R {
#[doc = "Bit 0 - HFXO clock source selection"]
#[inline(always)]
pub fn hfxosrc(&self) -> HFXOSRC_R {
HFXOSRC_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - HFXO clock source selection"]
#[inline(always)]
pub fn hfxosrc(&mut self) -> HFXOSRC_W<0> {
HFXOSRC_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "HFXO clock source selection\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [hfxosrc](index.html) module"]
pub struct HFXOSRC_SPEC;
impl crate::RegisterSpec for HFXOSRC_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [hfxosrc::R](R) reader structure"]
impl crate::Readable for HFXOSRC_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [hfxosrc::W](W) writer structure"]
impl crate::Writable for HFXOSRC_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets HFXOSRC to value 0xffff_ffff"]
impl crate::Resettable for HFXOSRC_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0xffff_ffff
}
}
+18
View File
@@ -0,0 +1,18 @@
#[doc = r"Register block"]
#[repr(C)]
pub struct KEYSLOT {
#[doc = "0x00..0x400 - Unspecified"]
pub config: [CONFIG; 128],
#[doc = "0x400..0xc00 - Unspecified"]
pub key: [KEY; 128],
}
#[doc = "Unspecified"]
pub use config::CONFIG;
#[doc = r"Cluster"]
#[doc = "Unspecified"]
pub mod config;
#[doc = "Unspecified"]
pub use key::KEY;
#[doc = r"Cluster"]
#[doc = "Unspecified"]
pub mod key;
+16
View File
@@ -0,0 +1,16 @@
#[doc = r"Register block"]
#[repr(C)]
pub struct CONFIG {
#[doc = "0x00 - Description cluster: Destination address where content of the key value registers (KEYSLOT.KEYn.VALUE\\[0-3\\]) will be pushed by KMU. Note that this address MUST match that of a peripherals APB mapped write-only key registers, else the KMU can push this key value into an address range which the CPU can potentially read!"]
pub dest: DEST,
#[doc = "0x04 - Description cluster: Define permissions for the key slot. Bits 0-15 and 16-31 can only be written when equal to 0xFFFF."]
pub perm: PERM,
}
#[doc = "DEST (rw) register accessor: an alias for `Reg<DEST_SPEC>`"]
pub type DEST = crate::Reg<dest::DEST_SPEC>;
#[doc = "Description cluster: Destination address where content of the key value registers (KEYSLOT.KEYn.VALUE\\[0-3\\]) will be pushed by KMU. Note that this address MUST match that of a peripherals APB mapped write-only key registers, else the KMU can push this key value into an address range which the CPU can potentially read!"]
pub mod dest;
#[doc = "PERM (rw) register accessor: an alias for `Reg<PERM_SPEC>`"]
pub type PERM = crate::Reg<perm::PERM_SPEC>;
#[doc = "Description cluster: Define permissions for the key slot. Bits 0-15 and 16-31 can only be written when equal to 0xFFFF."]
pub mod perm;
+80
View File
@@ -0,0 +1,80 @@
#[doc = "Register `DEST` reader"]
pub struct R(crate::R<DEST_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DEST_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DEST_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DEST_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DEST` writer"]
pub struct W(crate::W<DEST_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DEST_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DEST_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DEST_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `DEST` reader - Secure APB destination address"]
pub type DEST_R = crate::FieldReader<u32, u32>;
#[doc = "Field `DEST` writer - Secure APB destination address"]
pub type DEST_W<'a, const O: u8> = crate::FieldWriter<'a, u32, DEST_SPEC, u32, u32, 32, O>;
impl R {
#[doc = "Bits 0:31 - Secure APB destination address"]
#[inline(always)]
pub fn dest(&self) -> DEST_R {
DEST_R::new(self.bits)
}
}
impl W {
#[doc = "Bits 0:31 - Secure APB destination address"]
#[inline(always)]
pub fn dest(&mut self) -> DEST_W<0> {
DEST_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Description cluster: Destination address where content of the key value registers (KEYSLOT.KEYn.VALUE\\[0-3\\]) will be pushed by KMU. Note that this address MUST match that of a peripherals APB mapped write-only key registers, else the KMU can push this key value into an address range which the CPU can potentially read!\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [dest](index.html) module"]
pub struct DEST_SPEC;
impl crate::RegisterSpec for DEST_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [dest::R](R) reader structure"]
impl crate::Readable for DEST_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [dest::W](W) writer structure"]
impl crate::Writable for DEST_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DEST to value 0xffff_ffff"]
impl crate::Resettable for DEST_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0xffff_ffff
}
}
+306
View File
@@ -0,0 +1,306 @@
#[doc = "Register `PERM` reader"]
pub struct R(crate::R<PERM_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<PERM_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<PERM_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<PERM_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `PERM` writer"]
pub struct W(crate::W<PERM_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<PERM_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<PERM_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<PERM_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `WRITE` reader - Write permission for key slot"]
pub type WRITE_R = crate::BitReader<WRITE_A>;
#[doc = "Write permission for key slot\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum WRITE_A {
#[doc = "0: Disable write to the key value registers"]
DISABLED = 0,
#[doc = "1: Enable write to the key value registers"]
ENABLED = 1,
}
impl From<WRITE_A> for bool {
#[inline(always)]
fn from(variant: WRITE_A) -> Self {
variant as u8 != 0
}
}
impl WRITE_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> WRITE_A {
match self.bits {
false => WRITE_A::DISABLED,
true => WRITE_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == WRITE_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == WRITE_A::ENABLED
}
}
#[doc = "Field `WRITE` writer - Write permission for key slot"]
pub type WRITE_W<'a, const O: u8> = crate::BitWriter<'a, u32, PERM_SPEC, WRITE_A, O>;
impl<'a, const O: u8> WRITE_W<'a, O> {
#[doc = "Disable write to the key value registers"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(WRITE_A::DISABLED)
}
#[doc = "Enable write to the key value registers"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(WRITE_A::ENABLED)
}
}
#[doc = "Field `READ` reader - Read permission for key slot"]
pub type READ_R = crate::BitReader<READ_A>;
#[doc = "Read permission for key slot\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum READ_A {
#[doc = "0: Disable read from key value registers"]
DISABLED = 0,
#[doc = "1: Enable read from key value registers"]
ENABLED = 1,
}
impl From<READ_A> for bool {
#[inline(always)]
fn from(variant: READ_A) -> Self {
variant as u8 != 0
}
}
impl READ_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> READ_A {
match self.bits {
false => READ_A::DISABLED,
true => READ_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == READ_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == READ_A::ENABLED
}
}
#[doc = "Field `READ` writer - Read permission for key slot"]
pub type READ_W<'a, const O: u8> = crate::BitWriter<'a, u32, PERM_SPEC, READ_A, O>;
impl<'a, const O: u8> READ_W<'a, O> {
#[doc = "Disable read from key value registers"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(READ_A::DISABLED)
}
#[doc = "Enable read from key value registers"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(READ_A::ENABLED)
}
}
#[doc = "Field `PUSH` reader - Push permission for key slot"]
pub type PUSH_R = crate::BitReader<PUSH_A>;
#[doc = "Push permission for key slot\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum PUSH_A {
#[doc = "0: Disable pushing of key value registers over secure APB, but can be read if field READ is Enabled"]
DISABLED = 0,
#[doc = "1: Enable pushing of key value registers over secure APB. Register KEYSLOT.CONFIGn.DEST must contain a valid destination address!"]
ENABLED = 1,
}
impl From<PUSH_A> for bool {
#[inline(always)]
fn from(variant: PUSH_A) -> Self {
variant as u8 != 0
}
}
impl PUSH_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> PUSH_A {
match self.bits {
false => PUSH_A::DISABLED,
true => PUSH_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == PUSH_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == PUSH_A::ENABLED
}
}
#[doc = "Field `PUSH` writer - Push permission for key slot"]
pub type PUSH_W<'a, const O: u8> = crate::BitWriter<'a, u32, PERM_SPEC, PUSH_A, O>;
impl<'a, const O: u8> PUSH_W<'a, O> {
#[doc = "Disable pushing of key value registers over secure APB, but can be read if field READ is Enabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(PUSH_A::DISABLED)
}
#[doc = "Enable pushing of key value registers over secure APB. Register KEYSLOT.CONFIGn.DEST must contain a valid destination address!"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(PUSH_A::ENABLED)
}
}
#[doc = "Field `STATE` reader - Revocation state for the key slot"]
pub type STATE_R = crate::BitReader<STATE_A>;
#[doc = "Revocation state for the key slot\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum STATE_A {
#[doc = "0: Key value registers can no longer be read or pushed"]
REVOKED = 0,
#[doc = "1: Key value registers are readable (if enabled) and can be pushed (if enabled)"]
ACTIVE = 1,
}
impl From<STATE_A> for bool {
#[inline(always)]
fn from(variant: STATE_A) -> Self {
variant as u8 != 0
}
}
impl STATE_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> STATE_A {
match self.bits {
false => STATE_A::REVOKED,
true => STATE_A::ACTIVE,
}
}
#[doc = "Checks if the value of the field is `REVOKED`"]
#[inline(always)]
pub fn is_revoked(&self) -> bool {
*self == STATE_A::REVOKED
}
#[doc = "Checks if the value of the field is `ACTIVE`"]
#[inline(always)]
pub fn is_active(&self) -> bool {
*self == STATE_A::ACTIVE
}
}
#[doc = "Field `STATE` writer - Revocation state for the key slot"]
pub type STATE_W<'a, const O: u8> = crate::BitWriter<'a, u32, PERM_SPEC, STATE_A, O>;
impl<'a, const O: u8> STATE_W<'a, O> {
#[doc = "Key value registers can no longer be read or pushed"]
#[inline(always)]
pub fn revoked(self) -> &'a mut W {
self.variant(STATE_A::REVOKED)
}
#[doc = "Key value registers are readable (if enabled) and can be pushed (if enabled)"]
#[inline(always)]
pub fn active(self) -> &'a mut W {
self.variant(STATE_A::ACTIVE)
}
}
impl R {
#[doc = "Bit 0 - Write permission for key slot"]
#[inline(always)]
pub fn write(&self) -> WRITE_R {
WRITE_R::new((self.bits & 1) != 0)
}
#[doc = "Bit 1 - Read permission for key slot"]
#[inline(always)]
pub fn read(&self) -> READ_R {
READ_R::new(((self.bits >> 1) & 1) != 0)
}
#[doc = "Bit 2 - Push permission for key slot"]
#[inline(always)]
pub fn push(&self) -> PUSH_R {
PUSH_R::new(((self.bits >> 2) & 1) != 0)
}
#[doc = "Bit 16 - Revocation state for the key slot"]
#[inline(always)]
pub fn state(&self) -> STATE_R {
STATE_R::new(((self.bits >> 16) & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Write permission for key slot"]
#[inline(always)]
pub fn write(&mut self) -> WRITE_W<0> {
WRITE_W::new(self)
}
#[doc = "Bit 1 - Read permission for key slot"]
#[inline(always)]
pub fn read(&mut self) -> READ_W<1> {
READ_W::new(self)
}
#[doc = "Bit 2 - Push permission for key slot"]
#[inline(always)]
pub fn push(&mut self) -> PUSH_W<2> {
PUSH_W::new(self)
}
#[doc = "Bit 16 - Revocation state for the key slot"]
#[inline(always)]
pub fn state(&mut self) -> STATE_W<16> {
STATE_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Description cluster: Define permissions for the key slot. Bits 0-15 and 16-31 can only be written when equal to 0xFFFF.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [perm](index.html) module"]
pub struct PERM_SPEC;
impl crate::RegisterSpec for PERM_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [perm::R](R) reader structure"]
impl crate::Readable for PERM_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [perm::W](W) writer structure"]
impl crate::Writable for PERM_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets PERM to value 0xffff_ffff"]
impl crate::Resettable for PERM_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0xffff_ffff
}
}
+12
View File
@@ -0,0 +1,12 @@
#[doc = r"Register block"]
#[repr(C)]
pub struct KEY {
#[doc = "0x00..0x10 - Description collection: Define bits \\[31+o*32:0+o*32\\]
of value assigned to KMU key slot."]
pub value: [VALUE; 4],
}
#[doc = "VALUE (rw) register accessor: an alias for `Reg<VALUE_SPEC>`"]
pub type VALUE = crate::Reg<value::VALUE_SPEC>;
#[doc = "Description collection: Define bits \\[31+o*32:0+o*32\\]
of value assigned to KMU key slot."]
pub mod value;
+86
View File
@@ -0,0 +1,86 @@
#[doc = "Register `VALUE[%s]` reader"]
pub struct R(crate::R<VALUE_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<VALUE_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<VALUE_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<VALUE_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `VALUE[%s]` writer"]
pub struct W(crate::W<VALUE_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<VALUE_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<VALUE_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<VALUE_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `VALUE` reader - Define bits \\[31+o*32:0+o*32\\]
of value assigned to KMU key slot"]
pub type VALUE_R = crate::FieldReader<u32, u32>;
#[doc = "Field `VALUE` writer - Define bits \\[31+o*32:0+o*32\\]
of value assigned to KMU key slot"]
pub type VALUE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, VALUE_SPEC, u32, u32, 32, O>;
impl R {
#[doc = "Bits 0:31 - Define bits \\[31+o*32:0+o*32\\]
of value assigned to KMU key slot"]
#[inline(always)]
pub fn value(&self) -> VALUE_R {
VALUE_R::new(self.bits)
}
}
impl W {
#[doc = "Bits 0:31 - Define bits \\[31+o*32:0+o*32\\]
of value assigned to KMU key slot"]
#[inline(always)]
pub fn value(&mut self) -> VALUE_W<0> {
VALUE_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Description collection: Define bits \\[31+o*32:0+o*32\\]
of value assigned to KMU key slot.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [value](index.html) module"]
pub struct VALUE_SPEC;
impl crate::RegisterSpec for VALUE_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [value::R](R) reader structure"]
impl crate::Readable for VALUE_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [value::W](W) writer structure"]
impl crate::Writable for VALUE_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets VALUE[%s]
to value 0xffff_ffff"]
impl crate::Resettable for VALUE_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0xffff_ffff
}
}
+95
View File
@@ -0,0 +1,95 @@
#[doc = "Register `OTP[%s]` reader"]
pub struct R(crate::R<OTP_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<OTP_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<OTP_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<OTP_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `OTP[%s]` writer"]
pub struct W(crate::W<OTP_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<OTP_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<OTP_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<OTP_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `LOWER` reader - Lower half word"]
pub type LOWER_R = crate::FieldReader<u16, u16>;
#[doc = "Field `LOWER` writer - Lower half word"]
pub type LOWER_W<'a, const O: u8> = crate::FieldWriter<'a, u32, OTP_SPEC, u16, u16, 16, O>;
#[doc = "Field `UPPER` reader - Upper half word"]
pub type UPPER_R = crate::FieldReader<u16, u16>;
#[doc = "Field `UPPER` writer - Upper half word"]
pub type UPPER_W<'a, const O: u8> = crate::FieldWriter<'a, u32, OTP_SPEC, u16, u16, 16, O>;
impl R {
#[doc = "Bits 0:15 - Lower half word"]
#[inline(always)]
pub fn lower(&self) -> LOWER_R {
LOWER_R::new((self.bits & 0xffff) as u16)
}
#[doc = "Bits 16:31 - Upper half word"]
#[inline(always)]
pub fn upper(&self) -> UPPER_R {
UPPER_R::new(((self.bits >> 16) & 0xffff) as u16)
}
}
impl W {
#[doc = "Bits 0:15 - Lower half word"]
#[inline(always)]
pub fn lower(&mut self) -> LOWER_W<0> {
LOWER_W::new(self)
}
#[doc = "Bits 16:31 - Upper half word"]
#[inline(always)]
pub fn upper(&mut self) -> UPPER_W<16> {
UPPER_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Description collection: One time programmable memory\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [otp](index.html) module"]
pub struct OTP_SPEC;
impl crate::RegisterSpec for OTP_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [otp::R](R) reader structure"]
impl crate::Readable for OTP_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [otp::W](W) writer structure"]
impl crate::Writable for OTP_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets OTP[%s]
to value 0xffff_ffff"]
impl crate::Resettable for OTP_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0xffff_ffff
}
}
+129
View File
@@ -0,0 +1,129 @@
#[doc = "Register `SECUREAPPROTECT` reader"]
pub struct R(crate::R<SECUREAPPROTECT_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<SECUREAPPROTECT_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<SECUREAPPROTECT_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<SECUREAPPROTECT_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `SECUREAPPROTECT` writer"]
pub struct W(crate::W<SECUREAPPROTECT_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<SECUREAPPROTECT_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<SECUREAPPROTECT_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<SECUREAPPROTECT_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `PALL` reader - Blocks debugger read/write access to all secure CPU registers and secure memory mapped addresses"]
pub type PALL_R = crate::FieldReader<u32, PALL_A>;
#[doc = "Blocks debugger read/write access to all secure CPU registers and secure memory mapped addresses\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u32)]
pub enum PALL_A {
#[doc = "4294967295: Unprotected"]
UNPROTECTED = 4294967295,
#[doc = "0: Protected"]
PROTECTED = 0,
}
impl From<PALL_A> for u32 {
#[inline(always)]
fn from(variant: PALL_A) -> Self {
variant as _
}
}
impl PALL_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> Option<PALL_A> {
match self.bits {
4294967295 => Some(PALL_A::UNPROTECTED),
0 => Some(PALL_A::PROTECTED),
_ => None,
}
}
#[doc = "Checks if the value of the field is `UNPROTECTED`"]
#[inline(always)]
pub fn is_unprotected(&self) -> bool {
*self == PALL_A::UNPROTECTED
}
#[doc = "Checks if the value of the field is `PROTECTED`"]
#[inline(always)]
pub fn is_protected(&self) -> bool {
*self == PALL_A::PROTECTED
}
}
#[doc = "Field `PALL` writer - Blocks debugger read/write access to all secure CPU registers and secure memory mapped addresses"]
pub type PALL_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, SECUREAPPROTECT_SPEC, u32, PALL_A, 32, O>;
impl<'a, const O: u8> PALL_W<'a, O> {
#[doc = "Unprotected"]
#[inline(always)]
pub fn unprotected(self) -> &'a mut W {
self.variant(PALL_A::UNPROTECTED)
}
#[doc = "Protected"]
#[inline(always)]
pub fn protected(self) -> &'a mut W {
self.variant(PALL_A::PROTECTED)
}
}
impl R {
#[doc = "Bits 0:31 - Blocks debugger read/write access to all secure CPU registers and secure memory mapped addresses"]
#[inline(always)]
pub fn pall(&self) -> PALL_R {
PALL_R::new(self.bits)
}
}
impl W {
#[doc = "Bits 0:31 - Blocks debugger read/write access to all secure CPU registers and secure memory mapped addresses"]
#[inline(always)]
pub fn pall(&mut self) -> PALL_W<0> {
PALL_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Secure access port protection\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [secureapprotect](index.html) module"]
pub struct SECUREAPPROTECT_SPEC;
impl crate::RegisterSpec for SECUREAPPROTECT_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [secureapprotect::R](R) reader structure"]
impl crate::Readable for SECUREAPPROTECT_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [secureapprotect::W](W) writer structure"]
impl crate::Writable for SECUREAPPROTECT_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets SECUREAPPROTECT to value 0"]
impl crate::Resettable for SECUREAPPROTECT_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+80
View File
@@ -0,0 +1,80 @@
#[doc = "Register `XOSC32M` reader"]
pub struct R(crate::R<XOSC32M_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<XOSC32M_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<XOSC32M_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<XOSC32M_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `XOSC32M` writer"]
pub struct W(crate::W<XOSC32M_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<XOSC32M_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<XOSC32M_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<XOSC32M_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `CTRL` reader - Pierce current DAC control signals"]
pub type CTRL_R = crate::FieldReader<u8, u8>;
#[doc = "Field `CTRL` writer - Pierce current DAC control signals"]
pub type CTRL_W<'a, const O: u8> = crate::FieldWriter<'a, u32, XOSC32M_SPEC, u8, u8, 6, O>;
impl R {
#[doc = "Bits 0:5 - Pierce current DAC control signals"]
#[inline(always)]
pub fn ctrl(&self) -> CTRL_R {
CTRL_R::new((self.bits & 0x3f) as u8)
}
}
impl W {
#[doc = "Bits 0:5 - Pierce current DAC control signals"]
#[inline(always)]
pub fn ctrl(&mut self) -> CTRL_W<0> {
CTRL_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Oscillator control\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [xosc32m](index.html) module"]
pub struct XOSC32M_SPEC;
impl crate::RegisterSpec for XOSC32M_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [xosc32m::R](R) reader structure"]
impl crate::Readable for XOSC32M_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [xosc32m::W](W) writer structure"]
impl crate::Writable for XOSC32M_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets XOSC32M to value 0xffff_ffcf"]
impl crate::Resettable for XOSC32M_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0xffff_ffcf
}
}