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

+127
View File
@@ -0,0 +1,127 @@
#[doc = "Register `EVENTS_POFWARN` reader"]
pub struct R(crate::R<EVENTS_POFWARN_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_POFWARN_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_POFWARN_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_POFWARN_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_POFWARN` writer"]
pub struct W(crate::W<EVENTS_POFWARN_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_POFWARN_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<EVENTS_POFWARN_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_POFWARN_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `EVENTS_POFWARN` reader - Power failure warning"]
pub type EVENTS_POFWARN_R = crate::BitReader<EVENTS_POFWARN_A>;
#[doc = "Power failure warning\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EVENTS_POFWARN_A {
#[doc = "0: Event not generated"]
NOT_GENERATED = 0,
#[doc = "1: Event generated"]
GENERATED = 1,
}
impl From<EVENTS_POFWARN_A> for bool {
#[inline(always)]
fn from(variant: EVENTS_POFWARN_A) -> Self {
variant as u8 != 0
}
}
impl EVENTS_POFWARN_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EVENTS_POFWARN_A {
match self.bits {
false => EVENTS_POFWARN_A::NOT_GENERATED,
true => EVENTS_POFWARN_A::GENERATED,
}
}
#[doc = "Checks if the value of the field is `NOT_GENERATED`"]
#[inline(always)]
pub fn is_not_generated(&self) -> bool {
*self == EVENTS_POFWARN_A::NOT_GENERATED
}
#[doc = "Checks if the value of the field is `GENERATED`"]
#[inline(always)]
pub fn is_generated(&self) -> bool {
*self == EVENTS_POFWARN_A::GENERATED
}
}
#[doc = "Field `EVENTS_POFWARN` writer - Power failure warning"]
pub type EVENTS_POFWARN_W<'a, const O: u8> =
crate::BitWriter<'a, u32, EVENTS_POFWARN_SPEC, EVENTS_POFWARN_A, O>;
impl<'a, const O: u8> EVENTS_POFWARN_W<'a, O> {
#[doc = "Event not generated"]
#[inline(always)]
pub fn not_generated(self) -> &'a mut W {
self.variant(EVENTS_POFWARN_A::NOT_GENERATED)
}
#[doc = "Event generated"]
#[inline(always)]
pub fn generated(self) -> &'a mut W {
self.variant(EVENTS_POFWARN_A::GENERATED)
}
}
impl R {
#[doc = "Bit 0 - Power failure warning"]
#[inline(always)]
pub fn events_pofwarn(&self) -> EVENTS_POFWARN_R {
EVENTS_POFWARN_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Power failure warning"]
#[inline(always)]
pub fn events_pofwarn(&mut self) -> EVENTS_POFWARN_W<0> {
EVENTS_POFWARN_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 = "Power failure warning\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 [events_pofwarn](index.html) module"]
pub struct EVENTS_POFWARN_SPEC;
impl crate::RegisterSpec for EVENTS_POFWARN_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_pofwarn::R](R) reader structure"]
impl crate::Readable for EVENTS_POFWARN_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_pofwarn::W](W) writer structure"]
impl crate::Writable for EVENTS_POFWARN_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_POFWARN to value 0"]
impl crate::Resettable for EVENTS_POFWARN_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+127
View File
@@ -0,0 +1,127 @@
#[doc = "Register `EVENTS_SLEEPENTER` reader"]
pub struct R(crate::R<EVENTS_SLEEPENTER_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_SLEEPENTER_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_SLEEPENTER_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_SLEEPENTER_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_SLEEPENTER` writer"]
pub struct W(crate::W<EVENTS_SLEEPENTER_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_SLEEPENTER_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<EVENTS_SLEEPENTER_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_SLEEPENTER_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `EVENTS_SLEEPENTER` reader - CPU entered WFI/WFE sleep"]
pub type EVENTS_SLEEPENTER_R = crate::BitReader<EVENTS_SLEEPENTER_A>;
#[doc = "CPU entered WFI/WFE sleep\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EVENTS_SLEEPENTER_A {
#[doc = "0: Event not generated"]
NOT_GENERATED = 0,
#[doc = "1: Event generated"]
GENERATED = 1,
}
impl From<EVENTS_SLEEPENTER_A> for bool {
#[inline(always)]
fn from(variant: EVENTS_SLEEPENTER_A) -> Self {
variant as u8 != 0
}
}
impl EVENTS_SLEEPENTER_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EVENTS_SLEEPENTER_A {
match self.bits {
false => EVENTS_SLEEPENTER_A::NOT_GENERATED,
true => EVENTS_SLEEPENTER_A::GENERATED,
}
}
#[doc = "Checks if the value of the field is `NOT_GENERATED`"]
#[inline(always)]
pub fn is_not_generated(&self) -> bool {
*self == EVENTS_SLEEPENTER_A::NOT_GENERATED
}
#[doc = "Checks if the value of the field is `GENERATED`"]
#[inline(always)]
pub fn is_generated(&self) -> bool {
*self == EVENTS_SLEEPENTER_A::GENERATED
}
}
#[doc = "Field `EVENTS_SLEEPENTER` writer - CPU entered WFI/WFE sleep"]
pub type EVENTS_SLEEPENTER_W<'a, const O: u8> =
crate::BitWriter<'a, u32, EVENTS_SLEEPENTER_SPEC, EVENTS_SLEEPENTER_A, O>;
impl<'a, const O: u8> EVENTS_SLEEPENTER_W<'a, O> {
#[doc = "Event not generated"]
#[inline(always)]
pub fn not_generated(self) -> &'a mut W {
self.variant(EVENTS_SLEEPENTER_A::NOT_GENERATED)
}
#[doc = "Event generated"]
#[inline(always)]
pub fn generated(self) -> &'a mut W {
self.variant(EVENTS_SLEEPENTER_A::GENERATED)
}
}
impl R {
#[doc = "Bit 0 - CPU entered WFI/WFE sleep"]
#[inline(always)]
pub fn events_sleepenter(&self) -> EVENTS_SLEEPENTER_R {
EVENTS_SLEEPENTER_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - CPU entered WFI/WFE sleep"]
#[inline(always)]
pub fn events_sleepenter(&mut self) -> EVENTS_SLEEPENTER_W<0> {
EVENTS_SLEEPENTER_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 = "CPU entered WFI/WFE sleep\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 [events_sleepenter](index.html) module"]
pub struct EVENTS_SLEEPENTER_SPEC;
impl crate::RegisterSpec for EVENTS_SLEEPENTER_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_sleepenter::R](R) reader structure"]
impl crate::Readable for EVENTS_SLEEPENTER_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_sleepenter::W](W) writer structure"]
impl crate::Writable for EVENTS_SLEEPENTER_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_SLEEPENTER to value 0"]
impl crate::Resettable for EVENTS_SLEEPENTER_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+127
View File
@@ -0,0 +1,127 @@
#[doc = "Register `EVENTS_SLEEPEXIT` reader"]
pub struct R(crate::R<EVENTS_SLEEPEXIT_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_SLEEPEXIT_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_SLEEPEXIT_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_SLEEPEXIT_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_SLEEPEXIT` writer"]
pub struct W(crate::W<EVENTS_SLEEPEXIT_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_SLEEPEXIT_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<EVENTS_SLEEPEXIT_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_SLEEPEXIT_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `EVENTS_SLEEPEXIT` reader - CPU exited WFI/WFE sleep"]
pub type EVENTS_SLEEPEXIT_R = crate::BitReader<EVENTS_SLEEPEXIT_A>;
#[doc = "CPU exited WFI/WFE sleep\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EVENTS_SLEEPEXIT_A {
#[doc = "0: Event not generated"]
NOT_GENERATED = 0,
#[doc = "1: Event generated"]
GENERATED = 1,
}
impl From<EVENTS_SLEEPEXIT_A> for bool {
#[inline(always)]
fn from(variant: EVENTS_SLEEPEXIT_A) -> Self {
variant as u8 != 0
}
}
impl EVENTS_SLEEPEXIT_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EVENTS_SLEEPEXIT_A {
match self.bits {
false => EVENTS_SLEEPEXIT_A::NOT_GENERATED,
true => EVENTS_SLEEPEXIT_A::GENERATED,
}
}
#[doc = "Checks if the value of the field is `NOT_GENERATED`"]
#[inline(always)]
pub fn is_not_generated(&self) -> bool {
*self == EVENTS_SLEEPEXIT_A::NOT_GENERATED
}
#[doc = "Checks if the value of the field is `GENERATED`"]
#[inline(always)]
pub fn is_generated(&self) -> bool {
*self == EVENTS_SLEEPEXIT_A::GENERATED
}
}
#[doc = "Field `EVENTS_SLEEPEXIT` writer - CPU exited WFI/WFE sleep"]
pub type EVENTS_SLEEPEXIT_W<'a, const O: u8> =
crate::BitWriter<'a, u32, EVENTS_SLEEPEXIT_SPEC, EVENTS_SLEEPEXIT_A, O>;
impl<'a, const O: u8> EVENTS_SLEEPEXIT_W<'a, O> {
#[doc = "Event not generated"]
#[inline(always)]
pub fn not_generated(self) -> &'a mut W {
self.variant(EVENTS_SLEEPEXIT_A::NOT_GENERATED)
}
#[doc = "Event generated"]
#[inline(always)]
pub fn generated(self) -> &'a mut W {
self.variant(EVENTS_SLEEPEXIT_A::GENERATED)
}
}
impl R {
#[doc = "Bit 0 - CPU exited WFI/WFE sleep"]
#[inline(always)]
pub fn events_sleepexit(&self) -> EVENTS_SLEEPEXIT_R {
EVENTS_SLEEPEXIT_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - CPU exited WFI/WFE sleep"]
#[inline(always)]
pub fn events_sleepexit(&mut self) -> EVENTS_SLEEPEXIT_W<0> {
EVENTS_SLEEPEXIT_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 = "CPU exited WFI/WFE sleep\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 [events_sleepexit](index.html) module"]
pub struct EVENTS_SLEEPEXIT_SPEC;
impl crate::RegisterSpec for EVENTS_SLEEPEXIT_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_sleepexit::R](R) reader structure"]
impl crate::Readable for EVENTS_SLEEPEXIT_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_sleepexit::W](W) writer structure"]
impl crate::Writable for EVENTS_SLEEPEXIT_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_SLEEPEXIT to value 0"]
impl crate::Resettable for EVENTS_SLEEPEXIT_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+81
View File
@@ -0,0 +1,81 @@
#[doc = "Register `GPREGRET[%s]` reader"]
pub struct R(crate::R<GPREGRET_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<GPREGRET_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<GPREGRET_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<GPREGRET_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `GPREGRET[%s]` writer"]
pub struct W(crate::W<GPREGRET_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<GPREGRET_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<GPREGRET_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<GPREGRET_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `GPREGRET` reader - General purpose retention register"]
pub type GPREGRET_R = crate::FieldReader<u8, u8>;
#[doc = "Field `GPREGRET` writer - General purpose retention register"]
pub type GPREGRET_W<'a, const O: u8> = crate::FieldWriter<'a, u32, GPREGRET_SPEC, u8, u8, 8, O>;
impl R {
#[doc = "Bits 0:7 - General purpose retention register"]
#[inline(always)]
pub fn gpregret(&self) -> GPREGRET_R {
GPREGRET_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 0:7 - General purpose retention register"]
#[inline(always)]
pub fn gpregret(&mut self) -> GPREGRET_W<0> {
GPREGRET_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: General purpose retention 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 [gpregret](index.html) module"]
pub struct GPREGRET_SPEC;
impl crate::RegisterSpec for GPREGRET_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [gpregret::R](R) reader structure"]
impl crate::Readable for GPREGRET_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [gpregret::W](W) writer structure"]
impl crate::Writable for GPREGRET_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets GPREGRET[%s]
to value 0"]
impl crate::Resettable for GPREGRET_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+246
View File
@@ -0,0 +1,246 @@
#[doc = "Register `INTEN` reader"]
pub struct R(crate::R<INTEN_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<INTEN_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<INTEN_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<INTEN_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `INTEN` writer"]
pub struct W(crate::W<INTEN_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<INTEN_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<INTEN_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<INTEN_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `POFWARN` reader - Enable or disable interrupt for event POFWARN"]
pub type POFWARN_R = crate::BitReader<POFWARN_A>;
#[doc = "Enable or disable interrupt for event POFWARN\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum POFWARN_A {
#[doc = "0: Disable"]
DISABLED = 0,
#[doc = "1: Enable"]
ENABLED = 1,
}
impl From<POFWARN_A> for bool {
#[inline(always)]
fn from(variant: POFWARN_A) -> Self {
variant as u8 != 0
}
}
impl POFWARN_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> POFWARN_A {
match self.bits {
false => POFWARN_A::DISABLED,
true => POFWARN_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == POFWARN_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == POFWARN_A::ENABLED
}
}
#[doc = "Field `POFWARN` writer - Enable or disable interrupt for event POFWARN"]
pub type POFWARN_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, POFWARN_A, O>;
impl<'a, const O: u8> POFWARN_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(POFWARN_A::DISABLED)
}
#[doc = "Enable"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(POFWARN_A::ENABLED)
}
}
#[doc = "Field `SLEEPENTER` reader - Enable or disable interrupt for event SLEEPENTER"]
pub type SLEEPENTER_R = crate::BitReader<SLEEPENTER_A>;
#[doc = "Enable or disable interrupt for event SLEEPENTER\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SLEEPENTER_A {
#[doc = "0: Disable"]
DISABLED = 0,
#[doc = "1: Enable"]
ENABLED = 1,
}
impl From<SLEEPENTER_A> for bool {
#[inline(always)]
fn from(variant: SLEEPENTER_A) -> Self {
variant as u8 != 0
}
}
impl SLEEPENTER_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> SLEEPENTER_A {
match self.bits {
false => SLEEPENTER_A::DISABLED,
true => SLEEPENTER_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == SLEEPENTER_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == SLEEPENTER_A::ENABLED
}
}
#[doc = "Field `SLEEPENTER` writer - Enable or disable interrupt for event SLEEPENTER"]
pub type SLEEPENTER_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, SLEEPENTER_A, O>;
impl<'a, const O: u8> SLEEPENTER_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(SLEEPENTER_A::DISABLED)
}
#[doc = "Enable"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(SLEEPENTER_A::ENABLED)
}
}
#[doc = "Field `SLEEPEXIT` reader - Enable or disable interrupt for event SLEEPEXIT"]
pub type SLEEPEXIT_R = crate::BitReader<SLEEPEXIT_A>;
#[doc = "Enable or disable interrupt for event SLEEPEXIT\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SLEEPEXIT_A {
#[doc = "0: Disable"]
DISABLED = 0,
#[doc = "1: Enable"]
ENABLED = 1,
}
impl From<SLEEPEXIT_A> for bool {
#[inline(always)]
fn from(variant: SLEEPEXIT_A) -> Self {
variant as u8 != 0
}
}
impl SLEEPEXIT_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> SLEEPEXIT_A {
match self.bits {
false => SLEEPEXIT_A::DISABLED,
true => SLEEPEXIT_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == SLEEPEXIT_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == SLEEPEXIT_A::ENABLED
}
}
#[doc = "Field `SLEEPEXIT` writer - Enable or disable interrupt for event SLEEPEXIT"]
pub type SLEEPEXIT_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, SLEEPEXIT_A, O>;
impl<'a, const O: u8> SLEEPEXIT_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(SLEEPEXIT_A::DISABLED)
}
#[doc = "Enable"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(SLEEPEXIT_A::ENABLED)
}
}
impl R {
#[doc = "Bit 2 - Enable or disable interrupt for event POFWARN"]
#[inline(always)]
pub fn pofwarn(&self) -> POFWARN_R {
POFWARN_R::new(((self.bits >> 2) & 1) != 0)
}
#[doc = "Bit 5 - Enable or disable interrupt for event SLEEPENTER"]
#[inline(always)]
pub fn sleepenter(&self) -> SLEEPENTER_R {
SLEEPENTER_R::new(((self.bits >> 5) & 1) != 0)
}
#[doc = "Bit 6 - Enable or disable interrupt for event SLEEPEXIT"]
#[inline(always)]
pub fn sleepexit(&self) -> SLEEPEXIT_R {
SLEEPEXIT_R::new(((self.bits >> 6) & 1) != 0)
}
}
impl W {
#[doc = "Bit 2 - Enable or disable interrupt for event POFWARN"]
#[inline(always)]
pub fn pofwarn(&mut self) -> POFWARN_W<2> {
POFWARN_W::new(self)
}
#[doc = "Bit 5 - Enable or disable interrupt for event SLEEPENTER"]
#[inline(always)]
pub fn sleepenter(&mut self) -> SLEEPENTER_W<5> {
SLEEPENTER_W::new(self)
}
#[doc = "Bit 6 - Enable or disable interrupt for event SLEEPEXIT"]
#[inline(always)]
pub fn sleepexit(&mut self) -> SLEEPEXIT_W<6> {
SLEEPEXIT_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 = "Enable or disable interrupt\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 [inten](index.html) module"]
pub struct INTEN_SPEC;
impl crate::RegisterSpec for INTEN_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [inten::R](R) reader structure"]
impl crate::Readable for INTEN_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [inten::W](W) writer structure"]
impl crate::Writable for INTEN_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets INTEN to value 0"]
impl crate::Resettable for INTEN_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+267
View File
@@ -0,0 +1,267 @@
#[doc = "Register `INTENCLR` reader"]
pub struct R(crate::R<INTENCLR_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<INTENCLR_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<INTENCLR_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<INTENCLR_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `INTENCLR` writer"]
pub struct W(crate::W<INTENCLR_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<INTENCLR_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<INTENCLR_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<INTENCLR_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `POFWARN` reader - Write '1' to disable interrupt for event POFWARN"]
pub type POFWARN_R = crate::BitReader<POFWARN_A>;
#[doc = "Write '1' to disable interrupt for event POFWARN\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum POFWARN_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<POFWARN_A> for bool {
#[inline(always)]
fn from(variant: POFWARN_A) -> Self {
variant as u8 != 0
}
}
impl POFWARN_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> POFWARN_A {
match self.bits {
false => POFWARN_A::DISABLED,
true => POFWARN_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == POFWARN_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == POFWARN_A::ENABLED
}
}
#[doc = "Write '1' to disable interrupt for event POFWARN\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum POFWARN_AW {
#[doc = "1: Disable"]
CLEAR = 1,
}
impl From<POFWARN_AW> for bool {
#[inline(always)]
fn from(variant: POFWARN_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `POFWARN` writer - Write '1' to disable interrupt for event POFWARN"]
pub type POFWARN_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, POFWARN_AW, O>;
impl<'a, const O: u8> POFWARN_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(POFWARN_AW::CLEAR)
}
}
#[doc = "Field `SLEEPENTER` reader - Write '1' to disable interrupt for event SLEEPENTER"]
pub type SLEEPENTER_R = crate::BitReader<SLEEPENTER_A>;
#[doc = "Write '1' to disable interrupt for event SLEEPENTER\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SLEEPENTER_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<SLEEPENTER_A> for bool {
#[inline(always)]
fn from(variant: SLEEPENTER_A) -> Self {
variant as u8 != 0
}
}
impl SLEEPENTER_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> SLEEPENTER_A {
match self.bits {
false => SLEEPENTER_A::DISABLED,
true => SLEEPENTER_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == SLEEPENTER_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == SLEEPENTER_A::ENABLED
}
}
#[doc = "Write '1' to disable interrupt for event SLEEPENTER\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SLEEPENTER_AW {
#[doc = "1: Disable"]
CLEAR = 1,
}
impl From<SLEEPENTER_AW> for bool {
#[inline(always)]
fn from(variant: SLEEPENTER_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `SLEEPENTER` writer - Write '1' to disable interrupt for event SLEEPENTER"]
pub type SLEEPENTER_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, SLEEPENTER_AW, O>;
impl<'a, const O: u8> SLEEPENTER_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(SLEEPENTER_AW::CLEAR)
}
}
#[doc = "Field `SLEEPEXIT` reader - Write '1' to disable interrupt for event SLEEPEXIT"]
pub type SLEEPEXIT_R = crate::BitReader<SLEEPEXIT_A>;
#[doc = "Write '1' to disable interrupt for event SLEEPEXIT\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SLEEPEXIT_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<SLEEPEXIT_A> for bool {
#[inline(always)]
fn from(variant: SLEEPEXIT_A) -> Self {
variant as u8 != 0
}
}
impl SLEEPEXIT_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> SLEEPEXIT_A {
match self.bits {
false => SLEEPEXIT_A::DISABLED,
true => SLEEPEXIT_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == SLEEPEXIT_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == SLEEPEXIT_A::ENABLED
}
}
#[doc = "Write '1' to disable interrupt for event SLEEPEXIT\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SLEEPEXIT_AW {
#[doc = "1: Disable"]
CLEAR = 1,
}
impl From<SLEEPEXIT_AW> for bool {
#[inline(always)]
fn from(variant: SLEEPEXIT_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `SLEEPEXIT` writer - Write '1' to disable interrupt for event SLEEPEXIT"]
pub type SLEEPEXIT_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, SLEEPEXIT_AW, O>;
impl<'a, const O: u8> SLEEPEXIT_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(SLEEPEXIT_AW::CLEAR)
}
}
impl R {
#[doc = "Bit 2 - Write '1' to disable interrupt for event POFWARN"]
#[inline(always)]
pub fn pofwarn(&self) -> POFWARN_R {
POFWARN_R::new(((self.bits >> 2) & 1) != 0)
}
#[doc = "Bit 5 - Write '1' to disable interrupt for event SLEEPENTER"]
#[inline(always)]
pub fn sleepenter(&self) -> SLEEPENTER_R {
SLEEPENTER_R::new(((self.bits >> 5) & 1) != 0)
}
#[doc = "Bit 6 - Write '1' to disable interrupt for event SLEEPEXIT"]
#[inline(always)]
pub fn sleepexit(&self) -> SLEEPEXIT_R {
SLEEPEXIT_R::new(((self.bits >> 6) & 1) != 0)
}
}
impl W {
#[doc = "Bit 2 - Write '1' to disable interrupt for event POFWARN"]
#[inline(always)]
pub fn pofwarn(&mut self) -> POFWARN_W<2> {
POFWARN_W::new(self)
}
#[doc = "Bit 5 - Write '1' to disable interrupt for event SLEEPENTER"]
#[inline(always)]
pub fn sleepenter(&mut self) -> SLEEPENTER_W<5> {
SLEEPENTER_W::new(self)
}
#[doc = "Bit 6 - Write '1' to disable interrupt for event SLEEPEXIT"]
#[inline(always)]
pub fn sleepexit(&mut self) -> SLEEPEXIT_W<6> {
SLEEPEXIT_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 = "Disable interrupt\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 [intenclr](index.html) module"]
pub struct INTENCLR_SPEC;
impl crate::RegisterSpec for INTENCLR_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [intenclr::R](R) reader structure"]
impl crate::Readable for INTENCLR_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"]
impl crate::Writable for INTENCLR_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets INTENCLR to value 0"]
impl crate::Resettable for INTENCLR_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+267
View File
@@ -0,0 +1,267 @@
#[doc = "Register `INTENSET` reader"]
pub struct R(crate::R<INTENSET_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<INTENSET_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<INTENSET_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<INTENSET_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `INTENSET` writer"]
pub struct W(crate::W<INTENSET_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<INTENSET_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<INTENSET_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<INTENSET_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `POFWARN` reader - Write '1' to enable interrupt for event POFWARN"]
pub type POFWARN_R = crate::BitReader<POFWARN_A>;
#[doc = "Write '1' to enable interrupt for event POFWARN\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum POFWARN_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<POFWARN_A> for bool {
#[inline(always)]
fn from(variant: POFWARN_A) -> Self {
variant as u8 != 0
}
}
impl POFWARN_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> POFWARN_A {
match self.bits {
false => POFWARN_A::DISABLED,
true => POFWARN_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == POFWARN_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == POFWARN_A::ENABLED
}
}
#[doc = "Write '1' to enable interrupt for event POFWARN\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum POFWARN_AW {
#[doc = "1: Enable"]
SET = 1,
}
impl From<POFWARN_AW> for bool {
#[inline(always)]
fn from(variant: POFWARN_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `POFWARN` writer - Write '1' to enable interrupt for event POFWARN"]
pub type POFWARN_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, POFWARN_AW, O>;
impl<'a, const O: u8> POFWARN_W<'a, O> {
#[doc = "Enable"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(POFWARN_AW::SET)
}
}
#[doc = "Field `SLEEPENTER` reader - Write '1' to enable interrupt for event SLEEPENTER"]
pub type SLEEPENTER_R = crate::BitReader<SLEEPENTER_A>;
#[doc = "Write '1' to enable interrupt for event SLEEPENTER\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SLEEPENTER_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<SLEEPENTER_A> for bool {
#[inline(always)]
fn from(variant: SLEEPENTER_A) -> Self {
variant as u8 != 0
}
}
impl SLEEPENTER_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> SLEEPENTER_A {
match self.bits {
false => SLEEPENTER_A::DISABLED,
true => SLEEPENTER_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == SLEEPENTER_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == SLEEPENTER_A::ENABLED
}
}
#[doc = "Write '1' to enable interrupt for event SLEEPENTER\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SLEEPENTER_AW {
#[doc = "1: Enable"]
SET = 1,
}
impl From<SLEEPENTER_AW> for bool {
#[inline(always)]
fn from(variant: SLEEPENTER_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `SLEEPENTER` writer - Write '1' to enable interrupt for event SLEEPENTER"]
pub type SLEEPENTER_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, SLEEPENTER_AW, O>;
impl<'a, const O: u8> SLEEPENTER_W<'a, O> {
#[doc = "Enable"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(SLEEPENTER_AW::SET)
}
}
#[doc = "Field `SLEEPEXIT` reader - Write '1' to enable interrupt for event SLEEPEXIT"]
pub type SLEEPEXIT_R = crate::BitReader<SLEEPEXIT_A>;
#[doc = "Write '1' to enable interrupt for event SLEEPEXIT\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SLEEPEXIT_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<SLEEPEXIT_A> for bool {
#[inline(always)]
fn from(variant: SLEEPEXIT_A) -> Self {
variant as u8 != 0
}
}
impl SLEEPEXIT_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> SLEEPEXIT_A {
match self.bits {
false => SLEEPEXIT_A::DISABLED,
true => SLEEPEXIT_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == SLEEPEXIT_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == SLEEPEXIT_A::ENABLED
}
}
#[doc = "Write '1' to enable interrupt for event SLEEPEXIT\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SLEEPEXIT_AW {
#[doc = "1: Enable"]
SET = 1,
}
impl From<SLEEPEXIT_AW> for bool {
#[inline(always)]
fn from(variant: SLEEPEXIT_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `SLEEPEXIT` writer - Write '1' to enable interrupt for event SLEEPEXIT"]
pub type SLEEPEXIT_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, SLEEPEXIT_AW, O>;
impl<'a, const O: u8> SLEEPEXIT_W<'a, O> {
#[doc = "Enable"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(SLEEPEXIT_AW::SET)
}
}
impl R {
#[doc = "Bit 2 - Write '1' to enable interrupt for event POFWARN"]
#[inline(always)]
pub fn pofwarn(&self) -> POFWARN_R {
POFWARN_R::new(((self.bits >> 2) & 1) != 0)
}
#[doc = "Bit 5 - Write '1' to enable interrupt for event SLEEPENTER"]
#[inline(always)]
pub fn sleepenter(&self) -> SLEEPENTER_R {
SLEEPENTER_R::new(((self.bits >> 5) & 1) != 0)
}
#[doc = "Bit 6 - Write '1' to enable interrupt for event SLEEPEXIT"]
#[inline(always)]
pub fn sleepexit(&self) -> SLEEPEXIT_R {
SLEEPEXIT_R::new(((self.bits >> 6) & 1) != 0)
}
}
impl W {
#[doc = "Bit 2 - Write '1' to enable interrupt for event POFWARN"]
#[inline(always)]
pub fn pofwarn(&mut self) -> POFWARN_W<2> {
POFWARN_W::new(self)
}
#[doc = "Bit 5 - Write '1' to enable interrupt for event SLEEPENTER"]
#[inline(always)]
pub fn sleepenter(&mut self) -> SLEEPENTER_W<5> {
SLEEPENTER_W::new(self)
}
#[doc = "Bit 6 - Write '1' to enable interrupt for event SLEEPEXIT"]
#[inline(always)]
pub fn sleepexit(&mut self) -> SLEEPEXIT_W<6> {
SLEEPEXIT_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 = "Enable interrupt\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 [intenset](index.html) module"]
pub struct INTENSET_SPEC;
impl crate::RegisterSpec for INTENSET_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [intenset::R](R) reader structure"]
impl crate::Readable for INTENSET_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"]
impl crate::Writable for INTENSET_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets INTENSET to value 0"]
impl crate::Resettable for INTENSET_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+140
View File
@@ -0,0 +1,140 @@
#[doc = "Register `PUBLISH_POFWARN` reader"]
pub struct R(crate::R<PUBLISH_POFWARN_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<PUBLISH_POFWARN_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<PUBLISH_POFWARN_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<PUBLISH_POFWARN_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `PUBLISH_POFWARN` writer"]
pub struct W(crate::W<PUBLISH_POFWARN_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<PUBLISH_POFWARN_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<PUBLISH_POFWARN_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<PUBLISH_POFWARN_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `CHIDX` reader - DPPI channel that event POFWARN will publish to."]
pub type CHIDX_R = crate::FieldReader<u8, u8>;
#[doc = "Field `CHIDX` writer - DPPI channel that event POFWARN will publish to."]
pub type CHIDX_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PUBLISH_POFWARN_SPEC, u8, u8, 8, O>;
#[doc = "Field `EN` reader - "]
pub type EN_R = crate::BitReader<EN_A>;
#[doc = "\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EN_A {
#[doc = "0: Disable publishing"]
DISABLED = 0,
#[doc = "1: Enable publishing"]
ENABLED = 1,
}
impl From<EN_A> for bool {
#[inline(always)]
fn from(variant: EN_A) -> Self {
variant as u8 != 0
}
}
impl EN_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EN_A {
match self.bits {
false => EN_A::DISABLED,
true => EN_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == EN_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == EN_A::ENABLED
}
}
#[doc = "Field `EN` writer - "]
pub type EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUBLISH_POFWARN_SPEC, EN_A, O>;
impl<'a, const O: u8> EN_W<'a, O> {
#[doc = "Disable publishing"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(EN_A::DISABLED)
}
#[doc = "Enable publishing"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(EN_A::ENABLED)
}
}
impl R {
#[doc = "Bits 0:7 - DPPI channel that event POFWARN will publish to."]
#[inline(always)]
pub fn chidx(&self) -> CHIDX_R {
CHIDX_R::new((self.bits & 0xff) as u8)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&self) -> EN_R {
EN_R::new(((self.bits >> 31) & 1) != 0)
}
}
impl W {
#[doc = "Bits 0:7 - DPPI channel that event POFWARN will publish to."]
#[inline(always)]
pub fn chidx(&mut self) -> CHIDX_W<0> {
CHIDX_W::new(self)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&mut self) -> EN_W<31> {
EN_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 = "Publish configuration for event POFWARN\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 [publish_pofwarn](index.html) module"]
pub struct PUBLISH_POFWARN_SPEC;
impl crate::RegisterSpec for PUBLISH_POFWARN_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [publish_pofwarn::R](R) reader structure"]
impl crate::Readable for PUBLISH_POFWARN_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [publish_pofwarn::W](W) writer structure"]
impl crate::Writable for PUBLISH_POFWARN_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets PUBLISH_POFWARN to value 0"]
impl crate::Resettable for PUBLISH_POFWARN_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
@@ -0,0 +1,141 @@
#[doc = "Register `PUBLISH_SLEEPENTER` reader"]
pub struct R(crate::R<PUBLISH_SLEEPENTER_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<PUBLISH_SLEEPENTER_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<PUBLISH_SLEEPENTER_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<PUBLISH_SLEEPENTER_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `PUBLISH_SLEEPENTER` writer"]
pub struct W(crate::W<PUBLISH_SLEEPENTER_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<PUBLISH_SLEEPENTER_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<PUBLISH_SLEEPENTER_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<PUBLISH_SLEEPENTER_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `CHIDX` reader - DPPI channel that event SLEEPENTER will publish to."]
pub type CHIDX_R = crate::FieldReader<u8, u8>;
#[doc = "Field `CHIDX` writer - DPPI channel that event SLEEPENTER will publish to."]
pub type CHIDX_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, PUBLISH_SLEEPENTER_SPEC, u8, u8, 8, O>;
#[doc = "Field `EN` reader - "]
pub type EN_R = crate::BitReader<EN_A>;
#[doc = "\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EN_A {
#[doc = "0: Disable publishing"]
DISABLED = 0,
#[doc = "1: Enable publishing"]
ENABLED = 1,
}
impl From<EN_A> for bool {
#[inline(always)]
fn from(variant: EN_A) -> Self {
variant as u8 != 0
}
}
impl EN_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EN_A {
match self.bits {
false => EN_A::DISABLED,
true => EN_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == EN_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == EN_A::ENABLED
}
}
#[doc = "Field `EN` writer - "]
pub type EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUBLISH_SLEEPENTER_SPEC, EN_A, O>;
impl<'a, const O: u8> EN_W<'a, O> {
#[doc = "Disable publishing"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(EN_A::DISABLED)
}
#[doc = "Enable publishing"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(EN_A::ENABLED)
}
}
impl R {
#[doc = "Bits 0:7 - DPPI channel that event SLEEPENTER will publish to."]
#[inline(always)]
pub fn chidx(&self) -> CHIDX_R {
CHIDX_R::new((self.bits & 0xff) as u8)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&self) -> EN_R {
EN_R::new(((self.bits >> 31) & 1) != 0)
}
}
impl W {
#[doc = "Bits 0:7 - DPPI channel that event SLEEPENTER will publish to."]
#[inline(always)]
pub fn chidx(&mut self) -> CHIDX_W<0> {
CHIDX_W::new(self)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&mut self) -> EN_W<31> {
EN_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 = "Publish configuration for event SLEEPENTER\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 [publish_sleepenter](index.html) module"]
pub struct PUBLISH_SLEEPENTER_SPEC;
impl crate::RegisterSpec for PUBLISH_SLEEPENTER_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [publish_sleepenter::R](R) reader structure"]
impl crate::Readable for PUBLISH_SLEEPENTER_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [publish_sleepenter::W](W) writer structure"]
impl crate::Writable for PUBLISH_SLEEPENTER_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets PUBLISH_SLEEPENTER to value 0"]
impl crate::Resettable for PUBLISH_SLEEPENTER_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+141
View File
@@ -0,0 +1,141 @@
#[doc = "Register `PUBLISH_SLEEPEXIT` reader"]
pub struct R(crate::R<PUBLISH_SLEEPEXIT_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<PUBLISH_SLEEPEXIT_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<PUBLISH_SLEEPEXIT_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<PUBLISH_SLEEPEXIT_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `PUBLISH_SLEEPEXIT` writer"]
pub struct W(crate::W<PUBLISH_SLEEPEXIT_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<PUBLISH_SLEEPEXIT_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<PUBLISH_SLEEPEXIT_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<PUBLISH_SLEEPEXIT_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `CHIDX` reader - DPPI channel that event SLEEPEXIT will publish to."]
pub type CHIDX_R = crate::FieldReader<u8, u8>;
#[doc = "Field `CHIDX` writer - DPPI channel that event SLEEPEXIT will publish to."]
pub type CHIDX_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, PUBLISH_SLEEPEXIT_SPEC, u8, u8, 8, O>;
#[doc = "Field `EN` reader - "]
pub type EN_R = crate::BitReader<EN_A>;
#[doc = "\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EN_A {
#[doc = "0: Disable publishing"]
DISABLED = 0,
#[doc = "1: Enable publishing"]
ENABLED = 1,
}
impl From<EN_A> for bool {
#[inline(always)]
fn from(variant: EN_A) -> Self {
variant as u8 != 0
}
}
impl EN_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EN_A {
match self.bits {
false => EN_A::DISABLED,
true => EN_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == EN_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == EN_A::ENABLED
}
}
#[doc = "Field `EN` writer - "]
pub type EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUBLISH_SLEEPEXIT_SPEC, EN_A, O>;
impl<'a, const O: u8> EN_W<'a, O> {
#[doc = "Disable publishing"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(EN_A::DISABLED)
}
#[doc = "Enable publishing"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(EN_A::ENABLED)
}
}
impl R {
#[doc = "Bits 0:7 - DPPI channel that event SLEEPEXIT will publish to."]
#[inline(always)]
pub fn chidx(&self) -> CHIDX_R {
CHIDX_R::new((self.bits & 0xff) as u8)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&self) -> EN_R {
EN_R::new(((self.bits >> 31) & 1) != 0)
}
}
impl W {
#[doc = "Bits 0:7 - DPPI channel that event SLEEPEXIT will publish to."]
#[inline(always)]
pub fn chidx(&mut self) -> CHIDX_W<0> {
CHIDX_W::new(self)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&mut self) -> EN_W<31> {
EN_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 = "Publish configuration for event SLEEPEXIT\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 [publish_sleepexit](index.html) module"]
pub struct PUBLISH_SLEEPEXIT_SPEC;
impl crate::RegisterSpec for PUBLISH_SLEEPEXIT_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [publish_sleepexit::R](R) reader structure"]
impl crate::Readable for PUBLISH_SLEEPEXIT_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [publish_sleepexit::W](W) writer structure"]
impl crate::Writable for PUBLISH_SLEEPEXIT_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets PUBLISH_SLEEPEXIT to value 0"]
impl crate::Resettable for PUBLISH_SLEEPEXIT_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
@@ -0,0 +1,141 @@
#[doc = "Register `SUBSCRIBE_CONSTLAT` reader"]
pub struct R(crate::R<SUBSCRIBE_CONSTLAT_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<SUBSCRIBE_CONSTLAT_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<SUBSCRIBE_CONSTLAT_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<SUBSCRIBE_CONSTLAT_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `SUBSCRIBE_CONSTLAT` writer"]
pub struct W(crate::W<SUBSCRIBE_CONSTLAT_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<SUBSCRIBE_CONSTLAT_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<SUBSCRIBE_CONSTLAT_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<SUBSCRIBE_CONSTLAT_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `CHIDX` reader - DPPI channel that task CONSTLAT will subscribe to"]
pub type CHIDX_R = crate::FieldReader<u8, u8>;
#[doc = "Field `CHIDX` writer - DPPI channel that task CONSTLAT will subscribe to"]
pub type CHIDX_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, SUBSCRIBE_CONSTLAT_SPEC, u8, u8, 8, O>;
#[doc = "Field `EN` reader - "]
pub type EN_R = crate::BitReader<EN_A>;
#[doc = "\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EN_A {
#[doc = "0: Disable subscription"]
DISABLED = 0,
#[doc = "1: Enable subscription"]
ENABLED = 1,
}
impl From<EN_A> for bool {
#[inline(always)]
fn from(variant: EN_A) -> Self {
variant as u8 != 0
}
}
impl EN_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EN_A {
match self.bits {
false => EN_A::DISABLED,
true => EN_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == EN_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == EN_A::ENABLED
}
}
#[doc = "Field `EN` writer - "]
pub type EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBSCRIBE_CONSTLAT_SPEC, EN_A, O>;
impl<'a, const O: u8> EN_W<'a, O> {
#[doc = "Disable subscription"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(EN_A::DISABLED)
}
#[doc = "Enable subscription"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(EN_A::ENABLED)
}
}
impl R {
#[doc = "Bits 0:7 - DPPI channel that task CONSTLAT will subscribe to"]
#[inline(always)]
pub fn chidx(&self) -> CHIDX_R {
CHIDX_R::new((self.bits & 0xff) as u8)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&self) -> EN_R {
EN_R::new(((self.bits >> 31) & 1) != 0)
}
}
impl W {
#[doc = "Bits 0:7 - DPPI channel that task CONSTLAT will subscribe to"]
#[inline(always)]
pub fn chidx(&mut self) -> CHIDX_W<0> {
CHIDX_W::new(self)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&mut self) -> EN_W<31> {
EN_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 = "Subscribe configuration for task CONSTLAT\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 [subscribe_constlat](index.html) module"]
pub struct SUBSCRIBE_CONSTLAT_SPEC;
impl crate::RegisterSpec for SUBSCRIBE_CONSTLAT_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [subscribe_constlat::R](R) reader structure"]
impl crate::Readable for SUBSCRIBE_CONSTLAT_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [subscribe_constlat::W](W) writer structure"]
impl crate::Writable for SUBSCRIBE_CONSTLAT_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets SUBSCRIBE_CONSTLAT to value 0"]
impl crate::Resettable for SUBSCRIBE_CONSTLAT_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+141
View File
@@ -0,0 +1,141 @@
#[doc = "Register `SUBSCRIBE_LOWPWR` reader"]
pub struct R(crate::R<SUBSCRIBE_LOWPWR_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<SUBSCRIBE_LOWPWR_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<SUBSCRIBE_LOWPWR_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<SUBSCRIBE_LOWPWR_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `SUBSCRIBE_LOWPWR` writer"]
pub struct W(crate::W<SUBSCRIBE_LOWPWR_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<SUBSCRIBE_LOWPWR_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<SUBSCRIBE_LOWPWR_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<SUBSCRIBE_LOWPWR_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `CHIDX` reader - DPPI channel that task LOWPWR will subscribe to"]
pub type CHIDX_R = crate::FieldReader<u8, u8>;
#[doc = "Field `CHIDX` writer - DPPI channel that task LOWPWR will subscribe to"]
pub type CHIDX_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, SUBSCRIBE_LOWPWR_SPEC, u8, u8, 8, O>;
#[doc = "Field `EN` reader - "]
pub type EN_R = crate::BitReader<EN_A>;
#[doc = "\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EN_A {
#[doc = "0: Disable subscription"]
DISABLED = 0,
#[doc = "1: Enable subscription"]
ENABLED = 1,
}
impl From<EN_A> for bool {
#[inline(always)]
fn from(variant: EN_A) -> Self {
variant as u8 != 0
}
}
impl EN_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EN_A {
match self.bits {
false => EN_A::DISABLED,
true => EN_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == EN_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == EN_A::ENABLED
}
}
#[doc = "Field `EN` writer - "]
pub type EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBSCRIBE_LOWPWR_SPEC, EN_A, O>;
impl<'a, const O: u8> EN_W<'a, O> {
#[doc = "Disable subscription"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(EN_A::DISABLED)
}
#[doc = "Enable subscription"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(EN_A::ENABLED)
}
}
impl R {
#[doc = "Bits 0:7 - DPPI channel that task LOWPWR will subscribe to"]
#[inline(always)]
pub fn chidx(&self) -> CHIDX_R {
CHIDX_R::new((self.bits & 0xff) as u8)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&self) -> EN_R {
EN_R::new(((self.bits >> 31) & 1) != 0)
}
}
impl W {
#[doc = "Bits 0:7 - DPPI channel that task LOWPWR will subscribe to"]
#[inline(always)]
pub fn chidx(&mut self) -> CHIDX_W<0> {
CHIDX_W::new(self)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&mut self) -> EN_W<31> {
EN_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 = "Subscribe configuration for task LOWPWR\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 [subscribe_lowpwr](index.html) module"]
pub struct SUBSCRIBE_LOWPWR_SPEC;
impl crate::RegisterSpec for SUBSCRIBE_LOWPWR_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [subscribe_lowpwr::R](R) reader structure"]
impl crate::Readable for SUBSCRIBE_LOWPWR_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [subscribe_lowpwr::W](W) writer structure"]
impl crate::Writable for SUBSCRIBE_LOWPWR_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets SUBSCRIBE_LOWPWR to value 0"]
impl crate::Resettable for SUBSCRIBE_LOWPWR_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+72
View File
@@ -0,0 +1,72 @@
#[doc = "Register `TASKS_CONSTLAT` writer"]
pub struct W(crate::W<TASKS_CONSTLAT_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<TASKS_CONSTLAT_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<TASKS_CONSTLAT_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<TASKS_CONSTLAT_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Enable Constant Latency mode\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TASKS_CONSTLAT_AW {
#[doc = "1: Trigger task"]
TRIGGER = 1,
}
impl From<TASKS_CONSTLAT_AW> for bool {
#[inline(always)]
fn from(variant: TASKS_CONSTLAT_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `TASKS_CONSTLAT` writer - Enable Constant Latency mode"]
pub type TASKS_CONSTLAT_W<'a, const O: u8> =
crate::BitWriter<'a, u32, TASKS_CONSTLAT_SPEC, TASKS_CONSTLAT_AW, O>;
impl<'a, const O: u8> TASKS_CONSTLAT_W<'a, O> {
#[doc = "Trigger task"]
#[inline(always)]
pub fn trigger(self) -> &'a mut W {
self.variant(TASKS_CONSTLAT_AW::TRIGGER)
}
}
impl W {
#[doc = "Bit 0 - Enable Constant Latency mode"]
#[inline(always)]
pub fn tasks_constlat(&mut self) -> TASKS_CONSTLAT_W<0> {
TASKS_CONSTLAT_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 = "Enable Constant Latency mode\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 [tasks_constlat](index.html) module"]
pub struct TASKS_CONSTLAT_SPEC;
impl crate::RegisterSpec for TASKS_CONSTLAT_SPEC {
type Ux = u32;
}
#[doc = "`write(|w| ..)` method takes [tasks_constlat::W](W) writer structure"]
impl crate::Writable for TASKS_CONSTLAT_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets TASKS_CONSTLAT to value 0"]
impl crate::Resettable for TASKS_CONSTLAT_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+72
View File
@@ -0,0 +1,72 @@
#[doc = "Register `TASKS_LOWPWR` writer"]
pub struct W(crate::W<TASKS_LOWPWR_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<TASKS_LOWPWR_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<TASKS_LOWPWR_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<TASKS_LOWPWR_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Enable Low-Power mode (variable latency)\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TASKS_LOWPWR_AW {
#[doc = "1: Trigger task"]
TRIGGER = 1,
}
impl From<TASKS_LOWPWR_AW> for bool {
#[inline(always)]
fn from(variant: TASKS_LOWPWR_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `TASKS_LOWPWR` writer - Enable Low-Power mode (variable latency)"]
pub type TASKS_LOWPWR_W<'a, const O: u8> =
crate::BitWriter<'a, u32, TASKS_LOWPWR_SPEC, TASKS_LOWPWR_AW, O>;
impl<'a, const O: u8> TASKS_LOWPWR_W<'a, O> {
#[doc = "Trigger task"]
#[inline(always)]
pub fn trigger(self) -> &'a mut W {
self.variant(TASKS_LOWPWR_AW::TRIGGER)
}
}
impl W {
#[doc = "Bit 0 - Enable Low-Power mode (variable latency)"]
#[inline(always)]
pub fn tasks_lowpwr(&mut self) -> TASKS_LOWPWR_W<0> {
TASKS_LOWPWR_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 = "Enable Low-Power mode (variable latency)\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 [tasks_lowpwr](index.html) module"]
pub struct TASKS_LOWPWR_SPEC;
impl crate::RegisterSpec for TASKS_LOWPWR_SPEC {
type Ux = u32;
}
#[doc = "`write(|w| ..)` method takes [tasks_lowpwr::W](W) writer structure"]
impl crate::Writable for TASKS_LOWPWR_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets TASKS_LOWPWR to value 0"]
impl crate::Resettable for TASKS_LOWPWR_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}