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 DC/DC converter for REG1 stage."]
|
||||
pub type DCDCEN_R = crate::BitReader<DCDCEN_A>;
|
||||
#[doc = "Enable DC/DC converter for REG1 stage.\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 DC/DC converter for REG1 stage."]
|
||||
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 DC/DC converter for REG1 stage."]
|
||||
#[inline(always)]
|
||||
pub fn dcdcen(&self) -> DCDCEN_R {
|
||||
DCDCEN_R::new((self.bits & 1) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Enable DC/DC converter for REG1 stage."]
|
||||
#[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 = "Enable DC/DC converter for REG1 stage.\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
|
||||
}
|
||||
}
|
||||
+126
@@ -0,0 +1,126 @@
|
||||
#[doc = "Register `DCDCEN0` reader"]
|
||||
pub struct R(crate::R<DCDCEN0_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<DCDCEN0_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<DCDCEN0_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<DCDCEN0_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `DCDCEN0` writer"]
|
||||
pub struct W(crate::W<DCDCEN0_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<DCDCEN0_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<DCDCEN0_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<DCDCEN0_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DCDCEN` reader - Enable DC/DC converter for REG0 stage."]
|
||||
pub type DCDCEN_R = crate::BitReader<DCDCEN_A>;
|
||||
#[doc = "Enable DC/DC converter for REG0 stage.\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 DC/DC converter for REG0 stage."]
|
||||
pub type DCDCEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, DCDCEN0_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 DC/DC converter for REG0 stage."]
|
||||
#[inline(always)]
|
||||
pub fn dcdcen(&self) -> DCDCEN_R {
|
||||
DCDCEN_R::new((self.bits & 1) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Enable DC/DC converter for REG0 stage."]
|
||||
#[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 = "Enable DC/DC converter for REG0 stage.\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 [dcdcen0](index.html) module"]
|
||||
pub struct DCDCEN0_SPEC;
|
||||
impl crate::RegisterSpec for DCDCEN0_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [dcdcen0::R](R) reader structure"]
|
||||
impl crate::Readable for DCDCEN0_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [dcdcen0::W](W) writer structure"]
|
||||
impl crate::Writable for DCDCEN0_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets DCDCEN0 to value 0"]
|
||||
impl crate::Resettable for DCDCEN0_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
#[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 - "]
|
||||
pub type EVENTS_POFWARN_R = crate::BitReader<bool>;
|
||||
#[doc = "Field `EVENTS_POFWARN` writer - "]
|
||||
pub type EVENTS_POFWARN_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, EVENTS_POFWARN_SPEC, bool, O>;
|
||||
impl R {
|
||||
#[doc = "Bit 0"]
|
||||
#[inline(always)]
|
||||
pub fn events_pofwarn(&self) -> EVENTS_POFWARN_R {
|
||||
EVENTS_POFWARN_R::new((self.bits & 1) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0"]
|
||||
#[inline(always)]
|
||||
pub fn events_pofwarn(&mut self) -> EVENTS_POFWARN_W<0> {
|
||||
EVENTS_POFWARN_W::new(self)
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Power failure warning\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [events_pofwarn](index.html) module"]
|
||||
pub struct EVENTS_POFWARN_SPEC;
|
||||
impl crate::RegisterSpec for EVENTS_POFWARN_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [events_pofwarn::R](R) reader structure"]
|
||||
impl crate::Readable for EVENTS_POFWARN_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [events_pofwarn::W](W) writer structure"]
|
||||
impl crate::Writable for EVENTS_POFWARN_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets EVENTS_POFWARN to value 0"]
|
||||
impl crate::Resettable for EVENTS_POFWARN_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
#[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 - "]
|
||||
pub type EVENTS_SLEEPENTER_R = crate::BitReader<bool>;
|
||||
#[doc = "Field `EVENTS_SLEEPENTER` writer - "]
|
||||
pub type EVENTS_SLEEPENTER_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, EVENTS_SLEEPENTER_SPEC, bool, O>;
|
||||
impl R {
|
||||
#[doc = "Bit 0"]
|
||||
#[inline(always)]
|
||||
pub fn events_sleepenter(&self) -> EVENTS_SLEEPENTER_R {
|
||||
EVENTS_SLEEPENTER_R::new((self.bits & 1) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0"]
|
||||
#[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
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
#[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 - "]
|
||||
pub type EVENTS_SLEEPEXIT_R = crate::BitReader<bool>;
|
||||
#[doc = "Field `EVENTS_SLEEPEXIT` writer - "]
|
||||
pub type EVENTS_SLEEPEXIT_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, EVENTS_SLEEPEXIT_SPEC, bool, O>;
|
||||
impl R {
|
||||
#[doc = "Bit 0"]
|
||||
#[inline(always)]
|
||||
pub fn events_sleepexit(&self) -> EVENTS_SLEEPEXIT_R {
|
||||
EVENTS_SLEEPEXIT_R::new((self.bits & 1) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0"]
|
||||
#[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
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
#[doc = "Register `EVENTS_USBDETECTED` reader"]
|
||||
pub struct R(crate::R<EVENTS_USBDETECTED_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<EVENTS_USBDETECTED_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<EVENTS_USBDETECTED_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<EVENTS_USBDETECTED_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `EVENTS_USBDETECTED` writer"]
|
||||
pub struct W(crate::W<EVENTS_USBDETECTED_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<EVENTS_USBDETECTED_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_USBDETECTED_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<EVENTS_USBDETECTED_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `EVENTS_USBDETECTED` reader - "]
|
||||
pub type EVENTS_USBDETECTED_R = crate::BitReader<bool>;
|
||||
#[doc = "Field `EVENTS_USBDETECTED` writer - "]
|
||||
pub type EVENTS_USBDETECTED_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, EVENTS_USBDETECTED_SPEC, bool, O>;
|
||||
impl R {
|
||||
#[doc = "Bit 0"]
|
||||
#[inline(always)]
|
||||
pub fn events_usbdetected(&self) -> EVENTS_USBDETECTED_R {
|
||||
EVENTS_USBDETECTED_R::new((self.bits & 1) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0"]
|
||||
#[inline(always)]
|
||||
pub fn events_usbdetected(&mut self) -> EVENTS_USBDETECTED_W<0> {
|
||||
EVENTS_USBDETECTED_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 = "Voltage supply detected on VBUS\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_usbdetected](index.html) module"]
|
||||
pub struct EVENTS_USBDETECTED_SPEC;
|
||||
impl crate::RegisterSpec for EVENTS_USBDETECTED_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [events_usbdetected::R](R) reader structure"]
|
||||
impl crate::Readable for EVENTS_USBDETECTED_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [events_usbdetected::W](W) writer structure"]
|
||||
impl crate::Writable for EVENTS_USBDETECTED_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets EVENTS_USBDETECTED to value 0"]
|
||||
impl crate::Resettable for EVENTS_USBDETECTED_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
#[doc = "Register `EVENTS_USBPWRRDY` reader"]
|
||||
pub struct R(crate::R<EVENTS_USBPWRRDY_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<EVENTS_USBPWRRDY_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<EVENTS_USBPWRRDY_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<EVENTS_USBPWRRDY_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `EVENTS_USBPWRRDY` writer"]
|
||||
pub struct W(crate::W<EVENTS_USBPWRRDY_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<EVENTS_USBPWRRDY_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_USBPWRRDY_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<EVENTS_USBPWRRDY_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `EVENTS_USBPWRRDY` reader - "]
|
||||
pub type EVENTS_USBPWRRDY_R = crate::BitReader<bool>;
|
||||
#[doc = "Field `EVENTS_USBPWRRDY` writer - "]
|
||||
pub type EVENTS_USBPWRRDY_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, EVENTS_USBPWRRDY_SPEC, bool, O>;
|
||||
impl R {
|
||||
#[doc = "Bit 0"]
|
||||
#[inline(always)]
|
||||
pub fn events_usbpwrrdy(&self) -> EVENTS_USBPWRRDY_R {
|
||||
EVENTS_USBPWRRDY_R::new((self.bits & 1) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0"]
|
||||
#[inline(always)]
|
||||
pub fn events_usbpwrrdy(&mut self) -> EVENTS_USBPWRRDY_W<0> {
|
||||
EVENTS_USBPWRRDY_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 = "USB 3.3 V supply ready\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_usbpwrrdy](index.html) module"]
|
||||
pub struct EVENTS_USBPWRRDY_SPEC;
|
||||
impl crate::RegisterSpec for EVENTS_USBPWRRDY_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [events_usbpwrrdy::R](R) reader structure"]
|
||||
impl crate::Readable for EVENTS_USBPWRRDY_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [events_usbpwrrdy::W](W) writer structure"]
|
||||
impl crate::Writable for EVENTS_USBPWRRDY_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets EVENTS_USBPWRRDY to value 0"]
|
||||
impl crate::Resettable for EVENTS_USBPWRRDY_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
#[doc = "Register `EVENTS_USBREMOVED` reader"]
|
||||
pub struct R(crate::R<EVENTS_USBREMOVED_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<EVENTS_USBREMOVED_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<EVENTS_USBREMOVED_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<EVENTS_USBREMOVED_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `EVENTS_USBREMOVED` writer"]
|
||||
pub struct W(crate::W<EVENTS_USBREMOVED_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<EVENTS_USBREMOVED_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_USBREMOVED_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<EVENTS_USBREMOVED_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `EVENTS_USBREMOVED` reader - "]
|
||||
pub type EVENTS_USBREMOVED_R = crate::BitReader<bool>;
|
||||
#[doc = "Field `EVENTS_USBREMOVED` writer - "]
|
||||
pub type EVENTS_USBREMOVED_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, EVENTS_USBREMOVED_SPEC, bool, O>;
|
||||
impl R {
|
||||
#[doc = "Bit 0"]
|
||||
#[inline(always)]
|
||||
pub fn events_usbremoved(&self) -> EVENTS_USBREMOVED_R {
|
||||
EVENTS_USBREMOVED_R::new((self.bits & 1) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0"]
|
||||
#[inline(always)]
|
||||
pub fn events_usbremoved(&mut self) -> EVENTS_USBREMOVED_W<0> {
|
||||
EVENTS_USBREMOVED_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 = "Voltage supply removed from VBUS\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_usbremoved](index.html) module"]
|
||||
pub struct EVENTS_USBREMOVED_SPEC;
|
||||
impl crate::RegisterSpec for EVENTS_USBREMOVED_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [events_usbremoved::R](R) reader structure"]
|
||||
impl crate::Readable for EVENTS_USBREMOVED_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [events_usbremoved::W](W) writer structure"]
|
||||
impl crate::Writable for EVENTS_USBREMOVED_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets EVENTS_USBREMOVED to value 0"]
|
||||
impl crate::Resettable for EVENTS_USBREMOVED_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
|
||||
}
|
||||
}
|
||||
+469
@@ -0,0 +1,469 @@
|
||||
#[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 POFWARN event"]
|
||||
pub type POFWARN_R = crate::BitReader<POFWARN_A>;
|
||||
#[doc = "Write '1' to disable interrupt for POFWARN event\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 POFWARN event\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 POFWARN event"]
|
||||
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 SLEEPENTER event"]
|
||||
pub type SLEEPENTER_R = crate::BitReader<SLEEPENTER_A>;
|
||||
#[doc = "Write '1' to disable interrupt for SLEEPENTER event\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 SLEEPENTER event\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 SLEEPENTER event"]
|
||||
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 SLEEPEXIT event"]
|
||||
pub type SLEEPEXIT_R = crate::BitReader<SLEEPEXIT_A>;
|
||||
#[doc = "Write '1' to disable interrupt for SLEEPEXIT event\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 SLEEPEXIT event\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 SLEEPEXIT event"]
|
||||
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)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `USBDETECTED` reader - Write '1' to disable interrupt for USBDETECTED event"]
|
||||
pub type USBDETECTED_R = crate::BitReader<USBDETECTED_A>;
|
||||
#[doc = "Write '1' to disable interrupt for USBDETECTED event\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum USBDETECTED_A {
|
||||
#[doc = "0: Read: Disabled"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Read: Enabled"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<USBDETECTED_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: USBDETECTED_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl USBDETECTED_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> USBDETECTED_A {
|
||||
match self.bits {
|
||||
false => USBDETECTED_A::DISABLED,
|
||||
true => USBDETECTED_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
*self == USBDETECTED_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
*self == USBDETECTED_A::ENABLED
|
||||
}
|
||||
}
|
||||
#[doc = "Write '1' to disable interrupt for USBDETECTED event\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum USBDETECTED_AW {
|
||||
#[doc = "1: Disable"]
|
||||
CLEAR = 1,
|
||||
}
|
||||
impl From<USBDETECTED_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: USBDETECTED_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `USBDETECTED` writer - Write '1' to disable interrupt for USBDETECTED event"]
|
||||
pub type USBDETECTED_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, INTENCLR_SPEC, USBDETECTED_AW, O>;
|
||||
impl<'a, const O: u8> USBDETECTED_W<'a, O> {
|
||||
#[doc = "Disable"]
|
||||
#[inline(always)]
|
||||
pub fn clear(self) -> &'a mut W {
|
||||
self.variant(USBDETECTED_AW::CLEAR)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `USBREMOVED` reader - Write '1' to disable interrupt for USBREMOVED event"]
|
||||
pub type USBREMOVED_R = crate::BitReader<USBREMOVED_A>;
|
||||
#[doc = "Write '1' to disable interrupt for USBREMOVED event\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum USBREMOVED_A {
|
||||
#[doc = "0: Read: Disabled"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Read: Enabled"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<USBREMOVED_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: USBREMOVED_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl USBREMOVED_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> USBREMOVED_A {
|
||||
match self.bits {
|
||||
false => USBREMOVED_A::DISABLED,
|
||||
true => USBREMOVED_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
*self == USBREMOVED_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
*self == USBREMOVED_A::ENABLED
|
||||
}
|
||||
}
|
||||
#[doc = "Write '1' to disable interrupt for USBREMOVED event\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum USBREMOVED_AW {
|
||||
#[doc = "1: Disable"]
|
||||
CLEAR = 1,
|
||||
}
|
||||
impl From<USBREMOVED_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: USBREMOVED_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `USBREMOVED` writer - Write '1' to disable interrupt for USBREMOVED event"]
|
||||
pub type USBREMOVED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, USBREMOVED_AW, O>;
|
||||
impl<'a, const O: u8> USBREMOVED_W<'a, O> {
|
||||
#[doc = "Disable"]
|
||||
#[inline(always)]
|
||||
pub fn clear(self) -> &'a mut W {
|
||||
self.variant(USBREMOVED_AW::CLEAR)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `USBPWRRDY` reader - Write '1' to disable interrupt for USBPWRRDY event"]
|
||||
pub type USBPWRRDY_R = crate::BitReader<USBPWRRDY_A>;
|
||||
#[doc = "Write '1' to disable interrupt for USBPWRRDY event\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum USBPWRRDY_A {
|
||||
#[doc = "0: Read: Disabled"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Read: Enabled"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<USBPWRRDY_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: USBPWRRDY_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl USBPWRRDY_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> USBPWRRDY_A {
|
||||
match self.bits {
|
||||
false => USBPWRRDY_A::DISABLED,
|
||||
true => USBPWRRDY_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
*self == USBPWRRDY_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
*self == USBPWRRDY_A::ENABLED
|
||||
}
|
||||
}
|
||||
#[doc = "Write '1' to disable interrupt for USBPWRRDY event\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum USBPWRRDY_AW {
|
||||
#[doc = "1: Disable"]
|
||||
CLEAR = 1,
|
||||
}
|
||||
impl From<USBPWRRDY_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: USBPWRRDY_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `USBPWRRDY` writer - Write '1' to disable interrupt for USBPWRRDY event"]
|
||||
pub type USBPWRRDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, USBPWRRDY_AW, O>;
|
||||
impl<'a, const O: u8> USBPWRRDY_W<'a, O> {
|
||||
#[doc = "Disable"]
|
||||
#[inline(always)]
|
||||
pub fn clear(self) -> &'a mut W {
|
||||
self.variant(USBPWRRDY_AW::CLEAR)
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 2 - Write '1' to disable interrupt for POFWARN event"]
|
||||
#[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 SLEEPENTER event"]
|
||||
#[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 SLEEPEXIT event"]
|
||||
#[inline(always)]
|
||||
pub fn sleepexit(&self) -> SLEEPEXIT_R {
|
||||
SLEEPEXIT_R::new(((self.bits >> 6) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 7 - Write '1' to disable interrupt for USBDETECTED event"]
|
||||
#[inline(always)]
|
||||
pub fn usbdetected(&self) -> USBDETECTED_R {
|
||||
USBDETECTED_R::new(((self.bits >> 7) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 8 - Write '1' to disable interrupt for USBREMOVED event"]
|
||||
#[inline(always)]
|
||||
pub fn usbremoved(&self) -> USBREMOVED_R {
|
||||
USBREMOVED_R::new(((self.bits >> 8) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 9 - Write '1' to disable interrupt for USBPWRRDY event"]
|
||||
#[inline(always)]
|
||||
pub fn usbpwrrdy(&self) -> USBPWRRDY_R {
|
||||
USBPWRRDY_R::new(((self.bits >> 9) & 1) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 2 - Write '1' to disable interrupt for POFWARN event"]
|
||||
#[inline(always)]
|
||||
pub fn pofwarn(&mut self) -> POFWARN_W<2> {
|
||||
POFWARN_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 5 - Write '1' to disable interrupt for SLEEPENTER event"]
|
||||
#[inline(always)]
|
||||
pub fn sleepenter(&mut self) -> SLEEPENTER_W<5> {
|
||||
SLEEPENTER_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 6 - Write '1' to disable interrupt for SLEEPEXIT event"]
|
||||
#[inline(always)]
|
||||
pub fn sleepexit(&mut self) -> SLEEPEXIT_W<6> {
|
||||
SLEEPEXIT_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 7 - Write '1' to disable interrupt for USBDETECTED event"]
|
||||
#[inline(always)]
|
||||
pub fn usbdetected(&mut self) -> USBDETECTED_W<7> {
|
||||
USBDETECTED_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 8 - Write '1' to disable interrupt for USBREMOVED event"]
|
||||
#[inline(always)]
|
||||
pub fn usbremoved(&mut self) -> USBREMOVED_W<8> {
|
||||
USBREMOVED_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 9 - Write '1' to disable interrupt for USBPWRRDY event"]
|
||||
#[inline(always)]
|
||||
pub fn usbpwrrdy(&mut self) -> USBPWRRDY_W<9> {
|
||||
USBPWRRDY_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
|
||||
}
|
||||
}
|
||||
+469
@@ -0,0 +1,469 @@
|
||||
#[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 POFWARN event"]
|
||||
pub type POFWARN_R = crate::BitReader<POFWARN_A>;
|
||||
#[doc = "Write '1' to enable interrupt for POFWARN event\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 POFWARN event\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 POFWARN event"]
|
||||
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 SLEEPENTER event"]
|
||||
pub type SLEEPENTER_R = crate::BitReader<SLEEPENTER_A>;
|
||||
#[doc = "Write '1' to enable interrupt for SLEEPENTER event\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 SLEEPENTER event\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 SLEEPENTER event"]
|
||||
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 SLEEPEXIT event"]
|
||||
pub type SLEEPEXIT_R = crate::BitReader<SLEEPEXIT_A>;
|
||||
#[doc = "Write '1' to enable interrupt for SLEEPEXIT event\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 SLEEPEXIT event\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 SLEEPEXIT event"]
|
||||
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)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `USBDETECTED` reader - Write '1' to enable interrupt for USBDETECTED event"]
|
||||
pub type USBDETECTED_R = crate::BitReader<USBDETECTED_A>;
|
||||
#[doc = "Write '1' to enable interrupt for USBDETECTED event\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum USBDETECTED_A {
|
||||
#[doc = "0: Read: Disabled"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Read: Enabled"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<USBDETECTED_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: USBDETECTED_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl USBDETECTED_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> USBDETECTED_A {
|
||||
match self.bits {
|
||||
false => USBDETECTED_A::DISABLED,
|
||||
true => USBDETECTED_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
*self == USBDETECTED_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
*self == USBDETECTED_A::ENABLED
|
||||
}
|
||||
}
|
||||
#[doc = "Write '1' to enable interrupt for USBDETECTED event\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum USBDETECTED_AW {
|
||||
#[doc = "1: Enable"]
|
||||
SET = 1,
|
||||
}
|
||||
impl From<USBDETECTED_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: USBDETECTED_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `USBDETECTED` writer - Write '1' to enable interrupt for USBDETECTED event"]
|
||||
pub type USBDETECTED_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, INTENSET_SPEC, USBDETECTED_AW, O>;
|
||||
impl<'a, const O: u8> USBDETECTED_W<'a, O> {
|
||||
#[doc = "Enable"]
|
||||
#[inline(always)]
|
||||
pub fn set(self) -> &'a mut W {
|
||||
self.variant(USBDETECTED_AW::SET)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `USBREMOVED` reader - Write '1' to enable interrupt for USBREMOVED event"]
|
||||
pub type USBREMOVED_R = crate::BitReader<USBREMOVED_A>;
|
||||
#[doc = "Write '1' to enable interrupt for USBREMOVED event\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum USBREMOVED_A {
|
||||
#[doc = "0: Read: Disabled"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Read: Enabled"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<USBREMOVED_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: USBREMOVED_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl USBREMOVED_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> USBREMOVED_A {
|
||||
match self.bits {
|
||||
false => USBREMOVED_A::DISABLED,
|
||||
true => USBREMOVED_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
*self == USBREMOVED_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
*self == USBREMOVED_A::ENABLED
|
||||
}
|
||||
}
|
||||
#[doc = "Write '1' to enable interrupt for USBREMOVED event\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum USBREMOVED_AW {
|
||||
#[doc = "1: Enable"]
|
||||
SET = 1,
|
||||
}
|
||||
impl From<USBREMOVED_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: USBREMOVED_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `USBREMOVED` writer - Write '1' to enable interrupt for USBREMOVED event"]
|
||||
pub type USBREMOVED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, USBREMOVED_AW, O>;
|
||||
impl<'a, const O: u8> USBREMOVED_W<'a, O> {
|
||||
#[doc = "Enable"]
|
||||
#[inline(always)]
|
||||
pub fn set(self) -> &'a mut W {
|
||||
self.variant(USBREMOVED_AW::SET)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `USBPWRRDY` reader - Write '1' to enable interrupt for USBPWRRDY event"]
|
||||
pub type USBPWRRDY_R = crate::BitReader<USBPWRRDY_A>;
|
||||
#[doc = "Write '1' to enable interrupt for USBPWRRDY event\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum USBPWRRDY_A {
|
||||
#[doc = "0: Read: Disabled"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Read: Enabled"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<USBPWRRDY_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: USBPWRRDY_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl USBPWRRDY_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> USBPWRRDY_A {
|
||||
match self.bits {
|
||||
false => USBPWRRDY_A::DISABLED,
|
||||
true => USBPWRRDY_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
*self == USBPWRRDY_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
*self == USBPWRRDY_A::ENABLED
|
||||
}
|
||||
}
|
||||
#[doc = "Write '1' to enable interrupt for USBPWRRDY event\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum USBPWRRDY_AW {
|
||||
#[doc = "1: Enable"]
|
||||
SET = 1,
|
||||
}
|
||||
impl From<USBPWRRDY_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: USBPWRRDY_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `USBPWRRDY` writer - Write '1' to enable interrupt for USBPWRRDY event"]
|
||||
pub type USBPWRRDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, USBPWRRDY_AW, O>;
|
||||
impl<'a, const O: u8> USBPWRRDY_W<'a, O> {
|
||||
#[doc = "Enable"]
|
||||
#[inline(always)]
|
||||
pub fn set(self) -> &'a mut W {
|
||||
self.variant(USBPWRRDY_AW::SET)
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 2 - Write '1' to enable interrupt for POFWARN event"]
|
||||
#[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 SLEEPENTER event"]
|
||||
#[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 SLEEPEXIT event"]
|
||||
#[inline(always)]
|
||||
pub fn sleepexit(&self) -> SLEEPEXIT_R {
|
||||
SLEEPEXIT_R::new(((self.bits >> 6) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 7 - Write '1' to enable interrupt for USBDETECTED event"]
|
||||
#[inline(always)]
|
||||
pub fn usbdetected(&self) -> USBDETECTED_R {
|
||||
USBDETECTED_R::new(((self.bits >> 7) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 8 - Write '1' to enable interrupt for USBREMOVED event"]
|
||||
#[inline(always)]
|
||||
pub fn usbremoved(&self) -> USBREMOVED_R {
|
||||
USBREMOVED_R::new(((self.bits >> 8) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 9 - Write '1' to enable interrupt for USBPWRRDY event"]
|
||||
#[inline(always)]
|
||||
pub fn usbpwrrdy(&self) -> USBPWRRDY_R {
|
||||
USBPWRRDY_R::new(((self.bits >> 9) & 1) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 2 - Write '1' to enable interrupt for POFWARN event"]
|
||||
#[inline(always)]
|
||||
pub fn pofwarn(&mut self) -> POFWARN_W<2> {
|
||||
POFWARN_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 5 - Write '1' to enable interrupt for SLEEPENTER event"]
|
||||
#[inline(always)]
|
||||
pub fn sleepenter(&mut self) -> SLEEPENTER_W<5> {
|
||||
SLEEPENTER_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 6 - Write '1' to enable interrupt for SLEEPEXIT event"]
|
||||
#[inline(always)]
|
||||
pub fn sleepexit(&mut self) -> SLEEPEXIT_W<6> {
|
||||
SLEEPEXIT_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 7 - Write '1' to enable interrupt for USBDETECTED event"]
|
||||
#[inline(always)]
|
||||
pub fn usbdetected(&mut self) -> USBDETECTED_W<7> {
|
||||
USBDETECTED_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 8 - Write '1' to enable interrupt for USBREMOVED event"]
|
||||
#[inline(always)]
|
||||
pub fn usbremoved(&mut self) -> USBREMOVED_W<8> {
|
||||
USBREMOVED_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 9 - Write '1' to enable interrupt for USBPWRRDY event"]
|
||||
#[inline(always)]
|
||||
pub fn usbpwrrdy(&mut self) -> USBPWRRDY_W<9> {
|
||||
USBPWRRDY_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
|
||||
}
|
||||
}
|
||||
+74
@@ -0,0 +1,74 @@
|
||||
#[doc = "Register `MAINREGSTATUS` reader"]
|
||||
pub struct R(crate::R<MAINREGSTATUS_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<MAINREGSTATUS_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<MAINREGSTATUS_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<MAINREGSTATUS_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `MAINREGSTATUS` reader - Main supply status"]
|
||||
pub type MAINREGSTATUS_R = crate::BitReader<MAINREGSTATUS_A>;
|
||||
#[doc = "Main supply status\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum MAINREGSTATUS_A {
|
||||
#[doc = "0: Normal voltage mode. Voltage supplied on VDD."]
|
||||
NORMAL = 0,
|
||||
#[doc = "1: High voltage mode. Voltage supplied on VDDH."]
|
||||
HIGH = 1,
|
||||
}
|
||||
impl From<MAINREGSTATUS_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: MAINREGSTATUS_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl MAINREGSTATUS_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> MAINREGSTATUS_A {
|
||||
match self.bits {
|
||||
false => MAINREGSTATUS_A::NORMAL,
|
||||
true => MAINREGSTATUS_A::HIGH,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `NORMAL`"]
|
||||
#[inline(always)]
|
||||
pub fn is_normal(&self) -> bool {
|
||||
*self == MAINREGSTATUS_A::NORMAL
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `HIGH`"]
|
||||
#[inline(always)]
|
||||
pub fn is_high(&self) -> bool {
|
||||
*self == MAINREGSTATUS_A::HIGH
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - Main supply status"]
|
||||
#[inline(always)]
|
||||
pub fn mainregstatus(&self) -> MAINREGSTATUS_R {
|
||||
MAINREGSTATUS_R::new((self.bits & 1) != 0)
|
||||
}
|
||||
}
|
||||
#[doc = "Main supply status\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [mainregstatus](index.html) module"]
|
||||
pub struct MAINREGSTATUS_SPEC;
|
||||
impl crate::RegisterSpec for MAINREGSTATUS_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [mainregstatus::R](R) reader structure"]
|
||||
impl crate::Readable for MAINREGSTATUS_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`reset()` method sets MAINREGSTATUS to value 0"]
|
||||
impl crate::Resettable for MAINREGSTATUS_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
+564
@@ -0,0 +1,564 @@
|
||||
#[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 warning"]
|
||||
pub type POF_R = crate::BitReader<POF_A>;
|
||||
#[doc = "Enable or disable power failure warning\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 warning"]
|
||||
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-fail comparator threshold setting. This setting applies both for normal voltage mode (supply connected to both VDD and VDDH) and high voltage mode (supply connected to VDDH only). Values 0-3 set threshold below 1.7 V and should not be used as brown out detection will be activated before power failure warning on such low voltages."]
|
||||
pub type THRESHOLD_R = crate::FieldReader<u8, THRESHOLD_A>;
|
||||
#[doc = "Power-fail comparator threshold setting. This setting applies both for normal voltage mode (supply connected to both VDD and VDDH) and high voltage mode (supply connected to VDDH only). Values 0-3 set threshold below 1.7 V and should not be used as brown out detection will be activated before power failure warning on such low voltages.\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-fail comparator threshold setting. This setting applies both for normal voltage mode (supply connected to both VDD and VDDH) and high voltage mode (supply connected to VDDH only). Values 0-3 set threshold below 1.7 V and should not be used as brown out detection will be activated before power failure warning on such low voltages."]
|
||||
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)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `THRESHOLDVDDH` reader - Power-fail comparator threshold setting for high voltage mode (supply connected to VDDH only). This setting does not apply for normal voltage mode (supply connected to both VDD and VDDH)."]
|
||||
pub type THRESHOLDVDDH_R = crate::FieldReader<u8, THRESHOLDVDDH_A>;
|
||||
#[doc = "Power-fail comparator threshold setting for high voltage mode (supply connected to VDDH only). This setting does not apply for normal voltage mode (supply connected to both VDD and VDDH).\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
#[repr(u8)]
|
||||
pub enum THRESHOLDVDDH_A {
|
||||
#[doc = "0: Set threshold to 2.7 V"]
|
||||
V27 = 0,
|
||||
#[doc = "1: Set threshold to 2.8 V"]
|
||||
V28 = 1,
|
||||
#[doc = "2: Set threshold to 2.9 V"]
|
||||
V29 = 2,
|
||||
#[doc = "3: Set threshold to 3.0 V"]
|
||||
V30 = 3,
|
||||
#[doc = "4: Set threshold to 3.1 V"]
|
||||
V31 = 4,
|
||||
#[doc = "5: Set threshold to 3.2 V"]
|
||||
V32 = 5,
|
||||
#[doc = "6: Set threshold to 3.3 V"]
|
||||
V33 = 6,
|
||||
#[doc = "7: Set threshold to 3.4 V"]
|
||||
V34 = 7,
|
||||
#[doc = "8: Set threshold to 3.5 V"]
|
||||
V35 = 8,
|
||||
#[doc = "9: Set threshold to 3.6 V"]
|
||||
V36 = 9,
|
||||
#[doc = "10: Set threshold to 3.7 V"]
|
||||
V37 = 10,
|
||||
#[doc = "11: Set threshold to 3.8 V"]
|
||||
V38 = 11,
|
||||
#[doc = "12: Set threshold to 3.9 V"]
|
||||
V39 = 12,
|
||||
#[doc = "13: Set threshold to 4.0 V"]
|
||||
V40 = 13,
|
||||
#[doc = "14: Set threshold to 4.1 V"]
|
||||
V41 = 14,
|
||||
#[doc = "15: Set threshold to 4.2 V"]
|
||||
V42 = 15,
|
||||
}
|
||||
impl From<THRESHOLDVDDH_A> for u8 {
|
||||
#[inline(always)]
|
||||
fn from(variant: THRESHOLDVDDH_A) -> Self {
|
||||
variant as _
|
||||
}
|
||||
}
|
||||
impl THRESHOLDVDDH_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> THRESHOLDVDDH_A {
|
||||
match self.bits {
|
||||
0 => THRESHOLDVDDH_A::V27,
|
||||
1 => THRESHOLDVDDH_A::V28,
|
||||
2 => THRESHOLDVDDH_A::V29,
|
||||
3 => THRESHOLDVDDH_A::V30,
|
||||
4 => THRESHOLDVDDH_A::V31,
|
||||
5 => THRESHOLDVDDH_A::V32,
|
||||
6 => THRESHOLDVDDH_A::V33,
|
||||
7 => THRESHOLDVDDH_A::V34,
|
||||
8 => THRESHOLDVDDH_A::V35,
|
||||
9 => THRESHOLDVDDH_A::V36,
|
||||
10 => THRESHOLDVDDH_A::V37,
|
||||
11 => THRESHOLDVDDH_A::V38,
|
||||
12 => THRESHOLDVDDH_A::V39,
|
||||
13 => THRESHOLDVDDH_A::V40,
|
||||
14 => THRESHOLDVDDH_A::V41,
|
||||
15 => THRESHOLDVDDH_A::V42,
|
||||
_ => unreachable!(),
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `V27`"]
|
||||
#[inline(always)]
|
||||
pub fn is_v27(&self) -> bool {
|
||||
*self == THRESHOLDVDDH_A::V27
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `V28`"]
|
||||
#[inline(always)]
|
||||
pub fn is_v28(&self) -> bool {
|
||||
*self == THRESHOLDVDDH_A::V28
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `V29`"]
|
||||
#[inline(always)]
|
||||
pub fn is_v29(&self) -> bool {
|
||||
*self == THRESHOLDVDDH_A::V29
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `V30`"]
|
||||
#[inline(always)]
|
||||
pub fn is_v30(&self) -> bool {
|
||||
*self == THRESHOLDVDDH_A::V30
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `V31`"]
|
||||
#[inline(always)]
|
||||
pub fn is_v31(&self) -> bool {
|
||||
*self == THRESHOLDVDDH_A::V31
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `V32`"]
|
||||
#[inline(always)]
|
||||
pub fn is_v32(&self) -> bool {
|
||||
*self == THRESHOLDVDDH_A::V32
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `V33`"]
|
||||
#[inline(always)]
|
||||
pub fn is_v33(&self) -> bool {
|
||||
*self == THRESHOLDVDDH_A::V33
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `V34`"]
|
||||
#[inline(always)]
|
||||
pub fn is_v34(&self) -> bool {
|
||||
*self == THRESHOLDVDDH_A::V34
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `V35`"]
|
||||
#[inline(always)]
|
||||
pub fn is_v35(&self) -> bool {
|
||||
*self == THRESHOLDVDDH_A::V35
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `V36`"]
|
||||
#[inline(always)]
|
||||
pub fn is_v36(&self) -> bool {
|
||||
*self == THRESHOLDVDDH_A::V36
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `V37`"]
|
||||
#[inline(always)]
|
||||
pub fn is_v37(&self) -> bool {
|
||||
*self == THRESHOLDVDDH_A::V37
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `V38`"]
|
||||
#[inline(always)]
|
||||
pub fn is_v38(&self) -> bool {
|
||||
*self == THRESHOLDVDDH_A::V38
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `V39`"]
|
||||
#[inline(always)]
|
||||
pub fn is_v39(&self) -> bool {
|
||||
*self == THRESHOLDVDDH_A::V39
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `V40`"]
|
||||
#[inline(always)]
|
||||
pub fn is_v40(&self) -> bool {
|
||||
*self == THRESHOLDVDDH_A::V40
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `V41`"]
|
||||
#[inline(always)]
|
||||
pub fn is_v41(&self) -> bool {
|
||||
*self == THRESHOLDVDDH_A::V41
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `V42`"]
|
||||
#[inline(always)]
|
||||
pub fn is_v42(&self) -> bool {
|
||||
*self == THRESHOLDVDDH_A::V42
|
||||
}
|
||||
}
|
||||
#[doc = "Field `THRESHOLDVDDH` writer - Power-fail comparator threshold setting for high voltage mode (supply connected to VDDH only). This setting does not apply for normal voltage mode (supply connected to both VDD and VDDH)."]
|
||||
pub type THRESHOLDVDDH_W<'a, const O: u8> =
|
||||
crate::FieldWriterSafe<'a, u32, POFCON_SPEC, u8, THRESHOLDVDDH_A, 4, O>;
|
||||
impl<'a, const O: u8> THRESHOLDVDDH_W<'a, O> {
|
||||
#[doc = "Set threshold to 2.7 V"]
|
||||
#[inline(always)]
|
||||
pub fn v27(self) -> &'a mut W {
|
||||
self.variant(THRESHOLDVDDH_A::V27)
|
||||
}
|
||||
#[doc = "Set threshold to 2.8 V"]
|
||||
#[inline(always)]
|
||||
pub fn v28(self) -> &'a mut W {
|
||||
self.variant(THRESHOLDVDDH_A::V28)
|
||||
}
|
||||
#[doc = "Set threshold to 2.9 V"]
|
||||
#[inline(always)]
|
||||
pub fn v29(self) -> &'a mut W {
|
||||
self.variant(THRESHOLDVDDH_A::V29)
|
||||
}
|
||||
#[doc = "Set threshold to 3.0 V"]
|
||||
#[inline(always)]
|
||||
pub fn v30(self) -> &'a mut W {
|
||||
self.variant(THRESHOLDVDDH_A::V30)
|
||||
}
|
||||
#[doc = "Set threshold to 3.1 V"]
|
||||
#[inline(always)]
|
||||
pub fn v31(self) -> &'a mut W {
|
||||
self.variant(THRESHOLDVDDH_A::V31)
|
||||
}
|
||||
#[doc = "Set threshold to 3.2 V"]
|
||||
#[inline(always)]
|
||||
pub fn v32(self) -> &'a mut W {
|
||||
self.variant(THRESHOLDVDDH_A::V32)
|
||||
}
|
||||
#[doc = "Set threshold to 3.3 V"]
|
||||
#[inline(always)]
|
||||
pub fn v33(self) -> &'a mut W {
|
||||
self.variant(THRESHOLDVDDH_A::V33)
|
||||
}
|
||||
#[doc = "Set threshold to 3.4 V"]
|
||||
#[inline(always)]
|
||||
pub fn v34(self) -> &'a mut W {
|
||||
self.variant(THRESHOLDVDDH_A::V34)
|
||||
}
|
||||
#[doc = "Set threshold to 3.5 V"]
|
||||
#[inline(always)]
|
||||
pub fn v35(self) -> &'a mut W {
|
||||
self.variant(THRESHOLDVDDH_A::V35)
|
||||
}
|
||||
#[doc = "Set threshold to 3.6 V"]
|
||||
#[inline(always)]
|
||||
pub fn v36(self) -> &'a mut W {
|
||||
self.variant(THRESHOLDVDDH_A::V36)
|
||||
}
|
||||
#[doc = "Set threshold to 3.7 V"]
|
||||
#[inline(always)]
|
||||
pub fn v37(self) -> &'a mut W {
|
||||
self.variant(THRESHOLDVDDH_A::V37)
|
||||
}
|
||||
#[doc = "Set threshold to 3.8 V"]
|
||||
#[inline(always)]
|
||||
pub fn v38(self) -> &'a mut W {
|
||||
self.variant(THRESHOLDVDDH_A::V38)
|
||||
}
|
||||
#[doc = "Set threshold to 3.9 V"]
|
||||
#[inline(always)]
|
||||
pub fn v39(self) -> &'a mut W {
|
||||
self.variant(THRESHOLDVDDH_A::V39)
|
||||
}
|
||||
#[doc = "Set threshold to 4.0 V"]
|
||||
#[inline(always)]
|
||||
pub fn v40(self) -> &'a mut W {
|
||||
self.variant(THRESHOLDVDDH_A::V40)
|
||||
}
|
||||
#[doc = "Set threshold to 4.1 V"]
|
||||
#[inline(always)]
|
||||
pub fn v41(self) -> &'a mut W {
|
||||
self.variant(THRESHOLDVDDH_A::V41)
|
||||
}
|
||||
#[doc = "Set threshold to 4.2 V"]
|
||||
#[inline(always)]
|
||||
pub fn v42(self) -> &'a mut W {
|
||||
self.variant(THRESHOLDVDDH_A::V42)
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - Enable or disable power failure warning"]
|
||||
#[inline(always)]
|
||||
pub fn pof(&self) -> POF_R {
|
||||
POF_R::new((self.bits & 1) != 0)
|
||||
}
|
||||
#[doc = "Bits 1:4 - Power-fail comparator threshold setting. This setting applies both for normal voltage mode (supply connected to both VDD and VDDH) and high voltage mode (supply connected to VDDH only). Values 0-3 set threshold below 1.7 V and should not be used as brown out detection will be activated before power failure warning on such low voltages."]
|
||||
#[inline(always)]
|
||||
pub fn threshold(&self) -> THRESHOLD_R {
|
||||
THRESHOLD_R::new(((self.bits >> 1) & 0x0f) as u8)
|
||||
}
|
||||
#[doc = "Bits 8:11 - Power-fail comparator threshold setting for high voltage mode (supply connected to VDDH only). This setting does not apply for normal voltage mode (supply connected to both VDD and VDDH)."]
|
||||
#[inline(always)]
|
||||
pub fn thresholdvddh(&self) -> THRESHOLDVDDH_R {
|
||||
THRESHOLDVDDH_R::new(((self.bits >> 8) & 0x0f) as u8)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Enable or disable power failure warning"]
|
||||
#[inline(always)]
|
||||
pub fn pof(&mut self) -> POF_W<0> {
|
||||
POF_W::new(self)
|
||||
}
|
||||
#[doc = "Bits 1:4 - Power-fail comparator threshold setting. This setting applies both for normal voltage mode (supply connected to both VDD and VDDH) and high voltage mode (supply connected to VDDH only). Values 0-3 set threshold below 1.7 V and should not be used as brown out detection will be activated before power failure warning on such low voltages."]
|
||||
#[inline(always)]
|
||||
pub fn threshold(&mut self) -> THRESHOLD_W<1> {
|
||||
THRESHOLD_W::new(self)
|
||||
}
|
||||
#[doc = "Bits 8:11 - Power-fail comparator threshold setting for high voltage mode (supply connected to VDDH only). This setting does not apply for normal voltage mode (supply connected to both VDD and VDDH)."]
|
||||
#[inline(always)]
|
||||
pub fn thresholdvddh(&mut self) -> THRESHOLDVDDH_W<8> {
|
||||
THRESHOLDVDDH_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-fail 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\\[n\\]: RAMn power control register"]
|
||||
pub power: POWER,
|
||||
#[doc = "0x04 - Description cluster\\[n\\]: RAMn power control set register"]
|
||||
pub powerset: POWERSET,
|
||||
#[doc = "0x08 - Description cluster\\[n\\]: 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\\[n\\]: RAMn power control register"]
|
||||
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\\[n\\]: 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\\[n\\]: RAMn power control clear register"]
|
||||
pub mod powerclr;
|
||||
+1986
File diff suppressed because it is too large.
Load diff
+893
@@ -0,0 +1,893 @@
|
||||
#[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 RAM section S2 of RAMn on or off in System ON mode\n\nValue on reset: 1"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S2POWER_AW {
|
||||
#[doc = "1: Off"]
|
||||
OFF = 1,
|
||||
}
|
||||
impl From<S2POWER_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S2POWER_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S2POWER` writer - Keep RAM section S2 of RAMn on or off in System ON mode"]
|
||||
pub type S2POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWERCLR_SPEC, S2POWER_AW, O>;
|
||||
impl<'a, const O: u8> S2POWER_W<'a, O> {
|
||||
#[doc = "Off"]
|
||||
#[inline(always)]
|
||||
pub fn off(self) -> &'a mut W {
|
||||
self.variant(S2POWER_AW::OFF)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep RAM section S3 of RAMn on or off in System ON mode\n\nValue on reset: 1"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S3POWER_AW {
|
||||
#[doc = "1: Off"]
|
||||
OFF = 1,
|
||||
}
|
||||
impl From<S3POWER_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S3POWER_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S3POWER` writer - Keep RAM section S3 of RAMn on or off in System ON mode"]
|
||||
pub type S3POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWERCLR_SPEC, S3POWER_AW, O>;
|
||||
impl<'a, const O: u8> S3POWER_W<'a, O> {
|
||||
#[doc = "Off"]
|
||||
#[inline(always)]
|
||||
pub fn off(self) -> &'a mut W {
|
||||
self.variant(S3POWER_AW::OFF)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep RAM section S4 of RAMn on or off in System ON mode\n\nValue on reset: 1"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S4POWER_AW {
|
||||
#[doc = "1: Off"]
|
||||
OFF = 1,
|
||||
}
|
||||
impl From<S4POWER_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S4POWER_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S4POWER` writer - Keep RAM section S4 of RAMn on or off in System ON mode"]
|
||||
pub type S4POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWERCLR_SPEC, S4POWER_AW, O>;
|
||||
impl<'a, const O: u8> S4POWER_W<'a, O> {
|
||||
#[doc = "Off"]
|
||||
#[inline(always)]
|
||||
pub fn off(self) -> &'a mut W {
|
||||
self.variant(S4POWER_AW::OFF)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep RAM section S5 of RAMn on or off in System ON mode\n\nValue on reset: 1"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S5POWER_AW {
|
||||
#[doc = "1: Off"]
|
||||
OFF = 1,
|
||||
}
|
||||
impl From<S5POWER_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S5POWER_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S5POWER` writer - Keep RAM section S5 of RAMn on or off in System ON mode"]
|
||||
pub type S5POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWERCLR_SPEC, S5POWER_AW, O>;
|
||||
impl<'a, const O: u8> S5POWER_W<'a, O> {
|
||||
#[doc = "Off"]
|
||||
#[inline(always)]
|
||||
pub fn off(self) -> &'a mut W {
|
||||
self.variant(S5POWER_AW::OFF)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep RAM section S6 of RAMn on or off in System ON mode\n\nValue on reset: 1"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S6POWER_AW {
|
||||
#[doc = "1: Off"]
|
||||
OFF = 1,
|
||||
}
|
||||
impl From<S6POWER_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S6POWER_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S6POWER` writer - Keep RAM section S6 of RAMn on or off in System ON mode"]
|
||||
pub type S6POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWERCLR_SPEC, S6POWER_AW, O>;
|
||||
impl<'a, const O: u8> S6POWER_W<'a, O> {
|
||||
#[doc = "Off"]
|
||||
#[inline(always)]
|
||||
pub fn off(self) -> &'a mut W {
|
||||
self.variant(S6POWER_AW::OFF)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep RAM section S7 of RAMn on or off in System ON mode\n\nValue on reset: 1"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S7POWER_AW {
|
||||
#[doc = "1: Off"]
|
||||
OFF = 1,
|
||||
}
|
||||
impl From<S7POWER_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S7POWER_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S7POWER` writer - Keep RAM section S7 of RAMn on or off in System ON mode"]
|
||||
pub type S7POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWERCLR_SPEC, S7POWER_AW, O>;
|
||||
impl<'a, const O: u8> S7POWER_W<'a, O> {
|
||||
#[doc = "Off"]
|
||||
#[inline(always)]
|
||||
pub fn off(self) -> &'a mut W {
|
||||
self.variant(S7POWER_AW::OFF)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep RAM section S8 of RAMn on or off in System ON mode\n\nValue on reset: 1"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S8POWER_AW {
|
||||
#[doc = "1: Off"]
|
||||
OFF = 1,
|
||||
}
|
||||
impl From<S8POWER_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S8POWER_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S8POWER` writer - Keep RAM section S8 of RAMn on or off in System ON mode"]
|
||||
pub type S8POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWERCLR_SPEC, S8POWER_AW, O>;
|
||||
impl<'a, const O: u8> S8POWER_W<'a, O> {
|
||||
#[doc = "Off"]
|
||||
#[inline(always)]
|
||||
pub fn off(self) -> &'a mut W {
|
||||
self.variant(S8POWER_AW::OFF)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep RAM section S9 of RAMn on or off in System ON mode\n\nValue on reset: 1"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S9POWER_AW {
|
||||
#[doc = "1: Off"]
|
||||
OFF = 1,
|
||||
}
|
||||
impl From<S9POWER_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S9POWER_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S9POWER` writer - Keep RAM section S9 of RAMn on or off in System ON mode"]
|
||||
pub type S9POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWERCLR_SPEC, S9POWER_AW, O>;
|
||||
impl<'a, const O: u8> S9POWER_W<'a, O> {
|
||||
#[doc = "Off"]
|
||||
#[inline(always)]
|
||||
pub fn off(self) -> &'a mut W {
|
||||
self.variant(S9POWER_AW::OFF)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep RAM section S10 of RAMn on or off in System ON mode\n\nValue on reset: 1"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S10POWER_AW {
|
||||
#[doc = "1: Off"]
|
||||
OFF = 1,
|
||||
}
|
||||
impl From<S10POWER_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S10POWER_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S10POWER` writer - Keep RAM section S10 of RAMn on or off in System ON mode"]
|
||||
pub type S10POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWERCLR_SPEC, S10POWER_AW, O>;
|
||||
impl<'a, const O: u8> S10POWER_W<'a, O> {
|
||||
#[doc = "Off"]
|
||||
#[inline(always)]
|
||||
pub fn off(self) -> &'a mut W {
|
||||
self.variant(S10POWER_AW::OFF)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep RAM section S11 of RAMn on or off in System ON mode\n\nValue on reset: 1"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S11POWER_AW {
|
||||
#[doc = "1: Off"]
|
||||
OFF = 1,
|
||||
}
|
||||
impl From<S11POWER_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S11POWER_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S11POWER` writer - Keep RAM section S11 of RAMn on or off in System ON mode"]
|
||||
pub type S11POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWERCLR_SPEC, S11POWER_AW, O>;
|
||||
impl<'a, const O: u8> S11POWER_W<'a, O> {
|
||||
#[doc = "Off"]
|
||||
#[inline(always)]
|
||||
pub fn off(self) -> &'a mut W {
|
||||
self.variant(S11POWER_AW::OFF)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep RAM section S12 of RAMn on or off in System ON mode\n\nValue on reset: 1"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S12POWER_AW {
|
||||
#[doc = "1: Off"]
|
||||
OFF = 1,
|
||||
}
|
||||
impl From<S12POWER_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S12POWER_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S12POWER` writer - Keep RAM section S12 of RAMn on or off in System ON mode"]
|
||||
pub type S12POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWERCLR_SPEC, S12POWER_AW, O>;
|
||||
impl<'a, const O: u8> S12POWER_W<'a, O> {
|
||||
#[doc = "Off"]
|
||||
#[inline(always)]
|
||||
pub fn off(self) -> &'a mut W {
|
||||
self.variant(S12POWER_AW::OFF)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep RAM section S13 of RAMn on or off in System ON mode\n\nValue on reset: 1"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S13POWER_AW {
|
||||
#[doc = "1: Off"]
|
||||
OFF = 1,
|
||||
}
|
||||
impl From<S13POWER_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S13POWER_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S13POWER` writer - Keep RAM section S13 of RAMn on or off in System ON mode"]
|
||||
pub type S13POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWERCLR_SPEC, S13POWER_AW, O>;
|
||||
impl<'a, const O: u8> S13POWER_W<'a, O> {
|
||||
#[doc = "Off"]
|
||||
#[inline(always)]
|
||||
pub fn off(self) -> &'a mut W {
|
||||
self.variant(S13POWER_AW::OFF)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep RAM section S14 of RAMn on or off in System ON mode\n\nValue on reset: 1"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S14POWER_AW {
|
||||
#[doc = "1: Off"]
|
||||
OFF = 1,
|
||||
}
|
||||
impl From<S14POWER_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S14POWER_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S14POWER` writer - Keep RAM section S14 of RAMn on or off in System ON mode"]
|
||||
pub type S14POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWERCLR_SPEC, S14POWER_AW, O>;
|
||||
impl<'a, const O: u8> S14POWER_W<'a, O> {
|
||||
#[doc = "Off"]
|
||||
#[inline(always)]
|
||||
pub fn off(self) -> &'a mut W {
|
||||
self.variant(S14POWER_AW::OFF)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep RAM section S15 of RAMn on or off in System ON mode\n\nValue on reset: 1"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S15POWER_AW {
|
||||
#[doc = "1: Off"]
|
||||
OFF = 1,
|
||||
}
|
||||
impl From<S15POWER_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S15POWER_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S15POWER` writer - Keep RAM section S15 of RAMn on or off in System ON mode"]
|
||||
pub type S15POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWERCLR_SPEC, S15POWER_AW, O>;
|
||||
impl<'a, const O: u8> S15POWER_W<'a, O> {
|
||||
#[doc = "Off"]
|
||||
#[inline(always)]
|
||||
pub fn off(self) -> &'a mut W {
|
||||
self.variant(S15POWER_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)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep retention on RAM section S2 when RAM section is switched off\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S2RETENTION_AW {
|
||||
#[doc = "1: Off"]
|
||||
OFF = 1,
|
||||
}
|
||||
impl From<S2RETENTION_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S2RETENTION_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S2RETENTION` writer - Keep retention on RAM section S2 when RAM section is switched off"]
|
||||
pub type S2RETENTION_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, POWERCLR_SPEC, S2RETENTION_AW, O>;
|
||||
impl<'a, const O: u8> S2RETENTION_W<'a, O> {
|
||||
#[doc = "Off"]
|
||||
#[inline(always)]
|
||||
pub fn off(self) -> &'a mut W {
|
||||
self.variant(S2RETENTION_AW::OFF)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep retention on RAM section S3 when RAM section is switched off\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S3RETENTION_AW {
|
||||
#[doc = "1: Off"]
|
||||
OFF = 1,
|
||||
}
|
||||
impl From<S3RETENTION_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S3RETENTION_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S3RETENTION` writer - Keep retention on RAM section S3 when RAM section is switched off"]
|
||||
pub type S3RETENTION_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, POWERCLR_SPEC, S3RETENTION_AW, O>;
|
||||
impl<'a, const O: u8> S3RETENTION_W<'a, O> {
|
||||
#[doc = "Off"]
|
||||
#[inline(always)]
|
||||
pub fn off(self) -> &'a mut W {
|
||||
self.variant(S3RETENTION_AW::OFF)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep retention on RAM section S4 when RAM section is switched off\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S4RETENTION_AW {
|
||||
#[doc = "1: Off"]
|
||||
OFF = 1,
|
||||
}
|
||||
impl From<S4RETENTION_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S4RETENTION_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S4RETENTION` writer - Keep retention on RAM section S4 when RAM section is switched off"]
|
||||
pub type S4RETENTION_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, POWERCLR_SPEC, S4RETENTION_AW, O>;
|
||||
impl<'a, const O: u8> S4RETENTION_W<'a, O> {
|
||||
#[doc = "Off"]
|
||||
#[inline(always)]
|
||||
pub fn off(self) -> &'a mut W {
|
||||
self.variant(S4RETENTION_AW::OFF)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep retention on RAM section S5 when RAM section is switched off\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S5RETENTION_AW {
|
||||
#[doc = "1: Off"]
|
||||
OFF = 1,
|
||||
}
|
||||
impl From<S5RETENTION_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S5RETENTION_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S5RETENTION` writer - Keep retention on RAM section S5 when RAM section is switched off"]
|
||||
pub type S5RETENTION_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, POWERCLR_SPEC, S5RETENTION_AW, O>;
|
||||
impl<'a, const O: u8> S5RETENTION_W<'a, O> {
|
||||
#[doc = "Off"]
|
||||
#[inline(always)]
|
||||
pub fn off(self) -> &'a mut W {
|
||||
self.variant(S5RETENTION_AW::OFF)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep retention on RAM section S6 when RAM section is switched off\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S6RETENTION_AW {
|
||||
#[doc = "1: Off"]
|
||||
OFF = 1,
|
||||
}
|
||||
impl From<S6RETENTION_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S6RETENTION_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S6RETENTION` writer - Keep retention on RAM section S6 when RAM section is switched off"]
|
||||
pub type S6RETENTION_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, POWERCLR_SPEC, S6RETENTION_AW, O>;
|
||||
impl<'a, const O: u8> S6RETENTION_W<'a, O> {
|
||||
#[doc = "Off"]
|
||||
#[inline(always)]
|
||||
pub fn off(self) -> &'a mut W {
|
||||
self.variant(S6RETENTION_AW::OFF)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep retention on RAM section S7 when RAM section is switched off\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S7RETENTION_AW {
|
||||
#[doc = "1: Off"]
|
||||
OFF = 1,
|
||||
}
|
||||
impl From<S7RETENTION_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S7RETENTION_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S7RETENTION` writer - Keep retention on RAM section S7 when RAM section is switched off"]
|
||||
pub type S7RETENTION_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, POWERCLR_SPEC, S7RETENTION_AW, O>;
|
||||
impl<'a, const O: u8> S7RETENTION_W<'a, O> {
|
||||
#[doc = "Off"]
|
||||
#[inline(always)]
|
||||
pub fn off(self) -> &'a mut W {
|
||||
self.variant(S7RETENTION_AW::OFF)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep retention on RAM section S8 when RAM section is switched off\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S8RETENTION_AW {
|
||||
#[doc = "1: Off"]
|
||||
OFF = 1,
|
||||
}
|
||||
impl From<S8RETENTION_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S8RETENTION_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S8RETENTION` writer - Keep retention on RAM section S8 when RAM section is switched off"]
|
||||
pub type S8RETENTION_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, POWERCLR_SPEC, S8RETENTION_AW, O>;
|
||||
impl<'a, const O: u8> S8RETENTION_W<'a, O> {
|
||||
#[doc = "Off"]
|
||||
#[inline(always)]
|
||||
pub fn off(self) -> &'a mut W {
|
||||
self.variant(S8RETENTION_AW::OFF)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep retention on RAM section S9 when RAM section is switched off\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S9RETENTION_AW {
|
||||
#[doc = "1: Off"]
|
||||
OFF = 1,
|
||||
}
|
||||
impl From<S9RETENTION_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S9RETENTION_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S9RETENTION` writer - Keep retention on RAM section S9 when RAM section is switched off"]
|
||||
pub type S9RETENTION_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, POWERCLR_SPEC, S9RETENTION_AW, O>;
|
||||
impl<'a, const O: u8> S9RETENTION_W<'a, O> {
|
||||
#[doc = "Off"]
|
||||
#[inline(always)]
|
||||
pub fn off(self) -> &'a mut W {
|
||||
self.variant(S9RETENTION_AW::OFF)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep retention on RAM section S10 when RAM section is switched off\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S10RETENTION_AW {
|
||||
#[doc = "1: Off"]
|
||||
OFF = 1,
|
||||
}
|
||||
impl From<S10RETENTION_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S10RETENTION_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S10RETENTION` writer - Keep retention on RAM section S10 when RAM section is switched off"]
|
||||
pub type S10RETENTION_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, POWERCLR_SPEC, S10RETENTION_AW, O>;
|
||||
impl<'a, const O: u8> S10RETENTION_W<'a, O> {
|
||||
#[doc = "Off"]
|
||||
#[inline(always)]
|
||||
pub fn off(self) -> &'a mut W {
|
||||
self.variant(S10RETENTION_AW::OFF)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep retention on RAM section S11 when RAM section is switched off\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S11RETENTION_AW {
|
||||
#[doc = "1: Off"]
|
||||
OFF = 1,
|
||||
}
|
||||
impl From<S11RETENTION_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S11RETENTION_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S11RETENTION` writer - Keep retention on RAM section S11 when RAM section is switched off"]
|
||||
pub type S11RETENTION_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, POWERCLR_SPEC, S11RETENTION_AW, O>;
|
||||
impl<'a, const O: u8> S11RETENTION_W<'a, O> {
|
||||
#[doc = "Off"]
|
||||
#[inline(always)]
|
||||
pub fn off(self) -> &'a mut W {
|
||||
self.variant(S11RETENTION_AW::OFF)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep retention on RAM section S12 when RAM section is switched off\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S12RETENTION_AW {
|
||||
#[doc = "1: Off"]
|
||||
OFF = 1,
|
||||
}
|
||||
impl From<S12RETENTION_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S12RETENTION_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S12RETENTION` writer - Keep retention on RAM section S12 when RAM section is switched off"]
|
||||
pub type S12RETENTION_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, POWERCLR_SPEC, S12RETENTION_AW, O>;
|
||||
impl<'a, const O: u8> S12RETENTION_W<'a, O> {
|
||||
#[doc = "Off"]
|
||||
#[inline(always)]
|
||||
pub fn off(self) -> &'a mut W {
|
||||
self.variant(S12RETENTION_AW::OFF)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep retention on RAM section S13 when RAM section is switched off\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S13RETENTION_AW {
|
||||
#[doc = "1: Off"]
|
||||
OFF = 1,
|
||||
}
|
||||
impl From<S13RETENTION_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S13RETENTION_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S13RETENTION` writer - Keep retention on RAM section S13 when RAM section is switched off"]
|
||||
pub type S13RETENTION_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, POWERCLR_SPEC, S13RETENTION_AW, O>;
|
||||
impl<'a, const O: u8> S13RETENTION_W<'a, O> {
|
||||
#[doc = "Off"]
|
||||
#[inline(always)]
|
||||
pub fn off(self) -> &'a mut W {
|
||||
self.variant(S13RETENTION_AW::OFF)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep retention on RAM section S14 when RAM section is switched off\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S14RETENTION_AW {
|
||||
#[doc = "1: Off"]
|
||||
OFF = 1,
|
||||
}
|
||||
impl From<S14RETENTION_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S14RETENTION_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S14RETENTION` writer - Keep retention on RAM section S14 when RAM section is switched off"]
|
||||
pub type S14RETENTION_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, POWERCLR_SPEC, S14RETENTION_AW, O>;
|
||||
impl<'a, const O: u8> S14RETENTION_W<'a, O> {
|
||||
#[doc = "Off"]
|
||||
#[inline(always)]
|
||||
pub fn off(self) -> &'a mut W {
|
||||
self.variant(S14RETENTION_AW::OFF)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep retention on RAM section S15 when RAM section is switched off\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S15RETENTION_AW {
|
||||
#[doc = "1: Off"]
|
||||
OFF = 1,
|
||||
}
|
||||
impl From<S15RETENTION_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S15RETENTION_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S15RETENTION` writer - Keep retention on RAM section S15 when RAM section is switched off"]
|
||||
pub type S15RETENTION_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, POWERCLR_SPEC, S15RETENTION_AW, O>;
|
||||
impl<'a, const O: u8> S15RETENTION_W<'a, O> {
|
||||
#[doc = "Off"]
|
||||
#[inline(always)]
|
||||
pub fn off(self) -> &'a mut W {
|
||||
self.variant(S15RETENTION_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 2 - Keep RAM section S2 of RAMn on or off in System ON mode"]
|
||||
#[inline(always)]
|
||||
pub fn s2power(&mut self) -> S2POWER_W<2> {
|
||||
S2POWER_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 3 - Keep RAM section S3 of RAMn on or off in System ON mode"]
|
||||
#[inline(always)]
|
||||
pub fn s3power(&mut self) -> S3POWER_W<3> {
|
||||
S3POWER_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 4 - Keep RAM section S4 of RAMn on or off in System ON mode"]
|
||||
#[inline(always)]
|
||||
pub fn s4power(&mut self) -> S4POWER_W<4> {
|
||||
S4POWER_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 5 - Keep RAM section S5 of RAMn on or off in System ON mode"]
|
||||
#[inline(always)]
|
||||
pub fn s5power(&mut self) -> S5POWER_W<5> {
|
||||
S5POWER_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 6 - Keep RAM section S6 of RAMn on or off in System ON mode"]
|
||||
#[inline(always)]
|
||||
pub fn s6power(&mut self) -> S6POWER_W<6> {
|
||||
S6POWER_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 7 - Keep RAM section S7 of RAMn on or off in System ON mode"]
|
||||
#[inline(always)]
|
||||
pub fn s7power(&mut self) -> S7POWER_W<7> {
|
||||
S7POWER_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 8 - Keep RAM section S8 of RAMn on or off in System ON mode"]
|
||||
#[inline(always)]
|
||||
pub fn s8power(&mut self) -> S8POWER_W<8> {
|
||||
S8POWER_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 9 - Keep RAM section S9 of RAMn on or off in System ON mode"]
|
||||
#[inline(always)]
|
||||
pub fn s9power(&mut self) -> S9POWER_W<9> {
|
||||
S9POWER_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 10 - Keep RAM section S10 of RAMn on or off in System ON mode"]
|
||||
#[inline(always)]
|
||||
pub fn s10power(&mut self) -> S10POWER_W<10> {
|
||||
S10POWER_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 11 - Keep RAM section S11 of RAMn on or off in System ON mode"]
|
||||
#[inline(always)]
|
||||
pub fn s11power(&mut self) -> S11POWER_W<11> {
|
||||
S11POWER_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 12 - Keep RAM section S12 of RAMn on or off in System ON mode"]
|
||||
#[inline(always)]
|
||||
pub fn s12power(&mut self) -> S12POWER_W<12> {
|
||||
S12POWER_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 13 - Keep RAM section S13 of RAMn on or off in System ON mode"]
|
||||
#[inline(always)]
|
||||
pub fn s13power(&mut self) -> S13POWER_W<13> {
|
||||
S13POWER_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 14 - Keep RAM section S14 of RAMn on or off in System ON mode"]
|
||||
#[inline(always)]
|
||||
pub fn s14power(&mut self) -> S14POWER_W<14> {
|
||||
S14POWER_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 15 - Keep RAM section S15 of RAMn on or off in System ON mode"]
|
||||
#[inline(always)]
|
||||
pub fn s15power(&mut self) -> S15POWER_W<15> {
|
||||
S15POWER_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 = "Bit 18 - Keep retention on RAM section S2 when RAM section is switched off"]
|
||||
#[inline(always)]
|
||||
pub fn s2retention(&mut self) -> S2RETENTION_W<18> {
|
||||
S2RETENTION_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 19 - Keep retention on RAM section S3 when RAM section is switched off"]
|
||||
#[inline(always)]
|
||||
pub fn s3retention(&mut self) -> S3RETENTION_W<19> {
|
||||
S3RETENTION_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 20 - Keep retention on RAM section S4 when RAM section is switched off"]
|
||||
#[inline(always)]
|
||||
pub fn s4retention(&mut self) -> S4RETENTION_W<20> {
|
||||
S4RETENTION_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 21 - Keep retention on RAM section S5 when RAM section is switched off"]
|
||||
#[inline(always)]
|
||||
pub fn s5retention(&mut self) -> S5RETENTION_W<21> {
|
||||
S5RETENTION_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 22 - Keep retention on RAM section S6 when RAM section is switched off"]
|
||||
#[inline(always)]
|
||||
pub fn s6retention(&mut self) -> S6RETENTION_W<22> {
|
||||
S6RETENTION_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 23 - Keep retention on RAM section S7 when RAM section is switched off"]
|
||||
#[inline(always)]
|
||||
pub fn s7retention(&mut self) -> S7RETENTION_W<23> {
|
||||
S7RETENTION_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 24 - Keep retention on RAM section S8 when RAM section is switched off"]
|
||||
#[inline(always)]
|
||||
pub fn s8retention(&mut self) -> S8RETENTION_W<24> {
|
||||
S8RETENTION_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 25 - Keep retention on RAM section S9 when RAM section is switched off"]
|
||||
#[inline(always)]
|
||||
pub fn s9retention(&mut self) -> S9RETENTION_W<25> {
|
||||
S9RETENTION_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 26 - Keep retention on RAM section S10 when RAM section is switched off"]
|
||||
#[inline(always)]
|
||||
pub fn s10retention(&mut self) -> S10RETENTION_W<26> {
|
||||
S10RETENTION_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 27 - Keep retention on RAM section S11 when RAM section is switched off"]
|
||||
#[inline(always)]
|
||||
pub fn s11retention(&mut self) -> S11RETENTION_W<27> {
|
||||
S11RETENTION_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 28 - Keep retention on RAM section S12 when RAM section is switched off"]
|
||||
#[inline(always)]
|
||||
pub fn s12retention(&mut self) -> S12RETENTION_W<28> {
|
||||
S12RETENTION_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 29 - Keep retention on RAM section S13 when RAM section is switched off"]
|
||||
#[inline(always)]
|
||||
pub fn s13retention(&mut self) -> S13RETENTION_W<29> {
|
||||
S13RETENTION_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 30 - Keep retention on RAM section S14 when RAM section is switched off"]
|
||||
#[inline(always)]
|
||||
pub fn s14retention(&mut self) -> S14RETENTION_W<30> {
|
||||
S14RETENTION_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 31 - Keep retention on RAM section S15 when RAM section is switched off"]
|
||||
#[inline(always)]
|
||||
pub fn s15retention(&mut self) -> S15RETENTION_W<31> {
|
||||
S15RETENTION_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\\[n\\]: 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
|
||||
}
|
||||
}
|
||||
+893
@@ -0,0 +1,893 @@
|
||||
#[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 RAM section S2 of RAMn on or off in System ON mode\n\nValue on reset: 1"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S2POWER_AW {
|
||||
#[doc = "1: On"]
|
||||
ON = 1,
|
||||
}
|
||||
impl From<S2POWER_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S2POWER_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S2POWER` writer - Keep RAM section S2 of RAMn on or off in System ON mode"]
|
||||
pub type S2POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWERSET_SPEC, S2POWER_AW, O>;
|
||||
impl<'a, const O: u8> S2POWER_W<'a, O> {
|
||||
#[doc = "On"]
|
||||
#[inline(always)]
|
||||
pub fn on(self) -> &'a mut W {
|
||||
self.variant(S2POWER_AW::ON)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep RAM section S3 of RAMn on or off in System ON mode\n\nValue on reset: 1"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S3POWER_AW {
|
||||
#[doc = "1: On"]
|
||||
ON = 1,
|
||||
}
|
||||
impl From<S3POWER_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S3POWER_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S3POWER` writer - Keep RAM section S3 of RAMn on or off in System ON mode"]
|
||||
pub type S3POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWERSET_SPEC, S3POWER_AW, O>;
|
||||
impl<'a, const O: u8> S3POWER_W<'a, O> {
|
||||
#[doc = "On"]
|
||||
#[inline(always)]
|
||||
pub fn on(self) -> &'a mut W {
|
||||
self.variant(S3POWER_AW::ON)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep RAM section S4 of RAMn on or off in System ON mode\n\nValue on reset: 1"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S4POWER_AW {
|
||||
#[doc = "1: On"]
|
||||
ON = 1,
|
||||
}
|
||||
impl From<S4POWER_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S4POWER_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S4POWER` writer - Keep RAM section S4 of RAMn on or off in System ON mode"]
|
||||
pub type S4POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWERSET_SPEC, S4POWER_AW, O>;
|
||||
impl<'a, const O: u8> S4POWER_W<'a, O> {
|
||||
#[doc = "On"]
|
||||
#[inline(always)]
|
||||
pub fn on(self) -> &'a mut W {
|
||||
self.variant(S4POWER_AW::ON)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep RAM section S5 of RAMn on or off in System ON mode\n\nValue on reset: 1"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S5POWER_AW {
|
||||
#[doc = "1: On"]
|
||||
ON = 1,
|
||||
}
|
||||
impl From<S5POWER_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S5POWER_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S5POWER` writer - Keep RAM section S5 of RAMn on or off in System ON mode"]
|
||||
pub type S5POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWERSET_SPEC, S5POWER_AW, O>;
|
||||
impl<'a, const O: u8> S5POWER_W<'a, O> {
|
||||
#[doc = "On"]
|
||||
#[inline(always)]
|
||||
pub fn on(self) -> &'a mut W {
|
||||
self.variant(S5POWER_AW::ON)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep RAM section S6 of RAMn on or off in System ON mode\n\nValue on reset: 1"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S6POWER_AW {
|
||||
#[doc = "1: On"]
|
||||
ON = 1,
|
||||
}
|
||||
impl From<S6POWER_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S6POWER_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S6POWER` writer - Keep RAM section S6 of RAMn on or off in System ON mode"]
|
||||
pub type S6POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWERSET_SPEC, S6POWER_AW, O>;
|
||||
impl<'a, const O: u8> S6POWER_W<'a, O> {
|
||||
#[doc = "On"]
|
||||
#[inline(always)]
|
||||
pub fn on(self) -> &'a mut W {
|
||||
self.variant(S6POWER_AW::ON)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep RAM section S7 of RAMn on or off in System ON mode\n\nValue on reset: 1"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S7POWER_AW {
|
||||
#[doc = "1: On"]
|
||||
ON = 1,
|
||||
}
|
||||
impl From<S7POWER_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S7POWER_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S7POWER` writer - Keep RAM section S7 of RAMn on or off in System ON mode"]
|
||||
pub type S7POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWERSET_SPEC, S7POWER_AW, O>;
|
||||
impl<'a, const O: u8> S7POWER_W<'a, O> {
|
||||
#[doc = "On"]
|
||||
#[inline(always)]
|
||||
pub fn on(self) -> &'a mut W {
|
||||
self.variant(S7POWER_AW::ON)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep RAM section S8 of RAMn on or off in System ON mode\n\nValue on reset: 1"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S8POWER_AW {
|
||||
#[doc = "1: On"]
|
||||
ON = 1,
|
||||
}
|
||||
impl From<S8POWER_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S8POWER_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S8POWER` writer - Keep RAM section S8 of RAMn on or off in System ON mode"]
|
||||
pub type S8POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWERSET_SPEC, S8POWER_AW, O>;
|
||||
impl<'a, const O: u8> S8POWER_W<'a, O> {
|
||||
#[doc = "On"]
|
||||
#[inline(always)]
|
||||
pub fn on(self) -> &'a mut W {
|
||||
self.variant(S8POWER_AW::ON)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep RAM section S9 of RAMn on or off in System ON mode\n\nValue on reset: 1"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S9POWER_AW {
|
||||
#[doc = "1: On"]
|
||||
ON = 1,
|
||||
}
|
||||
impl From<S9POWER_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S9POWER_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S9POWER` writer - Keep RAM section S9 of RAMn on or off in System ON mode"]
|
||||
pub type S9POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWERSET_SPEC, S9POWER_AW, O>;
|
||||
impl<'a, const O: u8> S9POWER_W<'a, O> {
|
||||
#[doc = "On"]
|
||||
#[inline(always)]
|
||||
pub fn on(self) -> &'a mut W {
|
||||
self.variant(S9POWER_AW::ON)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep RAM section S10 of RAMn on or off in System ON mode\n\nValue on reset: 1"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S10POWER_AW {
|
||||
#[doc = "1: On"]
|
||||
ON = 1,
|
||||
}
|
||||
impl From<S10POWER_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S10POWER_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S10POWER` writer - Keep RAM section S10 of RAMn on or off in System ON mode"]
|
||||
pub type S10POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWERSET_SPEC, S10POWER_AW, O>;
|
||||
impl<'a, const O: u8> S10POWER_W<'a, O> {
|
||||
#[doc = "On"]
|
||||
#[inline(always)]
|
||||
pub fn on(self) -> &'a mut W {
|
||||
self.variant(S10POWER_AW::ON)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep RAM section S11 of RAMn on or off in System ON mode\n\nValue on reset: 1"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S11POWER_AW {
|
||||
#[doc = "1: On"]
|
||||
ON = 1,
|
||||
}
|
||||
impl From<S11POWER_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S11POWER_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S11POWER` writer - Keep RAM section S11 of RAMn on or off in System ON mode"]
|
||||
pub type S11POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWERSET_SPEC, S11POWER_AW, O>;
|
||||
impl<'a, const O: u8> S11POWER_W<'a, O> {
|
||||
#[doc = "On"]
|
||||
#[inline(always)]
|
||||
pub fn on(self) -> &'a mut W {
|
||||
self.variant(S11POWER_AW::ON)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep RAM section S12 of RAMn on or off in System ON mode\n\nValue on reset: 1"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S12POWER_AW {
|
||||
#[doc = "1: On"]
|
||||
ON = 1,
|
||||
}
|
||||
impl From<S12POWER_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S12POWER_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S12POWER` writer - Keep RAM section S12 of RAMn on or off in System ON mode"]
|
||||
pub type S12POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWERSET_SPEC, S12POWER_AW, O>;
|
||||
impl<'a, const O: u8> S12POWER_W<'a, O> {
|
||||
#[doc = "On"]
|
||||
#[inline(always)]
|
||||
pub fn on(self) -> &'a mut W {
|
||||
self.variant(S12POWER_AW::ON)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep RAM section S13 of RAMn on or off in System ON mode\n\nValue on reset: 1"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S13POWER_AW {
|
||||
#[doc = "1: On"]
|
||||
ON = 1,
|
||||
}
|
||||
impl From<S13POWER_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S13POWER_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S13POWER` writer - Keep RAM section S13 of RAMn on or off in System ON mode"]
|
||||
pub type S13POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWERSET_SPEC, S13POWER_AW, O>;
|
||||
impl<'a, const O: u8> S13POWER_W<'a, O> {
|
||||
#[doc = "On"]
|
||||
#[inline(always)]
|
||||
pub fn on(self) -> &'a mut W {
|
||||
self.variant(S13POWER_AW::ON)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep RAM section S14 of RAMn on or off in System ON mode\n\nValue on reset: 1"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S14POWER_AW {
|
||||
#[doc = "1: On"]
|
||||
ON = 1,
|
||||
}
|
||||
impl From<S14POWER_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S14POWER_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S14POWER` writer - Keep RAM section S14 of RAMn on or off in System ON mode"]
|
||||
pub type S14POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWERSET_SPEC, S14POWER_AW, O>;
|
||||
impl<'a, const O: u8> S14POWER_W<'a, O> {
|
||||
#[doc = "On"]
|
||||
#[inline(always)]
|
||||
pub fn on(self) -> &'a mut W {
|
||||
self.variant(S14POWER_AW::ON)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep RAM section S15 of RAMn on or off in System ON mode\n\nValue on reset: 1"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S15POWER_AW {
|
||||
#[doc = "1: On"]
|
||||
ON = 1,
|
||||
}
|
||||
impl From<S15POWER_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S15POWER_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S15POWER` writer - Keep RAM section S15 of RAMn on or off in System ON mode"]
|
||||
pub type S15POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWERSET_SPEC, S15POWER_AW, O>;
|
||||
impl<'a, const O: u8> S15POWER_W<'a, O> {
|
||||
#[doc = "On"]
|
||||
#[inline(always)]
|
||||
pub fn on(self) -> &'a mut W {
|
||||
self.variant(S15POWER_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)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep retention on RAM section S2 when RAM section is switched off\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S2RETENTION_AW {
|
||||
#[doc = "1: On"]
|
||||
ON = 1,
|
||||
}
|
||||
impl From<S2RETENTION_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S2RETENTION_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S2RETENTION` writer - Keep retention on RAM section S2 when RAM section is switched off"]
|
||||
pub type S2RETENTION_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, POWERSET_SPEC, S2RETENTION_AW, O>;
|
||||
impl<'a, const O: u8> S2RETENTION_W<'a, O> {
|
||||
#[doc = "On"]
|
||||
#[inline(always)]
|
||||
pub fn on(self) -> &'a mut W {
|
||||
self.variant(S2RETENTION_AW::ON)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep retention on RAM section S3 when RAM section is switched off\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S3RETENTION_AW {
|
||||
#[doc = "1: On"]
|
||||
ON = 1,
|
||||
}
|
||||
impl From<S3RETENTION_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S3RETENTION_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S3RETENTION` writer - Keep retention on RAM section S3 when RAM section is switched off"]
|
||||
pub type S3RETENTION_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, POWERSET_SPEC, S3RETENTION_AW, O>;
|
||||
impl<'a, const O: u8> S3RETENTION_W<'a, O> {
|
||||
#[doc = "On"]
|
||||
#[inline(always)]
|
||||
pub fn on(self) -> &'a mut W {
|
||||
self.variant(S3RETENTION_AW::ON)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep retention on RAM section S4 when RAM section is switched off\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S4RETENTION_AW {
|
||||
#[doc = "1: On"]
|
||||
ON = 1,
|
||||
}
|
||||
impl From<S4RETENTION_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S4RETENTION_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S4RETENTION` writer - Keep retention on RAM section S4 when RAM section is switched off"]
|
||||
pub type S4RETENTION_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, POWERSET_SPEC, S4RETENTION_AW, O>;
|
||||
impl<'a, const O: u8> S4RETENTION_W<'a, O> {
|
||||
#[doc = "On"]
|
||||
#[inline(always)]
|
||||
pub fn on(self) -> &'a mut W {
|
||||
self.variant(S4RETENTION_AW::ON)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep retention on RAM section S5 when RAM section is switched off\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S5RETENTION_AW {
|
||||
#[doc = "1: On"]
|
||||
ON = 1,
|
||||
}
|
||||
impl From<S5RETENTION_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S5RETENTION_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S5RETENTION` writer - Keep retention on RAM section S5 when RAM section is switched off"]
|
||||
pub type S5RETENTION_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, POWERSET_SPEC, S5RETENTION_AW, O>;
|
||||
impl<'a, const O: u8> S5RETENTION_W<'a, O> {
|
||||
#[doc = "On"]
|
||||
#[inline(always)]
|
||||
pub fn on(self) -> &'a mut W {
|
||||
self.variant(S5RETENTION_AW::ON)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep retention on RAM section S6 when RAM section is switched off\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S6RETENTION_AW {
|
||||
#[doc = "1: On"]
|
||||
ON = 1,
|
||||
}
|
||||
impl From<S6RETENTION_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S6RETENTION_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S6RETENTION` writer - Keep retention on RAM section S6 when RAM section is switched off"]
|
||||
pub type S6RETENTION_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, POWERSET_SPEC, S6RETENTION_AW, O>;
|
||||
impl<'a, const O: u8> S6RETENTION_W<'a, O> {
|
||||
#[doc = "On"]
|
||||
#[inline(always)]
|
||||
pub fn on(self) -> &'a mut W {
|
||||
self.variant(S6RETENTION_AW::ON)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep retention on RAM section S7 when RAM section is switched off\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S7RETENTION_AW {
|
||||
#[doc = "1: On"]
|
||||
ON = 1,
|
||||
}
|
||||
impl From<S7RETENTION_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S7RETENTION_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S7RETENTION` writer - Keep retention on RAM section S7 when RAM section is switched off"]
|
||||
pub type S7RETENTION_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, POWERSET_SPEC, S7RETENTION_AW, O>;
|
||||
impl<'a, const O: u8> S7RETENTION_W<'a, O> {
|
||||
#[doc = "On"]
|
||||
#[inline(always)]
|
||||
pub fn on(self) -> &'a mut W {
|
||||
self.variant(S7RETENTION_AW::ON)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep retention on RAM section S8 when RAM section is switched off\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S8RETENTION_AW {
|
||||
#[doc = "1: On"]
|
||||
ON = 1,
|
||||
}
|
||||
impl From<S8RETENTION_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S8RETENTION_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S8RETENTION` writer - Keep retention on RAM section S8 when RAM section is switched off"]
|
||||
pub type S8RETENTION_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, POWERSET_SPEC, S8RETENTION_AW, O>;
|
||||
impl<'a, const O: u8> S8RETENTION_W<'a, O> {
|
||||
#[doc = "On"]
|
||||
#[inline(always)]
|
||||
pub fn on(self) -> &'a mut W {
|
||||
self.variant(S8RETENTION_AW::ON)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep retention on RAM section S9 when RAM section is switched off\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S9RETENTION_AW {
|
||||
#[doc = "1: On"]
|
||||
ON = 1,
|
||||
}
|
||||
impl From<S9RETENTION_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S9RETENTION_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S9RETENTION` writer - Keep retention on RAM section S9 when RAM section is switched off"]
|
||||
pub type S9RETENTION_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, POWERSET_SPEC, S9RETENTION_AW, O>;
|
||||
impl<'a, const O: u8> S9RETENTION_W<'a, O> {
|
||||
#[doc = "On"]
|
||||
#[inline(always)]
|
||||
pub fn on(self) -> &'a mut W {
|
||||
self.variant(S9RETENTION_AW::ON)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep retention on RAM section S10 when RAM section is switched off\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S10RETENTION_AW {
|
||||
#[doc = "1: On"]
|
||||
ON = 1,
|
||||
}
|
||||
impl From<S10RETENTION_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S10RETENTION_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S10RETENTION` writer - Keep retention on RAM section S10 when RAM section is switched off"]
|
||||
pub type S10RETENTION_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, POWERSET_SPEC, S10RETENTION_AW, O>;
|
||||
impl<'a, const O: u8> S10RETENTION_W<'a, O> {
|
||||
#[doc = "On"]
|
||||
#[inline(always)]
|
||||
pub fn on(self) -> &'a mut W {
|
||||
self.variant(S10RETENTION_AW::ON)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep retention on RAM section S11 when RAM section is switched off\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S11RETENTION_AW {
|
||||
#[doc = "1: On"]
|
||||
ON = 1,
|
||||
}
|
||||
impl From<S11RETENTION_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S11RETENTION_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S11RETENTION` writer - Keep retention on RAM section S11 when RAM section is switched off"]
|
||||
pub type S11RETENTION_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, POWERSET_SPEC, S11RETENTION_AW, O>;
|
||||
impl<'a, const O: u8> S11RETENTION_W<'a, O> {
|
||||
#[doc = "On"]
|
||||
#[inline(always)]
|
||||
pub fn on(self) -> &'a mut W {
|
||||
self.variant(S11RETENTION_AW::ON)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep retention on RAM section S12 when RAM section is switched off\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S12RETENTION_AW {
|
||||
#[doc = "1: On"]
|
||||
ON = 1,
|
||||
}
|
||||
impl From<S12RETENTION_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S12RETENTION_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S12RETENTION` writer - Keep retention on RAM section S12 when RAM section is switched off"]
|
||||
pub type S12RETENTION_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, POWERSET_SPEC, S12RETENTION_AW, O>;
|
||||
impl<'a, const O: u8> S12RETENTION_W<'a, O> {
|
||||
#[doc = "On"]
|
||||
#[inline(always)]
|
||||
pub fn on(self) -> &'a mut W {
|
||||
self.variant(S12RETENTION_AW::ON)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep retention on RAM section S13 when RAM section is switched off\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S13RETENTION_AW {
|
||||
#[doc = "1: On"]
|
||||
ON = 1,
|
||||
}
|
||||
impl From<S13RETENTION_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S13RETENTION_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S13RETENTION` writer - Keep retention on RAM section S13 when RAM section is switched off"]
|
||||
pub type S13RETENTION_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, POWERSET_SPEC, S13RETENTION_AW, O>;
|
||||
impl<'a, const O: u8> S13RETENTION_W<'a, O> {
|
||||
#[doc = "On"]
|
||||
#[inline(always)]
|
||||
pub fn on(self) -> &'a mut W {
|
||||
self.variant(S13RETENTION_AW::ON)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep retention on RAM section S14 when RAM section is switched off\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S14RETENTION_AW {
|
||||
#[doc = "1: On"]
|
||||
ON = 1,
|
||||
}
|
||||
impl From<S14RETENTION_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S14RETENTION_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S14RETENTION` writer - Keep retention on RAM section S14 when RAM section is switched off"]
|
||||
pub type S14RETENTION_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, POWERSET_SPEC, S14RETENTION_AW, O>;
|
||||
impl<'a, const O: u8> S14RETENTION_W<'a, O> {
|
||||
#[doc = "On"]
|
||||
#[inline(always)]
|
||||
pub fn on(self) -> &'a mut W {
|
||||
self.variant(S14RETENTION_AW::ON)
|
||||
}
|
||||
}
|
||||
#[doc = "Keep retention on RAM section S15 when RAM section is switched off\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum S15RETENTION_AW {
|
||||
#[doc = "1: On"]
|
||||
ON = 1,
|
||||
}
|
||||
impl From<S15RETENTION_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: S15RETENTION_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `S15RETENTION` writer - Keep retention on RAM section S15 when RAM section is switched off"]
|
||||
pub type S15RETENTION_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, POWERSET_SPEC, S15RETENTION_AW, O>;
|
||||
impl<'a, const O: u8> S15RETENTION_W<'a, O> {
|
||||
#[doc = "On"]
|
||||
#[inline(always)]
|
||||
pub fn on(self) -> &'a mut W {
|
||||
self.variant(S15RETENTION_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 2 - Keep RAM section S2 of RAMn on or off in System ON mode"]
|
||||
#[inline(always)]
|
||||
pub fn s2power(&mut self) -> S2POWER_W<2> {
|
||||
S2POWER_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 3 - Keep RAM section S3 of RAMn on or off in System ON mode"]
|
||||
#[inline(always)]
|
||||
pub fn s3power(&mut self) -> S3POWER_W<3> {
|
||||
S3POWER_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 4 - Keep RAM section S4 of RAMn on or off in System ON mode"]
|
||||
#[inline(always)]
|
||||
pub fn s4power(&mut self) -> S4POWER_W<4> {
|
||||
S4POWER_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 5 - Keep RAM section S5 of RAMn on or off in System ON mode"]
|
||||
#[inline(always)]
|
||||
pub fn s5power(&mut self) -> S5POWER_W<5> {
|
||||
S5POWER_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 6 - Keep RAM section S6 of RAMn on or off in System ON mode"]
|
||||
#[inline(always)]
|
||||
pub fn s6power(&mut self) -> S6POWER_W<6> {
|
||||
S6POWER_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 7 - Keep RAM section S7 of RAMn on or off in System ON mode"]
|
||||
#[inline(always)]
|
||||
pub fn s7power(&mut self) -> S7POWER_W<7> {
|
||||
S7POWER_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 8 - Keep RAM section S8 of RAMn on or off in System ON mode"]
|
||||
#[inline(always)]
|
||||
pub fn s8power(&mut self) -> S8POWER_W<8> {
|
||||
S8POWER_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 9 - Keep RAM section S9 of RAMn on or off in System ON mode"]
|
||||
#[inline(always)]
|
||||
pub fn s9power(&mut self) -> S9POWER_W<9> {
|
||||
S9POWER_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 10 - Keep RAM section S10 of RAMn on or off in System ON mode"]
|
||||
#[inline(always)]
|
||||
pub fn s10power(&mut self) -> S10POWER_W<10> {
|
||||
S10POWER_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 11 - Keep RAM section S11 of RAMn on or off in System ON mode"]
|
||||
#[inline(always)]
|
||||
pub fn s11power(&mut self) -> S11POWER_W<11> {
|
||||
S11POWER_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 12 - Keep RAM section S12 of RAMn on or off in System ON mode"]
|
||||
#[inline(always)]
|
||||
pub fn s12power(&mut self) -> S12POWER_W<12> {
|
||||
S12POWER_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 13 - Keep RAM section S13 of RAMn on or off in System ON mode"]
|
||||
#[inline(always)]
|
||||
pub fn s13power(&mut self) -> S13POWER_W<13> {
|
||||
S13POWER_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 14 - Keep RAM section S14 of RAMn on or off in System ON mode"]
|
||||
#[inline(always)]
|
||||
pub fn s14power(&mut self) -> S14POWER_W<14> {
|
||||
S14POWER_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 15 - Keep RAM section S15 of RAMn on or off in System ON mode"]
|
||||
#[inline(always)]
|
||||
pub fn s15power(&mut self) -> S15POWER_W<15> {
|
||||
S15POWER_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 = "Bit 18 - Keep retention on RAM section S2 when RAM section is switched off"]
|
||||
#[inline(always)]
|
||||
pub fn s2retention(&mut self) -> S2RETENTION_W<18> {
|
||||
S2RETENTION_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 19 - Keep retention on RAM section S3 when RAM section is switched off"]
|
||||
#[inline(always)]
|
||||
pub fn s3retention(&mut self) -> S3RETENTION_W<19> {
|
||||
S3RETENTION_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 20 - Keep retention on RAM section S4 when RAM section is switched off"]
|
||||
#[inline(always)]
|
||||
pub fn s4retention(&mut self) -> S4RETENTION_W<20> {
|
||||
S4RETENTION_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 21 - Keep retention on RAM section S5 when RAM section is switched off"]
|
||||
#[inline(always)]
|
||||
pub fn s5retention(&mut self) -> S5RETENTION_W<21> {
|
||||
S5RETENTION_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 22 - Keep retention on RAM section S6 when RAM section is switched off"]
|
||||
#[inline(always)]
|
||||
pub fn s6retention(&mut self) -> S6RETENTION_W<22> {
|
||||
S6RETENTION_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 23 - Keep retention on RAM section S7 when RAM section is switched off"]
|
||||
#[inline(always)]
|
||||
pub fn s7retention(&mut self) -> S7RETENTION_W<23> {
|
||||
S7RETENTION_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 24 - Keep retention on RAM section S8 when RAM section is switched off"]
|
||||
#[inline(always)]
|
||||
pub fn s8retention(&mut self) -> S8RETENTION_W<24> {
|
||||
S8RETENTION_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 25 - Keep retention on RAM section S9 when RAM section is switched off"]
|
||||
#[inline(always)]
|
||||
pub fn s9retention(&mut self) -> S9RETENTION_W<25> {
|
||||
S9RETENTION_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 26 - Keep retention on RAM section S10 when RAM section is switched off"]
|
||||
#[inline(always)]
|
||||
pub fn s10retention(&mut self) -> S10RETENTION_W<26> {
|
||||
S10RETENTION_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 27 - Keep retention on RAM section S11 when RAM section is switched off"]
|
||||
#[inline(always)]
|
||||
pub fn s11retention(&mut self) -> S11RETENTION_W<27> {
|
||||
S11RETENTION_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 28 - Keep retention on RAM section S12 when RAM section is switched off"]
|
||||
#[inline(always)]
|
||||
pub fn s12retention(&mut self) -> S12RETENTION_W<28> {
|
||||
S12RETENTION_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 29 - Keep retention on RAM section S13 when RAM section is switched off"]
|
||||
#[inline(always)]
|
||||
pub fn s13retention(&mut self) -> S13RETENTION_W<29> {
|
||||
S13RETENTION_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 30 - Keep retention on RAM section S14 when RAM section is switched off"]
|
||||
#[inline(always)]
|
||||
pub fn s14retention(&mut self) -> S14RETENTION_W<30> {
|
||||
S14RETENTION_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 31 - Keep retention on RAM section S15 when RAM section is switched off"]
|
||||
#[inline(always)]
|
||||
pub fn s15retention(&mut self) -> S15RETENTION_W<31> {
|
||||
S15RETENTION_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\\[n\\]: 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
|
||||
}
|
||||
}
|
||||
+197
@@ -0,0 +1,197 @@
|
||||
#[doc = "Register `RAMSTATUS` reader"]
|
||||
pub struct R(crate::R<RAMSTATUS_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<RAMSTATUS_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<RAMSTATUS_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<RAMSTATUS_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RAMBLOCK0` reader - RAM block 0 is on or off/powering up"]
|
||||
pub type RAMBLOCK0_R = crate::BitReader<RAMBLOCK0_A>;
|
||||
#[doc = "RAM block 0 is on or off/powering up\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum RAMBLOCK0_A {
|
||||
#[doc = "0: Off"]
|
||||
OFF = 0,
|
||||
#[doc = "1: On"]
|
||||
ON = 1,
|
||||
}
|
||||
impl From<RAMBLOCK0_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: RAMBLOCK0_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl RAMBLOCK0_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> RAMBLOCK0_A {
|
||||
match self.bits {
|
||||
false => RAMBLOCK0_A::OFF,
|
||||
true => RAMBLOCK0_A::ON,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `OFF`"]
|
||||
#[inline(always)]
|
||||
pub fn is_off(&self) -> bool {
|
||||
*self == RAMBLOCK0_A::OFF
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ON`"]
|
||||
#[inline(always)]
|
||||
pub fn is_on(&self) -> bool {
|
||||
*self == RAMBLOCK0_A::ON
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RAMBLOCK1` reader - RAM block 1 is on or off/powering up"]
|
||||
pub type RAMBLOCK1_R = crate::BitReader<RAMBLOCK1_A>;
|
||||
#[doc = "RAM block 1 is on or off/powering up\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum RAMBLOCK1_A {
|
||||
#[doc = "0: Off"]
|
||||
OFF = 0,
|
||||
#[doc = "1: On"]
|
||||
ON = 1,
|
||||
}
|
||||
impl From<RAMBLOCK1_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: RAMBLOCK1_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl RAMBLOCK1_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> RAMBLOCK1_A {
|
||||
match self.bits {
|
||||
false => RAMBLOCK1_A::OFF,
|
||||
true => RAMBLOCK1_A::ON,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `OFF`"]
|
||||
#[inline(always)]
|
||||
pub fn is_off(&self) -> bool {
|
||||
*self == RAMBLOCK1_A::OFF
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ON`"]
|
||||
#[inline(always)]
|
||||
pub fn is_on(&self) -> bool {
|
||||
*self == RAMBLOCK1_A::ON
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RAMBLOCK2` reader - RAM block 2 is on or off/powering up"]
|
||||
pub type RAMBLOCK2_R = crate::BitReader<RAMBLOCK2_A>;
|
||||
#[doc = "RAM block 2 is on or off/powering up\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum RAMBLOCK2_A {
|
||||
#[doc = "0: Off"]
|
||||
OFF = 0,
|
||||
#[doc = "1: On"]
|
||||
ON = 1,
|
||||
}
|
||||
impl From<RAMBLOCK2_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: RAMBLOCK2_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl RAMBLOCK2_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> RAMBLOCK2_A {
|
||||
match self.bits {
|
||||
false => RAMBLOCK2_A::OFF,
|
||||
true => RAMBLOCK2_A::ON,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `OFF`"]
|
||||
#[inline(always)]
|
||||
pub fn is_off(&self) -> bool {
|
||||
*self == RAMBLOCK2_A::OFF
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ON`"]
|
||||
#[inline(always)]
|
||||
pub fn is_on(&self) -> bool {
|
||||
*self == RAMBLOCK2_A::ON
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RAMBLOCK3` reader - RAM block 3 is on or off/powering up"]
|
||||
pub type RAMBLOCK3_R = crate::BitReader<RAMBLOCK3_A>;
|
||||
#[doc = "RAM block 3 is on or off/powering up\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum RAMBLOCK3_A {
|
||||
#[doc = "0: Off"]
|
||||
OFF = 0,
|
||||
#[doc = "1: On"]
|
||||
ON = 1,
|
||||
}
|
||||
impl From<RAMBLOCK3_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: RAMBLOCK3_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl RAMBLOCK3_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> RAMBLOCK3_A {
|
||||
match self.bits {
|
||||
false => RAMBLOCK3_A::OFF,
|
||||
true => RAMBLOCK3_A::ON,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `OFF`"]
|
||||
#[inline(always)]
|
||||
pub fn is_off(&self) -> bool {
|
||||
*self == RAMBLOCK3_A::OFF
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ON`"]
|
||||
#[inline(always)]
|
||||
pub fn is_on(&self) -> bool {
|
||||
*self == RAMBLOCK3_A::ON
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - RAM block 0 is on or off/powering up"]
|
||||
#[inline(always)]
|
||||
pub fn ramblock0(&self) -> RAMBLOCK0_R {
|
||||
RAMBLOCK0_R::new((self.bits & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 1 - RAM block 1 is on or off/powering up"]
|
||||
#[inline(always)]
|
||||
pub fn ramblock1(&self) -> RAMBLOCK1_R {
|
||||
RAMBLOCK1_R::new(((self.bits >> 1) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - RAM block 2 is on or off/powering up"]
|
||||
#[inline(always)]
|
||||
pub fn ramblock2(&self) -> RAMBLOCK2_R {
|
||||
RAMBLOCK2_R::new(((self.bits >> 2) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 3 - RAM block 3 is on or off/powering up"]
|
||||
#[inline(always)]
|
||||
pub fn ramblock3(&self) -> RAMBLOCK3_R {
|
||||
RAMBLOCK3_R::new(((self.bits >> 3) & 1) != 0)
|
||||
}
|
||||
}
|
||||
#[doc = "Deprecated register - RAM status register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ramstatus](index.html) module"]
|
||||
pub struct RAMSTATUS_SPEC;
|
||||
impl crate::RegisterSpec for RAMSTATUS_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [ramstatus::R](R) reader structure"]
|
||||
impl crate::Readable for RAMSTATUS_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`reset()` method sets RAMSTATUS to value 0"]
|
||||
impl crate::Resettable for RAMSTATUS_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
+606
@@ -0,0 +1,606 @@
|
||||
#[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 `LPCOMP` reader - Reset due to wake up from System OFF mode when wakeup is triggered from ANADETECT signal from LPCOMP"]
|
||||
pub type LPCOMP_R = crate::BitReader<LPCOMP_A>;
|
||||
#[doc = "Reset due to wake up from System OFF mode when wakeup is triggered from ANADETECT signal from LPCOMP\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum LPCOMP_A {
|
||||
#[doc = "0: Not detected"]
|
||||
NOT_DETECTED = 0,
|
||||
#[doc = "1: Detected"]
|
||||
DETECTED = 1,
|
||||
}
|
||||
impl From<LPCOMP_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: LPCOMP_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl LPCOMP_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> LPCOMP_A {
|
||||
match self.bits {
|
||||
false => LPCOMP_A::NOT_DETECTED,
|
||||
true => LPCOMP_A::DETECTED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `NOT_DETECTED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_not_detected(&self) -> bool {
|
||||
*self == LPCOMP_A::NOT_DETECTED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DETECTED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_detected(&self) -> bool {
|
||||
*self == LPCOMP_A::DETECTED
|
||||
}
|
||||
}
|
||||
#[doc = "Field `LPCOMP` writer - Reset due to wake up from System OFF mode when wakeup is triggered from ANADETECT signal from LPCOMP"]
|
||||
pub type LPCOMP_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESETREAS_SPEC, LPCOMP_A, O>;
|
||||
impl<'a, const O: u8> LPCOMP_W<'a, O> {
|
||||
#[doc = "Not detected"]
|
||||
#[inline(always)]
|
||||
pub fn not_detected(self) -> &'a mut W {
|
||||
self.variant(LPCOMP_A::NOT_DETECTED)
|
||||
}
|
||||
#[doc = "Detected"]
|
||||
#[inline(always)]
|
||||
pub fn detected(self) -> &'a mut W {
|
||||
self.variant(LPCOMP_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)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `NFC` reader - Reset due to wake up from System OFF mode by NFC field detect"]
|
||||
pub type NFC_R = crate::BitReader<NFC_A>;
|
||||
#[doc = "Reset due to wake up from System OFF mode by NFC field detect\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum NFC_A {
|
||||
#[doc = "0: Not detected"]
|
||||
NOT_DETECTED = 0,
|
||||
#[doc = "1: Detected"]
|
||||
DETECTED = 1,
|
||||
}
|
||||
impl From<NFC_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: NFC_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl NFC_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> NFC_A {
|
||||
match self.bits {
|
||||
false => NFC_A::NOT_DETECTED,
|
||||
true => NFC_A::DETECTED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `NOT_DETECTED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_not_detected(&self) -> bool {
|
||||
*self == NFC_A::NOT_DETECTED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DETECTED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_detected(&self) -> bool {
|
||||
*self == NFC_A::DETECTED
|
||||
}
|
||||
}
|
||||
#[doc = "Field `NFC` writer - Reset due to wake up from System OFF mode by NFC field detect"]
|
||||
pub type NFC_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESETREAS_SPEC, NFC_A, O>;
|
||||
impl<'a, const O: u8> NFC_W<'a, O> {
|
||||
#[doc = "Not detected"]
|
||||
#[inline(always)]
|
||||
pub fn not_detected(self) -> &'a mut W {
|
||||
self.variant(NFC_A::NOT_DETECTED)
|
||||
}
|
||||
#[doc = "Detected"]
|
||||
#[inline(always)]
|
||||
pub fn detected(self) -> &'a mut W {
|
||||
self.variant(NFC_A::DETECTED)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `VBUS` reader - Reset due to wake up from System OFF mode by VBUS rising into valid range"]
|
||||
pub type VBUS_R = crate::BitReader<VBUS_A>;
|
||||
#[doc = "Reset due to wake up from System OFF mode by VBUS rising into valid range\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum VBUS_A {
|
||||
#[doc = "0: Not detected"]
|
||||
NOT_DETECTED = 0,
|
||||
#[doc = "1: Detected"]
|
||||
DETECTED = 1,
|
||||
}
|
||||
impl From<VBUS_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: VBUS_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl VBUS_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> VBUS_A {
|
||||
match self.bits {
|
||||
false => VBUS_A::NOT_DETECTED,
|
||||
true => VBUS_A::DETECTED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `NOT_DETECTED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_not_detected(&self) -> bool {
|
||||
*self == VBUS_A::NOT_DETECTED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DETECTED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_detected(&self) -> bool {
|
||||
*self == VBUS_A::DETECTED
|
||||
}
|
||||
}
|
||||
#[doc = "Field `VBUS` writer - Reset due to wake up from System OFF mode by VBUS rising into valid range"]
|
||||
pub type VBUS_W<'a, const O: u8> = crate::BitWriter<'a, u32, RESETREAS_SPEC, VBUS_A, O>;
|
||||
impl<'a, const O: u8> VBUS_W<'a, O> {
|
||||
#[doc = "Not detected"]
|
||||
#[inline(always)]
|
||||
pub fn not_detected(self) -> &'a mut W {
|
||||
self.variant(VBUS_A::NOT_DETECTED)
|
||||
}
|
||||
#[doc = "Detected"]
|
||||
#[inline(always)]
|
||||
pub fn detected(self) -> &'a mut W {
|
||||
self.variant(VBUS_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 17 - Reset due to wake up from System OFF mode when wakeup is triggered from ANADETECT signal from LPCOMP"]
|
||||
#[inline(always)]
|
||||
pub fn lpcomp(&self) -> LPCOMP_R {
|
||||
LPCOMP_R::new(((self.bits >> 17) & 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)
|
||||
}
|
||||
#[doc = "Bit 19 - Reset due to wake up from System OFF mode by NFC field detect"]
|
||||
#[inline(always)]
|
||||
pub fn nfc(&self) -> NFC_R {
|
||||
NFC_R::new(((self.bits >> 19) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 20 - Reset due to wake up from System OFF mode by VBUS rising into valid range"]
|
||||
#[inline(always)]
|
||||
pub fn vbus(&self) -> VBUS_R {
|
||||
VBUS_R::new(((self.bits >> 20) & 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 17 - Reset due to wake up from System OFF mode when wakeup is triggered from ANADETECT signal from LPCOMP"]
|
||||
#[inline(always)]
|
||||
pub fn lpcomp(&mut self) -> LPCOMP_W<17> {
|
||||
LPCOMP_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 = "Bit 19 - Reset due to wake up from System OFF mode by NFC field detect"]
|
||||
#[inline(always)]
|
||||
pub fn nfc(&mut self) -> NFC_W<19> {
|
||||
NFC_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 20 - Reset due to wake up from System OFF mode by VBUS rising into valid range"]
|
||||
#[inline(always)]
|
||||
pub fn vbus(&mut self) -> VBUS_W<20> {
|
||||
VBUS_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
|
||||
}
|
||||
}
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
#[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 = "Field `TASKS_CONSTLAT` writer - "]
|
||||
pub type TASKS_CONSTLAT_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, TASKS_CONSTLAT_SPEC, bool, O>;
|
||||
impl W {
|
||||
#[doc = "Bit 0"]
|
||||
#[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
|
||||
}
|
||||
}
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
#[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 = "Field `TASKS_LOWPWR` writer - "]
|
||||
pub type TASKS_LOWPWR_W<'a, const O: u8> = crate::BitWriter<'a, u32, TASKS_LOWPWR_SPEC, bool, O>;
|
||||
impl W {
|
||||
#[doc = "Bit 0"]
|
||||
#[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
|
||||
}
|
||||
}
|
||||
+115
@@ -0,0 +1,115 @@
|
||||
#[doc = "Register `USBREGSTATUS` reader"]
|
||||
pub struct R(crate::R<USBREGSTATUS_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<USBREGSTATUS_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<USBREGSTATUS_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<USBREGSTATUS_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `VBUSDETECT` reader - VBUS input detection status (USBDETECTED and USBREMOVED events are derived from this information)"]
|
||||
pub type VBUSDETECT_R = crate::BitReader<VBUSDETECT_A>;
|
||||
#[doc = "VBUS input detection status (USBDETECTED and USBREMOVED events are derived from this information)\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum VBUSDETECT_A {
|
||||
#[doc = "0: VBUS voltage below valid threshold"]
|
||||
NO_VBUS = 0,
|
||||
#[doc = "1: VBUS voltage above valid threshold"]
|
||||
VBUS_PRESENT = 1,
|
||||
}
|
||||
impl From<VBUSDETECT_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: VBUSDETECT_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl VBUSDETECT_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> VBUSDETECT_A {
|
||||
match self.bits {
|
||||
false => VBUSDETECT_A::NO_VBUS,
|
||||
true => VBUSDETECT_A::VBUS_PRESENT,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `NO_VBUS`"]
|
||||
#[inline(always)]
|
||||
pub fn is_no_vbus(&self) -> bool {
|
||||
*self == VBUSDETECT_A::NO_VBUS
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `VBUS_PRESENT`"]
|
||||
#[inline(always)]
|
||||
pub fn is_vbus_present(&self) -> bool {
|
||||
*self == VBUSDETECT_A::VBUS_PRESENT
|
||||
}
|
||||
}
|
||||
#[doc = "Field `OUTPUTRDY` reader - USB supply output settling time elapsed"]
|
||||
pub type OUTPUTRDY_R = crate::BitReader<OUTPUTRDY_A>;
|
||||
#[doc = "USB supply output settling time elapsed\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum OUTPUTRDY_A {
|
||||
#[doc = "0: USBREG output settling time not elapsed"]
|
||||
NOT_READY = 0,
|
||||
#[doc = "1: USBREG output settling time elapsed (same information as USBPWRRDY event)"]
|
||||
READY = 1,
|
||||
}
|
||||
impl From<OUTPUTRDY_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: OUTPUTRDY_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl OUTPUTRDY_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> OUTPUTRDY_A {
|
||||
match self.bits {
|
||||
false => OUTPUTRDY_A::NOT_READY,
|
||||
true => OUTPUTRDY_A::READY,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `NOT_READY`"]
|
||||
#[inline(always)]
|
||||
pub fn is_not_ready(&self) -> bool {
|
||||
*self == OUTPUTRDY_A::NOT_READY
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `READY`"]
|
||||
#[inline(always)]
|
||||
pub fn is_ready(&self) -> bool {
|
||||
*self == OUTPUTRDY_A::READY
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - VBUS input detection status (USBDETECTED and USBREMOVED events are derived from this information)"]
|
||||
#[inline(always)]
|
||||
pub fn vbusdetect(&self) -> VBUSDETECT_R {
|
||||
VBUSDETECT_R::new((self.bits & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 1 - USB supply output settling time elapsed"]
|
||||
#[inline(always)]
|
||||
pub fn outputrdy(&self) -> OUTPUTRDY_R {
|
||||
OUTPUTRDY_R::new(((self.bits >> 1) & 1) != 0)
|
||||
}
|
||||
}
|
||||
#[doc = "USB supply status\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [usbregstatus](index.html) module"]
|
||||
pub struct USBREGSTATUS_SPEC;
|
||||
impl crate::RegisterSpec for USBREGSTATUS_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [usbregstatus::R](R) reader structure"]
|
||||
impl crate::Readable for USBREGSTATUS_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`reset()` method sets USBREGSTATUS to value 0"]
|
||||
impl crate::Resettable for USBREGSTATUS_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user