feat: add display UI with splash screen, dashboard, and RSSI sparkline

Implement full SSD1306 OLED display support:
- Splash screen on boot (1.5s) with project name, version, board
- Dashboard showing radio state, config, counters, RSSI/SNR
- RSSI history sparkline (64-sample ring buffer, 2px-wide bars)
- DisplayOn/DisplayOff host commands routed via dedicated channel
- Pure render functions against generic DrawTarget (no hardware coupling)
- Display on/off control bypasses radio task entirely

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
swaitsandClaude Opus 4.6 committed 2026-03-29 20:42:54 -06:00
1 parent 7064110293
commit 3102fc747a
17624 files changed
+4564928 -38

No files matched your search

+186
View File
@@ -0,0 +1,186 @@
#[doc = "Register `CONFIG` reader"]
pub struct R(crate::R<CONFIG_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CONFIG_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CONFIG_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CONFIG_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `CONFIG` writer"]
pub struct W(crate::W<CONFIG_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<CONFIG_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<CONFIG_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<CONFIG_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `SLEEP` reader - Configure the watchdog to either be paused, or kept running, while the CPU is sleeping"]
pub type SLEEP_R = crate::BitReader<SLEEP_A>;
#[doc = "Configure the watchdog to either be paused, or kept running, while the CPU is sleeping\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SLEEP_A {
#[doc = "0: Pause watchdog while the CPU is sleeping"]
PAUSE = 0,
#[doc = "1: Keep the watchdog running while the CPU is sleeping"]
RUN = 1,
}
impl From<SLEEP_A> for bool {
#[inline(always)]
fn from(variant: SLEEP_A) -> Self {
variant as u8 != 0
}
}
impl SLEEP_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> SLEEP_A {
match self.bits {
false => SLEEP_A::PAUSE,
true => SLEEP_A::RUN,
}
}
#[doc = "Checks if the value of the field is `PAUSE`"]
#[inline(always)]
pub fn is_pause(&self) -> bool {
*self == SLEEP_A::PAUSE
}
#[doc = "Checks if the value of the field is `RUN`"]
#[inline(always)]
pub fn is_run(&self) -> bool {
*self == SLEEP_A::RUN
}
}
#[doc = "Field `SLEEP` writer - Configure the watchdog to either be paused, or kept running, while the CPU is sleeping"]
pub type SLEEP_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG_SPEC, SLEEP_A, O>;
impl<'a, const O: u8> SLEEP_W<'a, O> {
#[doc = "Pause watchdog while the CPU is sleeping"]
#[inline(always)]
pub fn pause(self) -> &'a mut W {
self.variant(SLEEP_A::PAUSE)
}
#[doc = "Keep the watchdog running while the CPU is sleeping"]
#[inline(always)]
pub fn run(self) -> &'a mut W {
self.variant(SLEEP_A::RUN)
}
}
#[doc = "Field `HALT` reader - Configure the watchdog to either be paused, or kept running, while the CPU is halted by the debugger"]
pub type HALT_R = crate::BitReader<HALT_A>;
#[doc = "Configure the watchdog to either be paused, or kept running, while the CPU is halted by the debugger\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum HALT_A {
#[doc = "0: Pause watchdog while the CPU is halted by the debugger"]
PAUSE = 0,
#[doc = "1: Keep the watchdog running while the CPU is halted by the debugger"]
RUN = 1,
}
impl From<HALT_A> for bool {
#[inline(always)]
fn from(variant: HALT_A) -> Self {
variant as u8 != 0
}
}
impl HALT_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> HALT_A {
match self.bits {
false => HALT_A::PAUSE,
true => HALT_A::RUN,
}
}
#[doc = "Checks if the value of the field is `PAUSE`"]
#[inline(always)]
pub fn is_pause(&self) -> bool {
*self == HALT_A::PAUSE
}
#[doc = "Checks if the value of the field is `RUN`"]
#[inline(always)]
pub fn is_run(&self) -> bool {
*self == HALT_A::RUN
}
}
#[doc = "Field `HALT` writer - Configure the watchdog to either be paused, or kept running, while the CPU is halted by the debugger"]
pub type HALT_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG_SPEC, HALT_A, O>;
impl<'a, const O: u8> HALT_W<'a, O> {
#[doc = "Pause watchdog while the CPU is halted by the debugger"]
#[inline(always)]
pub fn pause(self) -> &'a mut W {
self.variant(HALT_A::PAUSE)
}
#[doc = "Keep the watchdog running while the CPU is halted by the debugger"]
#[inline(always)]
pub fn run(self) -> &'a mut W {
self.variant(HALT_A::RUN)
}
}
impl R {
#[doc = "Bit 0 - Configure the watchdog to either be paused, or kept running, while the CPU is sleeping"]
#[inline(always)]
pub fn sleep(&self) -> SLEEP_R {
SLEEP_R::new((self.bits & 1) != 0)
}
#[doc = "Bit 3 - Configure the watchdog to either be paused, or kept running, while the CPU is halted by the debugger"]
#[inline(always)]
pub fn halt(&self) -> HALT_R {
HALT_R::new(((self.bits >> 3) & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Configure the watchdog to either be paused, or kept running, while the CPU is sleeping"]
#[inline(always)]
pub fn sleep(&mut self) -> SLEEP_W<0> {
SLEEP_W::new(self)
}
#[doc = "Bit 3 - Configure the watchdog to either be paused, or kept running, while the CPU is halted by the debugger"]
#[inline(always)]
pub fn halt(&mut self) -> HALT_W<3> {
HALT_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Configuration register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [config](index.html) module"]
pub struct CONFIG_SPEC;
impl crate::RegisterSpec for CONFIG_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [config::R](R) reader structure"]
impl crate::Readable for CONFIG_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [config::W](W) writer structure"]
impl crate::Writable for CONFIG_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets CONFIG to value 0x01"]
impl crate::Resettable for CONFIG_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0x01
}
}
+80
View File
@@ -0,0 +1,80 @@
#[doc = "Register `CRV` reader"]
pub struct R(crate::R<CRV_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CRV_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CRV_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CRV_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `CRV` writer"]
pub struct W(crate::W<CRV_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<CRV_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<CRV_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<CRV_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `CRV` reader - Counter reload value in number of cycles of the 32.768 kHz clock"]
pub type CRV_R = crate::FieldReader<u32, u32>;
#[doc = "Field `CRV` writer - Counter reload value in number of cycles of the 32.768 kHz clock"]
pub type CRV_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CRV_SPEC, u32, u32, 32, O>;
impl R {
#[doc = "Bits 0:31 - Counter reload value in number of cycles of the 32.768 kHz clock"]
#[inline(always)]
pub fn crv(&self) -> CRV_R {
CRV_R::new(self.bits)
}
}
impl W {
#[doc = "Bits 0:31 - Counter reload value in number of cycles of the 32.768 kHz clock"]
#[inline(always)]
pub fn crv(&mut self) -> CRV_W<0> {
CRV_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 = "Counter reload value\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 [crv](index.html) module"]
pub struct CRV_SPEC;
impl crate::RegisterSpec for CRV_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [crv::R](R) reader structure"]
impl crate::Readable for CRV_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [crv::W](W) writer structure"]
impl crate::Writable for CRV_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets CRV to value 0xffff_ffff"]
impl crate::Resettable for CRV_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0xffff_ffff
}
}
+127
View File
@@ -0,0 +1,127 @@
#[doc = "Register `EVENTS_TIMEOUT` reader"]
pub struct R(crate::R<EVENTS_TIMEOUT_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_TIMEOUT_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_TIMEOUT_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_TIMEOUT_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_TIMEOUT` writer"]
pub struct W(crate::W<EVENTS_TIMEOUT_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_TIMEOUT_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_TIMEOUT_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_TIMEOUT_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `EVENTS_TIMEOUT` reader - Watchdog timeout"]
pub type EVENTS_TIMEOUT_R = crate::BitReader<EVENTS_TIMEOUT_A>;
#[doc = "Watchdog timeout\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EVENTS_TIMEOUT_A {
#[doc = "0: Event not generated"]
NOT_GENERATED = 0,
#[doc = "1: Event generated"]
GENERATED = 1,
}
impl From<EVENTS_TIMEOUT_A> for bool {
#[inline(always)]
fn from(variant: EVENTS_TIMEOUT_A) -> Self {
variant as u8 != 0
}
}
impl EVENTS_TIMEOUT_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EVENTS_TIMEOUT_A {
match self.bits {
false => EVENTS_TIMEOUT_A::NOT_GENERATED,
true => EVENTS_TIMEOUT_A::GENERATED,
}
}
#[doc = "Checks if the value of the field is `NOT_GENERATED`"]
#[inline(always)]
pub fn is_not_generated(&self) -> bool {
*self == EVENTS_TIMEOUT_A::NOT_GENERATED
}
#[doc = "Checks if the value of the field is `GENERATED`"]
#[inline(always)]
pub fn is_generated(&self) -> bool {
*self == EVENTS_TIMEOUT_A::GENERATED
}
}
#[doc = "Field `EVENTS_TIMEOUT` writer - Watchdog timeout"]
pub type EVENTS_TIMEOUT_W<'a, const O: u8> =
crate::BitWriter<'a, u32, EVENTS_TIMEOUT_SPEC, EVENTS_TIMEOUT_A, O>;
impl<'a, const O: u8> EVENTS_TIMEOUT_W<'a, O> {
#[doc = "Event not generated"]
#[inline(always)]
pub fn not_generated(self) -> &'a mut W {
self.variant(EVENTS_TIMEOUT_A::NOT_GENERATED)
}
#[doc = "Event generated"]
#[inline(always)]
pub fn generated(self) -> &'a mut W {
self.variant(EVENTS_TIMEOUT_A::GENERATED)
}
}
impl R {
#[doc = "Bit 0 - Watchdog timeout"]
#[inline(always)]
pub fn events_timeout(&self) -> EVENTS_TIMEOUT_R {
EVENTS_TIMEOUT_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Watchdog timeout"]
#[inline(always)]
pub fn events_timeout(&mut self) -> EVENTS_TIMEOUT_W<0> {
EVENTS_TIMEOUT_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 = "Watchdog timeout\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_timeout](index.html) module"]
pub struct EVENTS_TIMEOUT_SPEC;
impl crate::RegisterSpec for EVENTS_TIMEOUT_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_timeout::R](R) reader structure"]
impl crate::Readable for EVENTS_TIMEOUT_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_timeout::W](W) writer structure"]
impl crate::Writable for EVENTS_TIMEOUT_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_TIMEOUT to value 0"]
impl crate::Resettable for EVENTS_TIMEOUT_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+133
View File
@@ -0,0 +1,133 @@
#[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 `TIMEOUT` reader - Write '1' to disable interrupt for event TIMEOUT"]
pub type TIMEOUT_R = crate::BitReader<TIMEOUT_A>;
#[doc = "Write '1' to disable interrupt for event TIMEOUT\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TIMEOUT_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<TIMEOUT_A> for bool {
#[inline(always)]
fn from(variant: TIMEOUT_A) -> Self {
variant as u8 != 0
}
}
impl TIMEOUT_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> TIMEOUT_A {
match self.bits {
false => TIMEOUT_A::DISABLED,
true => TIMEOUT_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == TIMEOUT_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == TIMEOUT_A::ENABLED
}
}
#[doc = "Write '1' to disable interrupt for event TIMEOUT\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TIMEOUT_AW {
#[doc = "1: Disable"]
CLEAR = 1,
}
impl From<TIMEOUT_AW> for bool {
#[inline(always)]
fn from(variant: TIMEOUT_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `TIMEOUT` writer - Write '1' to disable interrupt for event TIMEOUT"]
pub type TIMEOUT_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, TIMEOUT_AW, O>;
impl<'a, const O: u8> TIMEOUT_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(TIMEOUT_AW::CLEAR)
}
}
impl R {
#[doc = "Bit 0 - Write '1' to disable interrupt for event TIMEOUT"]
#[inline(always)]
pub fn timeout(&self) -> TIMEOUT_R {
TIMEOUT_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Write '1' to disable interrupt for event TIMEOUT"]
#[inline(always)]
pub fn timeout(&mut self) -> TIMEOUT_W<0> {
TIMEOUT_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
}
}
+133
View File
@@ -0,0 +1,133 @@
#[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 `TIMEOUT` reader - Write '1' to enable interrupt for event TIMEOUT"]
pub type TIMEOUT_R = crate::BitReader<TIMEOUT_A>;
#[doc = "Write '1' to enable interrupt for event TIMEOUT\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TIMEOUT_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<TIMEOUT_A> for bool {
#[inline(always)]
fn from(variant: TIMEOUT_A) -> Self {
variant as u8 != 0
}
}
impl TIMEOUT_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> TIMEOUT_A {
match self.bits {
false => TIMEOUT_A::DISABLED,
true => TIMEOUT_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == TIMEOUT_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == TIMEOUT_A::ENABLED
}
}
#[doc = "Write '1' to enable interrupt for event TIMEOUT\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TIMEOUT_AW {
#[doc = "1: Enable"]
SET = 1,
}
impl From<TIMEOUT_AW> for bool {
#[inline(always)]
fn from(variant: TIMEOUT_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `TIMEOUT` writer - Write '1' to enable interrupt for event TIMEOUT"]
pub type TIMEOUT_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, TIMEOUT_AW, O>;
impl<'a, const O: u8> TIMEOUT_W<'a, O> {
#[doc = "Enable"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(TIMEOUT_AW::SET)
}
}
impl R {
#[doc = "Bit 0 - Write '1' to enable interrupt for event TIMEOUT"]
#[inline(always)]
pub fn timeout(&self) -> TIMEOUT_R {
TIMEOUT_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Write '1' to enable interrupt for event TIMEOUT"]
#[inline(always)]
pub fn timeout(&mut self) -> TIMEOUT_W<0> {
TIMEOUT_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Enable interrupt\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [intenset](index.html) module"]
pub struct INTENSET_SPEC;
impl crate::RegisterSpec for INTENSET_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [intenset::R](R) reader structure"]
impl crate::Readable for INTENSET_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"]
impl crate::Writable for INTENSET_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets INTENSET to value 0"]
impl crate::Resettable for INTENSET_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+140
View File
@@ -0,0 +1,140 @@
#[doc = "Register `PUBLISH_TIMEOUT` reader"]
pub struct R(crate::R<PUBLISH_TIMEOUT_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<PUBLISH_TIMEOUT_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<PUBLISH_TIMEOUT_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<PUBLISH_TIMEOUT_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `PUBLISH_TIMEOUT` writer"]
pub struct W(crate::W<PUBLISH_TIMEOUT_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<PUBLISH_TIMEOUT_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<PUBLISH_TIMEOUT_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<PUBLISH_TIMEOUT_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `CHIDX` reader - Channel that event TIMEOUT will publish to."]
pub type CHIDX_R = crate::FieldReader<u8, u8>;
#[doc = "Field `CHIDX` writer - Channel that event TIMEOUT will publish to."]
pub type CHIDX_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PUBLISH_TIMEOUT_SPEC, u8, u8, 4, O>;
#[doc = "Field `EN` reader - "]
pub type EN_R = crate::BitReader<EN_A>;
#[doc = "\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EN_A {
#[doc = "0: Disable publishing"]
DISABLED = 0,
#[doc = "1: Enable publishing"]
ENABLED = 1,
}
impl From<EN_A> for bool {
#[inline(always)]
fn from(variant: EN_A) -> Self {
variant as u8 != 0
}
}
impl EN_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EN_A {
match self.bits {
false => EN_A::DISABLED,
true => EN_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == EN_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == EN_A::ENABLED
}
}
#[doc = "Field `EN` writer - "]
pub type EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUBLISH_TIMEOUT_SPEC, EN_A, O>;
impl<'a, const O: u8> EN_W<'a, O> {
#[doc = "Disable publishing"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(EN_A::DISABLED)
}
#[doc = "Enable publishing"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(EN_A::ENABLED)
}
}
impl R {
#[doc = "Bits 0:3 - Channel that event TIMEOUT will publish to."]
#[inline(always)]
pub fn chidx(&self) -> CHIDX_R {
CHIDX_R::new((self.bits & 0x0f) as u8)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&self) -> EN_R {
EN_R::new(((self.bits >> 31) & 1) != 0)
}
}
impl W {
#[doc = "Bits 0:3 - Channel that event TIMEOUT will publish to."]
#[inline(always)]
pub fn chidx(&mut self) -> CHIDX_W<0> {
CHIDX_W::new(self)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&mut self) -> EN_W<31> {
EN_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Publish configuration for event TIMEOUT\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [publish_timeout](index.html) module"]
pub struct PUBLISH_TIMEOUT_SPEC;
impl crate::RegisterSpec for PUBLISH_TIMEOUT_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [publish_timeout::R](R) reader structure"]
impl crate::Readable for PUBLISH_TIMEOUT_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [publish_timeout::W](W) writer structure"]
impl crate::Writable for PUBLISH_TIMEOUT_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets PUBLISH_TIMEOUT to value 0"]
impl crate::Resettable for PUBLISH_TIMEOUT_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+401
View File
@@ -0,0 +1,401 @@
#[doc = "Register `REQSTATUS` reader"]
pub struct R(crate::R<REQSTATUS_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<REQSTATUS_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<REQSTATUS_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<REQSTATUS_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `RR0` reader - Request status for RR\\[0\\]
register"]
pub type RR0_R = crate::BitReader<RR0_A>;
#[doc = "Request status for RR\\[0\\]
register\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RR0_A {
#[doc = "0: RR\\[0\\]
register is not enabled, or are already requesting reload"]
DISABLED_OR_REQUESTED = 0,
#[doc = "1: RR\\[0\\]
register is enabled, and are not yet requesting reload"]
ENABLED_AND_UNREQUESTED = 1,
}
impl From<RR0_A> for bool {
#[inline(always)]
fn from(variant: RR0_A) -> Self {
variant as u8 != 0
}
}
impl RR0_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RR0_A {
match self.bits {
false => RR0_A::DISABLED_OR_REQUESTED,
true => RR0_A::ENABLED_AND_UNREQUESTED,
}
}
#[doc = "Checks if the value of the field is `DISABLED_OR_REQUESTED`"]
#[inline(always)]
pub fn is_disabled_or_requested(&self) -> bool {
*self == RR0_A::DISABLED_OR_REQUESTED
}
#[doc = "Checks if the value of the field is `ENABLED_AND_UNREQUESTED`"]
#[inline(always)]
pub fn is_enabled_and_unrequested(&self) -> bool {
*self == RR0_A::ENABLED_AND_UNREQUESTED
}
}
#[doc = "Field `RR1` reader - Request status for RR\\[1\\]
register"]
pub type RR1_R = crate::BitReader<RR1_A>;
#[doc = "Request status for RR\\[1\\]
register\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RR1_A {
#[doc = "0: RR\\[1\\]
register is not enabled, or are already requesting reload"]
DISABLED_OR_REQUESTED = 0,
#[doc = "1: RR\\[1\\]
register is enabled, and are not yet requesting reload"]
ENABLED_AND_UNREQUESTED = 1,
}
impl From<RR1_A> for bool {
#[inline(always)]
fn from(variant: RR1_A) -> Self {
variant as u8 != 0
}
}
impl RR1_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RR1_A {
match self.bits {
false => RR1_A::DISABLED_OR_REQUESTED,
true => RR1_A::ENABLED_AND_UNREQUESTED,
}
}
#[doc = "Checks if the value of the field is `DISABLED_OR_REQUESTED`"]
#[inline(always)]
pub fn is_disabled_or_requested(&self) -> bool {
*self == RR1_A::DISABLED_OR_REQUESTED
}
#[doc = "Checks if the value of the field is `ENABLED_AND_UNREQUESTED`"]
#[inline(always)]
pub fn is_enabled_and_unrequested(&self) -> bool {
*self == RR1_A::ENABLED_AND_UNREQUESTED
}
}
#[doc = "Field `RR2` reader - Request status for RR\\[2\\]
register"]
pub type RR2_R = crate::BitReader<RR2_A>;
#[doc = "Request status for RR\\[2\\]
register\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RR2_A {
#[doc = "0: RR\\[2\\]
register is not enabled, or are already requesting reload"]
DISABLED_OR_REQUESTED = 0,
#[doc = "1: RR\\[2\\]
register is enabled, and are not yet requesting reload"]
ENABLED_AND_UNREQUESTED = 1,
}
impl From<RR2_A> for bool {
#[inline(always)]
fn from(variant: RR2_A) -> Self {
variant as u8 != 0
}
}
impl RR2_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RR2_A {
match self.bits {
false => RR2_A::DISABLED_OR_REQUESTED,
true => RR2_A::ENABLED_AND_UNREQUESTED,
}
}
#[doc = "Checks if the value of the field is `DISABLED_OR_REQUESTED`"]
#[inline(always)]
pub fn is_disabled_or_requested(&self) -> bool {
*self == RR2_A::DISABLED_OR_REQUESTED
}
#[doc = "Checks if the value of the field is `ENABLED_AND_UNREQUESTED`"]
#[inline(always)]
pub fn is_enabled_and_unrequested(&self) -> bool {
*self == RR2_A::ENABLED_AND_UNREQUESTED
}
}
#[doc = "Field `RR3` reader - Request status for RR\\[3\\]
register"]
pub type RR3_R = crate::BitReader<RR3_A>;
#[doc = "Request status for RR\\[3\\]
register\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RR3_A {
#[doc = "0: RR\\[3\\]
register is not enabled, or are already requesting reload"]
DISABLED_OR_REQUESTED = 0,
#[doc = "1: RR\\[3\\]
register is enabled, and are not yet requesting reload"]
ENABLED_AND_UNREQUESTED = 1,
}
impl From<RR3_A> for bool {
#[inline(always)]
fn from(variant: RR3_A) -> Self {
variant as u8 != 0
}
}
impl RR3_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RR3_A {
match self.bits {
false => RR3_A::DISABLED_OR_REQUESTED,
true => RR3_A::ENABLED_AND_UNREQUESTED,
}
}
#[doc = "Checks if the value of the field is `DISABLED_OR_REQUESTED`"]
#[inline(always)]
pub fn is_disabled_or_requested(&self) -> bool {
*self == RR3_A::DISABLED_OR_REQUESTED
}
#[doc = "Checks if the value of the field is `ENABLED_AND_UNREQUESTED`"]
#[inline(always)]
pub fn is_enabled_and_unrequested(&self) -> bool {
*self == RR3_A::ENABLED_AND_UNREQUESTED
}
}
#[doc = "Field `RR4` reader - Request status for RR\\[4\\]
register"]
pub type RR4_R = crate::BitReader<RR4_A>;
#[doc = "Request status for RR\\[4\\]
register\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RR4_A {
#[doc = "0: RR\\[4\\]
register is not enabled, or are already requesting reload"]
DISABLED_OR_REQUESTED = 0,
#[doc = "1: RR\\[4\\]
register is enabled, and are not yet requesting reload"]
ENABLED_AND_UNREQUESTED = 1,
}
impl From<RR4_A> for bool {
#[inline(always)]
fn from(variant: RR4_A) -> Self {
variant as u8 != 0
}
}
impl RR4_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RR4_A {
match self.bits {
false => RR4_A::DISABLED_OR_REQUESTED,
true => RR4_A::ENABLED_AND_UNREQUESTED,
}
}
#[doc = "Checks if the value of the field is `DISABLED_OR_REQUESTED`"]
#[inline(always)]
pub fn is_disabled_or_requested(&self) -> bool {
*self == RR4_A::DISABLED_OR_REQUESTED
}
#[doc = "Checks if the value of the field is `ENABLED_AND_UNREQUESTED`"]
#[inline(always)]
pub fn is_enabled_and_unrequested(&self) -> bool {
*self == RR4_A::ENABLED_AND_UNREQUESTED
}
}
#[doc = "Field `RR5` reader - Request status for RR\\[5\\]
register"]
pub type RR5_R = crate::BitReader<RR5_A>;
#[doc = "Request status for RR\\[5\\]
register\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RR5_A {
#[doc = "0: RR\\[5\\]
register is not enabled, or are already requesting reload"]
DISABLED_OR_REQUESTED = 0,
#[doc = "1: RR\\[5\\]
register is enabled, and are not yet requesting reload"]
ENABLED_AND_UNREQUESTED = 1,
}
impl From<RR5_A> for bool {
#[inline(always)]
fn from(variant: RR5_A) -> Self {
variant as u8 != 0
}
}
impl RR5_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RR5_A {
match self.bits {
false => RR5_A::DISABLED_OR_REQUESTED,
true => RR5_A::ENABLED_AND_UNREQUESTED,
}
}
#[doc = "Checks if the value of the field is `DISABLED_OR_REQUESTED`"]
#[inline(always)]
pub fn is_disabled_or_requested(&self) -> bool {
*self == RR5_A::DISABLED_OR_REQUESTED
}
#[doc = "Checks if the value of the field is `ENABLED_AND_UNREQUESTED`"]
#[inline(always)]
pub fn is_enabled_and_unrequested(&self) -> bool {
*self == RR5_A::ENABLED_AND_UNREQUESTED
}
}
#[doc = "Field `RR6` reader - Request status for RR\\[6\\]
register"]
pub type RR6_R = crate::BitReader<RR6_A>;
#[doc = "Request status for RR\\[6\\]
register\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RR6_A {
#[doc = "0: RR\\[6\\]
register is not enabled, or are already requesting reload"]
DISABLED_OR_REQUESTED = 0,
#[doc = "1: RR\\[6\\]
register is enabled, and are not yet requesting reload"]
ENABLED_AND_UNREQUESTED = 1,
}
impl From<RR6_A> for bool {
#[inline(always)]
fn from(variant: RR6_A) -> Self {
variant as u8 != 0
}
}
impl RR6_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RR6_A {
match self.bits {
false => RR6_A::DISABLED_OR_REQUESTED,
true => RR6_A::ENABLED_AND_UNREQUESTED,
}
}
#[doc = "Checks if the value of the field is `DISABLED_OR_REQUESTED`"]
#[inline(always)]
pub fn is_disabled_or_requested(&self) -> bool {
*self == RR6_A::DISABLED_OR_REQUESTED
}
#[doc = "Checks if the value of the field is `ENABLED_AND_UNREQUESTED`"]
#[inline(always)]
pub fn is_enabled_and_unrequested(&self) -> bool {
*self == RR6_A::ENABLED_AND_UNREQUESTED
}
}
#[doc = "Field `RR7` reader - Request status for RR\\[7\\]
register"]
pub type RR7_R = crate::BitReader<RR7_A>;
#[doc = "Request status for RR\\[7\\]
register\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RR7_A {
#[doc = "0: RR\\[7\\]
register is not enabled, or are already requesting reload"]
DISABLED_OR_REQUESTED = 0,
#[doc = "1: RR\\[7\\]
register is enabled, and are not yet requesting reload"]
ENABLED_AND_UNREQUESTED = 1,
}
impl From<RR7_A> for bool {
#[inline(always)]
fn from(variant: RR7_A) -> Self {
variant as u8 != 0
}
}
impl RR7_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RR7_A {
match self.bits {
false => RR7_A::DISABLED_OR_REQUESTED,
true => RR7_A::ENABLED_AND_UNREQUESTED,
}
}
#[doc = "Checks if the value of the field is `DISABLED_OR_REQUESTED`"]
#[inline(always)]
pub fn is_disabled_or_requested(&self) -> bool {
*self == RR7_A::DISABLED_OR_REQUESTED
}
#[doc = "Checks if the value of the field is `ENABLED_AND_UNREQUESTED`"]
#[inline(always)]
pub fn is_enabled_and_unrequested(&self) -> bool {
*self == RR7_A::ENABLED_AND_UNREQUESTED
}
}
impl R {
#[doc = "Bit 0 - Request status for RR\\[0\\]
register"]
#[inline(always)]
pub fn rr0(&self) -> RR0_R {
RR0_R::new((self.bits & 1) != 0)
}
#[doc = "Bit 1 - Request status for RR\\[1\\]
register"]
#[inline(always)]
pub fn rr1(&self) -> RR1_R {
RR1_R::new(((self.bits >> 1) & 1) != 0)
}
#[doc = "Bit 2 - Request status for RR\\[2\\]
register"]
#[inline(always)]
pub fn rr2(&self) -> RR2_R {
RR2_R::new(((self.bits >> 2) & 1) != 0)
}
#[doc = "Bit 3 - Request status for RR\\[3\\]
register"]
#[inline(always)]
pub fn rr3(&self) -> RR3_R {
RR3_R::new(((self.bits >> 3) & 1) != 0)
}
#[doc = "Bit 4 - Request status for RR\\[4\\]
register"]
#[inline(always)]
pub fn rr4(&self) -> RR4_R {
RR4_R::new(((self.bits >> 4) & 1) != 0)
}
#[doc = "Bit 5 - Request status for RR\\[5\\]
register"]
#[inline(always)]
pub fn rr5(&self) -> RR5_R {
RR5_R::new(((self.bits >> 5) & 1) != 0)
}
#[doc = "Bit 6 - Request status for RR\\[6\\]
register"]
#[inline(always)]
pub fn rr6(&self) -> RR6_R {
RR6_R::new(((self.bits >> 6) & 1) != 0)
}
#[doc = "Bit 7 - Request status for RR\\[7\\]
register"]
#[inline(always)]
pub fn rr7(&self) -> RR7_R {
RR7_R::new(((self.bits >> 7) & 1) != 0)
}
}
#[doc = "Request 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 [reqstatus](index.html) module"]
pub struct REQSTATUS_SPEC;
impl crate::RegisterSpec for REQSTATUS_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [reqstatus::R](R) reader structure"]
impl crate::Readable for REQSTATUS_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets REQSTATUS to value 0x01"]
impl crate::Resettable for REQSTATUS_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0x01
}
}
+73
View File
@@ -0,0 +1,73 @@
#[doc = "Register `RR[%s]` writer"]
pub struct W(crate::W<RR_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<RR_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<RR_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<RR_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Reload request register\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u32)]
pub enum RR_AW {
#[doc = "1850885685: Value to request a reload of the watchdog timer"]
RELOAD = 1850885685,
}
impl From<RR_AW> for u32 {
#[inline(always)]
fn from(variant: RR_AW) -> Self {
variant as _
}
}
#[doc = "Field `RR` writer - Reload request register"]
pub type RR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, RR_SPEC, u32, RR_AW, 32, O>;
impl<'a, const O: u8> RR_W<'a, O> {
#[doc = "Value to request a reload of the watchdog timer"]
#[inline(always)]
pub fn reload(self) -> &'a mut W {
self.variant(RR_AW::RELOAD)
}
}
impl W {
#[doc = "Bits 0:31 - Reload request register"]
#[inline(always)]
pub fn rr(&mut self) -> RR_W<0> {
RR_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Description collection: Reload request n\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 [rr](index.html) module"]
pub struct RR_SPEC;
impl crate::RegisterSpec for RR_SPEC {
type Ux = u32;
}
#[doc = "`write(|w| ..)` method takes [rr::W](W) writer structure"]
impl crate::Writable for RR_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets RR[%s]
to value 0"]
impl crate::Resettable for RR_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+618
View File
@@ -0,0 +1,618 @@
#[doc = "Register `RREN` reader"]
pub struct R(crate::R<RREN_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<RREN_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<RREN_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<RREN_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `RREN` writer"]
pub struct W(crate::W<RREN_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<RREN_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<RREN_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<RREN_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `RR0` reader - Enable or disable RR\\[0\\]
register"]
pub type RR0_R = crate::BitReader<RR0_A>;
#[doc = "Enable or disable RR\\[0\\]
register\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RR0_A {
#[doc = "0: Disable RR\\[0\\]
register"]
DISABLED = 0,
#[doc = "1: Enable RR\\[0\\]
register"]
ENABLED = 1,
}
impl From<RR0_A> for bool {
#[inline(always)]
fn from(variant: RR0_A) -> Self {
variant as u8 != 0
}
}
impl RR0_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RR0_A {
match self.bits {
false => RR0_A::DISABLED,
true => RR0_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == RR0_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == RR0_A::ENABLED
}
}
#[doc = "Field `RR0` writer - Enable or disable RR\\[0\\]
register"]
pub type RR0_W<'a, const O: u8> = crate::BitWriter<'a, u32, RREN_SPEC, RR0_A, O>;
impl<'a, const O: u8> RR0_W<'a, O> {
#[doc = "Disable RR\\[0\\]
register"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(RR0_A::DISABLED)
}
#[doc = "Enable RR\\[0\\]
register"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(RR0_A::ENABLED)
}
}
#[doc = "Field `RR1` reader - Enable or disable RR\\[1\\]
register"]
pub type RR1_R = crate::BitReader<RR1_A>;
#[doc = "Enable or disable RR\\[1\\]
register\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RR1_A {
#[doc = "0: Disable RR\\[1\\]
register"]
DISABLED = 0,
#[doc = "1: Enable RR\\[1\\]
register"]
ENABLED = 1,
}
impl From<RR1_A> for bool {
#[inline(always)]
fn from(variant: RR1_A) -> Self {
variant as u8 != 0
}
}
impl RR1_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RR1_A {
match self.bits {
false => RR1_A::DISABLED,
true => RR1_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == RR1_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == RR1_A::ENABLED
}
}
#[doc = "Field `RR1` writer - Enable or disable RR\\[1\\]
register"]
pub type RR1_W<'a, const O: u8> = crate::BitWriter<'a, u32, RREN_SPEC, RR1_A, O>;
impl<'a, const O: u8> RR1_W<'a, O> {
#[doc = "Disable RR\\[1\\]
register"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(RR1_A::DISABLED)
}
#[doc = "Enable RR\\[1\\]
register"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(RR1_A::ENABLED)
}
}
#[doc = "Field `RR2` reader - Enable or disable RR\\[2\\]
register"]
pub type RR2_R = crate::BitReader<RR2_A>;
#[doc = "Enable or disable RR\\[2\\]
register\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RR2_A {
#[doc = "0: Disable RR\\[2\\]
register"]
DISABLED = 0,
#[doc = "1: Enable RR\\[2\\]
register"]
ENABLED = 1,
}
impl From<RR2_A> for bool {
#[inline(always)]
fn from(variant: RR2_A) -> Self {
variant as u8 != 0
}
}
impl RR2_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RR2_A {
match self.bits {
false => RR2_A::DISABLED,
true => RR2_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == RR2_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == RR2_A::ENABLED
}
}
#[doc = "Field `RR2` writer - Enable or disable RR\\[2\\]
register"]
pub type RR2_W<'a, const O: u8> = crate::BitWriter<'a, u32, RREN_SPEC, RR2_A, O>;
impl<'a, const O: u8> RR2_W<'a, O> {
#[doc = "Disable RR\\[2\\]
register"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(RR2_A::DISABLED)
}
#[doc = "Enable RR\\[2\\]
register"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(RR2_A::ENABLED)
}
}
#[doc = "Field `RR3` reader - Enable or disable RR\\[3\\]
register"]
pub type RR3_R = crate::BitReader<RR3_A>;
#[doc = "Enable or disable RR\\[3\\]
register\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RR3_A {
#[doc = "0: Disable RR\\[3\\]
register"]
DISABLED = 0,
#[doc = "1: Enable RR\\[3\\]
register"]
ENABLED = 1,
}
impl From<RR3_A> for bool {
#[inline(always)]
fn from(variant: RR3_A) -> Self {
variant as u8 != 0
}
}
impl RR3_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RR3_A {
match self.bits {
false => RR3_A::DISABLED,
true => RR3_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == RR3_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == RR3_A::ENABLED
}
}
#[doc = "Field `RR3` writer - Enable or disable RR\\[3\\]
register"]
pub type RR3_W<'a, const O: u8> = crate::BitWriter<'a, u32, RREN_SPEC, RR3_A, O>;
impl<'a, const O: u8> RR3_W<'a, O> {
#[doc = "Disable RR\\[3\\]
register"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(RR3_A::DISABLED)
}
#[doc = "Enable RR\\[3\\]
register"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(RR3_A::ENABLED)
}
}
#[doc = "Field `RR4` reader - Enable or disable RR\\[4\\]
register"]
pub type RR4_R = crate::BitReader<RR4_A>;
#[doc = "Enable or disable RR\\[4\\]
register\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RR4_A {
#[doc = "0: Disable RR\\[4\\]
register"]
DISABLED = 0,
#[doc = "1: Enable RR\\[4\\]
register"]
ENABLED = 1,
}
impl From<RR4_A> for bool {
#[inline(always)]
fn from(variant: RR4_A) -> Self {
variant as u8 != 0
}
}
impl RR4_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RR4_A {
match self.bits {
false => RR4_A::DISABLED,
true => RR4_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == RR4_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == RR4_A::ENABLED
}
}
#[doc = "Field `RR4` writer - Enable or disable RR\\[4\\]
register"]
pub type RR4_W<'a, const O: u8> = crate::BitWriter<'a, u32, RREN_SPEC, RR4_A, O>;
impl<'a, const O: u8> RR4_W<'a, O> {
#[doc = "Disable RR\\[4\\]
register"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(RR4_A::DISABLED)
}
#[doc = "Enable RR\\[4\\]
register"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(RR4_A::ENABLED)
}
}
#[doc = "Field `RR5` reader - Enable or disable RR\\[5\\]
register"]
pub type RR5_R = crate::BitReader<RR5_A>;
#[doc = "Enable or disable RR\\[5\\]
register\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RR5_A {
#[doc = "0: Disable RR\\[5\\]
register"]
DISABLED = 0,
#[doc = "1: Enable RR\\[5\\]
register"]
ENABLED = 1,
}
impl From<RR5_A> for bool {
#[inline(always)]
fn from(variant: RR5_A) -> Self {
variant as u8 != 0
}
}
impl RR5_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RR5_A {
match self.bits {
false => RR5_A::DISABLED,
true => RR5_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == RR5_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == RR5_A::ENABLED
}
}
#[doc = "Field `RR5` writer - Enable or disable RR\\[5\\]
register"]
pub type RR5_W<'a, const O: u8> = crate::BitWriter<'a, u32, RREN_SPEC, RR5_A, O>;
impl<'a, const O: u8> RR5_W<'a, O> {
#[doc = "Disable RR\\[5\\]
register"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(RR5_A::DISABLED)
}
#[doc = "Enable RR\\[5\\]
register"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(RR5_A::ENABLED)
}
}
#[doc = "Field `RR6` reader - Enable or disable RR\\[6\\]
register"]
pub type RR6_R = crate::BitReader<RR6_A>;
#[doc = "Enable or disable RR\\[6\\]
register\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RR6_A {
#[doc = "0: Disable RR\\[6\\]
register"]
DISABLED = 0,
#[doc = "1: Enable RR\\[6\\]
register"]
ENABLED = 1,
}
impl From<RR6_A> for bool {
#[inline(always)]
fn from(variant: RR6_A) -> Self {
variant as u8 != 0
}
}
impl RR6_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RR6_A {
match self.bits {
false => RR6_A::DISABLED,
true => RR6_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == RR6_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == RR6_A::ENABLED
}
}
#[doc = "Field `RR6` writer - Enable or disable RR\\[6\\]
register"]
pub type RR6_W<'a, const O: u8> = crate::BitWriter<'a, u32, RREN_SPEC, RR6_A, O>;
impl<'a, const O: u8> RR6_W<'a, O> {
#[doc = "Disable RR\\[6\\]
register"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(RR6_A::DISABLED)
}
#[doc = "Enable RR\\[6\\]
register"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(RR6_A::ENABLED)
}
}
#[doc = "Field `RR7` reader - Enable or disable RR\\[7\\]
register"]
pub type RR7_R = crate::BitReader<RR7_A>;
#[doc = "Enable or disable RR\\[7\\]
register\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RR7_A {
#[doc = "0: Disable RR\\[7\\]
register"]
DISABLED = 0,
#[doc = "1: Enable RR\\[7\\]
register"]
ENABLED = 1,
}
impl From<RR7_A> for bool {
#[inline(always)]
fn from(variant: RR7_A) -> Self {
variant as u8 != 0
}
}
impl RR7_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RR7_A {
match self.bits {
false => RR7_A::DISABLED,
true => RR7_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == RR7_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == RR7_A::ENABLED
}
}
#[doc = "Field `RR7` writer - Enable or disable RR\\[7\\]
register"]
pub type RR7_W<'a, const O: u8> = crate::BitWriter<'a, u32, RREN_SPEC, RR7_A, O>;
impl<'a, const O: u8> RR7_W<'a, O> {
#[doc = "Disable RR\\[7\\]
register"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(RR7_A::DISABLED)
}
#[doc = "Enable RR\\[7\\]
register"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(RR7_A::ENABLED)
}
}
impl R {
#[doc = "Bit 0 - Enable or disable RR\\[0\\]
register"]
#[inline(always)]
pub fn rr0(&self) -> RR0_R {
RR0_R::new((self.bits & 1) != 0)
}
#[doc = "Bit 1 - Enable or disable RR\\[1\\]
register"]
#[inline(always)]
pub fn rr1(&self) -> RR1_R {
RR1_R::new(((self.bits >> 1) & 1) != 0)
}
#[doc = "Bit 2 - Enable or disable RR\\[2\\]
register"]
#[inline(always)]
pub fn rr2(&self) -> RR2_R {
RR2_R::new(((self.bits >> 2) & 1) != 0)
}
#[doc = "Bit 3 - Enable or disable RR\\[3\\]
register"]
#[inline(always)]
pub fn rr3(&self) -> RR3_R {
RR3_R::new(((self.bits >> 3) & 1) != 0)
}
#[doc = "Bit 4 - Enable or disable RR\\[4\\]
register"]
#[inline(always)]
pub fn rr4(&self) -> RR4_R {
RR4_R::new(((self.bits >> 4) & 1) != 0)
}
#[doc = "Bit 5 - Enable or disable RR\\[5\\]
register"]
#[inline(always)]
pub fn rr5(&self) -> RR5_R {
RR5_R::new(((self.bits >> 5) & 1) != 0)
}
#[doc = "Bit 6 - Enable or disable RR\\[6\\]
register"]
#[inline(always)]
pub fn rr6(&self) -> RR6_R {
RR6_R::new(((self.bits >> 6) & 1) != 0)
}
#[doc = "Bit 7 - Enable or disable RR\\[7\\]
register"]
#[inline(always)]
pub fn rr7(&self) -> RR7_R {
RR7_R::new(((self.bits >> 7) & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Enable or disable RR\\[0\\]
register"]
#[inline(always)]
pub fn rr0(&mut self) -> RR0_W<0> {
RR0_W::new(self)
}
#[doc = "Bit 1 - Enable or disable RR\\[1\\]
register"]
#[inline(always)]
pub fn rr1(&mut self) -> RR1_W<1> {
RR1_W::new(self)
}
#[doc = "Bit 2 - Enable or disable RR\\[2\\]
register"]
#[inline(always)]
pub fn rr2(&mut self) -> RR2_W<2> {
RR2_W::new(self)
}
#[doc = "Bit 3 - Enable or disable RR\\[3\\]
register"]
#[inline(always)]
pub fn rr3(&mut self) -> RR3_W<3> {
RR3_W::new(self)
}
#[doc = "Bit 4 - Enable or disable RR\\[4\\]
register"]
#[inline(always)]
pub fn rr4(&mut self) -> RR4_W<4> {
RR4_W::new(self)
}
#[doc = "Bit 5 - Enable or disable RR\\[5\\]
register"]
#[inline(always)]
pub fn rr5(&mut self) -> RR5_W<5> {
RR5_W::new(self)
}
#[doc = "Bit 6 - Enable or disable RR\\[6\\]
register"]
#[inline(always)]
pub fn rr6(&mut self) -> RR6_W<6> {
RR6_W::new(self)
}
#[doc = "Bit 7 - Enable or disable RR\\[7\\]
register"]
#[inline(always)]
pub fn rr7(&mut self) -> RR7_W<7> {
RR7_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 register for reload request registers\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 [rren](index.html) module"]
pub struct RREN_SPEC;
impl crate::RegisterSpec for RREN_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [rren::R](R) reader structure"]
impl crate::Readable for RREN_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [rren::W](W) writer structure"]
impl crate::Writable for RREN_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets RREN to value 0x01"]
impl crate::Resettable for RREN_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0x01
}
}
+74
View File
@@ -0,0 +1,74 @@
#[doc = "Register `RUNSTATUS` reader"]
pub struct R(crate::R<RUNSTATUS_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<RUNSTATUS_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<RUNSTATUS_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<RUNSTATUS_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `RUNSTATUSWDT` reader - Indicates whether or not the watchdog is running"]
pub type RUNSTATUSWDT_R = crate::BitReader<RUNSTATUSWDT_A>;
#[doc = "Indicates whether or not the watchdog is running\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RUNSTATUSWDT_A {
#[doc = "0: Watchdog not running"]
NOT_RUNNING = 0,
#[doc = "1: Watchdog is running"]
RUNNING = 1,
}
impl From<RUNSTATUSWDT_A> for bool {
#[inline(always)]
fn from(variant: RUNSTATUSWDT_A) -> Self {
variant as u8 != 0
}
}
impl RUNSTATUSWDT_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RUNSTATUSWDT_A {
match self.bits {
false => RUNSTATUSWDT_A::NOT_RUNNING,
true => RUNSTATUSWDT_A::RUNNING,
}
}
#[doc = "Checks if the value of the field is `NOT_RUNNING`"]
#[inline(always)]
pub fn is_not_running(&self) -> bool {
*self == RUNSTATUSWDT_A::NOT_RUNNING
}
#[doc = "Checks if the value of the field is `RUNNING`"]
#[inline(always)]
pub fn is_running(&self) -> bool {
*self == RUNSTATUSWDT_A::RUNNING
}
}
impl R {
#[doc = "Bit 0 - Indicates whether or not the watchdog is running"]
#[inline(always)]
pub fn runstatuswdt(&self) -> RUNSTATUSWDT_R {
RUNSTATUSWDT_R::new((self.bits & 1) != 0)
}
}
#[doc = "Run 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 [runstatus](index.html) module"]
pub struct RUNSTATUS_SPEC;
impl crate::RegisterSpec for RUNSTATUS_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [runstatus::R](R) reader structure"]
impl crate::Readable for RUNSTATUS_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets RUNSTATUS to value 0"]
impl crate::Resettable for RUNSTATUS_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+140
View File
@@ -0,0 +1,140 @@
#[doc = "Register `SUBSCRIBE_START` reader"]
pub struct R(crate::R<SUBSCRIBE_START_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<SUBSCRIBE_START_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<SUBSCRIBE_START_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<SUBSCRIBE_START_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `SUBSCRIBE_START` writer"]
pub struct W(crate::W<SUBSCRIBE_START_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<SUBSCRIBE_START_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<SUBSCRIBE_START_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<SUBSCRIBE_START_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `CHIDX` reader - Channel that task START will subscribe to"]
pub type CHIDX_R = crate::FieldReader<u8, u8>;
#[doc = "Field `CHIDX` writer - Channel that task START will subscribe to"]
pub type CHIDX_W<'a, const O: u8> = crate::FieldWriter<'a, u32, SUBSCRIBE_START_SPEC, u8, u8, 4, O>;
#[doc = "Field `EN` reader - "]
pub type EN_R = crate::BitReader<EN_A>;
#[doc = "\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EN_A {
#[doc = "0: Disable subscription"]
DISABLED = 0,
#[doc = "1: Enable subscription"]
ENABLED = 1,
}
impl From<EN_A> for bool {
#[inline(always)]
fn from(variant: EN_A) -> Self {
variant as u8 != 0
}
}
impl EN_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EN_A {
match self.bits {
false => EN_A::DISABLED,
true => EN_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == EN_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == EN_A::ENABLED
}
}
#[doc = "Field `EN` writer - "]
pub type EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBSCRIBE_START_SPEC, EN_A, O>;
impl<'a, const O: u8> EN_W<'a, O> {
#[doc = "Disable subscription"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(EN_A::DISABLED)
}
#[doc = "Enable subscription"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(EN_A::ENABLED)
}
}
impl R {
#[doc = "Bits 0:3 - Channel that task START will subscribe to"]
#[inline(always)]
pub fn chidx(&self) -> CHIDX_R {
CHIDX_R::new((self.bits & 0x0f) as u8)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&self) -> EN_R {
EN_R::new(((self.bits >> 31) & 1) != 0)
}
}
impl W {
#[doc = "Bits 0:3 - Channel that task START will subscribe to"]
#[inline(always)]
pub fn chidx(&mut self) -> CHIDX_W<0> {
CHIDX_W::new(self)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&mut self) -> EN_W<31> {
EN_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Subscribe configuration for task START\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [subscribe_start](index.html) module"]
pub struct SUBSCRIBE_START_SPEC;
impl crate::RegisterSpec for SUBSCRIBE_START_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [subscribe_start::R](R) reader structure"]
impl crate::Readable for SUBSCRIBE_START_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [subscribe_start::W](W) writer structure"]
impl crate::Writable for SUBSCRIBE_START_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets SUBSCRIBE_START to value 0"]
impl crate::Resettable for SUBSCRIBE_START_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+72
View File
@@ -0,0 +1,72 @@
#[doc = "Register `TASKS_START` writer"]
pub struct W(crate::W<TASKS_START_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<TASKS_START_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_START_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<TASKS_START_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Start the watchdog\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TASKS_START_AW {
#[doc = "1: Trigger task"]
TRIGGER = 1,
}
impl From<TASKS_START_AW> for bool {
#[inline(always)]
fn from(variant: TASKS_START_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `TASKS_START` writer - Start the watchdog"]
pub type TASKS_START_W<'a, const O: u8> =
crate::BitWriter<'a, u32, TASKS_START_SPEC, TASKS_START_AW, O>;
impl<'a, const O: u8> TASKS_START_W<'a, O> {
#[doc = "Trigger task"]
#[inline(always)]
pub fn trigger(self) -> &'a mut W {
self.variant(TASKS_START_AW::TRIGGER)
}
}
impl W {
#[doc = "Bit 0 - Start the watchdog"]
#[inline(always)]
pub fn tasks_start(&mut self) -> TASKS_START_W<0> {
TASKS_START_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Start the watchdog\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_start](index.html) module"]
pub struct TASKS_START_SPEC;
impl crate::RegisterSpec for TASKS_START_SPEC {
type Ux = u32;
}
#[doc = "`write(|w| ..)` method takes [tasks_start::W](W) writer structure"]
impl crate::Writable for TASKS_START_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets TASKS_START to value 0"]
impl crate::Resettable for TASKS_START_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}