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

+64
View File
@@ -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;
+68
View File
@@ -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: 4096"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u32)]
pub enum CODEPAGESIZE_A {
#[doc = "4096: 4 kByte"]
K4096 = 4096,
}
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 {
4096 => Some(CODEPAGESIZE_A::K4096),
_ => None,
}
}
#[doc = "Checks if the value of the field is `K4096`"]
#[inline(always)]
pub fn is_k4096(&self) -> bool {
*self == CODEPAGESIZE_A::K4096
}
}
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 0x1000"]
impl crate::Resettable for CODEPAGESIZE_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0x1000
}
}
+68
View File
@@ -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: 256"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u32)]
pub enum CODESIZE_A {
#[doc = "256: 256 pages"]
P256 = 256,
}
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 {
256 => Some(CODESIZE_A::P256),
_ => None,
}
}
#[doc = "Checks if the value of the field is `P256`"]
#[inline(always)]
pub fn is_p256(&self) -> bool {
*self == CODESIZE_A::P256
}
}
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 0x0100"]
impl crate::Resettable for CODESIZE_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0x0100
}
}
+40
View File
@@ -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
}
}
+41
View File
@@ -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
}
}
+76
View File
@@ -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
View File
@@ -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
}
}
+76
View File
@@ -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
View File
@@ -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
View File
@@ -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
}
}
+76
View File
@@ -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
}
}
+28
View File
@@ -0,0 +1,28 @@
#[doc = r"Register block"]
#[repr(C)]
pub struct NFC {
#[doc = "0x00 - Default header for NFC Tag. Software can read these values to populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST."]
pub tagheader0: TAGHEADER0,
#[doc = "0x04 - Default header for NFC Tag. Software can read these values to populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST."]
pub tagheader1: TAGHEADER1,
#[doc = "0x08 - Default header for NFC Tag. Software can read these values to populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST."]
pub tagheader2: TAGHEADER2,
#[doc = "0x0c - Default header for NFC Tag. Software can read these values to populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST."]
pub tagheader3: TAGHEADER3,
}
#[doc = "TAGHEADER0 (r) register accessor: an alias for `Reg<TAGHEADER0_SPEC>`"]
pub type TAGHEADER0 = crate::Reg<tagheader0::TAGHEADER0_SPEC>;
#[doc = "Default header for NFC Tag. Software can read these values to populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST."]
pub mod tagheader0;
#[doc = "TAGHEADER1 (r) register accessor: an alias for `Reg<TAGHEADER1_SPEC>`"]
pub type TAGHEADER1 = crate::Reg<tagheader1::TAGHEADER1_SPEC>;
#[doc = "Default header for NFC Tag. Software can read these values to populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST."]
pub mod tagheader1;
#[doc = "TAGHEADER2 (r) register accessor: an alias for `Reg<TAGHEADER2_SPEC>`"]
pub type TAGHEADER2 = crate::Reg<tagheader2::TAGHEADER2_SPEC>;
#[doc = "Default header for NFC Tag. Software can read these values to populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST."]
pub mod tagheader2;
#[doc = "TAGHEADER3 (r) register accessor: an alias for `Reg<TAGHEADER3_SPEC>`"]
pub type TAGHEADER3 = crate::Reg<tagheader3::TAGHEADER3_SPEC>;
#[doc = "Default header for NFC Tag. Software can read these values to populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST."]
pub mod tagheader3;
+61
View File
@@ -0,0 +1,61 @@
#[doc = "Register `TAGHEADER0` reader"]
pub struct R(crate::R<TAGHEADER0_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<TAGHEADER0_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<TAGHEADER0_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<TAGHEADER0_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `MFGID` reader - Default Manufacturer ID: Nordic Semiconductor ASA has ICM 0x5F"]
pub type MFGID_R = crate::FieldReader<u8, u8>;
#[doc = "Field `UD1` reader - Unique identifier byte 1"]
pub type UD1_R = crate::FieldReader<u8, u8>;
#[doc = "Field `UD2` reader - Unique identifier byte 2"]
pub type UD2_R = crate::FieldReader<u8, u8>;
#[doc = "Field `UD3` reader - Unique identifier byte 3"]
pub type UD3_R = crate::FieldReader<u8, u8>;
impl R {
#[doc = "Bits 0:7 - Default Manufacturer ID: Nordic Semiconductor ASA has ICM 0x5F"]
#[inline(always)]
pub fn mfgid(&self) -> MFGID_R {
MFGID_R::new((self.bits & 0xff) as u8)
}
#[doc = "Bits 8:15 - Unique identifier byte 1"]
#[inline(always)]
pub fn ud1(&self) -> UD1_R {
UD1_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 16:23 - Unique identifier byte 2"]
#[inline(always)]
pub fn ud2(&self) -> UD2_R {
UD2_R::new(((self.bits >> 16) & 0xff) as u8)
}
#[doc = "Bits 24:31 - Unique identifier byte 3"]
#[inline(always)]
pub fn ud3(&self) -> UD3_R {
UD3_R::new(((self.bits >> 24) & 0xff) as u8)
}
}
#[doc = "Default header for NFC Tag. Software can read these values to populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST.\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 [tagheader0](index.html) module"]
pub struct TAGHEADER0_SPEC;
impl crate::RegisterSpec for TAGHEADER0_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [tagheader0::R](R) reader structure"]
impl crate::Readable for TAGHEADER0_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets TAGHEADER0 to value 0xffff_ff5f"]
impl crate::Resettable for TAGHEADER0_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0xffff_ff5f
}
}
+61
View File
@@ -0,0 +1,61 @@
#[doc = "Register `TAGHEADER1` reader"]
pub struct R(crate::R<TAGHEADER1_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<TAGHEADER1_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<TAGHEADER1_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<TAGHEADER1_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `UD4` reader - Unique identifier byte 4"]
pub type UD4_R = crate::FieldReader<u8, u8>;
#[doc = "Field `UD5` reader - Unique identifier byte 5"]
pub type UD5_R = crate::FieldReader<u8, u8>;
#[doc = "Field `UD6` reader - Unique identifier byte 6"]
pub type UD6_R = crate::FieldReader<u8, u8>;
#[doc = "Field `UD7` reader - Unique identifier byte 7"]
pub type UD7_R = crate::FieldReader<u8, u8>;
impl R {
#[doc = "Bits 0:7 - Unique identifier byte 4"]
#[inline(always)]
pub fn ud4(&self) -> UD4_R {
UD4_R::new((self.bits & 0xff) as u8)
}
#[doc = "Bits 8:15 - Unique identifier byte 5"]
#[inline(always)]
pub fn ud5(&self) -> UD5_R {
UD5_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 16:23 - Unique identifier byte 6"]
#[inline(always)]
pub fn ud6(&self) -> UD6_R {
UD6_R::new(((self.bits >> 16) & 0xff) as u8)
}
#[doc = "Bits 24:31 - Unique identifier byte 7"]
#[inline(always)]
pub fn ud7(&self) -> UD7_R {
UD7_R::new(((self.bits >> 24) & 0xff) as u8)
}
}
#[doc = "Default header for NFC Tag. Software can read these values to populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST.\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 [tagheader1](index.html) module"]
pub struct TAGHEADER1_SPEC;
impl crate::RegisterSpec for TAGHEADER1_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [tagheader1::R](R) reader structure"]
impl crate::Readable for TAGHEADER1_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets TAGHEADER1 to value 0xffff_ffff"]
impl crate::Resettable for TAGHEADER1_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0xffff_ffff
}
}
+61
View File
@@ -0,0 +1,61 @@
#[doc = "Register `TAGHEADER2` reader"]
pub struct R(crate::R<TAGHEADER2_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<TAGHEADER2_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<TAGHEADER2_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<TAGHEADER2_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `UD8` reader - Unique identifier byte 8"]
pub type UD8_R = crate::FieldReader<u8, u8>;
#[doc = "Field `UD9` reader - Unique identifier byte 9"]
pub type UD9_R = crate::FieldReader<u8, u8>;
#[doc = "Field `UD10` reader - Unique identifier byte 10"]
pub type UD10_R = crate::FieldReader<u8, u8>;
#[doc = "Field `UD11` reader - Unique identifier byte 11"]
pub type UD11_R = crate::FieldReader<u8, u8>;
impl R {
#[doc = "Bits 0:7 - Unique identifier byte 8"]
#[inline(always)]
pub fn ud8(&self) -> UD8_R {
UD8_R::new((self.bits & 0xff) as u8)
}
#[doc = "Bits 8:15 - Unique identifier byte 9"]
#[inline(always)]
pub fn ud9(&self) -> UD9_R {
UD9_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 16:23 - Unique identifier byte 10"]
#[inline(always)]
pub fn ud10(&self) -> UD10_R {
UD10_R::new(((self.bits >> 16) & 0xff) as u8)
}
#[doc = "Bits 24:31 - Unique identifier byte 11"]
#[inline(always)]
pub fn ud11(&self) -> UD11_R {
UD11_R::new(((self.bits >> 24) & 0xff) as u8)
}
}
#[doc = "Default header for NFC Tag. Software can read these values to populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST.\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 [tagheader2](index.html) module"]
pub struct TAGHEADER2_SPEC;
impl crate::RegisterSpec for TAGHEADER2_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [tagheader2::R](R) reader structure"]
impl crate::Readable for TAGHEADER2_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets TAGHEADER2 to value 0xffff_ffff"]
impl crate::Resettable for TAGHEADER2_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0xffff_ffff
}
}
+61
View File
@@ -0,0 +1,61 @@
#[doc = "Register `TAGHEADER3` reader"]
pub struct R(crate::R<TAGHEADER3_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<TAGHEADER3_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<TAGHEADER3_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<TAGHEADER3_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `UD12` reader - Unique identifier byte 12"]
pub type UD12_R = crate::FieldReader<u8, u8>;
#[doc = "Field `UD13` reader - Unique identifier byte 13"]
pub type UD13_R = crate::FieldReader<u8, u8>;
#[doc = "Field `UD14` reader - Unique identifier byte 14"]
pub type UD14_R = crate::FieldReader<u8, u8>;
#[doc = "Field `UD15` reader - Unique identifier byte 15"]
pub type UD15_R = crate::FieldReader<u8, u8>;
impl R {
#[doc = "Bits 0:7 - Unique identifier byte 12"]
#[inline(always)]
pub fn ud12(&self) -> UD12_R {
UD12_R::new((self.bits & 0xff) as u8)
}
#[doc = "Bits 8:15 - Unique identifier byte 13"]
#[inline(always)]
pub fn ud13(&self) -> UD13_R {
UD13_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 16:23 - Unique identifier byte 14"]
#[inline(always)]
pub fn ud14(&self) -> UD14_R {
UD14_R::new(((self.bits >> 16) & 0xff) as u8)
}
#[doc = "Bits 24:31 - Unique identifier byte 15"]
#[inline(always)]
pub fn ud15(&self) -> UD15_R {
UD15_R::new(((self.bits >> 24) & 0xff) as u8)
}
}
#[doc = "Default header for NFC Tag. Software can read these values to populate NFCID1_3RD_LAST, NFCID1_2ND_LAST and NFCID1_LAST.\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 [tagheader3](index.html) module"]
pub struct TAGHEADER3_SPEC;
impl crate::RegisterSpec for TAGHEADER3_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [tagheader3::R](R) reader structure"]
impl crate::Readable for TAGHEADER3_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets TAGHEADER3 to value 0xffff_ffff"]
impl crate::Resettable for TAGHEADER3_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0xffff_ffff
}
}
+16
View File
@@ -0,0 +1,16 @@
#[doc = r"Register block"]
#[repr(C)]
pub struct TRIMCNF {
#[doc = "0x00 - Description cluster: Address of the PAR register which will be written"]
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 of the PAR register which will be written"]
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;
+80
View File
@@ -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 of the PAR register which will be written\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
}
}
+40
View File
@@ -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 to be written into the PAR register"]
pub type DATA_R = crate::FieldReader<u32, u32>;
impl R {
#[doc = "Bits 0:31 - Data to be written into the PAR register"]
#[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
}
}
+52
View File
@@ -0,0 +1,52 @@
#[doc = r"Register block"]
#[repr(C)]
pub struct TRNG90B {
#[doc = "0x00 - Amount of bytes for the required entropy bits"]
pub bytes: BYTES,
#[doc = "0x04 - Repetition counter cutoff"]
pub rccutoff: RCCUTOFF,
#[doc = "0x08 - Adaptive proportion cutoff"]
pub apcutoff: APCUTOFF,
#[doc = "0x0c - Amount of bytes for the startup tests"]
pub startup: STARTUP,
#[doc = "0x10 - Sample count for ring oscillator 1"]
pub rosc1: ROSC1,
#[doc = "0x14 - Sample count for ring oscillator 2"]
pub rosc2: ROSC2,
#[doc = "0x18 - Sample count for ring oscillator 3"]
pub rosc3: ROSC3,
#[doc = "0x1c - Sample count for ring oscillator 4"]
pub rosc4: ROSC4,
}
#[doc = "BYTES (r) register accessor: an alias for `Reg<BYTES_SPEC>`"]
pub type BYTES = crate::Reg<bytes::BYTES_SPEC>;
#[doc = "Amount of bytes for the required entropy bits"]
pub mod bytes;
#[doc = "RCCUTOFF (r) register accessor: an alias for `Reg<RCCUTOFF_SPEC>`"]
pub type RCCUTOFF = crate::Reg<rccutoff::RCCUTOFF_SPEC>;
#[doc = "Repetition counter cutoff"]
pub mod rccutoff;
#[doc = "APCUTOFF (r) register accessor: an alias for `Reg<APCUTOFF_SPEC>`"]
pub type APCUTOFF = crate::Reg<apcutoff::APCUTOFF_SPEC>;
#[doc = "Adaptive proportion cutoff"]
pub mod apcutoff;
#[doc = "STARTUP (r) register accessor: an alias for `Reg<STARTUP_SPEC>`"]
pub type STARTUP = crate::Reg<startup::STARTUP_SPEC>;
#[doc = "Amount of bytes for the startup tests"]
pub mod startup;
#[doc = "ROSC1 (r) register accessor: an alias for `Reg<ROSC1_SPEC>`"]
pub type ROSC1 = crate::Reg<rosc1::ROSC1_SPEC>;
#[doc = "Sample count for ring oscillator 1"]
pub mod rosc1;
#[doc = "ROSC2 (r) register accessor: an alias for `Reg<ROSC2_SPEC>`"]
pub type ROSC2 = crate::Reg<rosc2::ROSC2_SPEC>;
#[doc = "Sample count for ring oscillator 2"]
pub mod rosc2;
#[doc = "ROSC3 (r) register accessor: an alias for `Reg<ROSC3_SPEC>`"]
pub type ROSC3 = crate::Reg<rosc3::ROSC3_SPEC>;
#[doc = "Sample count for ring oscillator 3"]
pub mod rosc3;
#[doc = "ROSC4 (r) register accessor: an alias for `Reg<ROSC4_SPEC>`"]
pub type ROSC4 = crate::Reg<rosc4::ROSC4_SPEC>;
#[doc = "Sample count for ring oscillator 4"]
pub mod rosc4;
+40
View File
@@ -0,0 +1,40 @@
#[doc = "Register `APCUTOFF` reader"]
pub struct R(crate::R<APCUTOFF_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<APCUTOFF_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<APCUTOFF_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<APCUTOFF_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `APCUTOFF` reader - Adaptive proportion cutoff"]
pub type APCUTOFF_R = crate::FieldReader<u32, u32>;
impl R {
#[doc = "Bits 0:31 - Adaptive proportion cutoff"]
#[inline(always)]
pub fn apcutoff(&self) -> APCUTOFF_R {
APCUTOFF_R::new(self.bits)
}
}
#[doc = "Adaptive proportion cutoff\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 [apcutoff](index.html) module"]
pub struct APCUTOFF_SPEC;
impl crate::RegisterSpec for APCUTOFF_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [apcutoff::R](R) reader structure"]
impl crate::Readable for APCUTOFF_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets APCUTOFF to value 0xffff_ffff"]
impl crate::Resettable for APCUTOFF_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0xffff_ffff
}
}
+40
View File
@@ -0,0 +1,40 @@
#[doc = "Register `BYTES` reader"]
pub struct R(crate::R<BYTES_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<BYTES_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<BYTES_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<BYTES_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `BYTES` reader - Amount of bytes for the required entropy bits"]
pub type BYTES_R = crate::FieldReader<u32, u32>;
impl R {
#[doc = "Bits 0:31 - Amount of bytes for the required entropy bits"]
#[inline(always)]
pub fn bytes(&self) -> BYTES_R {
BYTES_R::new(self.bits)
}
}
#[doc = "Amount of bytes for the required entropy bits\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 [bytes](index.html) module"]
pub struct BYTES_SPEC;
impl crate::RegisterSpec for BYTES_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [bytes::R](R) reader structure"]
impl crate::Readable for BYTES_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets BYTES to value 0x0210"]
impl crate::Resettable for BYTES_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0x0210
}
}
+40
View File
@@ -0,0 +1,40 @@
#[doc = "Register `RCCUTOFF` reader"]
pub struct R(crate::R<RCCUTOFF_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<RCCUTOFF_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<RCCUTOFF_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<RCCUTOFF_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `RCCUTOFF` reader - Repetition counter cutoff"]
pub type RCCUTOFF_R = crate::FieldReader<u32, u32>;
impl R {
#[doc = "Bits 0:31 - Repetition counter cutoff"]
#[inline(always)]
pub fn rccutoff(&self) -> RCCUTOFF_R {
RCCUTOFF_R::new(self.bits)
}
}
#[doc = "Repetition counter cutoff\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 [rccutoff](index.html) module"]
pub struct RCCUTOFF_SPEC;
impl crate::RegisterSpec for RCCUTOFF_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [rccutoff::R](R) reader structure"]
impl crate::Readable for RCCUTOFF_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets RCCUTOFF to value 0xffff_ffff"]
impl crate::Resettable for RCCUTOFF_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0xffff_ffff
}
}
+40
View File
@@ -0,0 +1,40 @@
#[doc = "Register `ROSC1` reader"]
pub struct R(crate::R<ROSC1_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<ROSC1_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<ROSC1_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<ROSC1_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `ROSC1` reader - Sample count for ring oscillator 1"]
pub type ROSC1_R = crate::FieldReader<u32, u32>;
impl R {
#[doc = "Bits 0:31 - Sample count for ring oscillator 1"]
#[inline(always)]
pub fn rosc1(&self) -> ROSC1_R {
ROSC1_R::new(self.bits)
}
}
#[doc = "Sample count for ring oscillator 1\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 [rosc1](index.html) module"]
pub struct ROSC1_SPEC;
impl crate::RegisterSpec for ROSC1_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [rosc1::R](R) reader structure"]
impl crate::Readable for ROSC1_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets ROSC1 to value 0xffff_ffff"]
impl crate::Resettable for ROSC1_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0xffff_ffff
}
}
+40
View File
@@ -0,0 +1,40 @@
#[doc = "Register `ROSC2` reader"]
pub struct R(crate::R<ROSC2_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<ROSC2_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<ROSC2_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<ROSC2_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `ROSC2` reader - Sample count for ring oscillator 2"]
pub type ROSC2_R = crate::FieldReader<u32, u32>;
impl R {
#[doc = "Bits 0:31 - Sample count for ring oscillator 2"]
#[inline(always)]
pub fn rosc2(&self) -> ROSC2_R {
ROSC2_R::new(self.bits)
}
}
#[doc = "Sample count for ring oscillator 2\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 [rosc2](index.html) module"]
pub struct ROSC2_SPEC;
impl crate::RegisterSpec for ROSC2_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [rosc2::R](R) reader structure"]
impl crate::Readable for ROSC2_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets ROSC2 to value 0xffff_ffff"]
impl crate::Resettable for ROSC2_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0xffff_ffff
}
}
+40
View File
@@ -0,0 +1,40 @@
#[doc = "Register `ROSC3` reader"]
pub struct R(crate::R<ROSC3_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<ROSC3_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<ROSC3_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<ROSC3_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `ROSC3` reader - Sample count for ring oscillator 3"]
pub type ROSC3_R = crate::FieldReader<u32, u32>;
impl R {
#[doc = "Bits 0:31 - Sample count for ring oscillator 3"]
#[inline(always)]
pub fn rosc3(&self) -> ROSC3_R {
ROSC3_R::new(self.bits)
}
}
#[doc = "Sample count for ring oscillator 3\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 [rosc3](index.html) module"]
pub struct ROSC3_SPEC;
impl crate::RegisterSpec for ROSC3_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [rosc3::R](R) reader structure"]
impl crate::Readable for ROSC3_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets ROSC3 to value 0xffff_ffff"]
impl crate::Resettable for ROSC3_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0xffff_ffff
}
}
+40
View File
@@ -0,0 +1,40 @@
#[doc = "Register `ROSC4` reader"]
pub struct R(crate::R<ROSC4_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<ROSC4_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<ROSC4_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<ROSC4_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `ROSC4` reader - Sample count for ring oscillator 4"]
pub type ROSC4_R = crate::FieldReader<u32, u32>;
impl R {
#[doc = "Bits 0:31 - Sample count for ring oscillator 4"]
#[inline(always)]
pub fn rosc4(&self) -> ROSC4_R {
ROSC4_R::new(self.bits)
}
}
#[doc = "Sample count for ring oscillator 4\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 [rosc4](index.html) module"]
pub struct ROSC4_SPEC;
impl crate::RegisterSpec for ROSC4_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [rosc4::R](R) reader structure"]
impl crate::Readable for ROSC4_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets ROSC4 to value 0xffff_ffff"]
impl crate::Resettable for ROSC4_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0xffff_ffff
}
}
+40
View File
@@ -0,0 +1,40 @@
#[doc = "Register `STARTUP` reader"]
pub struct R(crate::R<STARTUP_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<STARTUP_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<STARTUP_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<STARTUP_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `STARTUP` reader - Amount of bytes for the startup tests"]
pub type STARTUP_R = crate::FieldReader<u32, u32>;
impl R {
#[doc = "Bits 0:31 - Amount of bytes for the startup tests"]
#[inline(always)]
pub fn startup(&self) -> STARTUP_R {
STARTUP_R::new(self.bits)
}
}
#[doc = "Amount of bytes for the startup tests\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 [startup](index.html) module"]
pub struct STARTUP_SPEC;
impl crate::RegisterSpec for STARTUP_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [startup::R](R) reader structure"]
impl crate::Readable for STARTUP_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets STARTUP to value 0xffff_ffff"]
impl crate::Resettable for STARTUP_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0xffff_ffff
}
}
+47
View File
@@ -0,0 +1,47 @@
#[doc = "Register `XOSC32MTRIM` reader"]
pub struct R(crate::R<XOSC32MTRIM_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<XOSC32MTRIM_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<XOSC32MTRIM_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<XOSC32MTRIM_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `SLOPE` reader - Slope trim factor on twos complement form"]
pub type SLOPE_R = crate::FieldReader<u8, u8>;
#[doc = "Field `OFFSET` reader - Offset trim factor on integer form"]
pub type OFFSET_R = crate::FieldReader<u8, u8>;
impl R {
#[doc = "Bits 0:4 - Slope trim factor on twos complement form"]
#[inline(always)]
pub fn slope(&self) -> SLOPE_R {
SLOPE_R::new((self.bits & 0x1f) as u8)
}
#[doc = "Bits 5:9 - Offset trim factor on integer form"]
#[inline(always)]
pub fn offset(&self) -> OFFSET_R {
OFFSET_R::new(((self.bits >> 5) & 0x1f) as u8)
}
}
#[doc = "XOSC32M capacitor selection trim values\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 [xosc32mtrim](index.html) module"]
pub struct XOSC32MTRIM_SPEC;
impl crate::RegisterSpec for XOSC32MTRIM_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [xosc32mtrim::R](R) reader structure"]
impl crate::Readable for XOSC32MTRIM_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets XOSC32MTRIM to value 0xffff_ffff"]
impl crate::Resettable for XOSC32MTRIM_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0xffff_ffff
}
}