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:
17624 files changed
+4564928
-38
No files matched your search
@@ -0,0 +1,41 @@
|
||||
#[doc = "Register `DEVICEADDR[%s]` reader"]
|
||||
pub struct R(crate::R<DEVICEADDR_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<DEVICEADDR_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<DEVICEADDR_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<DEVICEADDR_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DEVICEADDR` reader - 48 bit device address"]
|
||||
pub type DEVICEADDR_R = crate::FieldReader<u32, u32>;
|
||||
impl R {
|
||||
#[doc = "Bits 0:31 - 48 bit device address"]
|
||||
#[inline(always)]
|
||||
pub fn deviceaddr(&self) -> DEVICEADDR_R {
|
||||
DEVICEADDR_R::new(self.bits)
|
||||
}
|
||||
}
|
||||
#[doc = "Description collection: Device address n\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [deviceaddr](index.html) module"]
|
||||
pub struct DEVICEADDR_SPEC;
|
||||
impl crate::RegisterSpec for DEVICEADDR_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [deviceaddr::R](R) reader structure"]
|
||||
impl crate::Readable for DEVICEADDR_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`reset()` method sets DEVICEADDR[%s]
|
||||
to value 0xffff_ffff"]
|
||||
impl crate::Resettable for DEVICEADDR_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0xffff_ffff
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
#[doc = "Register `DEVICEADDRTYPE` reader"]
|
||||
pub struct R(crate::R<DEVICEADDRTYPE_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<DEVICEADDRTYPE_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<DEVICEADDRTYPE_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<DEVICEADDRTYPE_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DEVICEADDRTYPE` reader - Device address type"]
|
||||
pub type DEVICEADDRTYPE_R = crate::BitReader<DEVICEADDRTYPE_A>;
|
||||
#[doc = "Device address type\n\nValue on reset: 1"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum DEVICEADDRTYPE_A {
|
||||
#[doc = "0: Public address"]
|
||||
PUBLIC = 0,
|
||||
#[doc = "1: Random address"]
|
||||
RANDOM = 1,
|
||||
}
|
||||
impl From<DEVICEADDRTYPE_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: DEVICEADDRTYPE_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl DEVICEADDRTYPE_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> DEVICEADDRTYPE_A {
|
||||
match self.bits {
|
||||
false => DEVICEADDRTYPE_A::PUBLIC,
|
||||
true => DEVICEADDRTYPE_A::RANDOM,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `PUBLIC`"]
|
||||
#[inline(always)]
|
||||
pub fn is_public(&self) -> bool {
|
||||
*self == DEVICEADDRTYPE_A::PUBLIC
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `RANDOM`"]
|
||||
#[inline(always)]
|
||||
pub fn is_random(&self) -> bool {
|
||||
*self == DEVICEADDRTYPE_A::RANDOM
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - Device address type"]
|
||||
#[inline(always)]
|
||||
pub fn deviceaddrtype(&self) -> DEVICEADDRTYPE_R {
|
||||
DEVICEADDRTYPE_R::new((self.bits & 1) != 0)
|
||||
}
|
||||
}
|
||||
#[doc = "Device address type\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [deviceaddrtype](index.html) module"]
|
||||
pub struct DEVICEADDRTYPE_SPEC;
|
||||
impl crate::RegisterSpec for DEVICEADDRTYPE_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [deviceaddrtype::R](R) reader structure"]
|
||||
impl crate::Readable for DEVICEADDRTYPE_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`reset()` method sets DEVICEADDRTYPE to value 0xffff_ffff"]
|
||||
impl crate::Resettable for DEVICEADDRTYPE_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0xffff_ffff
|
||||
}
|
||||
}
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
#[doc = "Register `ER[%s]` reader"]
|
||||
pub struct R(crate::R<ER_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<ER_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<ER_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<ER_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ER` reader - Encryption Root, word n"]
|
||||
pub type ER_R = crate::FieldReader<u32, u32>;
|
||||
impl R {
|
||||
#[doc = "Bits 0:31 - Encryption Root, word n"]
|
||||
#[inline(always)]
|
||||
pub fn er(&self) -> ER_R {
|
||||
ER_R::new(self.bits)
|
||||
}
|
||||
}
|
||||
#[doc = "Description collection: Encryption Root, word n\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [er](index.html) module"]
|
||||
pub struct ER_SPEC;
|
||||
impl crate::RegisterSpec for ER_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [er::R](R) reader structure"]
|
||||
impl crate::Readable for ER_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`reset()` method sets ER[%s]
|
||||
to value 0xffff_ffff"]
|
||||
impl crate::Resettable for ER_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0xffff_ffff
|
||||
}
|
||||
}
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
#[doc = r"Register block"]
|
||||
#[repr(C)]
|
||||
pub struct INFO {
|
||||
#[doc = "0x00 - Configuration identifier"]
|
||||
pub configid: CONFIGID,
|
||||
#[doc = "0x04..0x0c - Description collection: Device identifier"]
|
||||
pub deviceid: [DEVICEID; 2],
|
||||
#[doc = "0x0c - Part code"]
|
||||
pub part: PART,
|
||||
#[doc = "0x10 - Part Variant, Hardware version and Production configuration"]
|
||||
pub variant: VARIANT,
|
||||
#[doc = "0x14 - Package option"]
|
||||
pub package: PACKAGE,
|
||||
#[doc = "0x18 - RAM variant"]
|
||||
pub ram: RAM,
|
||||
#[doc = "0x1c - Flash variant"]
|
||||
pub flash: FLASH,
|
||||
#[doc = "0x20 - Code memory page size in bytes"]
|
||||
pub codepagesize: CODEPAGESIZE,
|
||||
#[doc = "0x24 - Code memory size"]
|
||||
pub codesize: CODESIZE,
|
||||
#[doc = "0x28 - Device type"]
|
||||
pub devicetype: DEVICETYPE,
|
||||
}
|
||||
#[doc = "CONFIGID (r) register accessor: an alias for `Reg<CONFIGID_SPEC>`"]
|
||||
pub type CONFIGID = crate::Reg<configid::CONFIGID_SPEC>;
|
||||
#[doc = "Configuration identifier"]
|
||||
pub mod configid;
|
||||
#[doc = "DEVICEID (r) register accessor: an alias for `Reg<DEVICEID_SPEC>`"]
|
||||
pub type DEVICEID = crate::Reg<deviceid::DEVICEID_SPEC>;
|
||||
#[doc = "Description collection: Device identifier"]
|
||||
pub mod deviceid;
|
||||
#[doc = "PART (r) register accessor: an alias for `Reg<PART_SPEC>`"]
|
||||
pub type PART = crate::Reg<part::PART_SPEC>;
|
||||
#[doc = "Part code"]
|
||||
pub mod part;
|
||||
#[doc = "VARIANT (r) register accessor: an alias for `Reg<VARIANT_SPEC>`"]
|
||||
pub type VARIANT = crate::Reg<variant::VARIANT_SPEC>;
|
||||
#[doc = "Part Variant, Hardware version and Production configuration"]
|
||||
pub mod variant;
|
||||
#[doc = "PACKAGE (r) register accessor: an alias for `Reg<PACKAGE_SPEC>`"]
|
||||
pub type PACKAGE = crate::Reg<package::PACKAGE_SPEC>;
|
||||
#[doc = "Package option"]
|
||||
pub mod package;
|
||||
#[doc = "RAM (r) register accessor: an alias for `Reg<RAM_SPEC>`"]
|
||||
pub type RAM = crate::Reg<ram::RAM_SPEC>;
|
||||
#[doc = "RAM variant"]
|
||||
pub mod ram;
|
||||
#[doc = "FLASH (r) register accessor: an alias for `Reg<FLASH_SPEC>`"]
|
||||
pub type FLASH = crate::Reg<flash::FLASH_SPEC>;
|
||||
#[doc = "Flash variant"]
|
||||
pub mod flash;
|
||||
#[doc = "CODEPAGESIZE (r) register accessor: an alias for `Reg<CODEPAGESIZE_SPEC>`"]
|
||||
pub type CODEPAGESIZE = crate::Reg<codepagesize::CODEPAGESIZE_SPEC>;
|
||||
#[doc = "Code memory page size in bytes"]
|
||||
pub mod codepagesize;
|
||||
#[doc = "CODESIZE (r) register accessor: an alias for `Reg<CODESIZE_SPEC>`"]
|
||||
pub type CODESIZE = crate::Reg<codesize::CODESIZE_SPEC>;
|
||||
#[doc = "Code memory size"]
|
||||
pub mod codesize;
|
||||
#[doc = "DEVICETYPE (r) register accessor: an alias for `Reg<DEVICETYPE_SPEC>`"]
|
||||
pub type DEVICETYPE = crate::Reg<devicetype::DEVICETYPE_SPEC>;
|
||||
#[doc = "Device type"]
|
||||
pub mod devicetype;
|
||||
@@ -0,0 +1,68 @@
|
||||
#[doc = "Register `CODEPAGESIZE` reader"]
|
||||
pub struct R(crate::R<CODEPAGESIZE_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<CODEPAGESIZE_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<CODEPAGESIZE_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<CODEPAGESIZE_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `CODEPAGESIZE` reader - Code memory page size in bytes"]
|
||||
pub type CODEPAGESIZE_R = crate::FieldReader<u32, CODEPAGESIZE_A>;
|
||||
#[doc = "Code memory page size in bytes\n\nValue on reset: 2048"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
#[repr(u32)]
|
||||
pub enum CODEPAGESIZE_A {
|
||||
#[doc = "2048: 2 kByte"]
|
||||
K2048 = 2048,
|
||||
}
|
||||
impl From<CODEPAGESIZE_A> for u32 {
|
||||
#[inline(always)]
|
||||
fn from(variant: CODEPAGESIZE_A) -> Self {
|
||||
variant as _
|
||||
}
|
||||
}
|
||||
impl CODEPAGESIZE_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> Option<CODEPAGESIZE_A> {
|
||||
match self.bits {
|
||||
2048 => Some(CODEPAGESIZE_A::K2048),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `K2048`"]
|
||||
#[inline(always)]
|
||||
pub fn is_k2048(&self) -> bool {
|
||||
*self == CODEPAGESIZE_A::K2048
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:31 - Code memory page size in bytes"]
|
||||
#[inline(always)]
|
||||
pub fn codepagesize(&self) -> CODEPAGESIZE_R {
|
||||
CODEPAGESIZE_R::new(self.bits)
|
||||
}
|
||||
}
|
||||
#[doc = "Code memory page size in bytes\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [codepagesize](index.html) module"]
|
||||
pub struct CODEPAGESIZE_SPEC;
|
||||
impl crate::RegisterSpec for CODEPAGESIZE_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [codepagesize::R](R) reader structure"]
|
||||
impl crate::Readable for CODEPAGESIZE_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`reset()` method sets CODEPAGESIZE to value 0x0800"]
|
||||
impl crate::Resettable for CODEPAGESIZE_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0x0800
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
#[doc = "Register `CODESIZE` reader"]
|
||||
pub struct R(crate::R<CODESIZE_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<CODESIZE_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<CODESIZE_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<CODESIZE_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `CODESIZE` reader - Code memory size in number of pages"]
|
||||
pub type CODESIZE_R = crate::FieldReader<u32, CODESIZE_A>;
|
||||
#[doc = "Code memory size in number of pages\n\nValue on reset: 128"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
#[repr(u32)]
|
||||
pub enum CODESIZE_A {
|
||||
#[doc = "128: 128 pages"]
|
||||
P128 = 128,
|
||||
}
|
||||
impl From<CODESIZE_A> for u32 {
|
||||
#[inline(always)]
|
||||
fn from(variant: CODESIZE_A) -> Self {
|
||||
variant as _
|
||||
}
|
||||
}
|
||||
impl CODESIZE_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> Option<CODESIZE_A> {
|
||||
match self.bits {
|
||||
128 => Some(CODESIZE_A::P128),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `P128`"]
|
||||
#[inline(always)]
|
||||
pub fn is_p128(&self) -> bool {
|
||||
*self == CODESIZE_A::P128
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:31 - Code memory size in number of pages"]
|
||||
#[inline(always)]
|
||||
pub fn codesize(&self) -> CODESIZE_R {
|
||||
CODESIZE_R::new(self.bits)
|
||||
}
|
||||
}
|
||||
#[doc = "Code memory size\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [codesize](index.html) module"]
|
||||
pub struct CODESIZE_SPEC;
|
||||
impl crate::RegisterSpec for CODESIZE_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [codesize::R](R) reader structure"]
|
||||
impl crate::Readable for CODESIZE_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`reset()` method sets CODESIZE to value 0x80"]
|
||||
impl crate::Resettable for CODESIZE_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0x80
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
#[doc = "Register `CONFIGID` reader"]
|
||||
pub struct R(crate::R<CONFIGID_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<CONFIGID_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<CONFIGID_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<CONFIGID_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `HWID` reader - Identification number for the HW"]
|
||||
pub type HWID_R = crate::FieldReader<u16, u16>;
|
||||
impl R {
|
||||
#[doc = "Bits 0:15 - Identification number for the HW"]
|
||||
#[inline(always)]
|
||||
pub fn hwid(&self) -> HWID_R {
|
||||
HWID_R::new((self.bits & 0xffff) as u16)
|
||||
}
|
||||
}
|
||||
#[doc = "Configuration identifier\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [configid](index.html) module"]
|
||||
pub struct CONFIGID_SPEC;
|
||||
impl crate::RegisterSpec for CONFIGID_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [configid::R](R) reader structure"]
|
||||
impl crate::Readable for CONFIGID_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`reset()` method sets CONFIGID to value 0xffff_ffff"]
|
||||
impl crate::Resettable for CONFIGID_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0xffff_ffff
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
#[doc = "Register `DEVICEID[%s]` reader"]
|
||||
pub struct R(crate::R<DEVICEID_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<DEVICEID_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<DEVICEID_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<DEVICEID_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DEVICEID` reader - 64 bit unique device identifier"]
|
||||
pub type DEVICEID_R = crate::FieldReader<u32, u32>;
|
||||
impl R {
|
||||
#[doc = "Bits 0:31 - 64 bit unique device identifier"]
|
||||
#[inline(always)]
|
||||
pub fn deviceid(&self) -> DEVICEID_R {
|
||||
DEVICEID_R::new(self.bits)
|
||||
}
|
||||
}
|
||||
#[doc = "Description collection: Device identifier\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [deviceid](index.html) module"]
|
||||
pub struct DEVICEID_SPEC;
|
||||
impl crate::RegisterSpec for DEVICEID_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [deviceid::R](R) reader structure"]
|
||||
impl crate::Readable for DEVICEID_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`reset()` method sets DEVICEID[%s]
|
||||
to value 0xffff_ffff"]
|
||||
impl crate::Resettable for DEVICEID_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0xffff_ffff
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
#[doc = "Register `DEVICETYPE` reader"]
|
||||
pub struct R(crate::R<DEVICETYPE_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<DEVICETYPE_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<DEVICETYPE_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<DEVICETYPE_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DEVICETYPE` reader - Device type"]
|
||||
pub type DEVICETYPE_R = crate::FieldReader<u32, DEVICETYPE_A>;
|
||||
#[doc = "Device type\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
#[repr(u32)]
|
||||
pub enum DEVICETYPE_A {
|
||||
#[doc = "0: Device is an physical DIE"]
|
||||
DIE = 0,
|
||||
#[doc = "4294967295: Device is an FPGA"]
|
||||
FPGA = 4294967295,
|
||||
}
|
||||
impl From<DEVICETYPE_A> for u32 {
|
||||
#[inline(always)]
|
||||
fn from(variant: DEVICETYPE_A) -> Self {
|
||||
variant as _
|
||||
}
|
||||
}
|
||||
impl DEVICETYPE_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> Option<DEVICETYPE_A> {
|
||||
match self.bits {
|
||||
0 => Some(DEVICETYPE_A::DIE),
|
||||
4294967295 => Some(DEVICETYPE_A::FPGA),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DIE`"]
|
||||
#[inline(always)]
|
||||
pub fn is_die(&self) -> bool {
|
||||
*self == DEVICETYPE_A::DIE
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `FPGA`"]
|
||||
#[inline(always)]
|
||||
pub fn is_fpga(&self) -> bool {
|
||||
*self == DEVICETYPE_A::FPGA
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:31 - Device type"]
|
||||
#[inline(always)]
|
||||
pub fn devicetype(&self) -> DEVICETYPE_R {
|
||||
DEVICETYPE_R::new(self.bits)
|
||||
}
|
||||
}
|
||||
#[doc = "Device type\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [devicetype](index.html) module"]
|
||||
pub struct DEVICETYPE_SPEC;
|
||||
impl crate::RegisterSpec for DEVICETYPE_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [devicetype::R](R) reader structure"]
|
||||
impl crate::Readable for DEVICETYPE_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`reset()` method sets DEVICETYPE to value 0"]
|
||||
impl crate::Resettable for DEVICETYPE_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
+108
@@ -0,0 +1,108 @@
|
||||
#[doc = "Register `FLASH` reader"]
|
||||
pub struct R(crate::R<FLASH_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<FLASH_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<FLASH_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<FLASH_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `FLASH` reader - Flash variant"]
|
||||
pub type FLASH_R = crate::FieldReader<u32, FLASH_A>;
|
||||
#[doc = "Flash variant\n\nValue on reset: 4294967295"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
#[repr(u32)]
|
||||
pub enum FLASH_A {
|
||||
#[doc = "128: 128 kByte FLASH"]
|
||||
K128 = 128,
|
||||
#[doc = "256: 256 kByte FLASH"]
|
||||
K256 = 256,
|
||||
#[doc = "512: 512 kByte FLASH"]
|
||||
K512 = 512,
|
||||
#[doc = "1024: 1 MByte FLASH"]
|
||||
K1024 = 1024,
|
||||
#[doc = "2048: 2 MByte FLASH"]
|
||||
K2048 = 2048,
|
||||
#[doc = "4294967295: Unspecified"]
|
||||
UNSPECIFIED = 4294967295,
|
||||
}
|
||||
impl From<FLASH_A> for u32 {
|
||||
#[inline(always)]
|
||||
fn from(variant: FLASH_A) -> Self {
|
||||
variant as _
|
||||
}
|
||||
}
|
||||
impl FLASH_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> Option<FLASH_A> {
|
||||
match self.bits {
|
||||
128 => Some(FLASH_A::K128),
|
||||
256 => Some(FLASH_A::K256),
|
||||
512 => Some(FLASH_A::K512),
|
||||
1024 => Some(FLASH_A::K1024),
|
||||
2048 => Some(FLASH_A::K2048),
|
||||
4294967295 => Some(FLASH_A::UNSPECIFIED),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `K128`"]
|
||||
#[inline(always)]
|
||||
pub fn is_k128(&self) -> bool {
|
||||
*self == FLASH_A::K128
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `K256`"]
|
||||
#[inline(always)]
|
||||
pub fn is_k256(&self) -> bool {
|
||||
*self == FLASH_A::K256
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `K512`"]
|
||||
#[inline(always)]
|
||||
pub fn is_k512(&self) -> bool {
|
||||
*self == FLASH_A::K512
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `K1024`"]
|
||||
#[inline(always)]
|
||||
pub fn is_k1024(&self) -> bool {
|
||||
*self == FLASH_A::K1024
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `K2048`"]
|
||||
#[inline(always)]
|
||||
pub fn is_k2048(&self) -> bool {
|
||||
*self == FLASH_A::K2048
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `UNSPECIFIED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_unspecified(&self) -> bool {
|
||||
*self == FLASH_A::UNSPECIFIED
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:31 - Flash variant"]
|
||||
#[inline(always)]
|
||||
pub fn flash(&self) -> FLASH_R {
|
||||
FLASH_R::new(self.bits)
|
||||
}
|
||||
}
|
||||
#[doc = "Flash variant\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [flash](index.html) module"]
|
||||
pub struct FLASH_SPEC;
|
||||
impl crate::RegisterSpec for FLASH_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [flash::R](R) reader structure"]
|
||||
impl crate::Readable for FLASH_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`reset()` method sets FLASH to value 0xffff_ffff"]
|
||||
impl crate::Resettable for FLASH_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0xffff_ffff
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
#[doc = "Register `PACKAGE` reader"]
|
||||
pub struct R(crate::R<PACKAGE_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<PACKAGE_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<PACKAGE_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<PACKAGE_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `PACKAGE` reader - Package option"]
|
||||
pub type PACKAGE_R = crate::FieldReader<u32, PACKAGE_A>;
|
||||
#[doc = "Package option\n\nValue on reset: 4294967295"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
#[repr(u32)]
|
||||
pub enum PACKAGE_A {
|
||||
#[doc = "8192: QKxx - 94-pin aQFN"]
|
||||
QK = 8192,
|
||||
#[doc = "4294967295: Unspecified"]
|
||||
UNSPECIFIED = 4294967295,
|
||||
}
|
||||
impl From<PACKAGE_A> for u32 {
|
||||
#[inline(always)]
|
||||
fn from(variant: PACKAGE_A) -> Self {
|
||||
variant as _
|
||||
}
|
||||
}
|
||||
impl PACKAGE_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> Option<PACKAGE_A> {
|
||||
match self.bits {
|
||||
8192 => Some(PACKAGE_A::QK),
|
||||
4294967295 => Some(PACKAGE_A::UNSPECIFIED),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `QK`"]
|
||||
#[inline(always)]
|
||||
pub fn is_qk(&self) -> bool {
|
||||
*self == PACKAGE_A::QK
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `UNSPECIFIED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_unspecified(&self) -> bool {
|
||||
*self == PACKAGE_A::UNSPECIFIED
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:31 - Package option"]
|
||||
#[inline(always)]
|
||||
pub fn package(&self) -> PACKAGE_R {
|
||||
PACKAGE_R::new(self.bits)
|
||||
}
|
||||
}
|
||||
#[doc = "Package option\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [package](index.html) module"]
|
||||
pub struct PACKAGE_SPEC;
|
||||
impl crate::RegisterSpec for PACKAGE_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [package::R](R) reader structure"]
|
||||
impl crate::Readable for PACKAGE_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`reset()` method sets PACKAGE to value 0xffff_ffff"]
|
||||
impl crate::Resettable for PACKAGE_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0xffff_ffff
|
||||
}
|
||||
}
|
||||
+76
@@ -0,0 +1,76 @@
|
||||
#[doc = "Register `PART` reader"]
|
||||
pub struct R(crate::R<PART_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<PART_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<PART_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<PART_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `PART` reader - Part code"]
|
||||
pub type PART_R = crate::FieldReader<u32, PART_A>;
|
||||
#[doc = "Part code\n\nValue on reset: 21312"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
#[repr(u32)]
|
||||
pub enum PART_A {
|
||||
#[doc = "21312: nRF5340"]
|
||||
N5340 = 21312,
|
||||
#[doc = "4294967295: Unspecified"]
|
||||
UNSPECIFIED = 4294967295,
|
||||
}
|
||||
impl From<PART_A> for u32 {
|
||||
#[inline(always)]
|
||||
fn from(variant: PART_A) -> Self {
|
||||
variant as _
|
||||
}
|
||||
}
|
||||
impl PART_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> Option<PART_A> {
|
||||
match self.bits {
|
||||
21312 => Some(PART_A::N5340),
|
||||
4294967295 => Some(PART_A::UNSPECIFIED),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `N5340`"]
|
||||
#[inline(always)]
|
||||
pub fn is_n5340(&self) -> bool {
|
||||
*self == PART_A::N5340
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `UNSPECIFIED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_unspecified(&self) -> bool {
|
||||
*self == PART_A::UNSPECIFIED
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:31 - Part code"]
|
||||
#[inline(always)]
|
||||
pub fn part(&self) -> PART_R {
|
||||
PART_R::new(self.bits)
|
||||
}
|
||||
}
|
||||
#[doc = "Part code\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [part](index.html) module"]
|
||||
pub struct PART_SPEC;
|
||||
impl crate::RegisterSpec for PART_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [part::R](R) reader structure"]
|
||||
impl crate::Readable for PART_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`reset()` method sets PART to value 0x5340"]
|
||||
impl crate::Resettable for PART_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0x5340
|
||||
}
|
||||
}
|
||||
+116
@@ -0,0 +1,116 @@
|
||||
#[doc = "Register `RAM` reader"]
|
||||
pub struct R(crate::R<RAM_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<RAM_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<RAM_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<RAM_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RAM` reader - RAM variant"]
|
||||
pub type RAM_R = crate::FieldReader<u32, RAM_A>;
|
||||
#[doc = "RAM variant\n\nValue on reset: 4294967295"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
#[repr(u32)]
|
||||
pub enum RAM_A {
|
||||
#[doc = "16: 16 kByte RAM"]
|
||||
K16 = 16,
|
||||
#[doc = "32: 32 kByte RAM"]
|
||||
K32 = 32,
|
||||
#[doc = "64: 64 kByte RAM"]
|
||||
K64 = 64,
|
||||
#[doc = "128: 128 kByte RAM"]
|
||||
K128 = 128,
|
||||
#[doc = "256: 256 kByte RAM"]
|
||||
K256 = 256,
|
||||
#[doc = "512: 512 kByte RAM"]
|
||||
K512 = 512,
|
||||
#[doc = "4294967295: Unspecified"]
|
||||
UNSPECIFIED = 4294967295,
|
||||
}
|
||||
impl From<RAM_A> for u32 {
|
||||
#[inline(always)]
|
||||
fn from(variant: RAM_A) -> Self {
|
||||
variant as _
|
||||
}
|
||||
}
|
||||
impl RAM_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> Option<RAM_A> {
|
||||
match self.bits {
|
||||
16 => Some(RAM_A::K16),
|
||||
32 => Some(RAM_A::K32),
|
||||
64 => Some(RAM_A::K64),
|
||||
128 => Some(RAM_A::K128),
|
||||
256 => Some(RAM_A::K256),
|
||||
512 => Some(RAM_A::K512),
|
||||
4294967295 => Some(RAM_A::UNSPECIFIED),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `K16`"]
|
||||
#[inline(always)]
|
||||
pub fn is_k16(&self) -> bool {
|
||||
*self == RAM_A::K16
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `K32`"]
|
||||
#[inline(always)]
|
||||
pub fn is_k32(&self) -> bool {
|
||||
*self == RAM_A::K32
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `K64`"]
|
||||
#[inline(always)]
|
||||
pub fn is_k64(&self) -> bool {
|
||||
*self == RAM_A::K64
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `K128`"]
|
||||
#[inline(always)]
|
||||
pub fn is_k128(&self) -> bool {
|
||||
*self == RAM_A::K128
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `K256`"]
|
||||
#[inline(always)]
|
||||
pub fn is_k256(&self) -> bool {
|
||||
*self == RAM_A::K256
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `K512`"]
|
||||
#[inline(always)]
|
||||
pub fn is_k512(&self) -> bool {
|
||||
*self == RAM_A::K512
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `UNSPECIFIED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_unspecified(&self) -> bool {
|
||||
*self == RAM_A::UNSPECIFIED
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:31 - RAM variant"]
|
||||
#[inline(always)]
|
||||
pub fn ram(&self) -> RAM_R {
|
||||
RAM_R::new(self.bits)
|
||||
}
|
||||
}
|
||||
#[doc = "RAM variant\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ram](index.html) module"]
|
||||
pub struct RAM_SPEC;
|
||||
impl crate::RegisterSpec for RAM_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [ram::R](R) reader structure"]
|
||||
impl crate::Readable for RAM_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`reset()` method sets RAM to value 0xffff_ffff"]
|
||||
impl crate::Resettable for RAM_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0xffff_ffff
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
#[doc = "Register `VARIANT` reader"]
|
||||
pub struct R(crate::R<VARIANT_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<VARIANT_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<VARIANT_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<VARIANT_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `VARIANT` reader - Part Variant, Hardware version and Production configuration, encoded as ASCII"]
|
||||
pub type VARIANT_R = crate::FieldReader<u32, VARIANT_A>;
|
||||
#[doc = "Part Variant, Hardware version and Production configuration, encoded as ASCII\n\nValue on reset: 4294967295"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
#[repr(u32)]
|
||||
pub enum VARIANT_A {
|
||||
#[doc = "1363886401: QKAA"]
|
||||
QKAA = 1363886401,
|
||||
#[doc = "4294967295: Unspecified"]
|
||||
UNSPECIFIED = 4294967295,
|
||||
}
|
||||
impl From<VARIANT_A> for u32 {
|
||||
#[inline(always)]
|
||||
fn from(variant: VARIANT_A) -> Self {
|
||||
variant as _
|
||||
}
|
||||
}
|
||||
impl VARIANT_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> Option<VARIANT_A> {
|
||||
match self.bits {
|
||||
1363886401 => Some(VARIANT_A::QKAA),
|
||||
4294967295 => Some(VARIANT_A::UNSPECIFIED),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `QKAA`"]
|
||||
#[inline(always)]
|
||||
pub fn is_qkaa(&self) -> bool {
|
||||
*self == VARIANT_A::QKAA
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `UNSPECIFIED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_unspecified(&self) -> bool {
|
||||
*self == VARIANT_A::UNSPECIFIED
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:31 - Part Variant, Hardware version and Production configuration, encoded as ASCII"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> VARIANT_R {
|
||||
VARIANT_R::new(self.bits)
|
||||
}
|
||||
}
|
||||
#[doc = "Part Variant, Hardware version and Production configuration\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [variant](index.html) module"]
|
||||
pub struct VARIANT_SPEC;
|
||||
impl crate::RegisterSpec for VARIANT_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [variant::R](R) reader structure"]
|
||||
impl crate::Readable for VARIANT_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`reset()` method sets VARIANT to value 0xffff_ffff"]
|
||||
impl crate::Resettable for VARIANT_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0xffff_ffff
|
||||
}
|
||||
}
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
#[doc = "Register `IR[%s]` reader"]
|
||||
pub struct R(crate::R<IR_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<IR_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<IR_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<IR_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IR` reader - Identity Root, word n"]
|
||||
pub type IR_R = crate::FieldReader<u32, u32>;
|
||||
impl R {
|
||||
#[doc = "Bits 0:31 - Identity Root, word n"]
|
||||
#[inline(always)]
|
||||
pub fn ir(&self) -> IR_R {
|
||||
IR_R::new(self.bits)
|
||||
}
|
||||
}
|
||||
#[doc = "Description collection: Identity Root, word n\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ir](index.html) module"]
|
||||
pub struct IR_SPEC;
|
||||
impl crate::RegisterSpec for IR_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [ir::R](R) reader structure"]
|
||||
impl crate::Readable for IR_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`reset()` method sets IR[%s]
|
||||
to value 0xffff_ffff"]
|
||||
impl crate::Resettable for IR_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0xffff_ffff
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
#[doc = r"Register block"]
|
||||
#[repr(C)]
|
||||
pub struct TRIMCNF {
|
||||
#[doc = "0x00 - Description cluster: Address"]
|
||||
pub addr: ADDR,
|
||||
#[doc = "0x04 - Description cluster: Data"]
|
||||
pub data: DATA,
|
||||
}
|
||||
#[doc = "ADDR (rw) register accessor: an alias for `Reg<ADDR_SPEC>`"]
|
||||
pub type ADDR = crate::Reg<addr::ADDR_SPEC>;
|
||||
#[doc = "Description cluster: Address"]
|
||||
pub mod addr;
|
||||
#[doc = "DATA (r) register accessor: an alias for `Reg<DATA_SPEC>`"]
|
||||
pub type DATA = crate::Reg<data::DATA_SPEC>;
|
||||
#[doc = "Description cluster: Data"]
|
||||
pub mod data;
|
||||
@@ -0,0 +1,80 @@
|
||||
#[doc = "Register `ADDR` reader"]
|
||||
pub struct R(crate::R<ADDR_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<ADDR_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<ADDR_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<ADDR_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `ADDR` writer"]
|
||||
pub struct W(crate::W<ADDR_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<ADDR_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<ADDR_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<ADDR_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `Address` reader - Address"]
|
||||
pub type ADDRESS_R = crate::FieldReader<u32, u32>;
|
||||
#[doc = "Field `Address` writer - Address"]
|
||||
pub type ADDRESS_W<'a, const O: u8> = crate::FieldWriter<'a, u32, ADDR_SPEC, u32, u32, 32, O>;
|
||||
impl R {
|
||||
#[doc = "Bits 0:31 - Address"]
|
||||
#[inline(always)]
|
||||
pub fn address(&self) -> ADDRESS_R {
|
||||
ADDRESS_R::new(self.bits)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:31 - Address"]
|
||||
#[inline(always)]
|
||||
pub fn address(&mut self) -> ADDRESS_W<0> {
|
||||
ADDRESS_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: Address\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 [addr](index.html) module"]
|
||||
pub struct ADDR_SPEC;
|
||||
impl crate::RegisterSpec for ADDR_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [addr::R](R) reader structure"]
|
||||
impl crate::Readable for ADDR_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [addr::W](W) writer structure"]
|
||||
impl crate::Writable for ADDR_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets ADDR to value 0xffff_ffff"]
|
||||
impl crate::Resettable for ADDR_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0xffff_ffff
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
#[doc = "Register `DATA` reader"]
|
||||
pub struct R(crate::R<DATA_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<DATA_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<DATA_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<DATA_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `Data` reader - Data"]
|
||||
pub type DATA_R = crate::FieldReader<u32, u32>;
|
||||
impl R {
|
||||
#[doc = "Bits 0:31 - Data"]
|
||||
#[inline(always)]
|
||||
pub fn data(&self) -> DATA_R {
|
||||
DATA_R::new(self.bits)
|
||||
}
|
||||
}
|
||||
#[doc = "Description cluster: Data\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data](index.html) module"]
|
||||
pub struct DATA_SPEC;
|
||||
impl crate::RegisterSpec for DATA_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [data::R](R) reader structure"]
|
||||
impl crate::Readable for DATA_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`reset()` method sets DATA to value 0xffff_ffff"]
|
||||
impl crate::Resettable for DATA_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0xffff_ffff
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user