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
+128
@@ -0,0 +1,128 @@
|
||||
#[doc = "Register `APPROTECT` reader"]
|
||||
pub struct R(crate::R<APPROTECT_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<APPROTECT_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<APPROTECT_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<APPROTECT_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `APPROTECT` writer"]
|
||||
pub struct W(crate::W<APPROTECT_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<APPROTECT_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<APPROTECT_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<APPROTECT_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `PALL` reader - Enable or disable Access Port protection. Any other value than 0xFF being written to this field will enable protection."]
|
||||
pub type PALL_R = crate::FieldReader<u8, PALL_A>;
|
||||
#[doc = "Enable or disable Access Port protection. Any other value than 0xFF being written to this field will enable protection.\n\nValue on reset: 255"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
#[repr(u8)]
|
||||
pub enum PALL_A {
|
||||
#[doc = "255: Disable"]
|
||||
DISABLED = 255,
|
||||
#[doc = "0: Enable"]
|
||||
ENABLED = 0,
|
||||
}
|
||||
impl From<PALL_A> for u8 {
|
||||
#[inline(always)]
|
||||
fn from(variant: PALL_A) -> Self {
|
||||
variant as _
|
||||
}
|
||||
}
|
||||
impl PALL_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> Option<PALL_A> {
|
||||
match self.bits {
|
||||
255 => Some(PALL_A::DISABLED),
|
||||
0 => Some(PALL_A::ENABLED),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
*self == PALL_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
*self == PALL_A::ENABLED
|
||||
}
|
||||
}
|
||||
#[doc = "Field `PALL` writer - Enable or disable Access Port protection. Any other value than 0xFF being written to this field will enable protection."]
|
||||
pub type PALL_W<'a, const O: u8> = crate::FieldWriter<'a, u32, APPROTECT_SPEC, u8, PALL_A, 8, O>;
|
||||
impl<'a, const O: u8> PALL_W<'a, O> {
|
||||
#[doc = "Disable"]
|
||||
#[inline(always)]
|
||||
pub fn disabled(self) -> &'a mut W {
|
||||
self.variant(PALL_A::DISABLED)
|
||||
}
|
||||
#[doc = "Enable"]
|
||||
#[inline(always)]
|
||||
pub fn enabled(self) -> &'a mut W {
|
||||
self.variant(PALL_A::ENABLED)
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:7 - Enable or disable Access Port protection. Any other value than 0xFF being written to this field will enable protection."]
|
||||
#[inline(always)]
|
||||
pub fn pall(&self) -> PALL_R {
|
||||
PALL_R::new((self.bits & 0xff) as u8)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:7 - Enable or disable Access Port protection. Any other value than 0xFF being written to this field will enable protection."]
|
||||
#[inline(always)]
|
||||
pub fn pall(&mut self) -> PALL_W<0> {
|
||||
PALL_W::new(self)
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Access Port protection\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [approtect](index.html) module"]
|
||||
pub struct APPROTECT_SPEC;
|
||||
impl crate::RegisterSpec for APPROTECT_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [approtect::R](R) reader structure"]
|
||||
impl crate::Readable for APPROTECT_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [approtect::W](W) writer structure"]
|
||||
impl crate::Writable for APPROTECT_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets APPROTECT to value 0xffff_ffff"]
|
||||
impl crate::Resettable for APPROTECT_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0xffff_ffff
|
||||
}
|
||||
}
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
#[doc = "Register `CUSTOMER[%s]` reader"]
|
||||
pub struct R(crate::R<CUSTOMER_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<CUSTOMER_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<CUSTOMER_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<CUSTOMER_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `CUSTOMER[%s]` writer"]
|
||||
pub struct W(crate::W<CUSTOMER_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<CUSTOMER_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<CUSTOMER_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<CUSTOMER_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `CUSTOMER` reader - Reserved for customer"]
|
||||
pub type CUSTOMER_R = crate::FieldReader<u32, u32>;
|
||||
#[doc = "Field `CUSTOMER` writer - Reserved for customer"]
|
||||
pub type CUSTOMER_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CUSTOMER_SPEC, u32, u32, 32, O>;
|
||||
impl R {
|
||||
#[doc = "Bits 0:31 - Reserved for customer"]
|
||||
#[inline(always)]
|
||||
pub fn customer(&self) -> CUSTOMER_R {
|
||||
CUSTOMER_R::new(self.bits)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:31 - Reserved for customer"]
|
||||
#[inline(always)]
|
||||
pub fn customer(&mut self) -> CUSTOMER_W<0> {
|
||||
CUSTOMER_W::new(self)
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Description collection\\[0\\]: Reserved for customer\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 [customer](index.html) module"]
|
||||
pub struct CUSTOMER_SPEC;
|
||||
impl crate::RegisterSpec for CUSTOMER_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [customer::R](R) reader structure"]
|
||||
impl crate::Readable for CUSTOMER_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [customer::W](W) writer structure"]
|
||||
impl crate::Writable for CUSTOMER_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets CUSTOMER[%s]
|
||||
to value 0xffff_ffff"]
|
||||
impl crate::Resettable for CUSTOMER_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0xffff_ffff
|
||||
}
|
||||
}
|
||||
+126
@@ -0,0 +1,126 @@
|
||||
#[doc = "Register `NFCPINS` reader"]
|
||||
pub struct R(crate::R<NFCPINS_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<NFCPINS_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<NFCPINS_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<NFCPINS_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `NFCPINS` writer"]
|
||||
pub struct W(crate::W<NFCPINS_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<NFCPINS_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<NFCPINS_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<NFCPINS_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `PROTECT` reader - Setting of pins dedicated to NFC functionality"]
|
||||
pub type PROTECT_R = crate::BitReader<PROTECT_A>;
|
||||
#[doc = "Setting of pins dedicated to NFC functionality\n\nValue on reset: 1"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum PROTECT_A {
|
||||
#[doc = "0: Operation as GPIO pins. Same protection as normal GPIO pins"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Operation as NFC antenna pins. Configures the protection for NFC operation"]
|
||||
NFC = 1,
|
||||
}
|
||||
impl From<PROTECT_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: PROTECT_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl PROTECT_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> PROTECT_A {
|
||||
match self.bits {
|
||||
false => PROTECT_A::DISABLED,
|
||||
true => PROTECT_A::NFC,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
*self == PROTECT_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `NFC`"]
|
||||
#[inline(always)]
|
||||
pub fn is_nfc(&self) -> bool {
|
||||
*self == PROTECT_A::NFC
|
||||
}
|
||||
}
|
||||
#[doc = "Field `PROTECT` writer - Setting of pins dedicated to NFC functionality"]
|
||||
pub type PROTECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, NFCPINS_SPEC, PROTECT_A, O>;
|
||||
impl<'a, const O: u8> PROTECT_W<'a, O> {
|
||||
#[doc = "Operation as GPIO pins. Same protection as normal GPIO pins"]
|
||||
#[inline(always)]
|
||||
pub fn disabled(self) -> &'a mut W {
|
||||
self.variant(PROTECT_A::DISABLED)
|
||||
}
|
||||
#[doc = "Operation as NFC antenna pins. Configures the protection for NFC operation"]
|
||||
#[inline(always)]
|
||||
pub fn nfc(self) -> &'a mut W {
|
||||
self.variant(PROTECT_A::NFC)
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - Setting of pins dedicated to NFC functionality"]
|
||||
#[inline(always)]
|
||||
pub fn protect(&self) -> PROTECT_R {
|
||||
PROTECT_R::new((self.bits & 1) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Setting of pins dedicated to NFC functionality"]
|
||||
#[inline(always)]
|
||||
pub fn protect(&mut self) -> PROTECT_W<0> {
|
||||
PROTECT_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 = "Setting of pins dedicated to NFC functionality: NFC antenna or GPIO\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 [nfcpins](index.html) module"]
|
||||
pub struct NFCPINS_SPEC;
|
||||
impl crate::RegisterSpec for NFCPINS_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [nfcpins::R](R) reader structure"]
|
||||
impl crate::Readable for NFCPINS_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [nfcpins::W](W) writer structure"]
|
||||
impl crate::Writable for NFCPINS_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets NFCPINS to value 0xffff_ffff"]
|
||||
impl crate::Resettable for NFCPINS_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0xffff_ffff
|
||||
}
|
||||
}
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
#[doc = "Register `NRFFW[%s]` reader"]
|
||||
pub struct R(crate::R<NRFFW_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<NRFFW_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<NRFFW_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<NRFFW_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `NRFFW[%s]` writer"]
|
||||
pub struct W(crate::W<NRFFW_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<NRFFW_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<NRFFW_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<NRFFW_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `NRFFW` reader - Reserved for Nordic firmware design"]
|
||||
pub type NRFFW_R = crate::FieldReader<u32, u32>;
|
||||
#[doc = "Field `NRFFW` writer - Reserved for Nordic firmware design"]
|
||||
pub type NRFFW_W<'a, const O: u8> = crate::FieldWriter<'a, u32, NRFFW_SPEC, u32, u32, 32, O>;
|
||||
impl R {
|
||||
#[doc = "Bits 0:31 - Reserved for Nordic firmware design"]
|
||||
#[inline(always)]
|
||||
pub fn nrffw(&self) -> NRFFW_R {
|
||||
NRFFW_R::new(self.bits)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:31 - Reserved for Nordic firmware design"]
|
||||
#[inline(always)]
|
||||
pub fn nrffw(&mut self) -> NRFFW_W<0> {
|
||||
NRFFW_W::new(self)
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Description collection\\[0\\]: Reserved for Nordic firmware design\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 [nrffw](index.html) module"]
|
||||
pub struct NRFFW_SPEC;
|
||||
impl crate::RegisterSpec for NRFFW_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [nrffw::R](R) reader structure"]
|
||||
impl crate::Readable for NRFFW_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [nrffw::W](W) writer structure"]
|
||||
impl crate::Writable for NRFFW_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets NRFFW[%s]
|
||||
to value 0xffff_ffff"]
|
||||
impl crate::Resettable for NRFFW_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0xffff_ffff
|
||||
}
|
||||
}
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
#[doc = "Register `NRFHW[%s]` reader"]
|
||||
pub struct R(crate::R<NRFHW_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<NRFHW_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<NRFHW_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<NRFHW_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `NRFHW[%s]` writer"]
|
||||
pub struct W(crate::W<NRFHW_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<NRFHW_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<NRFHW_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<NRFHW_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `NRFHW` reader - Reserved for Nordic hardware design"]
|
||||
pub type NRFHW_R = crate::FieldReader<u32, u32>;
|
||||
#[doc = "Field `NRFHW` writer - Reserved for Nordic hardware design"]
|
||||
pub type NRFHW_W<'a, const O: u8> = crate::FieldWriter<'a, u32, NRFHW_SPEC, u32, u32, 32, O>;
|
||||
impl R {
|
||||
#[doc = "Bits 0:31 - Reserved for Nordic hardware design"]
|
||||
#[inline(always)]
|
||||
pub fn nrfhw(&self) -> NRFHW_R {
|
||||
NRFHW_R::new(self.bits)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:31 - Reserved for Nordic hardware design"]
|
||||
#[inline(always)]
|
||||
pub fn nrfhw(&mut self) -> NRFHW_W<0> {
|
||||
NRFHW_W::new(self)
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Description collection\\[0\\]: Reserved for Nordic hardware design\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 [nrfhw](index.html) module"]
|
||||
pub struct NRFHW_SPEC;
|
||||
impl crate::RegisterSpec for NRFHW_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [nrfhw::R](R) reader structure"]
|
||||
impl crate::Readable for NRFHW_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [nrfhw::W](W) writer structure"]
|
||||
impl crate::Writable for NRFHW_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets NRFHW[%s]
|
||||
to value 0xffff_ffff"]
|
||||
impl crate::Resettable for NRFHW_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0xffff_ffff
|
||||
}
|
||||
}
|
||||
+141
@@ -0,0 +1,141 @@
|
||||
#[doc = "Register `PSELRESET[%s]` reader"]
|
||||
pub struct R(crate::R<PSELRESET_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<PSELRESET_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<PSELRESET_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<PSELRESET_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `PSELRESET[%s]` writer"]
|
||||
pub struct W(crate::W<PSELRESET_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<PSELRESET_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<PSELRESET_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<PSELRESET_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `PIN` reader - GPIO number P0.n onto which Reset is exposed"]
|
||||
pub type PIN_R = crate::FieldReader<u8, u8>;
|
||||
#[doc = "Field `PIN` writer - GPIO number P0.n onto which Reset is exposed"]
|
||||
pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PSELRESET_SPEC, u8, u8, 6, O>;
|
||||
#[doc = "Field `CONNECT` reader - Connection"]
|
||||
pub type CONNECT_R = crate::BitReader<CONNECT_A>;
|
||||
#[doc = "Connection\n\nValue on reset: 1"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum CONNECT_A {
|
||||
#[doc = "1: Disconnect"]
|
||||
DISCONNECTED = 1,
|
||||
#[doc = "0: Connect"]
|
||||
CONNECTED = 0,
|
||||
}
|
||||
impl From<CONNECT_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: CONNECT_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl CONNECT_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> CONNECT_A {
|
||||
match self.bits {
|
||||
true => CONNECT_A::DISCONNECTED,
|
||||
false => CONNECT_A::CONNECTED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISCONNECTED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disconnected(&self) -> bool {
|
||||
*self == CONNECT_A::DISCONNECTED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `CONNECTED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_connected(&self) -> bool {
|
||||
*self == CONNECT_A::CONNECTED
|
||||
}
|
||||
}
|
||||
#[doc = "Field `CONNECT` writer - Connection"]
|
||||
pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, PSELRESET_SPEC, CONNECT_A, O>;
|
||||
impl<'a, const O: u8> CONNECT_W<'a, O> {
|
||||
#[doc = "Disconnect"]
|
||||
#[inline(always)]
|
||||
pub fn disconnected(self) -> &'a mut W {
|
||||
self.variant(CONNECT_A::DISCONNECTED)
|
||||
}
|
||||
#[doc = "Connect"]
|
||||
#[inline(always)]
|
||||
pub fn connected(self) -> &'a mut W {
|
||||
self.variant(CONNECT_A::CONNECTED)
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:5 - GPIO number P0.n onto which Reset is exposed"]
|
||||
#[inline(always)]
|
||||
pub fn pin(&self) -> PIN_R {
|
||||
PIN_R::new((self.bits & 0x3f) as u8)
|
||||
}
|
||||
#[doc = "Bit 31 - Connection"]
|
||||
#[inline(always)]
|
||||
pub fn connect(&self) -> CONNECT_R {
|
||||
CONNECT_R::new(((self.bits >> 31) & 1) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:5 - GPIO number P0.n onto which Reset is exposed"]
|
||||
#[inline(always)]
|
||||
pub fn pin(&mut self) -> PIN_W<0> {
|
||||
PIN_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 31 - Connection"]
|
||||
#[inline(always)]
|
||||
pub fn connect(&mut self) -> CONNECT_W<31> {
|
||||
CONNECT_W::new(self)
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Description collection\\[0\\]: Mapping of the nRESET function (see POWER chapter for details)\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 [pselreset](index.html) module"]
|
||||
pub struct PSELRESET_SPEC;
|
||||
impl crate::RegisterSpec for PSELRESET_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [pselreset::R](R) reader structure"]
|
||||
impl crate::Readable for PSELRESET_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [pselreset::W](W) writer structure"]
|
||||
impl crate::Writable for PSELRESET_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets PSELRESET[%s]
|
||||
to value 0xffff_ffff"]
|
||||
impl crate::Resettable for PSELRESET_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0xffff_ffff
|
||||
}
|
||||
}
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
#[doc = "Register `UNUSED0` reader"]
|
||||
pub struct R(crate::R<UNUSED0_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<UNUSED0_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<UNUSED0_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<UNUSED0_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `UNUSED0` writer"]
|
||||
pub struct W(crate::W<UNUSED0_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<UNUSED0_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<UNUSED0_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<UNUSED0_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[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 = "Unspecified\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 [unused0](index.html) module"]
|
||||
pub struct UNUSED0_SPEC;
|
||||
impl crate::RegisterSpec for UNUSED0_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [unused0::R](R) reader structure"]
|
||||
impl crate::Readable for UNUSED0_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [unused0::W](W) writer structure"]
|
||||
impl crate::Writable for UNUSED0_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets UNUSED0 to value 0"]
|
||||
impl crate::Resettable for UNUSED0_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
#[doc = "Register `UNUSED1` reader"]
|
||||
pub struct R(crate::R<UNUSED1_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<UNUSED1_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<UNUSED1_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<UNUSED1_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `UNUSED1` writer"]
|
||||
pub struct W(crate::W<UNUSED1_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<UNUSED1_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<UNUSED1_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<UNUSED1_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[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 = "Unspecified\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 [unused1](index.html) module"]
|
||||
pub struct UNUSED1_SPEC;
|
||||
impl crate::RegisterSpec for UNUSED1_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [unused1::R](R) reader structure"]
|
||||
impl crate::Readable for UNUSED1_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [unused1::W](W) writer structure"]
|
||||
impl crate::Writable for UNUSED1_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets UNUSED1 to value 0"]
|
||||
impl crate::Resettable for UNUSED1_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
#[doc = "Register `UNUSED2` reader"]
|
||||
pub struct R(crate::R<UNUSED2_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<UNUSED2_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<UNUSED2_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<UNUSED2_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `UNUSED2` writer"]
|
||||
pub struct W(crate::W<UNUSED2_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<UNUSED2_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<UNUSED2_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<UNUSED2_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[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 = "Unspecified\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 [unused2](index.html) module"]
|
||||
pub struct UNUSED2_SPEC;
|
||||
impl crate::RegisterSpec for UNUSED2_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [unused2::R](R) reader structure"]
|
||||
impl crate::Readable for UNUSED2_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [unused2::W](W) writer structure"]
|
||||
impl crate::Writable for UNUSED2_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets UNUSED2 to value 0"]
|
||||
impl crate::Resettable for UNUSED2_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
#[doc = "Register `UNUSED3` reader"]
|
||||
pub struct R(crate::R<UNUSED3_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<UNUSED3_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<UNUSED3_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<UNUSED3_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `UNUSED3` writer"]
|
||||
pub struct W(crate::W<UNUSED3_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<UNUSED3_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<UNUSED3_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<UNUSED3_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[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 = "Unspecified\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 [unused3](index.html) module"]
|
||||
pub struct UNUSED3_SPEC;
|
||||
impl crate::RegisterSpec for UNUSED3_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [unused3::R](R) reader structure"]
|
||||
impl crate::Readable for UNUSED3_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [unused3::W](W) writer structure"]
|
||||
impl crate::Writable for UNUSED3_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets UNUSED3 to value 0"]
|
||||
impl crate::Resettable for UNUSED3_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user