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
+141
@@ -0,0 +1,141 @@
|
||||
#[doc = "Register `CONFIG` reader"]
|
||||
pub struct R(crate::R<CONFIG_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<CONFIG_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<CONFIG_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<CONFIG_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `CONFIG` writer"]
|
||||
pub struct W(crate::W<CONFIG_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<CONFIG_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<CONFIG_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<CONFIG_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `WEN` reader - Program memory access mode. It is strongly recommended to only activate erase and write modes when they are actively used."]
|
||||
pub type WEN_R = crate::FieldReader<u8, WEN_A>;
|
||||
#[doc = "Program memory access mode. It is strongly recommended to only activate erase and write modes when they are actively used.\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
#[repr(u8)]
|
||||
pub enum WEN_A {
|
||||
#[doc = "0: Read only access"]
|
||||
REN = 0,
|
||||
#[doc = "1: Write enabled"]
|
||||
WEN = 1,
|
||||
#[doc = "2: Erase enabled"]
|
||||
EEN = 2,
|
||||
}
|
||||
impl From<WEN_A> for u8 {
|
||||
#[inline(always)]
|
||||
fn from(variant: WEN_A) -> Self {
|
||||
variant as _
|
||||
}
|
||||
}
|
||||
impl WEN_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> Option<WEN_A> {
|
||||
match self.bits {
|
||||
0 => Some(WEN_A::REN),
|
||||
1 => Some(WEN_A::WEN),
|
||||
2 => Some(WEN_A::EEN),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `REN`"]
|
||||
#[inline(always)]
|
||||
pub fn is_ren(&self) -> bool {
|
||||
*self == WEN_A::REN
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `WEN`"]
|
||||
#[inline(always)]
|
||||
pub fn is_wen(&self) -> bool {
|
||||
*self == WEN_A::WEN
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `EEN`"]
|
||||
#[inline(always)]
|
||||
pub fn is_een(&self) -> bool {
|
||||
*self == WEN_A::EEN
|
||||
}
|
||||
}
|
||||
#[doc = "Field `WEN` writer - Program memory access mode. It is strongly recommended to only activate erase and write modes when they are actively used."]
|
||||
pub type WEN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CONFIG_SPEC, u8, WEN_A, 2, O>;
|
||||
impl<'a, const O: u8> WEN_W<'a, O> {
|
||||
#[doc = "Read only access"]
|
||||
#[inline(always)]
|
||||
pub fn ren(self) -> &'a mut W {
|
||||
self.variant(WEN_A::REN)
|
||||
}
|
||||
#[doc = "Write enabled"]
|
||||
#[inline(always)]
|
||||
pub fn wen(self) -> &'a mut W {
|
||||
self.variant(WEN_A::WEN)
|
||||
}
|
||||
#[doc = "Erase enabled"]
|
||||
#[inline(always)]
|
||||
pub fn een(self) -> &'a mut W {
|
||||
self.variant(WEN_A::EEN)
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:1 - Program memory access mode. It is strongly recommended to only activate erase and write modes when they are actively used."]
|
||||
#[inline(always)]
|
||||
pub fn wen(&self) -> WEN_R {
|
||||
WEN_R::new((self.bits & 3) as u8)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:1 - Program memory access mode. It is strongly recommended to only activate erase and write modes when they are actively used."]
|
||||
#[inline(always)]
|
||||
pub fn wen(&mut self) -> WEN_W<0> {
|
||||
WEN_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 = "Configuration 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 [config](index.html) module"]
|
||||
pub struct CONFIG_SPEC;
|
||||
impl crate::RegisterSpec for CONFIG_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [config::R](R) reader structure"]
|
||||
impl crate::Readable for CONFIG_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [config::W](W) writer structure"]
|
||||
impl crate::Writable for CONFIG_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets CONFIG to value 0"]
|
||||
impl crate::Resettable for CONFIG_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
+78
@@ -0,0 +1,78 @@
|
||||
#[doc = "Register `ERASEALL` writer"]
|
||||
pub struct W(crate::W<ERASEALL_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<ERASEALL_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<ERASEALL_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<ERASEALL_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Erase all non-volatile memory including UICR registers. The erase must be enabled using CONFIG.WEN before the non-volatile memory can be erased.\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum ERASEALL_AW {
|
||||
#[doc = "0: No operation"]
|
||||
NO_OPERATION = 0,
|
||||
#[doc = "1: Start chip erase"]
|
||||
ERASE = 1,
|
||||
}
|
||||
impl From<ERASEALL_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: ERASEALL_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ERASEALL` writer - Erase all non-volatile memory including UICR registers. The erase must be enabled using CONFIG.WEN before the non-volatile memory can be erased."]
|
||||
pub type ERASEALL_W<'a, const O: u8> = crate::BitWriter<'a, u32, ERASEALL_SPEC, ERASEALL_AW, O>;
|
||||
impl<'a, const O: u8> ERASEALL_W<'a, O> {
|
||||
#[doc = "No operation"]
|
||||
#[inline(always)]
|
||||
pub fn no_operation(self) -> &'a mut W {
|
||||
self.variant(ERASEALL_AW::NO_OPERATION)
|
||||
}
|
||||
#[doc = "Start chip erase"]
|
||||
#[inline(always)]
|
||||
pub fn erase(self) -> &'a mut W {
|
||||
self.variant(ERASEALL_AW::ERASE)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Erase all non-volatile memory including UICR registers. The erase must be enabled using CONFIG.WEN before the non-volatile memory can be erased."]
|
||||
#[inline(always)]
|
||||
pub fn eraseall(&mut self) -> ERASEALL_W<0> {
|
||||
ERASEALL_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 = "Register for erasing all non-volatile user memory\n\nThis register you can [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [eraseall](index.html) module"]
|
||||
pub struct ERASEALL_SPEC;
|
||||
impl crate::RegisterSpec for ERASEALL_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [eraseall::W](W) writer structure"]
|
||||
impl crate::Writable for ERASEALL_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets ERASEALL to value 0"]
|
||||
impl crate::Resettable for ERASEALL_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
#[doc = "Register `ERASEPAGE` writer"]
|
||||
pub struct W(crate::W<ERASEPAGE_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<ERASEPAGE_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<ERASEPAGE_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<ERASEPAGE_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ERASEPAGE` writer - Register for starting erase of a page in code area"]
|
||||
pub type ERASEPAGE_W<'a, const O: u8> =
|
||||
crate::FieldWriter<'a, u32, ERASEPAGE_SPEC, u32, u32, 32, O>;
|
||||
impl W {
|
||||
#[doc = "Bits 0:31 - Register for starting erase of a page in code area"]
|
||||
#[inline(always)]
|
||||
pub fn erasepage(&mut self) -> ERASEPAGE_W<0> {
|
||||
ERASEPAGE_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 = "Register for erasing a page in code area\n\nThis register you can [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [erasepage](index.html) module"]
|
||||
pub struct ERASEPAGE_SPEC;
|
||||
impl crate::RegisterSpec for ERASEPAGE_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [erasepage::W](W) writer structure"]
|
||||
impl crate::Writable for ERASEPAGE_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets ERASEPAGE to value 0"]
|
||||
impl crate::Resettable for ERASEPAGE_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
#[doc = "Register `ERASEPAGEPARTIAL` writer"]
|
||||
pub struct W(crate::W<ERASEPAGEPARTIAL_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<ERASEPAGEPARTIAL_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<ERASEPAGEPARTIAL_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<ERASEPAGEPARTIAL_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ERASEPAGEPARTIAL` writer - Register for starting partial erase of a page in code area"]
|
||||
pub type ERASEPAGEPARTIAL_W<'a, const O: u8> =
|
||||
crate::FieldWriter<'a, u32, ERASEPAGEPARTIAL_SPEC, u32, u32, 32, O>;
|
||||
impl W {
|
||||
#[doc = "Bits 0:31 - Register for starting partial erase of a page in code area"]
|
||||
#[inline(always)]
|
||||
pub fn erasepagepartial(&mut self) -> ERASEPAGEPARTIAL_W<0> {
|
||||
ERASEPAGEPARTIAL_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 = "Register for partial erase of a page in code area\n\nThis register you can [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [erasepagepartial](index.html) module"]
|
||||
pub struct ERASEPAGEPARTIAL_SPEC;
|
||||
impl crate::RegisterSpec for ERASEPAGEPARTIAL_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [erasepagepartial::W](W) writer structure"]
|
||||
impl crate::Writable for ERASEPAGEPARTIAL_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets ERASEPAGEPARTIAL to value 0"]
|
||||
impl crate::Resettable for ERASEPAGEPARTIAL_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
#[doc = "Register `ERASEPAGEPARTIALCFG` reader"]
|
||||
pub struct R(crate::R<ERASEPAGEPARTIALCFG_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<ERASEPAGEPARTIALCFG_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<ERASEPAGEPARTIALCFG_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<ERASEPAGEPARTIALCFG_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `ERASEPAGEPARTIALCFG` writer"]
|
||||
pub struct W(crate::W<ERASEPAGEPARTIALCFG_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<ERASEPAGEPARTIALCFG_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<ERASEPAGEPARTIALCFG_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<ERASEPAGEPARTIALCFG_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DURATION` reader - Duration of the partial erase in milliseconds"]
|
||||
pub type DURATION_R = crate::FieldReader<u8, u8>;
|
||||
#[doc = "Field `DURATION` writer - Duration of the partial erase in milliseconds"]
|
||||
pub type DURATION_W<'a, const O: u8> =
|
||||
crate::FieldWriter<'a, u32, ERASEPAGEPARTIALCFG_SPEC, u8, u8, 7, O>;
|
||||
impl R {
|
||||
#[doc = "Bits 0:6 - Duration of the partial erase in milliseconds"]
|
||||
#[inline(always)]
|
||||
pub fn duration(&self) -> DURATION_R {
|
||||
DURATION_R::new((self.bits & 0x7f) as u8)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:6 - Duration of the partial erase in milliseconds"]
|
||||
#[inline(always)]
|
||||
pub fn duration(&mut self) -> DURATION_W<0> {
|
||||
DURATION_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 = "Register for partial erase 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 [erasepagepartialcfg](index.html) module"]
|
||||
pub struct ERASEPAGEPARTIALCFG_SPEC;
|
||||
impl crate::RegisterSpec for ERASEPAGEPARTIALCFG_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [erasepagepartialcfg::R](R) reader structure"]
|
||||
impl crate::Readable for ERASEPAGEPARTIALCFG_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [erasepagepartialcfg::W](W) writer structure"]
|
||||
impl crate::Writable for ERASEPAGEPARTIALCFG_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets ERASEPAGEPARTIALCFG to value 0x0a"]
|
||||
impl crate::Resettable for ERASEPAGEPARTIALCFG_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0x0a
|
||||
}
|
||||
}
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
#[doc = "Register `ERASEPCR0` writer"]
|
||||
pub struct W(crate::W<ERASEPCR0_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<ERASEPCR0_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<ERASEPCR0_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<ERASEPCR0_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ERASEPCR0` writer - Register for starting erase of a page in code area, equivalent to ERASEPAGE"]
|
||||
pub type ERASEPCR0_W<'a, const O: u8> =
|
||||
crate::FieldWriter<'a, u32, ERASEPCR0_SPEC, u32, u32, 32, O>;
|
||||
impl W {
|
||||
#[doc = "Bits 0:31 - Register for starting erase of a page in code area, equivalent to ERASEPAGE"]
|
||||
#[inline(always)]
|
||||
pub fn erasepcr0(&mut self) -> ERASEPCR0_W<0> {
|
||||
ERASEPCR0_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 = "Deprecated register - Register for erasing a page in code area, equivalent to ERASEPAGE\n\nThis register you can [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [erasepcr0](index.html) module"]
|
||||
pub struct ERASEPCR0_SPEC;
|
||||
impl crate::RegisterSpec for ERASEPCR0_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [erasepcr0::W](W) writer structure"]
|
||||
impl crate::Writable for ERASEPCR0_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets ERASEPCR0 to value 0"]
|
||||
impl crate::Resettable for ERASEPCR0_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
#[doc = "Register `ERASEPCR1` writer"]
|
||||
pub struct W(crate::W<ERASEPCR1_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<ERASEPCR1_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<ERASEPCR1_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<ERASEPCR1_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ERASEPCR1` writer - Register for erasing a page in code area, equivalent to ERASEPAGE"]
|
||||
pub type ERASEPCR1_W<'a, const O: u8> =
|
||||
crate::FieldWriter<'a, u32, ERASEPCR1_SPEC, u32, u32, 32, O>;
|
||||
impl W {
|
||||
#[doc = "Bits 0:31 - Register for erasing a page in code area, equivalent to ERASEPAGE"]
|
||||
#[inline(always)]
|
||||
pub fn erasepcr1(&mut self) -> ERASEPCR1_W<0> {
|
||||
ERASEPCR1_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 = "Deprecated register - Register for erasing a page in code area, equivalent to ERASEPAGE\n\nThis register you can [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [erasepcr1](index.html) module"]
|
||||
pub struct ERASEPCR1_SPEC;
|
||||
impl crate::RegisterSpec for ERASEPCR1_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [erasepcr1::W](W) writer structure"]
|
||||
impl crate::Writable for ERASEPCR1_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets ERASEPCR1 to value 0"]
|
||||
impl crate::Resettable for ERASEPCR1_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
+78
@@ -0,0 +1,78 @@
|
||||
#[doc = "Register `ERASEUICR` writer"]
|
||||
pub struct W(crate::W<ERASEUICR_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<ERASEUICR_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<ERASEUICR_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<ERASEUICR_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Register starting erase of all user information configuration registers. The erase must be enabled using CONFIG.WEN before the UICR can be erased.\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum ERASEUICR_AW {
|
||||
#[doc = "0: No operation"]
|
||||
NO_OPERATION = 0,
|
||||
#[doc = "1: Start erase of UICR"]
|
||||
ERASE = 1,
|
||||
}
|
||||
impl From<ERASEUICR_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: ERASEUICR_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `ERASEUICR` writer - Register starting erase of all user information configuration registers. The erase must be enabled using CONFIG.WEN before the UICR can be erased."]
|
||||
pub type ERASEUICR_W<'a, const O: u8> = crate::BitWriter<'a, u32, ERASEUICR_SPEC, ERASEUICR_AW, O>;
|
||||
impl<'a, const O: u8> ERASEUICR_W<'a, O> {
|
||||
#[doc = "No operation"]
|
||||
#[inline(always)]
|
||||
pub fn no_operation(self) -> &'a mut W {
|
||||
self.variant(ERASEUICR_AW::NO_OPERATION)
|
||||
}
|
||||
#[doc = "Start erase of UICR"]
|
||||
#[inline(always)]
|
||||
pub fn erase(self) -> &'a mut W {
|
||||
self.variant(ERASEUICR_AW::ERASE)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Register starting erase of all user information configuration registers. The erase must be enabled using CONFIG.WEN before the UICR can be erased."]
|
||||
#[inline(always)]
|
||||
pub fn eraseuicr(&mut self) -> ERASEUICR_W<0> {
|
||||
ERASEUICR_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 = "Register for erasing user information configuration registers\n\nThis register you can [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [eraseuicr](index.html) module"]
|
||||
pub struct ERASEUICR_SPEC;
|
||||
impl crate::RegisterSpec for ERASEUICR_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [eraseuicr::W](W) writer structure"]
|
||||
impl crate::Writable for ERASEUICR_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets ERASEUICR to value 0"]
|
||||
impl crate::Resettable for ERASEUICR_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
+74
@@ -0,0 +1,74 @@
|
||||
#[doc = "Register `READY` reader"]
|
||||
pub struct R(crate::R<READY_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<READY_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<READY_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<READY_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `READY` reader - NVMC is ready or busy"]
|
||||
pub type READY_R = crate::BitReader<READY_A>;
|
||||
#[doc = "NVMC is ready or busy\n\nValue on reset: 1"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum READY_A {
|
||||
#[doc = "0: NVMC is busy (on-going write or erase operation)"]
|
||||
BUSY = 0,
|
||||
#[doc = "1: NVMC is ready"]
|
||||
READY = 1,
|
||||
}
|
||||
impl From<READY_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: READY_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl READY_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> READY_A {
|
||||
match self.bits {
|
||||
false => READY_A::BUSY,
|
||||
true => READY_A::READY,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `BUSY`"]
|
||||
#[inline(always)]
|
||||
pub fn is_busy(&self) -> bool {
|
||||
*self == READY_A::BUSY
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `READY`"]
|
||||
#[inline(always)]
|
||||
pub fn is_ready(&self) -> bool {
|
||||
*self == READY_A::READY
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - NVMC is ready or busy"]
|
||||
#[inline(always)]
|
||||
pub fn ready(&self) -> READY_R {
|
||||
READY_R::new((self.bits & 1) != 0)
|
||||
}
|
||||
}
|
||||
#[doc = "Ready flag\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 [ready](index.html) module"]
|
||||
pub struct READY_SPEC;
|
||||
impl crate::RegisterSpec for READY_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [ready::R](R) reader structure"]
|
||||
impl crate::Readable for READY_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`reset()` method sets READY to value 0x01"]
|
||||
impl crate::Resettable for READY_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0x01
|
||||
}
|
||||
}
|
||||
+74
@@ -0,0 +1,74 @@
|
||||
#[doc = "Register `READYNEXT` reader"]
|
||||
pub struct R(crate::R<READYNEXT_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<READYNEXT_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<READYNEXT_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<READYNEXT_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `READYNEXT` reader - NVMC can accept a new write operation"]
|
||||
pub type READYNEXT_R = crate::BitReader<READYNEXT_A>;
|
||||
#[doc = "NVMC can accept a new write operation\n\nValue on reset: 1"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum READYNEXT_A {
|
||||
#[doc = "0: NVMC cannot accept any write operation"]
|
||||
BUSY = 0,
|
||||
#[doc = "1: NVMC is ready"]
|
||||
READY = 1,
|
||||
}
|
||||
impl From<READYNEXT_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: READYNEXT_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl READYNEXT_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> READYNEXT_A {
|
||||
match self.bits {
|
||||
false => READYNEXT_A::BUSY,
|
||||
true => READYNEXT_A::READY,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `BUSY`"]
|
||||
#[inline(always)]
|
||||
pub fn is_busy(&self) -> bool {
|
||||
*self == READYNEXT_A::BUSY
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `READY`"]
|
||||
#[inline(always)]
|
||||
pub fn is_ready(&self) -> bool {
|
||||
*self == READYNEXT_A::READY
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - NVMC can accept a new write operation"]
|
||||
#[inline(always)]
|
||||
pub fn readynext(&self) -> READYNEXT_R {
|
||||
READYNEXT_R::new((self.bits & 1) != 0)
|
||||
}
|
||||
}
|
||||
#[doc = "Ready flag\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 [readynext](index.html) module"]
|
||||
pub struct READYNEXT_SPEC;
|
||||
impl crate::RegisterSpec for READYNEXT_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [readynext::R](R) reader structure"]
|
||||
impl crate::Readable for READYNEXT_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`reset()` method sets READYNEXT to value 0x01"]
|
||||
impl crate::Resettable for READYNEXT_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0x01
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user