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
+64
@@ -0,0 +1,64 @@
|
||||
#[doc = "Register `BOOTLOADERADDR` reader"]
|
||||
pub struct R(crate::R<BOOTLOADERADDR_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<BOOTLOADERADDR_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<BOOTLOADERADDR_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<BOOTLOADERADDR_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `BOOTLOADERADDR` writer"]
|
||||
pub struct W(crate::W<BOOTLOADERADDR_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<BOOTLOADERADDR_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<BOOTLOADERADDR_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<BOOTLOADERADDR_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 = "Bootloader start 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 [bootloaderaddr](index.html) module"]
|
||||
pub struct BOOTLOADERADDR_SPEC;
|
||||
impl crate::RegisterSpec for BOOTLOADERADDR_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [bootloaderaddr::R](R) reader structure"]
|
||||
impl crate::Readable for BOOTLOADERADDR_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [bootloaderaddr::W](W) writer structure"]
|
||||
impl crate::Writable for BOOTLOADERADDR_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets BOOTLOADERADDR to value 0xffff_ffff"]
|
||||
impl crate::Resettable for BOOTLOADERADDR_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0xffff_ffff
|
||||
}
|
||||
}
|
||||
Vendored
+64
@@ -0,0 +1,64 @@
|
||||
#[doc = "Register `CLENR0` reader"]
|
||||
pub struct R(crate::R<CLENR0_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<CLENR0_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<CLENR0_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<CLENR0_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `CLENR0` writer"]
|
||||
pub struct W(crate::W<CLENR0_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<CLENR0_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<CLENR0_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<CLENR0_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 = "Length of code region 0.\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 [clenr0](index.html) module"]
|
||||
pub struct CLENR0_SPEC;
|
||||
impl crate::RegisterSpec for CLENR0_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [clenr0::R](R) reader structure"]
|
||||
impl crate::Readable for CLENR0_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [clenr0::W](W) writer structure"]
|
||||
impl crate::Writable for CLENR0_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets CLENR0 to value 0xffff_ffff"]
|
||||
impl crate::Resettable for CLENR0_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0xffff_ffff
|
||||
}
|
||||
}
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
#[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)
|
||||
}
|
||||
}
|
||||
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 = "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
|
||||
}
|
||||
}
|
||||
Vendored
+40
@@ -0,0 +1,40 @@
|
||||
#[doc = "Register `FWID` reader"]
|
||||
pub struct R(crate::R<FWID_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<FWID_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<FWID_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<FWID_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `FWID` reader - Identification number for the firmware loaded into the chip."]
|
||||
pub type FWID_R = crate::FieldReader<u16, u16>;
|
||||
impl R {
|
||||
#[doc = "Bits 0:15 - Identification number for the firmware loaded into the chip."]
|
||||
#[inline(always)]
|
||||
pub fn fwid(&self) -> FWID_R {
|
||||
FWID_R::new((self.bits & 0xffff) as u16)
|
||||
}
|
||||
}
|
||||
#[doc = "Firmware ID.\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 [fwid](index.html) module"]
|
||||
pub struct FWID_SPEC;
|
||||
impl crate::RegisterSpec for FWID_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [fwid::R](R) reader structure"]
|
||||
impl crate::Readable for FWID_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`reset()` method sets FWID to value 0xffff_ffff"]
|
||||
impl crate::Resettable for FWID_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0xffff_ffff
|
||||
}
|
||||
}
|
||||
Vendored
+65
@@ -0,0 +1,65 @@
|
||||
#[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)
|
||||
}
|
||||
}
|
||||
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 = "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
|
||||
}
|
||||
}
|
||||
Vendored
+65
@@ -0,0 +1,65 @@
|
||||
#[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)
|
||||
}
|
||||
}
|
||||
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 = "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
|
||||
}
|
||||
}
|
||||
Vendored
+190
@@ -0,0 +1,190 @@
|
||||
#[doc = "Register `RBPCONF` reader"]
|
||||
pub struct R(crate::R<RBPCONF_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<RBPCONF_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<RBPCONF_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<RBPCONF_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `RBPCONF` writer"]
|
||||
pub struct W(crate::W<RBPCONF_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<RBPCONF_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<RBPCONF_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<RBPCONF_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `PR0` reader - Readback protect region 0. Will be ignored if pre-programmed factory code is present on the chip."]
|
||||
pub type PR0_R = crate::FieldReader<u8, PR0_A>;
|
||||
#[doc = "Readback protect region 0. Will be ignored if pre-programmed factory code is present on the chip.\n\nValue on reset: 255"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
#[repr(u8)]
|
||||
pub enum PR0_A {
|
||||
#[doc = "255: Disabled."]
|
||||
DISABLED = 255,
|
||||
#[doc = "0: Enabled."]
|
||||
ENABLED = 0,
|
||||
}
|
||||
impl From<PR0_A> for u8 {
|
||||
#[inline(always)]
|
||||
fn from(variant: PR0_A) -> Self {
|
||||
variant as _
|
||||
}
|
||||
}
|
||||
impl PR0_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> Option<PR0_A> {
|
||||
match self.bits {
|
||||
255 => Some(PR0_A::DISABLED),
|
||||
0 => Some(PR0_A::ENABLED),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
*self == PR0_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
*self == PR0_A::ENABLED
|
||||
}
|
||||
}
|
||||
#[doc = "Field `PR0` writer - Readback protect region 0. Will be ignored if pre-programmed factory code is present on the chip."]
|
||||
pub type PR0_W<'a, const O: u8> = crate::FieldWriter<'a, u32, RBPCONF_SPEC, u8, PR0_A, 8, O>;
|
||||
impl<'a, const O: u8> PR0_W<'a, O> {
|
||||
#[doc = "Disabled."]
|
||||
#[inline(always)]
|
||||
pub fn disabled(self) -> &'a mut W {
|
||||
self.variant(PR0_A::DISABLED)
|
||||
}
|
||||
#[doc = "Enabled."]
|
||||
#[inline(always)]
|
||||
pub fn enabled(self) -> &'a mut W {
|
||||
self.variant(PR0_A::ENABLED)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `PALL` reader - Readback protect all code in the device."]
|
||||
pub type PALL_R = crate::FieldReader<u8, PALL_A>;
|
||||
#[doc = "Readback protect all code in the device.\n\nValue on reset: 255"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
#[repr(u8)]
|
||||
pub enum PALL_A {
|
||||
#[doc = "255: Disabled."]
|
||||
DISABLED = 255,
|
||||
#[doc = "0: Enabled."]
|
||||
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 - Readback protect all code in the device."]
|
||||
pub type PALL_W<'a, const O: u8> = crate::FieldWriter<'a, u32, RBPCONF_SPEC, u8, PALL_A, 8, O>;
|
||||
impl<'a, const O: u8> PALL_W<'a, O> {
|
||||
#[doc = "Disabled."]
|
||||
#[inline(always)]
|
||||
pub fn disabled(self) -> &'a mut W {
|
||||
self.variant(PALL_A::DISABLED)
|
||||
}
|
||||
#[doc = "Enabled."]
|
||||
#[inline(always)]
|
||||
pub fn enabled(self) -> &'a mut W {
|
||||
self.variant(PALL_A::ENABLED)
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:7 - Readback protect region 0. Will be ignored if pre-programmed factory code is present on the chip."]
|
||||
#[inline(always)]
|
||||
pub fn pr0(&self) -> PR0_R {
|
||||
PR0_R::new((self.bits & 0xff) as u8)
|
||||
}
|
||||
#[doc = "Bits 8:15 - Readback protect all code in the device."]
|
||||
#[inline(always)]
|
||||
pub fn pall(&self) -> PALL_R {
|
||||
PALL_R::new(((self.bits >> 8) & 0xff) as u8)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:7 - Readback protect region 0. Will be ignored if pre-programmed factory code is present on the chip."]
|
||||
#[inline(always)]
|
||||
pub fn pr0(&mut self) -> PR0_W<0> {
|
||||
PR0_W::new(self)
|
||||
}
|
||||
#[doc = "Bits 8:15 - Readback protect all code in the device."]
|
||||
#[inline(always)]
|
||||
pub fn pall(&mut self) -> PALL_W<8> {
|
||||
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 = "Readback protection configuration.\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 [rbpconf](index.html) module"]
|
||||
pub struct RBPCONF_SPEC;
|
||||
impl crate::RegisterSpec for RBPCONF_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [rbpconf::R](R) reader structure"]
|
||||
impl crate::Readable for RBPCONF_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [rbpconf::W](W) writer structure"]
|
||||
impl crate::Writable for RBPCONF_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets RBPCONF to value 0xffff_ffff"]
|
||||
impl crate::Resettable for RBPCONF_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0xffff_ffff
|
||||
}
|
||||
}
|
||||
+129
@@ -0,0 +1,129 @@
|
||||
#[doc = "Register `XTALFREQ` reader"]
|
||||
pub struct R(crate::R<XTALFREQ_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<XTALFREQ_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<XTALFREQ_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<XTALFREQ_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `XTALFREQ` writer"]
|
||||
pub struct W(crate::W<XTALFREQ_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<XTALFREQ_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<XTALFREQ_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<XTALFREQ_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `XTALFREQ` reader - Reset value for CLOCK XTALFREQ register."]
|
||||
pub type XTALFREQ_R = crate::FieldReader<u8, XTALFREQ_A>;
|
||||
#[doc = "Reset value for CLOCK XTALFREQ register.\n\nValue on reset: 255"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
#[repr(u8)]
|
||||
pub enum XTALFREQ_A {
|
||||
#[doc = "255: 16MHz Xtal is used."]
|
||||
_16MHZ = 255,
|
||||
#[doc = "0: 32MHz Xtal is used."]
|
||||
_32MHZ = 0,
|
||||
}
|
||||
impl From<XTALFREQ_A> for u8 {
|
||||
#[inline(always)]
|
||||
fn from(variant: XTALFREQ_A) -> Self {
|
||||
variant as _
|
||||
}
|
||||
}
|
||||
impl XTALFREQ_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> Option<XTALFREQ_A> {
|
||||
match self.bits {
|
||||
255 => Some(XTALFREQ_A::_16MHZ),
|
||||
0 => Some(XTALFREQ_A::_32MHZ),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `_16MHZ`"]
|
||||
#[inline(always)]
|
||||
pub fn is_16mhz(&self) -> bool {
|
||||
*self == XTALFREQ_A::_16MHZ
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `_32MHZ`"]
|
||||
#[inline(always)]
|
||||
pub fn is_32mhz(&self) -> bool {
|
||||
*self == XTALFREQ_A::_32MHZ
|
||||
}
|
||||
}
|
||||
#[doc = "Field `XTALFREQ` writer - Reset value for CLOCK XTALFREQ register."]
|
||||
pub type XTALFREQ_W<'a, const O: u8> =
|
||||
crate::FieldWriter<'a, u32, XTALFREQ_SPEC, u8, XTALFREQ_A, 8, O>;
|
||||
impl<'a, const O: u8> XTALFREQ_W<'a, O> {
|
||||
#[doc = "16MHz Xtal is used."]
|
||||
#[inline(always)]
|
||||
pub fn _16mhz(self) -> &'a mut W {
|
||||
self.variant(XTALFREQ_A::_16MHZ)
|
||||
}
|
||||
#[doc = "32MHz Xtal is used."]
|
||||
#[inline(always)]
|
||||
pub fn _32mhz(self) -> &'a mut W {
|
||||
self.variant(XTALFREQ_A::_32MHZ)
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:7 - Reset value for CLOCK XTALFREQ register."]
|
||||
#[inline(always)]
|
||||
pub fn xtalfreq(&self) -> XTALFREQ_R {
|
||||
XTALFREQ_R::new((self.bits & 0xff) as u8)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:7 - Reset value for CLOCK XTALFREQ register."]
|
||||
#[inline(always)]
|
||||
pub fn xtalfreq(&mut self) -> XTALFREQ_W<0> {
|
||||
XTALFREQ_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 = "Reset value for CLOCK XTALFREQ register.\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 [xtalfreq](index.html) module"]
|
||||
pub struct XTALFREQ_SPEC;
|
||||
impl crate::RegisterSpec for XTALFREQ_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [xtalfreq::R](R) reader structure"]
|
||||
impl crate::Readable for XTALFREQ_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [xtalfreq::W](W) writer structure"]
|
||||
impl crate::Writable for XTALFREQ_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets XTALFREQ to value 0xffff_ffff"]
|
||||
impl crate::Resettable for XTALFREQ_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0xffff_ffff
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user