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
+126
@@ -0,0 +1,126 @@
|
||||
#[doc = "Register `DCDCEN` reader"]
|
||||
pub struct R(crate::R<DCDCEN_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<DCDCEN_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<DCDCEN_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<DCDCEN_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `DCDCEN` writer"]
|
||||
pub struct W(crate::W<DCDCEN_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<DCDCEN_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<DCDCEN_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<DCDCEN_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DCDCEN` reader - Enable or disable DC/DC converter"]
|
||||
pub type DCDCEN_R = crate::BitReader<DCDCEN_A>;
|
||||
#[doc = "Enable or disable DC/DC converter\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum DCDCEN_A {
|
||||
#[doc = "0: Disable"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Enable"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<DCDCEN_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: DCDCEN_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl DCDCEN_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> DCDCEN_A {
|
||||
match self.bits {
|
||||
false => DCDCEN_A::DISABLED,
|
||||
true => DCDCEN_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
*self == DCDCEN_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
*self == DCDCEN_A::ENABLED
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DCDCEN` writer - Enable or disable DC/DC converter"]
|
||||
pub type DCDCEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, DCDCEN_SPEC, DCDCEN_A, O>;
|
||||
impl<'a, const O: u8> DCDCEN_W<'a, O> {
|
||||
#[doc = "Disable"]
|
||||
#[inline(always)]
|
||||
pub fn disabled(self) -> &'a mut W {
|
||||
self.variant(DCDCEN_A::DISABLED)
|
||||
}
|
||||
#[doc = "Enable"]
|
||||
#[inline(always)]
|
||||
pub fn enabled(self) -> &'a mut W {
|
||||
self.variant(DCDCEN_A::ENABLED)
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - Enable or disable DC/DC converter"]
|
||||
#[inline(always)]
|
||||
pub fn dcdcen(&self) -> DCDCEN_R {
|
||||
DCDCEN_R::new((self.bits & 1) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Enable or disable DC/DC converter"]
|
||||
#[inline(always)]
|
||||
pub fn dcdcen(&mut self) -> DCDCEN_W<0> {
|
||||
DCDCEN_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 = "DC/DC enable 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 [dcdcen](index.html) module"]
|
||||
pub struct DCDCEN_SPEC;
|
||||
impl crate::RegisterSpec for DCDCEN_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [dcdcen::R](R) reader structure"]
|
||||
impl crate::Readable for DCDCEN_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [dcdcen::W](W) writer structure"]
|
||||
impl crate::Writable for DCDCEN_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets DCDCEN to value 0"]
|
||||
impl crate::Resettable for DCDCEN_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
+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
|
||||
}
|
||||
}
|
||||
+127
@@ -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
|
||||
}
|
||||
}
|
||||
+80
@@ -0,0 +1,80 @@
|
||||
#[doc = "Register `GPREGRET` 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` 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 = "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 to value 0"]
|
||||
impl crate::Resettable for GPREGRET_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
+80
@@ -0,0 +1,80 @@
|
||||
#[doc = "Register `GPREGRET2` reader"]
|
||||
pub struct R(crate::R<GPREGRET2_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<GPREGRET2_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<GPREGRET2_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<GPREGRET2_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `GPREGRET2` writer"]
|
||||
pub struct W(crate::W<GPREGRET2_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<GPREGRET2_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<GPREGRET2_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<GPREGRET2_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, GPREGRET2_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 = "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 [gpregret2](index.html) module"]
|
||||
pub struct GPREGRET2_SPEC;
|
||||
impl crate::RegisterSpec for GPREGRET2_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [gpregret2::R](R) reader structure"]
|
||||
impl crate::Readable for GPREGRET2_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [gpregret2::W](W) writer structure"]
|
||||
impl crate::Writable for GPREGRET2_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets GPREGRET2 to value 0"]
|
||||
impl crate::Resettable for GPREGRET2_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
|
||||
}
|
||||
}
|
||||
+319
@@ -0,0 +1,319 @@
|
||||
#[doc = "Register `POFCON` reader"]
|
||||
pub struct R(crate::R<POFCON_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<POFCON_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<POFCON_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<POFCON_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `POFCON` writer"]
|
||||
pub struct W(crate::W<POFCON_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<POFCON_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<POFCON_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<POFCON_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `POF` reader - Enable or disable power failure comparator"]
|
||||
pub type POF_R = crate::BitReader<POF_A>;
|
||||
#[doc = "Enable or disable power failure comparator\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum POF_A {
|
||||
#[doc = "0: Disable"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Enable"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<POF_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: POF_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl POF_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> POF_A {
|
||||
match self.bits {
|
||||
false => POF_A::DISABLED,
|
||||
true => POF_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
*self == POF_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
*self == POF_A::ENABLED
|
||||
}
|
||||
}
|
||||
#[doc = "Field `POF` writer - Enable or disable power failure comparator"]
|
||||
pub type POF_W<'a, const O: u8> = crate::BitWriter<'a, u32, POFCON_SPEC, POF_A, O>;
|
||||
impl<'a, const O: u8> POF_W<'a, O> {
|
||||
#[doc = "Disable"]
|
||||
#[inline(always)]
|
||||
pub fn disabled(self) -> &'a mut W {
|
||||
self.variant(POF_A::DISABLED)
|
||||
}
|
||||
#[doc = "Enable"]
|
||||
#[inline(always)]
|
||||
pub fn enabled(self) -> &'a mut W {
|
||||
self.variant(POF_A::ENABLED)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `THRESHOLD` reader - Power failure comparator threshold setting"]
|
||||
pub type THRESHOLD_R = crate::FieldReader<u8, THRESHOLD_A>;
|
||||
#[doc = "Power failure comparator threshold setting\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
#[repr(u8)]
|
||||
pub enum THRESHOLD_A {
|
||||
#[doc = "4: Set threshold to 1.7 V"]
|
||||
V17 = 4,
|
||||
#[doc = "5: Set threshold to 1.8 V"]
|
||||
V18 = 5,
|
||||
#[doc = "6: Set threshold to 1.9 V"]
|
||||
V19 = 6,
|
||||
#[doc = "7: Set threshold to 2.0 V"]
|
||||
V20 = 7,
|
||||
#[doc = "8: Set threshold to 2.1 V"]
|
||||
V21 = 8,
|
||||
#[doc = "9: Set threshold to 2.2 V"]
|
||||
V22 = 9,
|
||||
#[doc = "10: Set threshold to 2.3 V"]
|
||||
V23 = 10,
|
||||
#[doc = "11: Set threshold to 2.4 V"]
|
||||
V24 = 11,
|
||||
#[doc = "12: Set threshold to 2.5 V"]
|
||||
V25 = 12,
|
||||
#[doc = "13: Set threshold to 2.6 V"]
|
||||
V26 = 13,
|
||||
#[doc = "14: Set threshold to 2.7 V"]
|
||||
V27 = 14,
|
||||
#[doc = "15: Set threshold to 2.8 V"]
|
||||
V28 = 15,
|
||||
}
|
||||
impl From<THRESHOLD_A> for u8 {
|
||||
#[inline(always)]
|
||||
fn from(variant: THRESHOLD_A) -> Self {
|
||||
variant as _
|
||||
}
|
||||
}
|
||||
impl THRESHOLD_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> Option<THRESHOLD_A> {
|
||||
match self.bits {
|
||||
4 => Some(THRESHOLD_A::V17),
|
||||
5 => Some(THRESHOLD_A::V18),
|
||||
6 => Some(THRESHOLD_A::V19),
|
||||
7 => Some(THRESHOLD_A::V20),
|
||||
8 => Some(THRESHOLD_A::V21),
|
||||
9 => Some(THRESHOLD_A::V22),
|
||||
10 => Some(THRESHOLD_A::V23),
|
||||
11 => Some(THRESHOLD_A::V24),
|
||||
12 => Some(THRESHOLD_A::V25),
|
||||
13 => Some(THRESHOLD_A::V26),
|
||||
14 => Some(THRESHOLD_A::V27),
|
||||
15 => Some(THRESHOLD_A::V28),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `V17`"]
|
||||
#[inline(always)]
|
||||
pub fn is_v17(&self) -> bool {
|
||||
*self == THRESHOLD_A::V17
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `V18`"]
|
||||
#[inline(always)]
|
||||
pub fn is_v18(&self) -> bool {
|
||||
*self == THRESHOLD_A::V18
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `V19`"]
|
||||
#[inline(always)]
|
||||
pub fn is_v19(&self) -> bool {
|
||||
*self == THRESHOLD_A::V19
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `V20`"]
|
||||
#[inline(always)]
|
||||
pub fn is_v20(&self) -> bool {
|
||||
*self == THRESHOLD_A::V20
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `V21`"]
|
||||
#[inline(always)]
|
||||
pub fn is_v21(&self) -> bool {
|
||||
*self == THRESHOLD_A::V21
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `V22`"]
|
||||
#[inline(always)]
|
||||
pub fn is_v22(&self) -> bool {
|
||||
*self == THRESHOLD_A::V22
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `V23`"]
|
||||
#[inline(always)]
|
||||
pub fn is_v23(&self) -> bool {
|
||||
*self == THRESHOLD_A::V23
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `V24`"]
|
||||
#[inline(always)]
|
||||
pub fn is_v24(&self) -> bool {
|
||||
*self == THRESHOLD_A::V24
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `V25`"]
|
||||
#[inline(always)]
|
||||
pub fn is_v25(&self) -> bool {
|
||||
*self == THRESHOLD_A::V25
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `V26`"]
|
||||
#[inline(always)]
|
||||
pub fn is_v26(&self) -> bool {
|
||||
*self == THRESHOLD_A::V26
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `V27`"]
|
||||
#[inline(always)]
|
||||
pub fn is_v27(&self) -> bool {
|
||||
*self == THRESHOLD_A::V27
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `V28`"]
|
||||
#[inline(always)]
|
||||
pub fn is_v28(&self) -> bool {
|
||||
*self == THRESHOLD_A::V28
|
||||
}
|
||||
}
|
||||
#[doc = "Field `THRESHOLD` writer - Power failure comparator threshold setting"]
|
||||
pub type THRESHOLD_W<'a, const O: u8> =
|
||||
crate::FieldWriter<'a, u32, POFCON_SPEC, u8, THRESHOLD_A, 4, O>;
|
||||
impl<'a, const O: u8> THRESHOLD_W<'a, O> {
|
||||
#[doc = "Set threshold to 1.7 V"]
|
||||
#[inline(always)]
|
||||
pub fn v17(self) -> &'a mut W {
|
||||
self.variant(THRESHOLD_A::V17)
|
||||
}
|
||||
#[doc = "Set threshold to 1.8 V"]
|
||||
#[inline(always)]
|
||||
pub fn v18(self) -> &'a mut W {
|
||||
self.variant(THRESHOLD_A::V18)
|
||||
}
|
||||
#[doc = "Set threshold to 1.9 V"]
|
||||
#[inline(always)]
|
||||
pub fn v19(self) -> &'a mut W {
|
||||
self.variant(THRESHOLD_A::V19)
|
||||
}
|
||||
#[doc = "Set threshold to 2.0 V"]
|
||||
#[inline(always)]
|
||||
pub fn v20(self) -> &'a mut W {
|
||||
self.variant(THRESHOLD_A::V20)
|
||||
}
|
||||
#[doc = "Set threshold to 2.1 V"]
|
||||
#[inline(always)]
|
||||
pub fn v21(self) -> &'a mut W {
|
||||
self.variant(THRESHOLD_A::V21)
|
||||
}
|
||||
#[doc = "Set threshold to 2.2 V"]
|
||||
#[inline(always)]
|
||||
pub fn v22(self) -> &'a mut W {
|
||||
self.variant(THRESHOLD_A::V22)
|
||||
}
|
||||
#[doc = "Set threshold to 2.3 V"]
|
||||
#[inline(always)]
|
||||
pub fn v23(self) -> &'a mut W {
|
||||
self.variant(THRESHOLD_A::V23)
|
||||
}
|
||||
#[doc = "Set threshold to 2.4 V"]
|
||||
#[inline(always)]
|
||||
pub fn v24(self) -> &'a mut W {
|
||||
self.variant(THRESHOLD_A::V24)
|
||||
}
|
||||
#[doc = "Set threshold to 2.5 V"]
|
||||
#[inline(always)]
|
||||
pub fn v25(self) -> &'a mut W {
|
||||
self.variant(THRESHOLD_A::V25)
|
||||
}
|
||||
#[doc = "Set threshold to 2.6 V"]
|
||||
#[inline(always)]
|
||||
pub fn v26(self) -> &'a mut W {
|
||||
self.variant(THRESHOLD_A::V26)
|
||||
}
|
||||
#[doc = "Set threshold to 2.7 V"]
|
||||
#[inline(always)]
|
||||
pub fn v27(self) -> &'a mut W {
|
||||
self.variant(THRESHOLD_A::V27)
|
||||
}
|
||||
#[doc = "Set threshold to 2.8 V"]
|
||||
#[inline(always)]
|
||||
pub fn v28(self) -> &'a mut W {
|
||||
self.variant(THRESHOLD_A::V28)
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - Enable or disable power failure comparator"]
|
||||
#[inline(always)]
|
||||
pub fn pof(&self) -> POF_R {
|
||||
POF_R::new((self.bits & 1) != 0)
|
||||
}
|
||||
#[doc = "Bits 1:4 - Power failure comparator threshold setting"]
|
||||
#[inline(always)]
|
||||
pub fn threshold(&self) -> THRESHOLD_R {
|
||||
THRESHOLD_R::new(((self.bits >> 1) & 0x0f) as u8)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Enable or disable power failure comparator"]
|
||||
#[inline(always)]
|
||||
pub fn pof(&mut self) -> POF_W<0> {
|
||||
POF_W::new(self)
|
||||
}
|
||||
#[doc = "Bits 1:4 - Power failure comparator threshold setting"]
|
||||
#[inline(always)]
|
||||
pub fn threshold(&mut self) -> THRESHOLD_W<1> {
|
||||
THRESHOLD_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 comparator configuration\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [pofcon](index.html) module"]
|
||||
pub struct POFCON_SPEC;
|
||||
impl crate::RegisterSpec for POFCON_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [pofcon::R](R) reader structure"]
|
||||
impl crate::Readable for POFCON_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [pofcon::W](W) writer structure"]
|
||||
impl crate::Writable for POFCON_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets POFCON to value 0"]
|
||||
impl crate::Resettable for POFCON_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
Vendored
+22
@@ -0,0 +1,22 @@
|
||||
#[doc = r"Register block"]
|
||||
#[repr(C)]
|
||||
pub struct RAM {
|
||||
#[doc = "0x00 - Description cluster: RAMn power control register. The RAM size will vary depending on product variant, and the RAMn register will only be present if the corresponding RAM AHB slave is present on the device."]
|
||||
pub power: POWER,
|
||||
#[doc = "0x04 - Description cluster: RAMn power control set register"]
|
||||
pub powerset: POWERSET,
|
||||
#[doc = "0x08 - Description cluster: RAMn power control clear register"]
|
||||
pub powerclr: POWERCLR,
|
||||
}
|
||||
#[doc = "POWER (rw) register accessor: an alias for `Reg<POWER_SPEC>`"]
|
||||
pub type POWER = crate::Reg<power::POWER_SPEC>;
|
||||
#[doc = "Description cluster: RAMn power control register. The RAM size will vary depending on product variant, and the RAMn register will only be present if the corresponding RAM AHB slave is present on the device."]
|
||||
pub mod power;
|
||||
#[doc = "POWERSET (w) register accessor: an alias for `Reg<POWERSET_SPEC>`"]
|
||||
pub type POWERSET = crate::Reg<powerset::POWERSET_SPEC>;
|
||||
#[doc = "Description cluster: RAMn power control set register"]
|
||||
pub mod powerset;
|
||||
#[doc = "POWERCLR (w) register accessor: an alias for `Reg<POWERCLR_SPEC>`"]
|
||||
pub type POWERCLR = crate::Reg<powerclr::POWERCLR_SPEC>;
|
||||
#[doc = "Description cluster: RAMn power control clear register"]
|
||||
pub mod powerclr;
|
||||
+306
@@ -0,0 +1,306 @@
|
||||
#[doc = "Register `POWER` reader"]
|
||||
pub struct R(crate::R<POWER_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<POWER_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<POWER_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<POWER_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `POWER` writer"]
|
||||
pub struct W(crate::W<POWER_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<POWER_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<POWER_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<POWER_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S0POWER` reader - Keep RAM section S0 ON or OFF in System ON mode."]
|
||||
pub type S0POWER_R = crate::BitReader<S0POWER_A>;
|
||||
#[doc = "Keep RAM section S0 ON or OFF in System ON mode.\n\nValue on reset: 1"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S0POWER_A {
|
||||
#[doc = "0: Off"]
|
||||
OFF = 0,
|
||||
#[doc = "1: On"]
|
||||
ON = 1,
|
||||
}
|
||||
impl From<S0POWER_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S0POWER_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl S0POWER_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> S0POWER_A {
|
||||
match self.bits {
|
||||
false => S0POWER_A::OFF,
|
||||
true => S0POWER_A::ON,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `OFF`"]
|
||||
#[inline(always)]
|
||||
pub fn is_off(&self) -> bool {
|
||||
*self == S0POWER_A::OFF
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ON`"]
|
||||
#[inline(always)]
|
||||
pub fn is_on(&self) -> bool {
|
||||
*self == S0POWER_A::ON
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S0POWER` writer - Keep RAM section S0 ON or OFF in System ON mode."]
|
||||
pub type S0POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWER_SPEC, S0POWER_A, O>;
|
||||
impl<'a, const O: u8> S0POWER_W<'a, O> {
|
||||
#[doc = "Off"]
|
||||
#[inline(always)]
|
||||
pub fn off(self) -> &'a mut W {
|
||||
self.variant(S0POWER_A::OFF)
|
||||
}
|
||||
#[doc = "On"]
|
||||
#[inline(always)]
|
||||
pub fn on(self) -> &'a mut W {
|
||||
self.variant(S0POWER_A::ON)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S1POWER` reader - Keep RAM section S1 ON or OFF in System ON mode."]
|
||||
pub type S1POWER_R = crate::BitReader<S1POWER_A>;
|
||||
#[doc = "Keep RAM section S1 ON or OFF in System ON mode.\n\nValue on reset: 1"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S1POWER_A {
|
||||
#[doc = "0: Off"]
|
||||
OFF = 0,
|
||||
#[doc = "1: On"]
|
||||
ON = 1,
|
||||
}
|
||||
impl From<S1POWER_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S1POWER_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl S1POWER_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> S1POWER_A {
|
||||
match self.bits {
|
||||
false => S1POWER_A::OFF,
|
||||
true => S1POWER_A::ON,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `OFF`"]
|
||||
#[inline(always)]
|
||||
pub fn is_off(&self) -> bool {
|
||||
*self == S1POWER_A::OFF
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ON`"]
|
||||
#[inline(always)]
|
||||
pub fn is_on(&self) -> bool {
|
||||
*self == S1POWER_A::ON
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S1POWER` writer - Keep RAM section S1 ON or OFF in System ON mode."]
|
||||
pub type S1POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWER_SPEC, S1POWER_A, O>;
|
||||
impl<'a, const O: u8> S1POWER_W<'a, O> {
|
||||
#[doc = "Off"]
|
||||
#[inline(always)]
|
||||
pub fn off(self) -> &'a mut W {
|
||||
self.variant(S1POWER_A::OFF)
|
||||
}
|
||||
#[doc = "On"]
|
||||
#[inline(always)]
|
||||
pub fn on(self) -> &'a mut W {
|
||||
self.variant(S1POWER_A::ON)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S0RETENTION` reader - Keep retention on RAM section S0 when RAM section is in OFF"]
|
||||
pub type S0RETENTION_R = crate::BitReader<S0RETENTION_A>;
|
||||
#[doc = "Keep retention on RAM section S0 when RAM section is in OFF\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S0RETENTION_A {
|
||||
#[doc = "0: Off"]
|
||||
OFF = 0,
|
||||
#[doc = "1: On"]
|
||||
ON = 1,
|
||||
}
|
||||
impl From<S0RETENTION_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S0RETENTION_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl S0RETENTION_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> S0RETENTION_A {
|
||||
match self.bits {
|
||||
false => S0RETENTION_A::OFF,
|
||||
true => S0RETENTION_A::ON,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `OFF`"]
|
||||
#[inline(always)]
|
||||
pub fn is_off(&self) -> bool {
|
||||
*self == S0RETENTION_A::OFF
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ON`"]
|
||||
#[inline(always)]
|
||||
pub fn is_on(&self) -> bool {
|
||||
*self == S0RETENTION_A::ON
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S0RETENTION` writer - Keep retention on RAM section S0 when RAM section is in OFF"]
|
||||
pub type S0RETENTION_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWER_SPEC, S0RETENTION_A, O>;
|
||||
impl<'a, const O: u8> S0RETENTION_W<'a, O> {
|
||||
#[doc = "Off"]
|
||||
#[inline(always)]
|
||||
pub fn off(self) -> &'a mut W {
|
||||
self.variant(S0RETENTION_A::OFF)
|
||||
}
|
||||
#[doc = "On"]
|
||||
#[inline(always)]
|
||||
pub fn on(self) -> &'a mut W {
|
||||
self.variant(S0RETENTION_A::ON)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S1RETENTION` reader - Keep retention on RAM section S1 when RAM section is in OFF"]
|
||||
pub type S1RETENTION_R = crate::BitReader<S1RETENTION_A>;
|
||||
#[doc = "Keep retention on RAM section S1 when RAM section is in OFF\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S1RETENTION_A {
|
||||
#[doc = "0: Off"]
|
||||
OFF = 0,
|
||||
#[doc = "1: On"]
|
||||
ON = 1,
|
||||
}
|
||||
impl From<S1RETENTION_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S1RETENTION_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl S1RETENTION_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> S1RETENTION_A {
|
||||
match self.bits {
|
||||
false => S1RETENTION_A::OFF,
|
||||
true => S1RETENTION_A::ON,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `OFF`"]
|
||||
#[inline(always)]
|
||||
pub fn is_off(&self) -> bool {
|
||||
*self == S1RETENTION_A::OFF
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ON`"]
|
||||
#[inline(always)]
|
||||
pub fn is_on(&self) -> bool {
|
||||
*self == S1RETENTION_A::ON
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S1RETENTION` writer - Keep retention on RAM section S1 when RAM section is in OFF"]
|
||||
pub type S1RETENTION_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWER_SPEC, S1RETENTION_A, O>;
|
||||
impl<'a, const O: u8> S1RETENTION_W<'a, O> {
|
||||
#[doc = "Off"]
|
||||
#[inline(always)]
|
||||
pub fn off(self) -> &'a mut W {
|
||||
self.variant(S1RETENTION_A::OFF)
|
||||
}
|
||||
#[doc = "On"]
|
||||
#[inline(always)]
|
||||
pub fn on(self) -> &'a mut W {
|
||||
self.variant(S1RETENTION_A::ON)
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - Keep RAM section S0 ON or OFF in System ON mode."]
|
||||
#[inline(always)]
|
||||
pub fn s0power(&self) -> S0POWER_R {
|
||||
S0POWER_R::new((self.bits & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 1 - Keep RAM section S1 ON or OFF in System ON mode."]
|
||||
#[inline(always)]
|
||||
pub fn s1power(&self) -> S1POWER_R {
|
||||
S1POWER_R::new(((self.bits >> 1) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 16 - Keep retention on RAM section S0 when RAM section is in OFF"]
|
||||
#[inline(always)]
|
||||
pub fn s0retention(&self) -> S0RETENTION_R {
|
||||
S0RETENTION_R::new(((self.bits >> 16) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 17 - Keep retention on RAM section S1 when RAM section is in OFF"]
|
||||
#[inline(always)]
|
||||
pub fn s1retention(&self) -> S1RETENTION_R {
|
||||
S1RETENTION_R::new(((self.bits >> 17) & 1) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Keep RAM section S0 ON or OFF in System ON mode."]
|
||||
#[inline(always)]
|
||||
pub fn s0power(&mut self) -> S0POWER_W<0> {
|
||||
S0POWER_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 1 - Keep RAM section S1 ON or OFF in System ON mode."]
|
||||
#[inline(always)]
|
||||
pub fn s1power(&mut self) -> S1POWER_W<1> {
|
||||
S1POWER_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 16 - Keep retention on RAM section S0 when RAM section is in OFF"]
|
||||
#[inline(always)]
|
||||
pub fn s0retention(&mut self) -> S0RETENTION_W<16> {
|
||||
S0RETENTION_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 17 - Keep retention on RAM section S1 when RAM section is in OFF"]
|
||||
#[inline(always)]
|
||||
pub fn s1retention(&mut self) -> S1RETENTION_W<17> {
|
||||
S1RETENTION_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 cluster: RAMn power control register. The RAM size will vary depending on product variant, and the RAMn register will only be present if the corresponding RAM AHB slave is present on the device.\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 [power](index.html) module"]
|
||||
pub struct POWER_SPEC;
|
||||
impl crate::RegisterSpec for POWER_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [power::R](R) reader structure"]
|
||||
impl crate::Readable for POWER_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [power::W](W) writer structure"]
|
||||
impl crate::Writable for POWER_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets POWER to value 0xffff"]
|
||||
impl crate::Resettable for POWER_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0xffff
|
||||
}
|
||||
}
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
#[doc = "Register `POWERCLR` writer"]
|
||||
pub struct W(crate::W<POWERCLR_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<POWERCLR_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<POWERCLR_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<POWERCLR_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep RAM section S0 of RAMn on or off in System ON mode\n\nValue on reset: 1"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S0POWER_AW {
|
||||
#[doc = "1: Off"]
|
||||
OFF = 1,
|
||||
}
|
||||
impl From<S0POWER_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S0POWER_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S0POWER` writer - Keep RAM section S0 of RAMn on or off in System ON mode"]
|
||||
pub type S0POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWERCLR_SPEC, S0POWER_AW, O>;
|
||||
impl<'a, const O: u8> S0POWER_W<'a, O> {
|
||||
#[doc = "Off"]
|
||||
#[inline(always)]
|
||||
pub fn off(self) -> &'a mut W {
|
||||
self.variant(S0POWER_AW::OFF)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep RAM section S1 of RAMn on or off in System ON mode\n\nValue on reset: 1"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S1POWER_AW {
|
||||
#[doc = "1: Off"]
|
||||
OFF = 1,
|
||||
}
|
||||
impl From<S1POWER_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S1POWER_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S1POWER` writer - Keep RAM section S1 of RAMn on or off in System ON mode"]
|
||||
pub type S1POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWERCLR_SPEC, S1POWER_AW, O>;
|
||||
impl<'a, const O: u8> S1POWER_W<'a, O> {
|
||||
#[doc = "Off"]
|
||||
#[inline(always)]
|
||||
pub fn off(self) -> &'a mut W {
|
||||
self.variant(S1POWER_AW::OFF)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep retention on RAM section S0 when RAM section is switched off\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S0RETENTION_AW {
|
||||
#[doc = "1: Off"]
|
||||
OFF = 1,
|
||||
}
|
||||
impl From<S0RETENTION_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S0RETENTION_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S0RETENTION` writer - Keep retention on RAM section S0 when RAM section is switched off"]
|
||||
pub type S0RETENTION_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, POWERCLR_SPEC, S0RETENTION_AW, O>;
|
||||
impl<'a, const O: u8> S0RETENTION_W<'a, O> {
|
||||
#[doc = "Off"]
|
||||
#[inline(always)]
|
||||
pub fn off(self) -> &'a mut W {
|
||||
self.variant(S0RETENTION_AW::OFF)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep retention on RAM section S1 when RAM section is switched off\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S1RETENTION_AW {
|
||||
#[doc = "1: Off"]
|
||||
OFF = 1,
|
||||
}
|
||||
impl From<S1RETENTION_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S1RETENTION_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S1RETENTION` writer - Keep retention on RAM section S1 when RAM section is switched off"]
|
||||
pub type S1RETENTION_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, POWERCLR_SPEC, S1RETENTION_AW, O>;
|
||||
impl<'a, const O: u8> S1RETENTION_W<'a, O> {
|
||||
#[doc = "Off"]
|
||||
#[inline(always)]
|
||||
pub fn off(self) -> &'a mut W {
|
||||
self.variant(S1RETENTION_AW::OFF)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Keep RAM section S0 of RAMn on or off in System ON mode"]
|
||||
#[inline(always)]
|
||||
pub fn s0power(&mut self) -> S0POWER_W<0> {
|
||||
S0POWER_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 1 - Keep RAM section S1 of RAMn on or off in System ON mode"]
|
||||
#[inline(always)]
|
||||
pub fn s1power(&mut self) -> S1POWER_W<1> {
|
||||
S1POWER_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 16 - Keep retention on RAM section S0 when RAM section is switched off"]
|
||||
#[inline(always)]
|
||||
pub fn s0retention(&mut self) -> S0RETENTION_W<16> {
|
||||
S0RETENTION_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 17 - Keep retention on RAM section S1 when RAM section is switched off"]
|
||||
#[inline(always)]
|
||||
pub fn s1retention(&mut self) -> S1RETENTION_W<17> {
|
||||
S1RETENTION_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 cluster: RAMn power control clear register\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 [powerclr](index.html) module"]
|
||||
pub struct POWERCLR_SPEC;
|
||||
impl crate::RegisterSpec for POWERCLR_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [powerclr::W](W) writer structure"]
|
||||
impl crate::Writable for POWERCLR_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets POWERCLR to value 0xffff"]
|
||||
impl crate::Resettable for POWERCLR_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0xffff
|
||||
}
|
||||
}
|
||||
+151
@@ -0,0 +1,151 @@
|
||||
#[doc = "Register `POWERSET` writer"]
|
||||
pub struct W(crate::W<POWERSET_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<POWERSET_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<POWERSET_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<POWERSET_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep RAM section S0 of RAMn on or off in System ON mode\n\nValue on reset: 1"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S0POWER_AW {
|
||||
#[doc = "1: On"]
|
||||
ON = 1,
|
||||
}
|
||||
impl From<S0POWER_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S0POWER_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S0POWER` writer - Keep RAM section S0 of RAMn on or off in System ON mode"]
|
||||
pub type S0POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWERSET_SPEC, S0POWER_AW, O>;
|
||||
impl<'a, const O: u8> S0POWER_W<'a, O> {
|
||||
#[doc = "On"]
|
||||
#[inline(always)]
|
||||
pub fn on(self) -> &'a mut W {
|
||||
self.variant(S0POWER_AW::ON)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep RAM section S1 of RAMn on or off in System ON mode\n\nValue on reset: 1"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S1POWER_AW {
|
||||
#[doc = "1: On"]
|
||||
ON = 1,
|
||||
}
|
||||
impl From<S1POWER_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S1POWER_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S1POWER` writer - Keep RAM section S1 of RAMn on or off in System ON mode"]
|
||||
pub type S1POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWERSET_SPEC, S1POWER_AW, O>;
|
||||
impl<'a, const O: u8> S1POWER_W<'a, O> {
|
||||
#[doc = "On"]
|
||||
#[inline(always)]
|
||||
pub fn on(self) -> &'a mut W {
|
||||
self.variant(S1POWER_AW::ON)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep retention on RAM section S0 when RAM section is switched off\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S0RETENTION_AW {
|
||||
#[doc = "1: On"]
|
||||
ON = 1,
|
||||
}
|
||||
impl From<S0RETENTION_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S0RETENTION_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S0RETENTION` writer - Keep retention on RAM section S0 when RAM section is switched off"]
|
||||
pub type S0RETENTION_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, POWERSET_SPEC, S0RETENTION_AW, O>;
|
||||
impl<'a, const O: u8> S0RETENTION_W<'a, O> {
|
||||
#[doc = "On"]
|
||||
#[inline(always)]
|
||||
pub fn on(self) -> &'a mut W {
|
||||
self.variant(S0RETENTION_AW::ON)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep retention on RAM section S1 when RAM section is switched off\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S1RETENTION_AW {
|
||||
#[doc = "1: On"]
|
||||
ON = 1,
|
||||
}
|
||||
impl From<S1RETENTION_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S1RETENTION_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S1RETENTION` writer - Keep retention on RAM section S1 when RAM section is switched off"]
|
||||
pub type S1RETENTION_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, POWERSET_SPEC, S1RETENTION_AW, O>;
|
||||
impl<'a, const O: u8> S1RETENTION_W<'a, O> {
|
||||
#[doc = "On"]
|
||||
#[inline(always)]
|
||||
pub fn on(self) -> &'a mut W {
|
||||
self.variant(S1RETENTION_AW::ON)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Keep RAM section S0 of RAMn on or off in System ON mode"]
|
||||
#[inline(always)]
|
||||
pub fn s0power(&mut self) -> S0POWER_W<0> {
|
||||
S0POWER_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 1 - Keep RAM section S1 of RAMn on or off in System ON mode"]
|
||||
#[inline(always)]
|
||||
pub fn s1power(&mut self) -> S1POWER_W<1> {
|
||||
S1POWER_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 16 - Keep retention on RAM section S0 when RAM section is switched off"]
|
||||
#[inline(always)]
|
||||
pub fn s0retention(&mut self) -> S0RETENTION_W<16> {
|
||||
S0RETENTION_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 17 - Keep retention on RAM section S1 when RAM section is switched off"]
|
||||
#[inline(always)]
|
||||
pub fn s1retention(&mut self) -> S1RETENTION_W<17> {
|
||||
S1RETENTION_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 cluster: RAMn power control set register\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 [powerset](index.html) module"]
|
||||
pub struct POWERSET_SPEC;
|
||||
impl crate::RegisterSpec for POWERSET_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [powerset::W](W) writer structure"]
|
||||
impl crate::Writable for POWERSET_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets POWERSET to value 0xffff"]
|
||||
impl crate::Resettable for POWERSET_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0xffff
|
||||
}
|
||||
}
|
||||
+426
@@ -0,0 +1,426 @@
|
||||
#[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 watchdog detected"]
|
||||
pub type DOG_R = crate::BitReader<DOG_A>;
|
||||
#[doc = "Reset from 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 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 `SREQ` reader - Reset from soft reset detected"]
|
||||
pub type SREQ_R = crate::BitReader<SREQ_A>;
|
||||
#[doc = "Reset from soft reset 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 soft reset 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 `OFF` reader - Reset due to wake up from System OFF mode when wakeup is triggered from DETECT signal from GPIO"]
|
||||
pub type OFF_R = crate::BitReader<OFF_A>;
|
||||
#[doc = "Reset due to wake up from System OFF mode when wakeup is triggered from 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 wake up from System OFF mode when wakeup is triggered from 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 wake up from System OFF mode when wakeup is triggered from entering into debug interface mode"]
|
||||
pub type DIF_R = crate::BitReader<DIF_A>;
|
||||
#[doc = "Reset due to wake up from System OFF mode when wakeup is triggered from entering into 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 wake up from System OFF mode when wakeup is triggered from entering into 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)
|
||||
}
|
||||
}
|
||||
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 watchdog detected"]
|
||||
#[inline(always)]
|
||||
pub fn dog(&self) -> DOG_R {
|
||||
DOG_R::new(((self.bits >> 1) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - Reset from soft reset detected"]
|
||||
#[inline(always)]
|
||||
pub fn sreq(&self) -> SREQ_R {
|
||||
SREQ_R::new(((self.bits >> 2) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 3 - Reset from CPU lock-up detected"]
|
||||
#[inline(always)]
|
||||
pub fn lockup(&self) -> LOCKUP_R {
|
||||
LOCKUP_R::new(((self.bits >> 3) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 16 - Reset due to wake up from System OFF mode when wakeup is triggered from DETECT signal from GPIO"]
|
||||
#[inline(always)]
|
||||
pub fn off(&self) -> OFF_R {
|
||||
OFF_R::new(((self.bits >> 16) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 18 - Reset due to wake up from System OFF mode when wakeup is triggered from entering into debug interface mode"]
|
||||
#[inline(always)]
|
||||
pub fn dif(&self) -> DIF_R {
|
||||
DIF_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 watchdog detected"]
|
||||
#[inline(always)]
|
||||
pub fn dog(&mut self) -> DOG_W<1> {
|
||||
DOG_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 2 - Reset from soft reset detected"]
|
||||
#[inline(always)]
|
||||
pub fn sreq(&mut self) -> SREQ_W<2> {
|
||||
SREQ_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 3 - Reset from CPU lock-up detected"]
|
||||
#[inline(always)]
|
||||
pub fn lockup(&mut self) -> LOCKUP_W<3> {
|
||||
LOCKUP_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 16 - Reset due to wake up from System OFF mode when wakeup is triggered from DETECT signal from GPIO"]
|
||||
#[inline(always)]
|
||||
pub fn off(&mut self) -> OFF_W<16> {
|
||||
OFF_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 18 - Reset due to wake up from System OFF mode when wakeup is triggered from entering into debug interface mode"]
|
||||
#[inline(always)]
|
||||
pub fn dif(&mut self) -> DIF_W<18> {
|
||||
DIF_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
|
||||
}
|
||||
}
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
#[doc = "Register `SYSTEMOFF` writer"]
|
||||
pub struct W(crate::W<SYSTEMOFF_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<SYSTEMOFF_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<SYSTEMOFF_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<SYSTEMOFF_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Enable System OFF mode\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum SYSTEMOFF_AW {
|
||||
#[doc = "1: Enable System OFF mode"]
|
||||
ENTER = 1,
|
||||
}
|
||||
impl From<SYSTEMOFF_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: SYSTEMOFF_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `SYSTEMOFF` writer - Enable System OFF mode"]
|
||||
pub type SYSTEMOFF_W<'a, const O: u8> = crate::BitWriter<'a, u32, SYSTEMOFF_SPEC, SYSTEMOFF_AW, O>;
|
||||
impl<'a, const O: u8> SYSTEMOFF_W<'a, O> {
|
||||
#[doc = "Enable System OFF mode"]
|
||||
#[inline(always)]
|
||||
pub fn enter(self) -> &'a mut W {
|
||||
self.variant(SYSTEMOFF_AW::ENTER)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Enable System OFF mode"]
|
||||
#[inline(always)]
|
||||
pub fn systemoff(&mut self) -> SYSTEMOFF_W<0> {
|
||||
SYSTEMOFF_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 = "System OFF register\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 [systemoff](index.html) module"]
|
||||
pub struct SYSTEMOFF_SPEC;
|
||||
impl crate::RegisterSpec for SYSTEMOFF_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [systemoff::W](W) writer structure"]
|
||||
impl crate::Writable for SYSTEMOFF_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets SYSTEMOFF to value 0"]
|
||||
impl crate::Resettable for SYSTEMOFF_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
+72
@@ -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
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user