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
+127
@@ -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
|
||||
}
|
||||
}
|
||||
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
#[doc = r"Register block"]
|
||||
#[repr(C)]
|
||||
pub struct LTEMODEM {
|
||||
#[doc = "0x00 - Start LTE modem"]
|
||||
pub startn: STARTN,
|
||||
#[doc = "0x04 - Force off LTE modem"]
|
||||
pub forceoff: FORCEOFF,
|
||||
}
|
||||
#[doc = "STARTN (rw) register accessor: an alias for `Reg<STARTN_SPEC>`"]
|
||||
pub type STARTN = crate::Reg<startn::STARTN_SPEC>;
|
||||
#[doc = "Start LTE modem"]
|
||||
pub mod startn;
|
||||
#[doc = "FORCEOFF (rw) register accessor: an alias for `Reg<FORCEOFF_SPEC>`"]
|
||||
pub type FORCEOFF = crate::Reg<forceoff::FORCEOFF_SPEC>;
|
||||
#[doc = "Force off LTE modem"]
|
||||
pub mod forceoff;
|
||||
@@ -0,0 +1,126 @@
|
||||
#[doc = "Register `FORCEOFF` reader"]
|
||||
pub struct R(crate::R<FORCEOFF_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<FORCEOFF_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<FORCEOFF_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<FORCEOFF_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `FORCEOFF` writer"]
|
||||
pub struct W(crate::W<FORCEOFF_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<FORCEOFF_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<FORCEOFF_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<FORCEOFF_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `FORCEOFF` reader - Force off LTE modem"]
|
||||
pub type FORCEOFF_R = crate::BitReader<FORCEOFF_A>;
|
||||
#[doc = "Force off LTE modem\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum FORCEOFF_A {
|
||||
#[doc = "0: Release force off"]
|
||||
RELEASE = 0,
|
||||
#[doc = "1: Hold force off active"]
|
||||
HOLD = 1,
|
||||
}
|
||||
impl From<FORCEOFF_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: FORCEOFF_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl FORCEOFF_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> FORCEOFF_A {
|
||||
match self.bits {
|
||||
false => FORCEOFF_A::RELEASE,
|
||||
true => FORCEOFF_A::HOLD,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `RELEASE`"]
|
||||
#[inline(always)]
|
||||
pub fn is_release(&self) -> bool {
|
||||
*self == FORCEOFF_A::RELEASE
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `HOLD`"]
|
||||
#[inline(always)]
|
||||
pub fn is_hold(&self) -> bool {
|
||||
*self == FORCEOFF_A::HOLD
|
||||
}
|
||||
}
|
||||
#[doc = "Field `FORCEOFF` writer - Force off LTE modem"]
|
||||
pub type FORCEOFF_W<'a, const O: u8> = crate::BitWriter<'a, u32, FORCEOFF_SPEC, FORCEOFF_A, O>;
|
||||
impl<'a, const O: u8> FORCEOFF_W<'a, O> {
|
||||
#[doc = "Release force off"]
|
||||
#[inline(always)]
|
||||
pub fn release(self) -> &'a mut W {
|
||||
self.variant(FORCEOFF_A::RELEASE)
|
||||
}
|
||||
#[doc = "Hold force off active"]
|
||||
#[inline(always)]
|
||||
pub fn hold(self) -> &'a mut W {
|
||||
self.variant(FORCEOFF_A::HOLD)
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - Force off LTE modem"]
|
||||
#[inline(always)]
|
||||
pub fn forceoff(&self) -> FORCEOFF_R {
|
||||
FORCEOFF_R::new((self.bits & 1) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Force off LTE modem"]
|
||||
#[inline(always)]
|
||||
pub fn forceoff(&mut self) -> FORCEOFF_W<0> {
|
||||
FORCEOFF_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 = "Force off LTE modem\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 [forceoff](index.html) module"]
|
||||
pub struct FORCEOFF_SPEC;
|
||||
impl crate::RegisterSpec for FORCEOFF_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [forceoff::R](R) reader structure"]
|
||||
impl crate::Readable for FORCEOFF_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [forceoff::W](W) writer structure"]
|
||||
impl crate::Writable for FORCEOFF_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets FORCEOFF to value 0"]
|
||||
impl crate::Resettable for FORCEOFF_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
+126
@@ -0,0 +1,126 @@
|
||||
#[doc = "Register `STARTN` reader"]
|
||||
pub struct R(crate::R<STARTN_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<STARTN_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<STARTN_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<STARTN_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `STARTN` writer"]
|
||||
pub struct W(crate::W<STARTN_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<STARTN_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<STARTN_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<STARTN_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `STARTN` reader - Start LTE modem"]
|
||||
pub type STARTN_R = crate::BitReader<STARTN_A>;
|
||||
#[doc = "Start LTE modem\n\nValue on reset: 1"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum STARTN_A {
|
||||
#[doc = "0: Start LTE modem"]
|
||||
START = 0,
|
||||
#[doc = "1: Hold LTE modem disabled"]
|
||||
HOLD = 1,
|
||||
}
|
||||
impl From<STARTN_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: STARTN_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl STARTN_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> STARTN_A {
|
||||
match self.bits {
|
||||
false => STARTN_A::START,
|
||||
true => STARTN_A::HOLD,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `START`"]
|
||||
#[inline(always)]
|
||||
pub fn is_start(&self) -> bool {
|
||||
*self == STARTN_A::START
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `HOLD`"]
|
||||
#[inline(always)]
|
||||
pub fn is_hold(&self) -> bool {
|
||||
*self == STARTN_A::HOLD
|
||||
}
|
||||
}
|
||||
#[doc = "Field `STARTN` writer - Start LTE modem"]
|
||||
pub type STARTN_W<'a, const O: u8> = crate::BitWriter<'a, u32, STARTN_SPEC, STARTN_A, O>;
|
||||
impl<'a, const O: u8> STARTN_W<'a, O> {
|
||||
#[doc = "Start LTE modem"]
|
||||
#[inline(always)]
|
||||
pub fn start(self) -> &'a mut W {
|
||||
self.variant(STARTN_A::START)
|
||||
}
|
||||
#[doc = "Hold LTE modem disabled"]
|
||||
#[inline(always)]
|
||||
pub fn hold(self) -> &'a mut W {
|
||||
self.variant(STARTN_A::HOLD)
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - Start LTE modem"]
|
||||
#[inline(always)]
|
||||
pub fn startn(&self) -> STARTN_R {
|
||||
STARTN_R::new((self.bits & 1) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Start LTE modem"]
|
||||
#[inline(always)]
|
||||
pub fn startn(&mut self) -> STARTN_W<0> {
|
||||
STARTN_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 = "Start LTE modem\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 [startn](index.html) module"]
|
||||
pub struct STARTN_SPEC;
|
||||
impl crate::RegisterSpec for STARTN_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [startn::R](R) reader structure"]
|
||||
impl crate::Readable for STARTN_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [startn::W](W) writer structure"]
|
||||
impl crate::Writable for STARTN_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets STARTN to value 0x01"]
|
||||
impl crate::Resettable for STARTN_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0x01
|
||||
}
|
||||
}
|
||||
+74
@@ -0,0 +1,74 @@
|
||||
#[doc = "Register `POWERSTATUS` reader"]
|
||||
pub struct R(crate::R<POWERSTATUS_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<POWERSTATUS_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<POWERSTATUS_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<POWERSTATUS_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `LTEMODEM` reader - LTE modem domain status"]
|
||||
pub type LTEMODEM_R = crate::BitReader<LTEMODEM_A>;
|
||||
#[doc = "LTE modem domain status\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum LTEMODEM_A {
|
||||
#[doc = "0: LTE modem domain is powered off"]
|
||||
OFF = 0,
|
||||
#[doc = "1: LTE modem domain is powered on"]
|
||||
ON = 1,
|
||||
}
|
||||
impl From<LTEMODEM_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: LTEMODEM_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl LTEMODEM_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> LTEMODEM_A {
|
||||
match self.bits {
|
||||
false => LTEMODEM_A::OFF,
|
||||
true => LTEMODEM_A::ON,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `OFF`"]
|
||||
#[inline(always)]
|
||||
pub fn is_off(&self) -> bool {
|
||||
*self == LTEMODEM_A::OFF
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ON`"]
|
||||
#[inline(always)]
|
||||
pub fn is_on(&self) -> bool {
|
||||
*self == LTEMODEM_A::ON
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - LTE modem domain status"]
|
||||
#[inline(always)]
|
||||
pub fn ltemodem(&self) -> LTEMODEM_R {
|
||||
LTEMODEM_R::new((self.bits & 1) != 0)
|
||||
}
|
||||
}
|
||||
#[doc = "Modem domain power status\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 [powerstatus](index.html) module"]
|
||||
pub struct POWERSTATUS_SPEC;
|
||||
impl crate::RegisterSpec for POWERSTATUS_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [powerstatus::R](R) reader structure"]
|
||||
impl crate::Readable for POWERSTATUS_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`reset()` method sets POWERSTATUS to value 0"]
|
||||
impl crate::Resettable for POWERSTATUS_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
+140
@@ -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
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
+486
@@ -0,0 +1,486 @@
|
||||
#[doc = "Register `RESETREAS` reader"]
|
||||
pub struct R(crate::R<RESETREAS_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<RESETREAS_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<RESETREAS_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<RESETREAS_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `RESETREAS` writer"]
|
||||
pub struct W(crate::W<RESETREAS_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<RESETREAS_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<RESETREAS_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<RESETREAS_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RESETPIN` reader - Reset from pin reset detected"]
|
||||
pub type RESETPIN_R = crate::BitReader<RESETPIN_A>;
|
||||
#[doc = "Reset from pin reset detected\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum RESETPIN_A {
|
||||
#[doc = "0: Not detected"]
|
||||
NOT_DETECTED = 0,
|
||||
#[doc = "1: Detected"]
|
||||
DETECTED = 1,
|
||||
}
|
||||
impl From<RESETPIN_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: RESETPIN_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl RESETPIN_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> RESETPIN_A {
|
||||
match self.bits {
|
||||
false => RESETPIN_A::NOT_DETECTED,
|
||||
true => RESETPIN_A::DETECTED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `NOT_DETECTED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_not_detected(&self) -> bool {
|
||||
*self == RESETPIN_A::NOT_DETECTED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DETECTED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_detected(&self) -> bool {
|
||||
*self == RESETPIN_A::DETECTED
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RESETPIN` writer - Reset from pin reset detected"]
|
||||
pub type RESETPIN_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESETREAS_SPEC, RESETPIN_A, O>;
|
||||
impl<'a, const O: u8> RESETPIN_W<'a, O> {
|
||||
#[doc = "Not detected"]
|
||||
#[inline(always)]
|
||||
pub fn not_detected(self) -> &'a mut W {
|
||||
self.variant(RESETPIN_A::NOT_DETECTED)
|
||||
}
|
||||
#[doc = "Detected"]
|
||||
#[inline(always)]
|
||||
pub fn detected(self) -> &'a mut W {
|
||||
self.variant(RESETPIN_A::DETECTED)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DOG` reader - Reset from global watchdog detected"]
|
||||
pub type DOG_R = crate::BitReader<DOG_A>;
|
||||
#[doc = "Reset from global watchdog detected\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum DOG_A {
|
||||
#[doc = "0: Not detected"]
|
||||
NOT_DETECTED = 0,
|
||||
#[doc = "1: Detected"]
|
||||
DETECTED = 1,
|
||||
}
|
||||
impl From<DOG_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: DOG_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl DOG_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> DOG_A {
|
||||
match self.bits {
|
||||
false => DOG_A::NOT_DETECTED,
|
||||
true => DOG_A::DETECTED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `NOT_DETECTED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_not_detected(&self) -> bool {
|
||||
*self == DOG_A::NOT_DETECTED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DETECTED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_detected(&self) -> bool {
|
||||
*self == DOG_A::DETECTED
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DOG` writer - Reset from global watchdog detected"]
|
||||
pub type DOG_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESETREAS_SPEC, DOG_A, O>;
|
||||
impl<'a, const O: u8> DOG_W<'a, O> {
|
||||
#[doc = "Not detected"]
|
||||
#[inline(always)]
|
||||
pub fn not_detected(self) -> &'a mut W {
|
||||
self.variant(DOG_A::NOT_DETECTED)
|
||||
}
|
||||
#[doc = "Detected"]
|
||||
#[inline(always)]
|
||||
pub fn detected(self) -> &'a mut W {
|
||||
self.variant(DOG_A::DETECTED)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `OFF` reader - Reset due to wakeup from System OFF mode, when wakeup is triggered by DETECT signal from GPIO"]
|
||||
pub type OFF_R = crate::BitReader<OFF_A>;
|
||||
#[doc = "Reset due to wakeup from System OFF mode, when wakeup is triggered by DETECT signal from GPIO\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum OFF_A {
|
||||
#[doc = "0: Not detected"]
|
||||
NOT_DETECTED = 0,
|
||||
#[doc = "1: Detected"]
|
||||
DETECTED = 1,
|
||||
}
|
||||
impl From<OFF_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: OFF_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl OFF_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> OFF_A {
|
||||
match self.bits {
|
||||
false => OFF_A::NOT_DETECTED,
|
||||
true => OFF_A::DETECTED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `NOT_DETECTED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_not_detected(&self) -> bool {
|
||||
*self == OFF_A::NOT_DETECTED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DETECTED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_detected(&self) -> bool {
|
||||
*self == OFF_A::DETECTED
|
||||
}
|
||||
}
|
||||
#[doc = "Field `OFF` writer - Reset due to wakeup from System OFF mode, when wakeup is triggered by DETECT signal from GPIO"]
|
||||
pub type OFF_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESETREAS_SPEC, OFF_A, O>;
|
||||
impl<'a, const O: u8> OFF_W<'a, O> {
|
||||
#[doc = "Not detected"]
|
||||
#[inline(always)]
|
||||
pub fn not_detected(self) -> &'a mut W {
|
||||
self.variant(OFF_A::NOT_DETECTED)
|
||||
}
|
||||
#[doc = "Detected"]
|
||||
#[inline(always)]
|
||||
pub fn detected(self) -> &'a mut W {
|
||||
self.variant(OFF_A::DETECTED)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DIF` reader - Reset due to wakeup from System OFF mode, when wakeup is triggered by entering debug interface mode"]
|
||||
pub type DIF_R = crate::BitReader<DIF_A>;
|
||||
#[doc = "Reset due to wakeup from System OFF mode, when wakeup is triggered by entering debug interface mode\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum DIF_A {
|
||||
#[doc = "0: Not detected"]
|
||||
NOT_DETECTED = 0,
|
||||
#[doc = "1: Detected"]
|
||||
DETECTED = 1,
|
||||
}
|
||||
impl From<DIF_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: DIF_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl DIF_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> DIF_A {
|
||||
match self.bits {
|
||||
false => DIF_A::NOT_DETECTED,
|
||||
true => DIF_A::DETECTED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `NOT_DETECTED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_not_detected(&self) -> bool {
|
||||
*self == DIF_A::NOT_DETECTED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DETECTED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_detected(&self) -> bool {
|
||||
*self == DIF_A::DETECTED
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DIF` writer - Reset due to wakeup from System OFF mode, when wakeup is triggered by entering debug interface mode"]
|
||||
pub type DIF_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESETREAS_SPEC, DIF_A, O>;
|
||||
impl<'a, const O: u8> DIF_W<'a, O> {
|
||||
#[doc = "Not detected"]
|
||||
#[inline(always)]
|
||||
pub fn not_detected(self) -> &'a mut W {
|
||||
self.variant(DIF_A::NOT_DETECTED)
|
||||
}
|
||||
#[doc = "Detected"]
|
||||
#[inline(always)]
|
||||
pub fn detected(self) -> &'a mut W {
|
||||
self.variant(DIF_A::DETECTED)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `SREQ` reader - Reset from AIRCR.SYSRESETREQ detected"]
|
||||
pub type SREQ_R = crate::BitReader<SREQ_A>;
|
||||
#[doc = "Reset from AIRCR.SYSRESETREQ detected\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum SREQ_A {
|
||||
#[doc = "0: Not detected"]
|
||||
NOT_DETECTED = 0,
|
||||
#[doc = "1: Detected"]
|
||||
DETECTED = 1,
|
||||
}
|
||||
impl From<SREQ_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: SREQ_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl SREQ_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> SREQ_A {
|
||||
match self.bits {
|
||||
false => SREQ_A::NOT_DETECTED,
|
||||
true => SREQ_A::DETECTED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `NOT_DETECTED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_not_detected(&self) -> bool {
|
||||
*self == SREQ_A::NOT_DETECTED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DETECTED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_detected(&self) -> bool {
|
||||
*self == SREQ_A::DETECTED
|
||||
}
|
||||
}
|
||||
#[doc = "Field `SREQ` writer - Reset from AIRCR.SYSRESETREQ detected"]
|
||||
pub type SREQ_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESETREAS_SPEC, SREQ_A, O>;
|
||||
impl<'a, const O: u8> SREQ_W<'a, O> {
|
||||
#[doc = "Not detected"]
|
||||
#[inline(always)]
|
||||
pub fn not_detected(self) -> &'a mut W {
|
||||
self.variant(SREQ_A::NOT_DETECTED)
|
||||
}
|
||||
#[doc = "Detected"]
|
||||
#[inline(always)]
|
||||
pub fn detected(self) -> &'a mut W {
|
||||
self.variant(SREQ_A::DETECTED)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `LOCKUP` reader - Reset from CPU lock-up detected"]
|
||||
pub type LOCKUP_R = crate::BitReader<LOCKUP_A>;
|
||||
#[doc = "Reset from CPU lock-up detected\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum LOCKUP_A {
|
||||
#[doc = "0: Not detected"]
|
||||
NOT_DETECTED = 0,
|
||||
#[doc = "1: Detected"]
|
||||
DETECTED = 1,
|
||||
}
|
||||
impl From<LOCKUP_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: LOCKUP_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl LOCKUP_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> LOCKUP_A {
|
||||
match self.bits {
|
||||
false => LOCKUP_A::NOT_DETECTED,
|
||||
true => LOCKUP_A::DETECTED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `NOT_DETECTED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_not_detected(&self) -> bool {
|
||||
*self == LOCKUP_A::NOT_DETECTED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DETECTED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_detected(&self) -> bool {
|
||||
*self == LOCKUP_A::DETECTED
|
||||
}
|
||||
}
|
||||
#[doc = "Field `LOCKUP` writer - Reset from CPU lock-up detected"]
|
||||
pub type LOCKUP_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESETREAS_SPEC, LOCKUP_A, O>;
|
||||
impl<'a, const O: u8> LOCKUP_W<'a, O> {
|
||||
#[doc = "Not detected"]
|
||||
#[inline(always)]
|
||||
pub fn not_detected(self) -> &'a mut W {
|
||||
self.variant(LOCKUP_A::NOT_DETECTED)
|
||||
}
|
||||
#[doc = "Detected"]
|
||||
#[inline(always)]
|
||||
pub fn detected(self) -> &'a mut W {
|
||||
self.variant(LOCKUP_A::DETECTED)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `CTRLAP` reader - Reset triggered through CTRL-AP"]
|
||||
pub type CTRLAP_R = crate::BitReader<CTRLAP_A>;
|
||||
#[doc = "Reset triggered through CTRL-AP\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum CTRLAP_A {
|
||||
#[doc = "0: Not detected"]
|
||||
NOT_DETECTED = 0,
|
||||
#[doc = "1: Detected"]
|
||||
DETECTED = 1,
|
||||
}
|
||||
impl From<CTRLAP_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: CTRLAP_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl CTRLAP_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> CTRLAP_A {
|
||||
match self.bits {
|
||||
false => CTRLAP_A::NOT_DETECTED,
|
||||
true => CTRLAP_A::DETECTED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `NOT_DETECTED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_not_detected(&self) -> bool {
|
||||
*self == CTRLAP_A::NOT_DETECTED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DETECTED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_detected(&self) -> bool {
|
||||
*self == CTRLAP_A::DETECTED
|
||||
}
|
||||
}
|
||||
#[doc = "Field `CTRLAP` writer - Reset triggered through CTRL-AP"]
|
||||
pub type CTRLAP_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESETREAS_SPEC, CTRLAP_A, O>;
|
||||
impl<'a, const O: u8> CTRLAP_W<'a, O> {
|
||||
#[doc = "Not detected"]
|
||||
#[inline(always)]
|
||||
pub fn not_detected(self) -> &'a mut W {
|
||||
self.variant(CTRLAP_A::NOT_DETECTED)
|
||||
}
|
||||
#[doc = "Detected"]
|
||||
#[inline(always)]
|
||||
pub fn detected(self) -> &'a mut W {
|
||||
self.variant(CTRLAP_A::DETECTED)
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - Reset from pin reset detected"]
|
||||
#[inline(always)]
|
||||
pub fn resetpin(&self) -> RESETPIN_R {
|
||||
RESETPIN_R::new((self.bits & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 1 - Reset from global watchdog detected"]
|
||||
#[inline(always)]
|
||||
pub fn dog(&self) -> DOG_R {
|
||||
DOG_R::new(((self.bits >> 1) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - Reset due to wakeup from System OFF mode, when wakeup is triggered by DETECT signal from GPIO"]
|
||||
#[inline(always)]
|
||||
pub fn off(&self) -> OFF_R {
|
||||
OFF_R::new(((self.bits >> 2) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 4 - Reset due to wakeup from System OFF mode, when wakeup is triggered by entering debug interface mode"]
|
||||
#[inline(always)]
|
||||
pub fn dif(&self) -> DIF_R {
|
||||
DIF_R::new(((self.bits >> 4) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 16 - Reset from AIRCR.SYSRESETREQ detected"]
|
||||
#[inline(always)]
|
||||
pub fn sreq(&self) -> SREQ_R {
|
||||
SREQ_R::new(((self.bits >> 16) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 17 - Reset from CPU lock-up detected"]
|
||||
#[inline(always)]
|
||||
pub fn lockup(&self) -> LOCKUP_R {
|
||||
LOCKUP_R::new(((self.bits >> 17) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 18 - Reset triggered through CTRL-AP"]
|
||||
#[inline(always)]
|
||||
pub fn ctrlap(&self) -> CTRLAP_R {
|
||||
CTRLAP_R::new(((self.bits >> 18) & 1) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Reset from pin reset detected"]
|
||||
#[inline(always)]
|
||||
pub fn resetpin(&mut self) -> RESETPIN_W<0> {
|
||||
RESETPIN_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 1 - Reset from global watchdog detected"]
|
||||
#[inline(always)]
|
||||
pub fn dog(&mut self) -> DOG_W<1> {
|
||||
DOG_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 2 - Reset due to wakeup from System OFF mode, when wakeup is triggered by DETECT signal from GPIO"]
|
||||
#[inline(always)]
|
||||
pub fn off(&mut self) -> OFF_W<2> {
|
||||
OFF_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 4 - Reset due to wakeup from System OFF mode, when wakeup is triggered by entering debug interface mode"]
|
||||
#[inline(always)]
|
||||
pub fn dif(&mut self) -> DIF_W<4> {
|
||||
DIF_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 16 - Reset from AIRCR.SYSRESETREQ detected"]
|
||||
#[inline(always)]
|
||||
pub fn sreq(&mut self) -> SREQ_W<16> {
|
||||
SREQ_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 17 - Reset from CPU lock-up detected"]
|
||||
#[inline(always)]
|
||||
pub fn lockup(&mut self) -> LOCKUP_W<17> {
|
||||
LOCKUP_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 18 - Reset triggered through CTRL-AP"]
|
||||
#[inline(always)]
|
||||
pub fn ctrlap(&mut self) -> CTRLAP_W<18> {
|
||||
CTRLAP_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 reason\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 [resetreas](index.html) module"]
|
||||
pub struct RESETREAS_SPEC;
|
||||
impl crate::RegisterSpec for RESETREAS_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [resetreas::R](R) reader structure"]
|
||||
impl crate::Readable for RESETREAS_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [resetreas::W](W) writer structure"]
|
||||
impl crate::Writable for RESETREAS_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets RESETREAS to value 0"]
|
||||
impl crate::Resettable for RESETREAS_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
@@ -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
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,141 @@
|
||||
#[doc = "Register `SUBSCRIBE_PWMREQSTART` reader"]
|
||||
pub struct R(crate::R<SUBSCRIBE_PWMREQSTART_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<SUBSCRIBE_PWMREQSTART_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<SUBSCRIBE_PWMREQSTART_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<SUBSCRIBE_PWMREQSTART_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `SUBSCRIBE_PWMREQSTART` writer"]
|
||||
pub struct W(crate::W<SUBSCRIBE_PWMREQSTART_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<SUBSCRIBE_PWMREQSTART_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_PWMREQSTART_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<SUBSCRIBE_PWMREQSTART_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `CHIDX` reader - DPPI channel that task PWMREQSTART will subscribe to"]
|
||||
pub type CHIDX_R = crate::FieldReader<u8, u8>;
|
||||
#[doc = "Field `CHIDX` writer - DPPI channel that task PWMREQSTART will subscribe to"]
|
||||
pub type CHIDX_W<'a, const O: u8> =
|
||||
crate::FieldWriter<'a, u32, SUBSCRIBE_PWMREQSTART_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_PWMREQSTART_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 PWMREQSTART 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 PWMREQSTART 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 PWMREQSTART\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_pwmreqstart](index.html) module"]
|
||||
pub struct SUBSCRIBE_PWMREQSTART_SPEC;
|
||||
impl crate::RegisterSpec for SUBSCRIBE_PWMREQSTART_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [subscribe_pwmreqstart::R](R) reader structure"]
|
||||
impl crate::Readable for SUBSCRIBE_PWMREQSTART_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [subscribe_pwmreqstart::W](W) writer structure"]
|
||||
impl crate::Writable for SUBSCRIBE_PWMREQSTART_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets SUBSCRIBE_PWMREQSTART to value 0"]
|
||||
impl crate::Resettable for SUBSCRIBE_PWMREQSTART_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,141 @@
|
||||
#[doc = "Register `SUBSCRIBE_PWMREQSTOP` reader"]
|
||||
pub struct R(crate::R<SUBSCRIBE_PWMREQSTOP_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<SUBSCRIBE_PWMREQSTOP_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<SUBSCRIBE_PWMREQSTOP_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<SUBSCRIBE_PWMREQSTOP_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `SUBSCRIBE_PWMREQSTOP` writer"]
|
||||
pub struct W(crate::W<SUBSCRIBE_PWMREQSTOP_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<SUBSCRIBE_PWMREQSTOP_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_PWMREQSTOP_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<SUBSCRIBE_PWMREQSTOP_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `CHIDX` reader - DPPI channel that task PWMREQSTOP will subscribe to"]
|
||||
pub type CHIDX_R = crate::FieldReader<u8, u8>;
|
||||
#[doc = "Field `CHIDX` writer - DPPI channel that task PWMREQSTOP will subscribe to"]
|
||||
pub type CHIDX_W<'a, const O: u8> =
|
||||
crate::FieldWriter<'a, u32, SUBSCRIBE_PWMREQSTOP_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_PWMREQSTOP_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 PWMREQSTOP 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 PWMREQSTOP 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 PWMREQSTOP\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_pwmreqstop](index.html) module"]
|
||||
pub struct SUBSCRIBE_PWMREQSTOP_SPEC;
|
||||
impl crate::RegisterSpec for SUBSCRIBE_PWMREQSTOP_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [subscribe_pwmreqstop::R](R) reader structure"]
|
||||
impl crate::Readable for SUBSCRIBE_PWMREQSTOP_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [subscribe_pwmreqstop::W](W) writer structure"]
|
||||
impl crate::Writable for SUBSCRIBE_PWMREQSTOP_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets SUBSCRIBE_PWMREQSTOP to value 0"]
|
||||
impl crate::Resettable for SUBSCRIBE_PWMREQSTOP_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@@ -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
@@ -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
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
#[doc = "Register `TASKS_PWMREQSTART` writer"]
|
||||
pub struct W(crate::W<TASKS_PWMREQSTART_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<TASKS_PWMREQSTART_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_PWMREQSTART_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<TASKS_PWMREQSTART_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Request forcing PWM mode in external DC/DC voltage regulator. (Drives FPWM_DCDC pin high or low depending on a setting in UICR).\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum TASKS_PWMREQSTART_AW {
|
||||
#[doc = "1: Trigger task"]
|
||||
TRIGGER = 1,
|
||||
}
|
||||
impl From<TASKS_PWMREQSTART_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: TASKS_PWMREQSTART_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TASKS_PWMREQSTART` writer - Request forcing PWM mode in external DC/DC voltage regulator. (Drives FPWM_DCDC pin high or low depending on a setting in UICR)."]
|
||||
pub type TASKS_PWMREQSTART_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, TASKS_PWMREQSTART_SPEC, TASKS_PWMREQSTART_AW, O>;
|
||||
impl<'a, const O: u8> TASKS_PWMREQSTART_W<'a, O> {
|
||||
#[doc = "Trigger task"]
|
||||
#[inline(always)]
|
||||
pub fn trigger(self) -> &'a mut W {
|
||||
self.variant(TASKS_PWMREQSTART_AW::TRIGGER)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Request forcing PWM mode in external DC/DC voltage regulator. (Drives FPWM_DCDC pin high or low depending on a setting in UICR)."]
|
||||
#[inline(always)]
|
||||
pub fn tasks_pwmreqstart(&mut self) -> TASKS_PWMREQSTART_W<0> {
|
||||
TASKS_PWMREQSTART_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 = "Request forcing PWM mode in external DC/DC voltage regulator. (Drives FPWM_DCDC pin high or low depending on a setting in UICR).\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_pwmreqstart](index.html) module"]
|
||||
pub struct TASKS_PWMREQSTART_SPEC;
|
||||
impl crate::RegisterSpec for TASKS_PWMREQSTART_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [tasks_pwmreqstart::W](W) writer structure"]
|
||||
impl crate::Writable for TASKS_PWMREQSTART_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets TASKS_PWMREQSTART to value 0"]
|
||||
impl crate::Resettable for TASKS_PWMREQSTART_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
#[doc = "Register `TASKS_PWMREQSTOP` writer"]
|
||||
pub struct W(crate::W<TASKS_PWMREQSTOP_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<TASKS_PWMREQSTOP_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_PWMREQSTOP_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<TASKS_PWMREQSTOP_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Stop requesting forcing PWM mode in external DC/DC voltage regulator\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum TASKS_PWMREQSTOP_AW {
|
||||
#[doc = "1: Trigger task"]
|
||||
TRIGGER = 1,
|
||||
}
|
||||
impl From<TASKS_PWMREQSTOP_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: TASKS_PWMREQSTOP_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TASKS_PWMREQSTOP` writer - Stop requesting forcing PWM mode in external DC/DC voltage regulator"]
|
||||
pub type TASKS_PWMREQSTOP_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, TASKS_PWMREQSTOP_SPEC, TASKS_PWMREQSTOP_AW, O>;
|
||||
impl<'a, const O: u8> TASKS_PWMREQSTOP_W<'a, O> {
|
||||
#[doc = "Trigger task"]
|
||||
#[inline(always)]
|
||||
pub fn trigger(self) -> &'a mut W {
|
||||
self.variant(TASKS_PWMREQSTOP_AW::TRIGGER)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Stop requesting forcing PWM mode in external DC/DC voltage regulator"]
|
||||
#[inline(always)]
|
||||
pub fn tasks_pwmreqstop(&mut self) -> TASKS_PWMREQSTOP_W<0> {
|
||||
TASKS_PWMREQSTOP_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 = "Stop requesting forcing PWM mode in external DC/DC voltage regulator\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_pwmreqstop](index.html) module"]
|
||||
pub struct TASKS_PWMREQSTOP_SPEC;
|
||||
impl crate::RegisterSpec for TASKS_PWMREQSTOP_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [tasks_pwmreqstop::W](W) writer structure"]
|
||||
impl crate::Writable for TASKS_PWMREQSTOP_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets TASKS_PWMREQSTOP to value 0"]
|
||||
impl crate::Resettable for TASKS_PWMREQSTOP_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user