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

+155
View File
@@ -0,0 +1,155 @@
#[doc = "Register `BITMODE` reader"]
pub struct R(crate::R<BITMODE_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<BITMODE_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<BITMODE_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<BITMODE_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `BITMODE` writer"]
pub struct W(crate::W<BITMODE_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<BITMODE_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<BITMODE_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<BITMODE_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BITMODE` reader - Timer bit width"]
pub type BITMODE_R = crate::FieldReader<u8, BITMODE_A>;
#[doc = "Timer bit width\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum BITMODE_A {
#[doc = "0: 16 bit timer bit width"]
_16BIT = 0,
#[doc = "1: 8 bit timer bit width"]
_08BIT = 1,
#[doc = "2: 24 bit timer bit width"]
_24BIT = 2,
#[doc = "3: 32 bit timer bit width"]
_32BIT = 3,
}
impl From<BITMODE_A> for u8 {
#[inline(always)]
fn from(variant: BITMODE_A) -> Self {
variant as _
}
}
impl BITMODE_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> BITMODE_A {
match self.bits {
0 => BITMODE_A::_16BIT,
1 => BITMODE_A::_08BIT,
2 => BITMODE_A::_24BIT,
3 => BITMODE_A::_32BIT,
_ => unreachable!(),
}
}
#[doc = "Checks if the value of the field is `_16BIT`"]
#[inline(always)]
pub fn is_16bit(&self) -> bool {
*self == BITMODE_A::_16BIT
}
#[doc = "Checks if the value of the field is `_08BIT`"]
#[inline(always)]
pub fn is_08bit(&self) -> bool {
*self == BITMODE_A::_08BIT
}
#[doc = "Checks if the value of the field is `_24BIT`"]
#[inline(always)]
pub fn is_24bit(&self) -> bool {
*self == BITMODE_A::_24BIT
}
#[doc = "Checks if the value of the field is `_32BIT`"]
#[inline(always)]
pub fn is_32bit(&self) -> bool {
*self == BITMODE_A::_32BIT
}
}
#[doc = "Field `BITMODE` writer - Timer bit width"]
pub type BITMODE_W<'a, const O: u8> =
crate::FieldWriterSafe<'a, u32, BITMODE_SPEC, u8, BITMODE_A, 2, O>;
impl<'a, const O: u8> BITMODE_W<'a, O> {
#[doc = "16 bit timer bit width"]
#[inline(always)]
pub fn _16bit(self) -> &'a mut W {
self.variant(BITMODE_A::_16BIT)
}
#[doc = "8 bit timer bit width"]
#[inline(always)]
pub fn _08bit(self) -> &'a mut W {
self.variant(BITMODE_A::_08BIT)
}
#[doc = "24 bit timer bit width"]
#[inline(always)]
pub fn _24bit(self) -> &'a mut W {
self.variant(BITMODE_A::_24BIT)
}
#[doc = "32 bit timer bit width"]
#[inline(always)]
pub fn _32bit(self) -> &'a mut W {
self.variant(BITMODE_A::_32BIT)
}
}
impl R {
#[doc = "Bits 0:1 - Timer bit width"]
#[inline(always)]
pub fn bitmode(&self) -> BITMODE_R {
BITMODE_R::new((self.bits & 3) as u8)
}
}
impl W {
#[doc = "Bits 0:1 - Timer bit width"]
#[inline(always)]
pub fn bitmode(&mut self) -> BITMODE_W<0> {
BITMODE_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 = "Configure the number of bits used by the TIMER\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 [bitmode](index.html) module"]
pub struct BITMODE_SPEC;
impl crate::RegisterSpec for BITMODE_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [bitmode::R](R) reader structure"]
impl crate::Readable for BITMODE_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [bitmode::W](W) writer structure"]
impl crate::Writable for BITMODE_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets BITMODE to value 0"]
impl crate::Resettable for BITMODE_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+81
View File
@@ -0,0 +1,81 @@
#[doc = "Register `CC[%s]` reader"]
pub struct R(crate::R<CC_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CC_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CC_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CC_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `CC[%s]` writer"]
pub struct W(crate::W<CC_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<CC_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<CC_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<CC_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `CC` reader - Capture/Compare value"]
pub type CC_R = crate::FieldReader<u32, u32>;
#[doc = "Field `CC` writer - Capture/Compare value"]
pub type CC_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CC_SPEC, u32, u32, 32, O>;
impl R {
#[doc = "Bits 0:31 - Capture/Compare value"]
#[inline(always)]
pub fn cc(&self) -> CC_R {
CC_R::new(self.bits)
}
}
impl W {
#[doc = "Bits 0:31 - Capture/Compare value"]
#[inline(always)]
pub fn cc(&mut self) -> CC_W<0> {
CC_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\\[n\\]: Capture/Compare register n\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 [cc](index.html) module"]
pub struct CC_SPEC;
impl crate::RegisterSpec for CC_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [cc::R](R) reader structure"]
impl crate::Readable for CC_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [cc::W](W) writer structure"]
impl crate::Writable for CC_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets CC[%s]
to value 0"]
impl crate::Resettable for CC_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+83
View File
@@ -0,0 +1,83 @@
#[doc = "Register `EVENTS_COMPARE[%s]` reader"]
pub struct R(crate::R<EVENTS_COMPARE_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_COMPARE_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_COMPARE_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_COMPARE_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_COMPARE[%s]` writer"]
pub struct W(crate::W<EVENTS_COMPARE_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_COMPARE_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_COMPARE_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_COMPARE_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `EVENTS_COMPARE` reader - "]
pub type EVENTS_COMPARE_R = crate::BitReader<bool>;
#[doc = "Field `EVENTS_COMPARE` writer - "]
pub type EVENTS_COMPARE_W<'a, const O: u8> =
crate::BitWriter<'a, u32, EVENTS_COMPARE_SPEC, bool, O>;
impl R {
#[doc = "Bit 0"]
#[inline(always)]
pub fn events_compare(&self) -> EVENTS_COMPARE_R {
EVENTS_COMPARE_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0"]
#[inline(always)]
pub fn events_compare(&mut self) -> EVENTS_COMPARE_W<0> {
EVENTS_COMPARE_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\\[n\\]: Compare event on CC\\[n\\]
match\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_compare](index.html) module"]
pub struct EVENTS_COMPARE_SPEC;
impl crate::RegisterSpec for EVENTS_COMPARE_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_compare::R](R) reader structure"]
impl crate::Readable for EVENTS_COMPARE_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_compare::W](W) writer structure"]
impl crate::Writable for EVENTS_COMPARE_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_COMPARE[%s]
to value 0"]
impl crate::Resettable for EVENTS_COMPARE_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+504
View File
@@ -0,0 +1,504 @@
#[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 `COMPARE0` reader - Write '1' to disable interrupt for COMPARE\\[0\\]
event"]
pub type COMPARE0_R = crate::BitReader<COMPARE0_A>;
#[doc = "Write '1' to disable interrupt for COMPARE\\[0\\]
event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum COMPARE0_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<COMPARE0_A> for bool {
#[inline(always)]
fn from(variant: COMPARE0_A) -> Self {
variant as u8 != 0
}
}
impl COMPARE0_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> COMPARE0_A {
match self.bits {
false => COMPARE0_A::DISABLED,
true => COMPARE0_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == COMPARE0_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == COMPARE0_A::ENABLED
}
}
#[doc = "Write '1' to disable interrupt for COMPARE\\[0\\]
event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum COMPARE0_AW {
#[doc = "1: Disable"]
CLEAR = 1,
}
impl From<COMPARE0_AW> for bool {
#[inline(always)]
fn from(variant: COMPARE0_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `COMPARE0` writer - Write '1' to disable interrupt for COMPARE\\[0\\]
event"]
pub type COMPARE0_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, COMPARE0_AW, O>;
impl<'a, const O: u8> COMPARE0_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(COMPARE0_AW::CLEAR)
}
}
#[doc = "Field `COMPARE1` reader - Write '1' to disable interrupt for COMPARE\\[1\\]
event"]
pub type COMPARE1_R = crate::BitReader<COMPARE1_A>;
#[doc = "Write '1' to disable interrupt for COMPARE\\[1\\]
event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum COMPARE1_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<COMPARE1_A> for bool {
#[inline(always)]
fn from(variant: COMPARE1_A) -> Self {
variant as u8 != 0
}
}
impl COMPARE1_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> COMPARE1_A {
match self.bits {
false => COMPARE1_A::DISABLED,
true => COMPARE1_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == COMPARE1_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == COMPARE1_A::ENABLED
}
}
#[doc = "Write '1' to disable interrupt for COMPARE\\[1\\]
event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum COMPARE1_AW {
#[doc = "1: Disable"]
CLEAR = 1,
}
impl From<COMPARE1_AW> for bool {
#[inline(always)]
fn from(variant: COMPARE1_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `COMPARE1` writer - Write '1' to disable interrupt for COMPARE\\[1\\]
event"]
pub type COMPARE1_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, COMPARE1_AW, O>;
impl<'a, const O: u8> COMPARE1_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(COMPARE1_AW::CLEAR)
}
}
#[doc = "Field `COMPARE2` reader - Write '1' to disable interrupt for COMPARE\\[2\\]
event"]
pub type COMPARE2_R = crate::BitReader<COMPARE2_A>;
#[doc = "Write '1' to disable interrupt for COMPARE\\[2\\]
event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum COMPARE2_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<COMPARE2_A> for bool {
#[inline(always)]
fn from(variant: COMPARE2_A) -> Self {
variant as u8 != 0
}
}
impl COMPARE2_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> COMPARE2_A {
match self.bits {
false => COMPARE2_A::DISABLED,
true => COMPARE2_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == COMPARE2_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == COMPARE2_A::ENABLED
}
}
#[doc = "Write '1' to disable interrupt for COMPARE\\[2\\]
event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum COMPARE2_AW {
#[doc = "1: Disable"]
CLEAR = 1,
}
impl From<COMPARE2_AW> for bool {
#[inline(always)]
fn from(variant: COMPARE2_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `COMPARE2` writer - Write '1' to disable interrupt for COMPARE\\[2\\]
event"]
pub type COMPARE2_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, COMPARE2_AW, O>;
impl<'a, const O: u8> COMPARE2_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(COMPARE2_AW::CLEAR)
}
}
#[doc = "Field `COMPARE3` reader - Write '1' to disable interrupt for COMPARE\\[3\\]
event"]
pub type COMPARE3_R = crate::BitReader<COMPARE3_A>;
#[doc = "Write '1' to disable interrupt for COMPARE\\[3\\]
event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum COMPARE3_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<COMPARE3_A> for bool {
#[inline(always)]
fn from(variant: COMPARE3_A) -> Self {
variant as u8 != 0
}
}
impl COMPARE3_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> COMPARE3_A {
match self.bits {
false => COMPARE3_A::DISABLED,
true => COMPARE3_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == COMPARE3_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == COMPARE3_A::ENABLED
}
}
#[doc = "Write '1' to disable interrupt for COMPARE\\[3\\]
event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum COMPARE3_AW {
#[doc = "1: Disable"]
CLEAR = 1,
}
impl From<COMPARE3_AW> for bool {
#[inline(always)]
fn from(variant: COMPARE3_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `COMPARE3` writer - Write '1' to disable interrupt for COMPARE\\[3\\]
event"]
pub type COMPARE3_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, COMPARE3_AW, O>;
impl<'a, const O: u8> COMPARE3_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(COMPARE3_AW::CLEAR)
}
}
#[doc = "Field `COMPARE4` reader - Write '1' to disable interrupt for COMPARE\\[4\\]
event"]
pub type COMPARE4_R = crate::BitReader<COMPARE4_A>;
#[doc = "Write '1' to disable interrupt for COMPARE\\[4\\]
event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum COMPARE4_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<COMPARE4_A> for bool {
#[inline(always)]
fn from(variant: COMPARE4_A) -> Self {
variant as u8 != 0
}
}
impl COMPARE4_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> COMPARE4_A {
match self.bits {
false => COMPARE4_A::DISABLED,
true => COMPARE4_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == COMPARE4_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == COMPARE4_A::ENABLED
}
}
#[doc = "Write '1' to disable interrupt for COMPARE\\[4\\]
event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum COMPARE4_AW {
#[doc = "1: Disable"]
CLEAR = 1,
}
impl From<COMPARE4_AW> for bool {
#[inline(always)]
fn from(variant: COMPARE4_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `COMPARE4` writer - Write '1' to disable interrupt for COMPARE\\[4\\]
event"]
pub type COMPARE4_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, COMPARE4_AW, O>;
impl<'a, const O: u8> COMPARE4_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(COMPARE4_AW::CLEAR)
}
}
#[doc = "Field `COMPARE5` reader - Write '1' to disable interrupt for COMPARE\\[5\\]
event"]
pub type COMPARE5_R = crate::BitReader<COMPARE5_A>;
#[doc = "Write '1' to disable interrupt for COMPARE\\[5\\]
event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum COMPARE5_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<COMPARE5_A> for bool {
#[inline(always)]
fn from(variant: COMPARE5_A) -> Self {
variant as u8 != 0
}
}
impl COMPARE5_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> COMPARE5_A {
match self.bits {
false => COMPARE5_A::DISABLED,
true => COMPARE5_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == COMPARE5_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == COMPARE5_A::ENABLED
}
}
#[doc = "Write '1' to disable interrupt for COMPARE\\[5\\]
event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum COMPARE5_AW {
#[doc = "1: Disable"]
CLEAR = 1,
}
impl From<COMPARE5_AW> for bool {
#[inline(always)]
fn from(variant: COMPARE5_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `COMPARE5` writer - Write '1' to disable interrupt for COMPARE\\[5\\]
event"]
pub type COMPARE5_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, COMPARE5_AW, O>;
impl<'a, const O: u8> COMPARE5_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(COMPARE5_AW::CLEAR)
}
}
impl R {
#[doc = "Bit 16 - Write '1' to disable interrupt for COMPARE\\[0\\]
event"]
#[inline(always)]
pub fn compare0(&self) -> COMPARE0_R {
COMPARE0_R::new(((self.bits >> 16) & 1) != 0)
}
#[doc = "Bit 17 - Write '1' to disable interrupt for COMPARE\\[1\\]
event"]
#[inline(always)]
pub fn compare1(&self) -> COMPARE1_R {
COMPARE1_R::new(((self.bits >> 17) & 1) != 0)
}
#[doc = "Bit 18 - Write '1' to disable interrupt for COMPARE\\[2\\]
event"]
#[inline(always)]
pub fn compare2(&self) -> COMPARE2_R {
COMPARE2_R::new(((self.bits >> 18) & 1) != 0)
}
#[doc = "Bit 19 - Write '1' to disable interrupt for COMPARE\\[3\\]
event"]
#[inline(always)]
pub fn compare3(&self) -> COMPARE3_R {
COMPARE3_R::new(((self.bits >> 19) & 1) != 0)
}
#[doc = "Bit 20 - Write '1' to disable interrupt for COMPARE\\[4\\]
event"]
#[inline(always)]
pub fn compare4(&self) -> COMPARE4_R {
COMPARE4_R::new(((self.bits >> 20) & 1) != 0)
}
#[doc = "Bit 21 - Write '1' to disable interrupt for COMPARE\\[5\\]
event"]
#[inline(always)]
pub fn compare5(&self) -> COMPARE5_R {
COMPARE5_R::new(((self.bits >> 21) & 1) != 0)
}
}
impl W {
#[doc = "Bit 16 - Write '1' to disable interrupt for COMPARE\\[0\\]
event"]
#[inline(always)]
pub fn compare0(&mut self) -> COMPARE0_W<16> {
COMPARE0_W::new(self)
}
#[doc = "Bit 17 - Write '1' to disable interrupt for COMPARE\\[1\\]
event"]
#[inline(always)]
pub fn compare1(&mut self) -> COMPARE1_W<17> {
COMPARE1_W::new(self)
}
#[doc = "Bit 18 - Write '1' to disable interrupt for COMPARE\\[2\\]
event"]
#[inline(always)]
pub fn compare2(&mut self) -> COMPARE2_W<18> {
COMPARE2_W::new(self)
}
#[doc = "Bit 19 - Write '1' to disable interrupt for COMPARE\\[3\\]
event"]
#[inline(always)]
pub fn compare3(&mut self) -> COMPARE3_W<19> {
COMPARE3_W::new(self)
}
#[doc = "Bit 20 - Write '1' to disable interrupt for COMPARE\\[4\\]
event"]
#[inline(always)]
pub fn compare4(&mut self) -> COMPARE4_W<20> {
COMPARE4_W::new(self)
}
#[doc = "Bit 21 - Write '1' to disable interrupt for COMPARE\\[5\\]
event"]
#[inline(always)]
pub fn compare5(&mut self) -> COMPARE5_W<21> {
COMPARE5_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
}
}
+504
View File
@@ -0,0 +1,504 @@
#[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 `COMPARE0` reader - Write '1' to enable interrupt for COMPARE\\[0\\]
event"]
pub type COMPARE0_R = crate::BitReader<COMPARE0_A>;
#[doc = "Write '1' to enable interrupt for COMPARE\\[0\\]
event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum COMPARE0_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<COMPARE0_A> for bool {
#[inline(always)]
fn from(variant: COMPARE0_A) -> Self {
variant as u8 != 0
}
}
impl COMPARE0_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> COMPARE0_A {
match self.bits {
false => COMPARE0_A::DISABLED,
true => COMPARE0_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == COMPARE0_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == COMPARE0_A::ENABLED
}
}
#[doc = "Write '1' to enable interrupt for COMPARE\\[0\\]
event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum COMPARE0_AW {
#[doc = "1: Enable"]
SET = 1,
}
impl From<COMPARE0_AW> for bool {
#[inline(always)]
fn from(variant: COMPARE0_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `COMPARE0` writer - Write '1' to enable interrupt for COMPARE\\[0\\]
event"]
pub type COMPARE0_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, COMPARE0_AW, O>;
impl<'a, const O: u8> COMPARE0_W<'a, O> {
#[doc = "Enable"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(COMPARE0_AW::SET)
}
}
#[doc = "Field `COMPARE1` reader - Write '1' to enable interrupt for COMPARE\\[1\\]
event"]
pub type COMPARE1_R = crate::BitReader<COMPARE1_A>;
#[doc = "Write '1' to enable interrupt for COMPARE\\[1\\]
event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum COMPARE1_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<COMPARE1_A> for bool {
#[inline(always)]
fn from(variant: COMPARE1_A) -> Self {
variant as u8 != 0
}
}
impl COMPARE1_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> COMPARE1_A {
match self.bits {
false => COMPARE1_A::DISABLED,
true => COMPARE1_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == COMPARE1_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == COMPARE1_A::ENABLED
}
}
#[doc = "Write '1' to enable interrupt for COMPARE\\[1\\]
event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum COMPARE1_AW {
#[doc = "1: Enable"]
SET = 1,
}
impl From<COMPARE1_AW> for bool {
#[inline(always)]
fn from(variant: COMPARE1_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `COMPARE1` writer - Write '1' to enable interrupt for COMPARE\\[1\\]
event"]
pub type COMPARE1_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, COMPARE1_AW, O>;
impl<'a, const O: u8> COMPARE1_W<'a, O> {
#[doc = "Enable"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(COMPARE1_AW::SET)
}
}
#[doc = "Field `COMPARE2` reader - Write '1' to enable interrupt for COMPARE\\[2\\]
event"]
pub type COMPARE2_R = crate::BitReader<COMPARE2_A>;
#[doc = "Write '1' to enable interrupt for COMPARE\\[2\\]
event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum COMPARE2_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<COMPARE2_A> for bool {
#[inline(always)]
fn from(variant: COMPARE2_A) -> Self {
variant as u8 != 0
}
}
impl COMPARE2_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> COMPARE2_A {
match self.bits {
false => COMPARE2_A::DISABLED,
true => COMPARE2_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == COMPARE2_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == COMPARE2_A::ENABLED
}
}
#[doc = "Write '1' to enable interrupt for COMPARE\\[2\\]
event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum COMPARE2_AW {
#[doc = "1: Enable"]
SET = 1,
}
impl From<COMPARE2_AW> for bool {
#[inline(always)]
fn from(variant: COMPARE2_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `COMPARE2` writer - Write '1' to enable interrupt for COMPARE\\[2\\]
event"]
pub type COMPARE2_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, COMPARE2_AW, O>;
impl<'a, const O: u8> COMPARE2_W<'a, O> {
#[doc = "Enable"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(COMPARE2_AW::SET)
}
}
#[doc = "Field `COMPARE3` reader - Write '1' to enable interrupt for COMPARE\\[3\\]
event"]
pub type COMPARE3_R = crate::BitReader<COMPARE3_A>;
#[doc = "Write '1' to enable interrupt for COMPARE\\[3\\]
event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum COMPARE3_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<COMPARE3_A> for bool {
#[inline(always)]
fn from(variant: COMPARE3_A) -> Self {
variant as u8 != 0
}
}
impl COMPARE3_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> COMPARE3_A {
match self.bits {
false => COMPARE3_A::DISABLED,
true => COMPARE3_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == COMPARE3_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == COMPARE3_A::ENABLED
}
}
#[doc = "Write '1' to enable interrupt for COMPARE\\[3\\]
event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum COMPARE3_AW {
#[doc = "1: Enable"]
SET = 1,
}
impl From<COMPARE3_AW> for bool {
#[inline(always)]
fn from(variant: COMPARE3_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `COMPARE3` writer - Write '1' to enable interrupt for COMPARE\\[3\\]
event"]
pub type COMPARE3_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, COMPARE3_AW, O>;
impl<'a, const O: u8> COMPARE3_W<'a, O> {
#[doc = "Enable"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(COMPARE3_AW::SET)
}
}
#[doc = "Field `COMPARE4` reader - Write '1' to enable interrupt for COMPARE\\[4\\]
event"]
pub type COMPARE4_R = crate::BitReader<COMPARE4_A>;
#[doc = "Write '1' to enable interrupt for COMPARE\\[4\\]
event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum COMPARE4_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<COMPARE4_A> for bool {
#[inline(always)]
fn from(variant: COMPARE4_A) -> Self {
variant as u8 != 0
}
}
impl COMPARE4_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> COMPARE4_A {
match self.bits {
false => COMPARE4_A::DISABLED,
true => COMPARE4_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == COMPARE4_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == COMPARE4_A::ENABLED
}
}
#[doc = "Write '1' to enable interrupt for COMPARE\\[4\\]
event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum COMPARE4_AW {
#[doc = "1: Enable"]
SET = 1,
}
impl From<COMPARE4_AW> for bool {
#[inline(always)]
fn from(variant: COMPARE4_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `COMPARE4` writer - Write '1' to enable interrupt for COMPARE\\[4\\]
event"]
pub type COMPARE4_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, COMPARE4_AW, O>;
impl<'a, const O: u8> COMPARE4_W<'a, O> {
#[doc = "Enable"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(COMPARE4_AW::SET)
}
}
#[doc = "Field `COMPARE5` reader - Write '1' to enable interrupt for COMPARE\\[5\\]
event"]
pub type COMPARE5_R = crate::BitReader<COMPARE5_A>;
#[doc = "Write '1' to enable interrupt for COMPARE\\[5\\]
event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum COMPARE5_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<COMPARE5_A> for bool {
#[inline(always)]
fn from(variant: COMPARE5_A) -> Self {
variant as u8 != 0
}
}
impl COMPARE5_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> COMPARE5_A {
match self.bits {
false => COMPARE5_A::DISABLED,
true => COMPARE5_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == COMPARE5_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == COMPARE5_A::ENABLED
}
}
#[doc = "Write '1' to enable interrupt for COMPARE\\[5\\]
event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum COMPARE5_AW {
#[doc = "1: Enable"]
SET = 1,
}
impl From<COMPARE5_AW> for bool {
#[inline(always)]
fn from(variant: COMPARE5_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `COMPARE5` writer - Write '1' to enable interrupt for COMPARE\\[5\\]
event"]
pub type COMPARE5_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, COMPARE5_AW, O>;
impl<'a, const O: u8> COMPARE5_W<'a, O> {
#[doc = "Enable"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(COMPARE5_AW::SET)
}
}
impl R {
#[doc = "Bit 16 - Write '1' to enable interrupt for COMPARE\\[0\\]
event"]
#[inline(always)]
pub fn compare0(&self) -> COMPARE0_R {
COMPARE0_R::new(((self.bits >> 16) & 1) != 0)
}
#[doc = "Bit 17 - Write '1' to enable interrupt for COMPARE\\[1\\]
event"]
#[inline(always)]
pub fn compare1(&self) -> COMPARE1_R {
COMPARE1_R::new(((self.bits >> 17) & 1) != 0)
}
#[doc = "Bit 18 - Write '1' to enable interrupt for COMPARE\\[2\\]
event"]
#[inline(always)]
pub fn compare2(&self) -> COMPARE2_R {
COMPARE2_R::new(((self.bits >> 18) & 1) != 0)
}
#[doc = "Bit 19 - Write '1' to enable interrupt for COMPARE\\[3\\]
event"]
#[inline(always)]
pub fn compare3(&self) -> COMPARE3_R {
COMPARE3_R::new(((self.bits >> 19) & 1) != 0)
}
#[doc = "Bit 20 - Write '1' to enable interrupt for COMPARE\\[4\\]
event"]
#[inline(always)]
pub fn compare4(&self) -> COMPARE4_R {
COMPARE4_R::new(((self.bits >> 20) & 1) != 0)
}
#[doc = "Bit 21 - Write '1' to enable interrupt for COMPARE\\[5\\]
event"]
#[inline(always)]
pub fn compare5(&self) -> COMPARE5_R {
COMPARE5_R::new(((self.bits >> 21) & 1) != 0)
}
}
impl W {
#[doc = "Bit 16 - Write '1' to enable interrupt for COMPARE\\[0\\]
event"]
#[inline(always)]
pub fn compare0(&mut self) -> COMPARE0_W<16> {
COMPARE0_W::new(self)
}
#[doc = "Bit 17 - Write '1' to enable interrupt for COMPARE\\[1\\]
event"]
#[inline(always)]
pub fn compare1(&mut self) -> COMPARE1_W<17> {
COMPARE1_W::new(self)
}
#[doc = "Bit 18 - Write '1' to enable interrupt for COMPARE\\[2\\]
event"]
#[inline(always)]
pub fn compare2(&mut self) -> COMPARE2_W<18> {
COMPARE2_W::new(self)
}
#[doc = "Bit 19 - Write '1' to enable interrupt for COMPARE\\[3\\]
event"]
#[inline(always)]
pub fn compare3(&mut self) -> COMPARE3_W<19> {
COMPARE3_W::new(self)
}
#[doc = "Bit 20 - Write '1' to enable interrupt for COMPARE\\[4\\]
event"]
#[inline(always)]
pub fn compare4(&mut self) -> COMPARE4_W<20> {
COMPARE4_W::new(self)
}
#[doc = "Bit 21 - Write '1' to enable interrupt for COMPARE\\[5\\]
event"]
#[inline(always)]
pub fn compare5(&mut self) -> COMPARE5_W<21> {
COMPARE5_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
}
}
+141
View File
@@ -0,0 +1,141 @@
#[doc = "Register `MODE` reader"]
pub struct R(crate::R<MODE_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<MODE_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<MODE_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<MODE_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `MODE` writer"]
pub struct W(crate::W<MODE_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<MODE_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<MODE_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<MODE_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `MODE` reader - Timer mode"]
pub type MODE_R = crate::FieldReader<u8, MODE_A>;
#[doc = "Timer mode\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum MODE_A {
#[doc = "0: Select Timer mode"]
TIMER = 0,
#[doc = "1: Deprecated enumerator - Select Counter mode"]
COUNTER = 1,
#[doc = "2: Select Low Power Counter mode"]
LOW_POWER_COUNTER = 2,
}
impl From<MODE_A> for u8 {
#[inline(always)]
fn from(variant: MODE_A) -> Self {
variant as _
}
}
impl MODE_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> Option<MODE_A> {
match self.bits {
0 => Some(MODE_A::TIMER),
1 => Some(MODE_A::COUNTER),
2 => Some(MODE_A::LOW_POWER_COUNTER),
_ => None,
}
}
#[doc = "Checks if the value of the field is `TIMER`"]
#[inline(always)]
pub fn is_timer(&self) -> bool {
*self == MODE_A::TIMER
}
#[doc = "Checks if the value of the field is `COUNTER`"]
#[inline(always)]
pub fn is_counter(&self) -> bool {
*self == MODE_A::COUNTER
}
#[doc = "Checks if the value of the field is `LOW_POWER_COUNTER`"]
#[inline(always)]
pub fn is_low_power_counter(&self) -> bool {
*self == MODE_A::LOW_POWER_COUNTER
}
}
#[doc = "Field `MODE` writer - Timer mode"]
pub type MODE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MODE_SPEC, u8, MODE_A, 2, O>;
impl<'a, const O: u8> MODE_W<'a, O> {
#[doc = "Select Timer mode"]
#[inline(always)]
pub fn timer(self) -> &'a mut W {
self.variant(MODE_A::TIMER)
}
#[doc = "Deprecated enumerator - Select Counter mode"]
#[inline(always)]
pub fn counter(self) -> &'a mut W {
self.variant(MODE_A::COUNTER)
}
#[doc = "Select Low Power Counter mode"]
#[inline(always)]
pub fn low_power_counter(self) -> &'a mut W {
self.variant(MODE_A::LOW_POWER_COUNTER)
}
}
impl R {
#[doc = "Bits 0:1 - Timer mode"]
#[inline(always)]
pub fn mode(&self) -> MODE_R {
MODE_R::new((self.bits & 3) as u8)
}
}
impl W {
#[doc = "Bits 0:1 - Timer mode"]
#[inline(always)]
pub fn mode(&mut self) -> MODE_W<0> {
MODE_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 = "Timer mode selection\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 [mode](index.html) module"]
pub struct MODE_SPEC;
impl crate::RegisterSpec for MODE_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [mode::R](R) reader structure"]
impl crate::Readable for MODE_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [mode::W](W) writer structure"]
impl crate::Writable for MODE_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets MODE to value 0"]
impl crate::Resettable for MODE_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+80
View File
@@ -0,0 +1,80 @@
#[doc = "Register `PRESCALER` reader"]
pub struct R(crate::R<PRESCALER_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<PRESCALER_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<PRESCALER_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<PRESCALER_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `PRESCALER` writer"]
pub struct W(crate::W<PRESCALER_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<PRESCALER_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<PRESCALER_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<PRESCALER_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `PRESCALER` reader - Prescaler value"]
pub type PRESCALER_R = crate::FieldReader<u8, u8>;
#[doc = "Field `PRESCALER` writer - Prescaler value"]
pub type PRESCALER_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PRESCALER_SPEC, u8, u8, 4, O>;
impl R {
#[doc = "Bits 0:3 - Prescaler value"]
#[inline(always)]
pub fn prescaler(&self) -> PRESCALER_R {
PRESCALER_R::new((self.bits & 0x0f) as u8)
}
}
impl W {
#[doc = "Bits 0:3 - Prescaler value"]
#[inline(always)]
pub fn prescaler(&mut self) -> PRESCALER_W<0> {
PRESCALER_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 = "Timer prescaler 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 [prescaler](index.html) module"]
pub struct PRESCALER_SPEC;
impl crate::RegisterSpec for PRESCALER_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [prescaler::R](R) reader structure"]
impl crate::Readable for PRESCALER_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [prescaler::W](W) writer structure"]
impl crate::Writable for PRESCALER_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets PRESCALER to value 0x04"]
impl crate::Resettable for PRESCALER_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0x04
}
}
+858
View File
@@ -0,0 +1,858 @@
#[doc = "Register `SHORTS` reader"]
pub struct R(crate::R<SHORTS_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<SHORTS_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<SHORTS_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<SHORTS_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `SHORTS` writer"]
pub struct W(crate::W<SHORTS_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<SHORTS_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<SHORTS_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<SHORTS_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `COMPARE0_CLEAR` reader - Shortcut between COMPARE\\[0\\]
event and CLEAR task"]
pub type COMPARE0_CLEAR_R = crate::BitReader<COMPARE0_CLEAR_A>;
#[doc = "Shortcut between COMPARE\\[0\\]
event and CLEAR task\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum COMPARE0_CLEAR_A {
#[doc = "0: Disable shortcut"]
DISABLED = 0,
#[doc = "1: Enable shortcut"]
ENABLED = 1,
}
impl From<COMPARE0_CLEAR_A> for bool {
#[inline(always)]
fn from(variant: COMPARE0_CLEAR_A) -> Self {
variant as u8 != 0
}
}
impl COMPARE0_CLEAR_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> COMPARE0_CLEAR_A {
match self.bits {
false => COMPARE0_CLEAR_A::DISABLED,
true => COMPARE0_CLEAR_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == COMPARE0_CLEAR_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == COMPARE0_CLEAR_A::ENABLED
}
}
#[doc = "Field `COMPARE0_CLEAR` writer - Shortcut between COMPARE\\[0\\]
event and CLEAR task"]
pub type COMPARE0_CLEAR_W<'a, const O: u8> =
crate::BitWriter<'a, u32, SHORTS_SPEC, COMPARE0_CLEAR_A, O>;
impl<'a, const O: u8> COMPARE0_CLEAR_W<'a, O> {
#[doc = "Disable shortcut"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(COMPARE0_CLEAR_A::DISABLED)
}
#[doc = "Enable shortcut"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(COMPARE0_CLEAR_A::ENABLED)
}
}
#[doc = "Field `COMPARE1_CLEAR` reader - Shortcut between COMPARE\\[1\\]
event and CLEAR task"]
pub type COMPARE1_CLEAR_R = crate::BitReader<COMPARE1_CLEAR_A>;
#[doc = "Shortcut between COMPARE\\[1\\]
event and CLEAR task\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum COMPARE1_CLEAR_A {
#[doc = "0: Disable shortcut"]
DISABLED = 0,
#[doc = "1: Enable shortcut"]
ENABLED = 1,
}
impl From<COMPARE1_CLEAR_A> for bool {
#[inline(always)]
fn from(variant: COMPARE1_CLEAR_A) -> Self {
variant as u8 != 0
}
}
impl COMPARE1_CLEAR_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> COMPARE1_CLEAR_A {
match self.bits {
false => COMPARE1_CLEAR_A::DISABLED,
true => COMPARE1_CLEAR_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == COMPARE1_CLEAR_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == COMPARE1_CLEAR_A::ENABLED
}
}
#[doc = "Field `COMPARE1_CLEAR` writer - Shortcut between COMPARE\\[1\\]
event and CLEAR task"]
pub type COMPARE1_CLEAR_W<'a, const O: u8> =
crate::BitWriter<'a, u32, SHORTS_SPEC, COMPARE1_CLEAR_A, O>;
impl<'a, const O: u8> COMPARE1_CLEAR_W<'a, O> {
#[doc = "Disable shortcut"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(COMPARE1_CLEAR_A::DISABLED)
}
#[doc = "Enable shortcut"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(COMPARE1_CLEAR_A::ENABLED)
}
}
#[doc = "Field `COMPARE2_CLEAR` reader - Shortcut between COMPARE\\[2\\]
event and CLEAR task"]
pub type COMPARE2_CLEAR_R = crate::BitReader<COMPARE2_CLEAR_A>;
#[doc = "Shortcut between COMPARE\\[2\\]
event and CLEAR task\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum COMPARE2_CLEAR_A {
#[doc = "0: Disable shortcut"]
DISABLED = 0,
#[doc = "1: Enable shortcut"]
ENABLED = 1,
}
impl From<COMPARE2_CLEAR_A> for bool {
#[inline(always)]
fn from(variant: COMPARE2_CLEAR_A) -> Self {
variant as u8 != 0
}
}
impl COMPARE2_CLEAR_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> COMPARE2_CLEAR_A {
match self.bits {
false => COMPARE2_CLEAR_A::DISABLED,
true => COMPARE2_CLEAR_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == COMPARE2_CLEAR_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == COMPARE2_CLEAR_A::ENABLED
}
}
#[doc = "Field `COMPARE2_CLEAR` writer - Shortcut between COMPARE\\[2\\]
event and CLEAR task"]
pub type COMPARE2_CLEAR_W<'a, const O: u8> =
crate::BitWriter<'a, u32, SHORTS_SPEC, COMPARE2_CLEAR_A, O>;
impl<'a, const O: u8> COMPARE2_CLEAR_W<'a, O> {
#[doc = "Disable shortcut"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(COMPARE2_CLEAR_A::DISABLED)
}
#[doc = "Enable shortcut"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(COMPARE2_CLEAR_A::ENABLED)
}
}
#[doc = "Field `COMPARE3_CLEAR` reader - Shortcut between COMPARE\\[3\\]
event and CLEAR task"]
pub type COMPARE3_CLEAR_R = crate::BitReader<COMPARE3_CLEAR_A>;
#[doc = "Shortcut between COMPARE\\[3\\]
event and CLEAR task\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum COMPARE3_CLEAR_A {
#[doc = "0: Disable shortcut"]
DISABLED = 0,
#[doc = "1: Enable shortcut"]
ENABLED = 1,
}
impl From<COMPARE3_CLEAR_A> for bool {
#[inline(always)]
fn from(variant: COMPARE3_CLEAR_A) -> Self {
variant as u8 != 0
}
}
impl COMPARE3_CLEAR_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> COMPARE3_CLEAR_A {
match self.bits {
false => COMPARE3_CLEAR_A::DISABLED,
true => COMPARE3_CLEAR_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == COMPARE3_CLEAR_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == COMPARE3_CLEAR_A::ENABLED
}
}
#[doc = "Field `COMPARE3_CLEAR` writer - Shortcut between COMPARE\\[3\\]
event and CLEAR task"]
pub type COMPARE3_CLEAR_W<'a, const O: u8> =
crate::BitWriter<'a, u32, SHORTS_SPEC, COMPARE3_CLEAR_A, O>;
impl<'a, const O: u8> COMPARE3_CLEAR_W<'a, O> {
#[doc = "Disable shortcut"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(COMPARE3_CLEAR_A::DISABLED)
}
#[doc = "Enable shortcut"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(COMPARE3_CLEAR_A::ENABLED)
}
}
#[doc = "Field `COMPARE4_CLEAR` reader - Shortcut between COMPARE\\[4\\]
event and CLEAR task"]
pub type COMPARE4_CLEAR_R = crate::BitReader<COMPARE4_CLEAR_A>;
#[doc = "Shortcut between COMPARE\\[4\\]
event and CLEAR task\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum COMPARE4_CLEAR_A {
#[doc = "0: Disable shortcut"]
DISABLED = 0,
#[doc = "1: Enable shortcut"]
ENABLED = 1,
}
impl From<COMPARE4_CLEAR_A> for bool {
#[inline(always)]
fn from(variant: COMPARE4_CLEAR_A) -> Self {
variant as u8 != 0
}
}
impl COMPARE4_CLEAR_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> COMPARE4_CLEAR_A {
match self.bits {
false => COMPARE4_CLEAR_A::DISABLED,
true => COMPARE4_CLEAR_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == COMPARE4_CLEAR_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == COMPARE4_CLEAR_A::ENABLED
}
}
#[doc = "Field `COMPARE4_CLEAR` writer - Shortcut between COMPARE\\[4\\]
event and CLEAR task"]
pub type COMPARE4_CLEAR_W<'a, const O: u8> =
crate::BitWriter<'a, u32, SHORTS_SPEC, COMPARE4_CLEAR_A, O>;
impl<'a, const O: u8> COMPARE4_CLEAR_W<'a, O> {
#[doc = "Disable shortcut"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(COMPARE4_CLEAR_A::DISABLED)
}
#[doc = "Enable shortcut"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(COMPARE4_CLEAR_A::ENABLED)
}
}
#[doc = "Field `COMPARE5_CLEAR` reader - Shortcut between COMPARE\\[5\\]
event and CLEAR task"]
pub type COMPARE5_CLEAR_R = crate::BitReader<COMPARE5_CLEAR_A>;
#[doc = "Shortcut between COMPARE\\[5\\]
event and CLEAR task\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum COMPARE5_CLEAR_A {
#[doc = "0: Disable shortcut"]
DISABLED = 0,
#[doc = "1: Enable shortcut"]
ENABLED = 1,
}
impl From<COMPARE5_CLEAR_A> for bool {
#[inline(always)]
fn from(variant: COMPARE5_CLEAR_A) -> Self {
variant as u8 != 0
}
}
impl COMPARE5_CLEAR_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> COMPARE5_CLEAR_A {
match self.bits {
false => COMPARE5_CLEAR_A::DISABLED,
true => COMPARE5_CLEAR_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == COMPARE5_CLEAR_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == COMPARE5_CLEAR_A::ENABLED
}
}
#[doc = "Field `COMPARE5_CLEAR` writer - Shortcut between COMPARE\\[5\\]
event and CLEAR task"]
pub type COMPARE5_CLEAR_W<'a, const O: u8> =
crate::BitWriter<'a, u32, SHORTS_SPEC, COMPARE5_CLEAR_A, O>;
impl<'a, const O: u8> COMPARE5_CLEAR_W<'a, O> {
#[doc = "Disable shortcut"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(COMPARE5_CLEAR_A::DISABLED)
}
#[doc = "Enable shortcut"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(COMPARE5_CLEAR_A::ENABLED)
}
}
#[doc = "Field `COMPARE0_STOP` reader - Shortcut between COMPARE\\[0\\]
event and STOP task"]
pub type COMPARE0_STOP_R = crate::BitReader<COMPARE0_STOP_A>;
#[doc = "Shortcut between COMPARE\\[0\\]
event and STOP task\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum COMPARE0_STOP_A {
#[doc = "0: Disable shortcut"]
DISABLED = 0,
#[doc = "1: Enable shortcut"]
ENABLED = 1,
}
impl From<COMPARE0_STOP_A> for bool {
#[inline(always)]
fn from(variant: COMPARE0_STOP_A) -> Self {
variant as u8 != 0
}
}
impl COMPARE0_STOP_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> COMPARE0_STOP_A {
match self.bits {
false => COMPARE0_STOP_A::DISABLED,
true => COMPARE0_STOP_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == COMPARE0_STOP_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == COMPARE0_STOP_A::ENABLED
}
}
#[doc = "Field `COMPARE0_STOP` writer - Shortcut between COMPARE\\[0\\]
event and STOP task"]
pub type COMPARE0_STOP_W<'a, const O: u8> =
crate::BitWriter<'a, u32, SHORTS_SPEC, COMPARE0_STOP_A, O>;
impl<'a, const O: u8> COMPARE0_STOP_W<'a, O> {
#[doc = "Disable shortcut"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(COMPARE0_STOP_A::DISABLED)
}
#[doc = "Enable shortcut"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(COMPARE0_STOP_A::ENABLED)
}
}
#[doc = "Field `COMPARE1_STOP` reader - Shortcut between COMPARE\\[1\\]
event and STOP task"]
pub type COMPARE1_STOP_R = crate::BitReader<COMPARE1_STOP_A>;
#[doc = "Shortcut between COMPARE\\[1\\]
event and STOP task\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum COMPARE1_STOP_A {
#[doc = "0: Disable shortcut"]
DISABLED = 0,
#[doc = "1: Enable shortcut"]
ENABLED = 1,
}
impl From<COMPARE1_STOP_A> for bool {
#[inline(always)]
fn from(variant: COMPARE1_STOP_A) -> Self {
variant as u8 != 0
}
}
impl COMPARE1_STOP_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> COMPARE1_STOP_A {
match self.bits {
false => COMPARE1_STOP_A::DISABLED,
true => COMPARE1_STOP_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == COMPARE1_STOP_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == COMPARE1_STOP_A::ENABLED
}
}
#[doc = "Field `COMPARE1_STOP` writer - Shortcut between COMPARE\\[1\\]
event and STOP task"]
pub type COMPARE1_STOP_W<'a, const O: u8> =
crate::BitWriter<'a, u32, SHORTS_SPEC, COMPARE1_STOP_A, O>;
impl<'a, const O: u8> COMPARE1_STOP_W<'a, O> {
#[doc = "Disable shortcut"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(COMPARE1_STOP_A::DISABLED)
}
#[doc = "Enable shortcut"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(COMPARE1_STOP_A::ENABLED)
}
}
#[doc = "Field `COMPARE2_STOP` reader - Shortcut between COMPARE\\[2\\]
event and STOP task"]
pub type COMPARE2_STOP_R = crate::BitReader<COMPARE2_STOP_A>;
#[doc = "Shortcut between COMPARE\\[2\\]
event and STOP task\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum COMPARE2_STOP_A {
#[doc = "0: Disable shortcut"]
DISABLED = 0,
#[doc = "1: Enable shortcut"]
ENABLED = 1,
}
impl From<COMPARE2_STOP_A> for bool {
#[inline(always)]
fn from(variant: COMPARE2_STOP_A) -> Self {
variant as u8 != 0
}
}
impl COMPARE2_STOP_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> COMPARE2_STOP_A {
match self.bits {
false => COMPARE2_STOP_A::DISABLED,
true => COMPARE2_STOP_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == COMPARE2_STOP_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == COMPARE2_STOP_A::ENABLED
}
}
#[doc = "Field `COMPARE2_STOP` writer - Shortcut between COMPARE\\[2\\]
event and STOP task"]
pub type COMPARE2_STOP_W<'a, const O: u8> =
crate::BitWriter<'a, u32, SHORTS_SPEC, COMPARE2_STOP_A, O>;
impl<'a, const O: u8> COMPARE2_STOP_W<'a, O> {
#[doc = "Disable shortcut"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(COMPARE2_STOP_A::DISABLED)
}
#[doc = "Enable shortcut"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(COMPARE2_STOP_A::ENABLED)
}
}
#[doc = "Field `COMPARE3_STOP` reader - Shortcut between COMPARE\\[3\\]
event and STOP task"]
pub type COMPARE3_STOP_R = crate::BitReader<COMPARE3_STOP_A>;
#[doc = "Shortcut between COMPARE\\[3\\]
event and STOP task\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum COMPARE3_STOP_A {
#[doc = "0: Disable shortcut"]
DISABLED = 0,
#[doc = "1: Enable shortcut"]
ENABLED = 1,
}
impl From<COMPARE3_STOP_A> for bool {
#[inline(always)]
fn from(variant: COMPARE3_STOP_A) -> Self {
variant as u8 != 0
}
}
impl COMPARE3_STOP_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> COMPARE3_STOP_A {
match self.bits {
false => COMPARE3_STOP_A::DISABLED,
true => COMPARE3_STOP_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == COMPARE3_STOP_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == COMPARE3_STOP_A::ENABLED
}
}
#[doc = "Field `COMPARE3_STOP` writer - Shortcut between COMPARE\\[3\\]
event and STOP task"]
pub type COMPARE3_STOP_W<'a, const O: u8> =
crate::BitWriter<'a, u32, SHORTS_SPEC, COMPARE3_STOP_A, O>;
impl<'a, const O: u8> COMPARE3_STOP_W<'a, O> {
#[doc = "Disable shortcut"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(COMPARE3_STOP_A::DISABLED)
}
#[doc = "Enable shortcut"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(COMPARE3_STOP_A::ENABLED)
}
}
#[doc = "Field `COMPARE4_STOP` reader - Shortcut between COMPARE\\[4\\]
event and STOP task"]
pub type COMPARE4_STOP_R = crate::BitReader<COMPARE4_STOP_A>;
#[doc = "Shortcut between COMPARE\\[4\\]
event and STOP task\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum COMPARE4_STOP_A {
#[doc = "0: Disable shortcut"]
DISABLED = 0,
#[doc = "1: Enable shortcut"]
ENABLED = 1,
}
impl From<COMPARE4_STOP_A> for bool {
#[inline(always)]
fn from(variant: COMPARE4_STOP_A) -> Self {
variant as u8 != 0
}
}
impl COMPARE4_STOP_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> COMPARE4_STOP_A {
match self.bits {
false => COMPARE4_STOP_A::DISABLED,
true => COMPARE4_STOP_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == COMPARE4_STOP_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == COMPARE4_STOP_A::ENABLED
}
}
#[doc = "Field `COMPARE4_STOP` writer - Shortcut between COMPARE\\[4\\]
event and STOP task"]
pub type COMPARE4_STOP_W<'a, const O: u8> =
crate::BitWriter<'a, u32, SHORTS_SPEC, COMPARE4_STOP_A, O>;
impl<'a, const O: u8> COMPARE4_STOP_W<'a, O> {
#[doc = "Disable shortcut"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(COMPARE4_STOP_A::DISABLED)
}
#[doc = "Enable shortcut"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(COMPARE4_STOP_A::ENABLED)
}
}
#[doc = "Field `COMPARE5_STOP` reader - Shortcut between COMPARE\\[5\\]
event and STOP task"]
pub type COMPARE5_STOP_R = crate::BitReader<COMPARE5_STOP_A>;
#[doc = "Shortcut between COMPARE\\[5\\]
event and STOP task\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum COMPARE5_STOP_A {
#[doc = "0: Disable shortcut"]
DISABLED = 0,
#[doc = "1: Enable shortcut"]
ENABLED = 1,
}
impl From<COMPARE5_STOP_A> for bool {
#[inline(always)]
fn from(variant: COMPARE5_STOP_A) -> Self {
variant as u8 != 0
}
}
impl COMPARE5_STOP_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> COMPARE5_STOP_A {
match self.bits {
false => COMPARE5_STOP_A::DISABLED,
true => COMPARE5_STOP_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == COMPARE5_STOP_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == COMPARE5_STOP_A::ENABLED
}
}
#[doc = "Field `COMPARE5_STOP` writer - Shortcut between COMPARE\\[5\\]
event and STOP task"]
pub type COMPARE5_STOP_W<'a, const O: u8> =
crate::BitWriter<'a, u32, SHORTS_SPEC, COMPARE5_STOP_A, O>;
impl<'a, const O: u8> COMPARE5_STOP_W<'a, O> {
#[doc = "Disable shortcut"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(COMPARE5_STOP_A::DISABLED)
}
#[doc = "Enable shortcut"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(COMPARE5_STOP_A::ENABLED)
}
}
impl R {
#[doc = "Bit 0 - Shortcut between COMPARE\\[0\\]
event and CLEAR task"]
#[inline(always)]
pub fn compare0_clear(&self) -> COMPARE0_CLEAR_R {
COMPARE0_CLEAR_R::new((self.bits & 1) != 0)
}
#[doc = "Bit 1 - Shortcut between COMPARE\\[1\\]
event and CLEAR task"]
#[inline(always)]
pub fn compare1_clear(&self) -> COMPARE1_CLEAR_R {
COMPARE1_CLEAR_R::new(((self.bits >> 1) & 1) != 0)
}
#[doc = "Bit 2 - Shortcut between COMPARE\\[2\\]
event and CLEAR task"]
#[inline(always)]
pub fn compare2_clear(&self) -> COMPARE2_CLEAR_R {
COMPARE2_CLEAR_R::new(((self.bits >> 2) & 1) != 0)
}
#[doc = "Bit 3 - Shortcut between COMPARE\\[3\\]
event and CLEAR task"]
#[inline(always)]
pub fn compare3_clear(&self) -> COMPARE3_CLEAR_R {
COMPARE3_CLEAR_R::new(((self.bits >> 3) & 1) != 0)
}
#[doc = "Bit 4 - Shortcut between COMPARE\\[4\\]
event and CLEAR task"]
#[inline(always)]
pub fn compare4_clear(&self) -> COMPARE4_CLEAR_R {
COMPARE4_CLEAR_R::new(((self.bits >> 4) & 1) != 0)
}
#[doc = "Bit 5 - Shortcut between COMPARE\\[5\\]
event and CLEAR task"]
#[inline(always)]
pub fn compare5_clear(&self) -> COMPARE5_CLEAR_R {
COMPARE5_CLEAR_R::new(((self.bits >> 5) & 1) != 0)
}
#[doc = "Bit 8 - Shortcut between COMPARE\\[0\\]
event and STOP task"]
#[inline(always)]
pub fn compare0_stop(&self) -> COMPARE0_STOP_R {
COMPARE0_STOP_R::new(((self.bits >> 8) & 1) != 0)
}
#[doc = "Bit 9 - Shortcut between COMPARE\\[1\\]
event and STOP task"]
#[inline(always)]
pub fn compare1_stop(&self) -> COMPARE1_STOP_R {
COMPARE1_STOP_R::new(((self.bits >> 9) & 1) != 0)
}
#[doc = "Bit 10 - Shortcut between COMPARE\\[2\\]
event and STOP task"]
#[inline(always)]
pub fn compare2_stop(&self) -> COMPARE2_STOP_R {
COMPARE2_STOP_R::new(((self.bits >> 10) & 1) != 0)
}
#[doc = "Bit 11 - Shortcut between COMPARE\\[3\\]
event and STOP task"]
#[inline(always)]
pub fn compare3_stop(&self) -> COMPARE3_STOP_R {
COMPARE3_STOP_R::new(((self.bits >> 11) & 1) != 0)
}
#[doc = "Bit 12 - Shortcut between COMPARE\\[4\\]
event and STOP task"]
#[inline(always)]
pub fn compare4_stop(&self) -> COMPARE4_STOP_R {
COMPARE4_STOP_R::new(((self.bits >> 12) & 1) != 0)
}
#[doc = "Bit 13 - Shortcut between COMPARE\\[5\\]
event and STOP task"]
#[inline(always)]
pub fn compare5_stop(&self) -> COMPARE5_STOP_R {
COMPARE5_STOP_R::new(((self.bits >> 13) & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Shortcut between COMPARE\\[0\\]
event and CLEAR task"]
#[inline(always)]
pub fn compare0_clear(&mut self) -> COMPARE0_CLEAR_W<0> {
COMPARE0_CLEAR_W::new(self)
}
#[doc = "Bit 1 - Shortcut between COMPARE\\[1\\]
event and CLEAR task"]
#[inline(always)]
pub fn compare1_clear(&mut self) -> COMPARE1_CLEAR_W<1> {
COMPARE1_CLEAR_W::new(self)
}
#[doc = "Bit 2 - Shortcut between COMPARE\\[2\\]
event and CLEAR task"]
#[inline(always)]
pub fn compare2_clear(&mut self) -> COMPARE2_CLEAR_W<2> {
COMPARE2_CLEAR_W::new(self)
}
#[doc = "Bit 3 - Shortcut between COMPARE\\[3\\]
event and CLEAR task"]
#[inline(always)]
pub fn compare3_clear(&mut self) -> COMPARE3_CLEAR_W<3> {
COMPARE3_CLEAR_W::new(self)
}
#[doc = "Bit 4 - Shortcut between COMPARE\\[4\\]
event and CLEAR task"]
#[inline(always)]
pub fn compare4_clear(&mut self) -> COMPARE4_CLEAR_W<4> {
COMPARE4_CLEAR_W::new(self)
}
#[doc = "Bit 5 - Shortcut between COMPARE\\[5\\]
event and CLEAR task"]
#[inline(always)]
pub fn compare5_clear(&mut self) -> COMPARE5_CLEAR_W<5> {
COMPARE5_CLEAR_W::new(self)
}
#[doc = "Bit 8 - Shortcut between COMPARE\\[0\\]
event and STOP task"]
#[inline(always)]
pub fn compare0_stop(&mut self) -> COMPARE0_STOP_W<8> {
COMPARE0_STOP_W::new(self)
}
#[doc = "Bit 9 - Shortcut between COMPARE\\[1\\]
event and STOP task"]
#[inline(always)]
pub fn compare1_stop(&mut self) -> COMPARE1_STOP_W<9> {
COMPARE1_STOP_W::new(self)
}
#[doc = "Bit 10 - Shortcut between COMPARE\\[2\\]
event and STOP task"]
#[inline(always)]
pub fn compare2_stop(&mut self) -> COMPARE2_STOP_W<10> {
COMPARE2_STOP_W::new(self)
}
#[doc = "Bit 11 - Shortcut between COMPARE\\[3\\]
event and STOP task"]
#[inline(always)]
pub fn compare3_stop(&mut self) -> COMPARE3_STOP_W<11> {
COMPARE3_STOP_W::new(self)
}
#[doc = "Bit 12 - Shortcut between COMPARE\\[4\\]
event and STOP task"]
#[inline(always)]
pub fn compare4_stop(&mut self) -> COMPARE4_STOP_W<12> {
COMPARE4_STOP_W::new(self)
}
#[doc = "Bit 13 - Shortcut between COMPARE\\[5\\]
event and STOP task"]
#[inline(always)]
pub fn compare5_stop(&mut self) -> COMPARE5_STOP_W<13> {
COMPARE5_STOP_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 = "Shortcut 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 [shorts](index.html) module"]
pub struct SHORTS_SPEC;
impl crate::RegisterSpec for SHORTS_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [shorts::R](R) reader structure"]
impl crate::Readable for SHORTS_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [shorts::W](W) writer structure"]
impl crate::Writable for SHORTS_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets SHORTS to value 0"]
impl crate::Resettable for SHORTS_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+54
View File
@@ -0,0 +1,54 @@
#[doc = "Register `TASKS_CAPTURE[%s]` writer"]
pub struct W(crate::W<TASKS_CAPTURE_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<TASKS_CAPTURE_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_CAPTURE_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<TASKS_CAPTURE_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `TASKS_CAPTURE` writer - "]
pub type TASKS_CAPTURE_W<'a, const O: u8> = crate::BitWriter<'a, u32, TASKS_CAPTURE_SPEC, bool, O>;
impl W {
#[doc = "Bit 0"]
#[inline(always)]
pub fn tasks_capture(&mut self) -> TASKS_CAPTURE_W<0> {
TASKS_CAPTURE_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\\[n\\]: Capture Timer value to CC\\[n\\]
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 [tasks_capture](index.html) module"]
pub struct TASKS_CAPTURE_SPEC;
impl crate::RegisterSpec for TASKS_CAPTURE_SPEC {
type Ux = u32;
}
#[doc = "`write(|w| ..)` method takes [tasks_capture::W](W) writer structure"]
impl crate::Writable for TASKS_CAPTURE_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets TASKS_CAPTURE[%s]
to value 0"]
impl crate::Resettable for TASKS_CAPTURE_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+52
View File
@@ -0,0 +1,52 @@
#[doc = "Register `TASKS_CLEAR` writer"]
pub struct W(crate::W<TASKS_CLEAR_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<TASKS_CLEAR_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_CLEAR_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<TASKS_CLEAR_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `TASKS_CLEAR` writer - "]
pub type TASKS_CLEAR_W<'a, const O: u8> = crate::BitWriter<'a, u32, TASKS_CLEAR_SPEC, bool, O>;
impl W {
#[doc = "Bit 0"]
#[inline(always)]
pub fn tasks_clear(&mut self) -> TASKS_CLEAR_W<0> {
TASKS_CLEAR_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 = "Clear time\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_clear](index.html) module"]
pub struct TASKS_CLEAR_SPEC;
impl crate::RegisterSpec for TASKS_CLEAR_SPEC {
type Ux = u32;
}
#[doc = "`write(|w| ..)` method takes [tasks_clear::W](W) writer structure"]
impl crate::Writable for TASKS_CLEAR_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets TASKS_CLEAR to value 0"]
impl crate::Resettable for TASKS_CLEAR_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+52
View File
@@ -0,0 +1,52 @@
#[doc = "Register `TASKS_COUNT` writer"]
pub struct W(crate::W<TASKS_COUNT_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<TASKS_COUNT_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_COUNT_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<TASKS_COUNT_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `TASKS_COUNT` writer - "]
pub type TASKS_COUNT_W<'a, const O: u8> = crate::BitWriter<'a, u32, TASKS_COUNT_SPEC, bool, O>;
impl W {
#[doc = "Bit 0"]
#[inline(always)]
pub fn tasks_count(&mut self) -> TASKS_COUNT_W<0> {
TASKS_COUNT_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 = "Increment Timer (Counter mode only)\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_count](index.html) module"]
pub struct TASKS_COUNT_SPEC;
impl crate::RegisterSpec for TASKS_COUNT_SPEC {
type Ux = u32;
}
#[doc = "`write(|w| ..)` method takes [tasks_count::W](W) writer structure"]
impl crate::Writable for TASKS_COUNT_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets TASKS_COUNT to value 0"]
impl crate::Resettable for TASKS_COUNT_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+53
View File
@@ -0,0 +1,53 @@
#[doc = "Register `TASKS_SHUTDOWN` writer"]
pub struct W(crate::W<TASKS_SHUTDOWN_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<TASKS_SHUTDOWN_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_SHUTDOWN_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<TASKS_SHUTDOWN_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `TASKS_SHUTDOWN` writer - "]
pub type TASKS_SHUTDOWN_W<'a, const O: u8> =
crate::BitWriter<'a, u32, TASKS_SHUTDOWN_SPEC, bool, O>;
impl W {
#[doc = "Bit 0"]
#[inline(always)]
pub fn tasks_shutdown(&mut self) -> TASKS_SHUTDOWN_W<0> {
TASKS_SHUTDOWN_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 = "Deprecated register - Shut down timer\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_shutdown](index.html) module"]
pub struct TASKS_SHUTDOWN_SPEC;
impl crate::RegisterSpec for TASKS_SHUTDOWN_SPEC {
type Ux = u32;
}
#[doc = "`write(|w| ..)` method takes [tasks_shutdown::W](W) writer structure"]
impl crate::Writable for TASKS_SHUTDOWN_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets TASKS_SHUTDOWN to value 0"]
impl crate::Resettable for TASKS_SHUTDOWN_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+52
View File
@@ -0,0 +1,52 @@
#[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 = "Field `TASKS_START` writer - "]
pub type TASKS_START_W<'a, const O: u8> = crate::BitWriter<'a, u32, TASKS_START_SPEC, bool, O>;
impl W {
#[doc = "Bit 0"]
#[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 Timer\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
}
}
+52
View File
@@ -0,0 +1,52 @@
#[doc = "Register `TASKS_STOP` writer"]
pub struct W(crate::W<TASKS_STOP_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<TASKS_STOP_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_STOP_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<TASKS_STOP_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `TASKS_STOP` writer - "]
pub type TASKS_STOP_W<'a, const O: u8> = crate::BitWriter<'a, u32, TASKS_STOP_SPEC, bool, O>;
impl W {
#[doc = "Bit 0"]
#[inline(always)]
pub fn tasks_stop(&mut self) -> TASKS_STOP_W<0> {
TASKS_STOP_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Stop Timer\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_stop](index.html) module"]
pub struct TASKS_STOP_SPEC;
impl crate::RegisterSpec for TASKS_STOP_SPEC {
type Ux = u32;
}
#[doc = "`write(|w| ..)` method takes [tasks_stop::W](W) writer structure"]
impl crate::Writable for TASKS_STOP_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets TASKS_STOP to value 0"]
impl crate::Resettable for TASKS_STOP_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}