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

+40
View File
@@ -0,0 +1,40 @@
#[doc = "Register `ACC` reader"]
pub struct R(crate::R<ACC_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<ACC_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<ACC_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<ACC_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `ACC` reader - Register accumulating all valid samples (not double transition) read from the SAMPLE register"]
pub type ACC_R = crate::FieldReader<u32, u32>;
impl R {
#[doc = "Bits 0:31 - Register accumulating all valid samples (not double transition) read from the SAMPLE register"]
#[inline(always)]
pub fn acc(&self) -> ACC_R {
ACC_R::new(self.bits)
}
}
#[doc = "Register accumulating the valid transitions\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 [acc](index.html) module"]
pub struct ACC_SPEC;
impl crate::RegisterSpec for ACC_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [acc::R](R) reader structure"]
impl crate::Readable for ACC_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets ACC to value 0"]
impl crate::Resettable for ACC_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+40
View File
@@ -0,0 +1,40 @@
#[doc = "Register `ACCDBL` reader"]
pub struct R(crate::R<ACCDBL_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<ACCDBL_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<ACCDBL_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<ACCDBL_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `ACCDBL` reader - Register accumulating the number of detected double or illegal transitions. ( SAMPLE = 2 )."]
pub type ACCDBL_R = crate::FieldReader<u8, u8>;
impl R {
#[doc = "Bits 0:3 - Register accumulating the number of detected double or illegal transitions. ( SAMPLE = 2 )."]
#[inline(always)]
pub fn accdbl(&self) -> ACCDBL_R {
ACCDBL_R::new((self.bits & 0x0f) as u8)
}
}
#[doc = "Register accumulating the number of detected double transitions\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 [accdbl](index.html) module"]
pub struct ACCDBL_SPEC;
impl crate::RegisterSpec for ACCDBL_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [accdbl::R](R) reader structure"]
impl crate::Readable for ACCDBL_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets ACCDBL to value 0"]
impl crate::Resettable for ACCDBL_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+40
View File
@@ -0,0 +1,40 @@
#[doc = "Register `ACCDBLREAD` reader"]
pub struct R(crate::R<ACCDBLREAD_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<ACCDBLREAD_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<ACCDBLREAD_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<ACCDBLREAD_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `ACCDBLREAD` reader - Snapshot of the ACCDBL register. This field is updated when the READCLRACC or RDCLRDBL task is triggered."]
pub type ACCDBLREAD_R = crate::FieldReader<u8, u8>;
impl R {
#[doc = "Bits 0:3 - Snapshot of the ACCDBL register. This field is updated when the READCLRACC or RDCLRDBL task is triggered."]
#[inline(always)]
pub fn accdblread(&self) -> ACCDBLREAD_R {
ACCDBLREAD_R::new((self.bits & 0x0f) as u8)
}
}
#[doc = "Snapshot of the ACCDBL, updated by the READCLRACC or RDCLRDBL task\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 [accdblread](index.html) module"]
pub struct ACCDBLREAD_SPEC;
impl crate::RegisterSpec for ACCDBLREAD_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [accdblread::R](R) reader structure"]
impl crate::Readable for ACCDBLREAD_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets ACCDBLREAD to value 0"]
impl crate::Resettable for ACCDBLREAD_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+40
View File
@@ -0,0 +1,40 @@
#[doc = "Register `ACCREAD` reader"]
pub struct R(crate::R<ACCREAD_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<ACCREAD_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<ACCREAD_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<ACCREAD_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `ACCREAD` reader - Snapshot of the ACC register."]
pub type ACCREAD_R = crate::FieldReader<u32, u32>;
impl R {
#[doc = "Bits 0:31 - Snapshot of the ACC register."]
#[inline(always)]
pub fn accread(&self) -> ACCREAD_R {
ACCREAD_R::new(self.bits)
}
}
#[doc = "Snapshot of the ACC register, updated by the READCLRACC or RDCLRACC task\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 [accread](index.html) module"]
pub struct ACCREAD_SPEC;
impl crate::RegisterSpec for ACCREAD_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [accread::R](R) reader structure"]
impl crate::Readable for ACCREAD_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets ACCREAD to value 0"]
impl crate::Resettable for ACCREAD_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+126
View File
@@ -0,0 +1,126 @@
#[doc = "Register `DBFEN` reader"]
pub struct R(crate::R<DBFEN_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DBFEN_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DBFEN_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DBFEN_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DBFEN` writer"]
pub struct W(crate::W<DBFEN_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DBFEN_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<DBFEN_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DBFEN_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `DBFEN` reader - Enable input debounce filters"]
pub type DBFEN_R = crate::BitReader<DBFEN_A>;
#[doc = "Enable input debounce filters\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DBFEN_A {
#[doc = "0: Debounce input filters disabled"]
DISABLED = 0,
#[doc = "1: Debounce input filters enabled"]
ENABLED = 1,
}
impl From<DBFEN_A> for bool {
#[inline(always)]
fn from(variant: DBFEN_A) -> Self {
variant as u8 != 0
}
}
impl DBFEN_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> DBFEN_A {
match self.bits {
false => DBFEN_A::DISABLED,
true => DBFEN_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == DBFEN_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == DBFEN_A::ENABLED
}
}
#[doc = "Field `DBFEN` writer - Enable input debounce filters"]
pub type DBFEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, DBFEN_SPEC, DBFEN_A, O>;
impl<'a, const O: u8> DBFEN_W<'a, O> {
#[doc = "Debounce input filters disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(DBFEN_A::DISABLED)
}
#[doc = "Debounce input filters enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(DBFEN_A::ENABLED)
}
}
impl R {
#[doc = "Bit 0 - Enable input debounce filters"]
#[inline(always)]
pub fn dbfen(&self) -> DBFEN_R {
DBFEN_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Enable input debounce filters"]
#[inline(always)]
pub fn dbfen(&mut self) -> DBFEN_W<0> {
DBFEN_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 input debounce filters\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 [dbfen](index.html) module"]
pub struct DBFEN_SPEC;
impl crate::RegisterSpec for DBFEN_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [dbfen::R](R) reader structure"]
impl crate::Readable for DBFEN_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [dbfen::W](W) writer structure"]
impl crate::Writable for DBFEN_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DBFEN to value 0"]
impl crate::Resettable for DBFEN_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+126
View File
@@ -0,0 +1,126 @@
#[doc = "Register `ENABLE` reader"]
pub struct R(crate::R<ENABLE_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<ENABLE_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<ENABLE_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<ENABLE_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `ENABLE` writer"]
pub struct W(crate::W<ENABLE_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<ENABLE_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<ENABLE_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<ENABLE_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `ENABLE` reader - Enable or disable the quadrature decoder"]
pub type ENABLE_R = crate::BitReader<ENABLE_A>;
#[doc = "Enable or disable the quadrature decoder\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ENABLE_A {
#[doc = "0: Disable"]
DISABLED = 0,
#[doc = "1: Enable"]
ENABLED = 1,
}
impl From<ENABLE_A> for bool {
#[inline(always)]
fn from(variant: ENABLE_A) -> Self {
variant as u8 != 0
}
}
impl ENABLE_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ENABLE_A {
match self.bits {
false => ENABLE_A::DISABLED,
true => ENABLE_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ENABLE_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ENABLE_A::ENABLED
}
}
#[doc = "Field `ENABLE` writer - Enable or disable the quadrature decoder"]
pub type ENABLE_W<'a, const O: u8> = crate::BitWriter<'a, u32, ENABLE_SPEC, ENABLE_A, O>;
impl<'a, const O: u8> ENABLE_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ENABLE_A::DISABLED)
}
#[doc = "Enable"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ENABLE_A::ENABLED)
}
}
impl R {
#[doc = "Bit 0 - Enable or disable the quadrature decoder"]
#[inline(always)]
pub fn enable(&self) -> ENABLE_R {
ENABLE_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Enable or disable the quadrature decoder"]
#[inline(always)]
pub fn enable(&mut self) -> ENABLE_W<0> {
ENABLE_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 the quadrature decoder\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 [enable](index.html) module"]
pub struct ENABLE_SPEC;
impl crate::RegisterSpec for ENABLE_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [enable::R](R) reader structure"]
impl crate::Readable for ENABLE_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [enable::W](W) writer structure"]
impl crate::Writable for ENABLE_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets ENABLE to value 0"]
impl crate::Resettable for ENABLE_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+127
View File
@@ -0,0 +1,127 @@
#[doc = "Register `EVENTS_ACCOF` reader"]
pub struct R(crate::R<EVENTS_ACCOF_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_ACCOF_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_ACCOF_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_ACCOF_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_ACCOF` writer"]
pub struct W(crate::W<EVENTS_ACCOF_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_ACCOF_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_ACCOF_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_ACCOF_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `EVENTS_ACCOF` reader - ACC or ACCDBL register overflow"]
pub type EVENTS_ACCOF_R = crate::BitReader<EVENTS_ACCOF_A>;
#[doc = "ACC or ACCDBL register overflow\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EVENTS_ACCOF_A {
#[doc = "0: Event not generated"]
NOT_GENERATED = 0,
#[doc = "1: Event generated"]
GENERATED = 1,
}
impl From<EVENTS_ACCOF_A> for bool {
#[inline(always)]
fn from(variant: EVENTS_ACCOF_A) -> Self {
variant as u8 != 0
}
}
impl EVENTS_ACCOF_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EVENTS_ACCOF_A {
match self.bits {
false => EVENTS_ACCOF_A::NOT_GENERATED,
true => EVENTS_ACCOF_A::GENERATED,
}
}
#[doc = "Checks if the value of the field is `NOT_GENERATED`"]
#[inline(always)]
pub fn is_not_generated(&self) -> bool {
*self == EVENTS_ACCOF_A::NOT_GENERATED
}
#[doc = "Checks if the value of the field is `GENERATED`"]
#[inline(always)]
pub fn is_generated(&self) -> bool {
*self == EVENTS_ACCOF_A::GENERATED
}
}
#[doc = "Field `EVENTS_ACCOF` writer - ACC or ACCDBL register overflow"]
pub type EVENTS_ACCOF_W<'a, const O: u8> =
crate::BitWriter<'a, u32, EVENTS_ACCOF_SPEC, EVENTS_ACCOF_A, O>;
impl<'a, const O: u8> EVENTS_ACCOF_W<'a, O> {
#[doc = "Event not generated"]
#[inline(always)]
pub fn not_generated(self) -> &'a mut W {
self.variant(EVENTS_ACCOF_A::NOT_GENERATED)
}
#[doc = "Event generated"]
#[inline(always)]
pub fn generated(self) -> &'a mut W {
self.variant(EVENTS_ACCOF_A::GENERATED)
}
}
impl R {
#[doc = "Bit 0 - ACC or ACCDBL register overflow"]
#[inline(always)]
pub fn events_accof(&self) -> EVENTS_ACCOF_R {
EVENTS_ACCOF_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - ACC or ACCDBL register overflow"]
#[inline(always)]
pub fn events_accof(&mut self) -> EVENTS_ACCOF_W<0> {
EVENTS_ACCOF_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 = "ACC or ACCDBL register overflow\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_accof](index.html) module"]
pub struct EVENTS_ACCOF_SPEC;
impl crate::RegisterSpec for EVENTS_ACCOF_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_accof::R](R) reader structure"]
impl crate::Readable for EVENTS_ACCOF_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_accof::W](W) writer structure"]
impl crate::Writable for EVENTS_ACCOF_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_ACCOF to value 0"]
impl crate::Resettable for EVENTS_ACCOF_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+127
View File
@@ -0,0 +1,127 @@
#[doc = "Register `EVENTS_DBLRDY` reader"]
pub struct R(crate::R<EVENTS_DBLRDY_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_DBLRDY_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_DBLRDY_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_DBLRDY_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_DBLRDY` writer"]
pub struct W(crate::W<EVENTS_DBLRDY_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_DBLRDY_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_DBLRDY_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_DBLRDY_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `EVENTS_DBLRDY` reader - Double displacement(s) detected"]
pub type EVENTS_DBLRDY_R = crate::BitReader<EVENTS_DBLRDY_A>;
#[doc = "Double displacement(s) detected\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EVENTS_DBLRDY_A {
#[doc = "0: Event not generated"]
NOT_GENERATED = 0,
#[doc = "1: Event generated"]
GENERATED = 1,
}
impl From<EVENTS_DBLRDY_A> for bool {
#[inline(always)]
fn from(variant: EVENTS_DBLRDY_A) -> Self {
variant as u8 != 0
}
}
impl EVENTS_DBLRDY_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EVENTS_DBLRDY_A {
match self.bits {
false => EVENTS_DBLRDY_A::NOT_GENERATED,
true => EVENTS_DBLRDY_A::GENERATED,
}
}
#[doc = "Checks if the value of the field is `NOT_GENERATED`"]
#[inline(always)]
pub fn is_not_generated(&self) -> bool {
*self == EVENTS_DBLRDY_A::NOT_GENERATED
}
#[doc = "Checks if the value of the field is `GENERATED`"]
#[inline(always)]
pub fn is_generated(&self) -> bool {
*self == EVENTS_DBLRDY_A::GENERATED
}
}
#[doc = "Field `EVENTS_DBLRDY` writer - Double displacement(s) detected"]
pub type EVENTS_DBLRDY_W<'a, const O: u8> =
crate::BitWriter<'a, u32, EVENTS_DBLRDY_SPEC, EVENTS_DBLRDY_A, O>;
impl<'a, const O: u8> EVENTS_DBLRDY_W<'a, O> {
#[doc = "Event not generated"]
#[inline(always)]
pub fn not_generated(self) -> &'a mut W {
self.variant(EVENTS_DBLRDY_A::NOT_GENERATED)
}
#[doc = "Event generated"]
#[inline(always)]
pub fn generated(self) -> &'a mut W {
self.variant(EVENTS_DBLRDY_A::GENERATED)
}
}
impl R {
#[doc = "Bit 0 - Double displacement(s) detected"]
#[inline(always)]
pub fn events_dblrdy(&self) -> EVENTS_DBLRDY_R {
EVENTS_DBLRDY_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Double displacement(s) detected"]
#[inline(always)]
pub fn events_dblrdy(&mut self) -> EVENTS_DBLRDY_W<0> {
EVENTS_DBLRDY_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 = "Double displacement(s) detected\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_dblrdy](index.html) module"]
pub struct EVENTS_DBLRDY_SPEC;
impl crate::RegisterSpec for EVENTS_DBLRDY_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_dblrdy::R](R) reader structure"]
impl crate::Readable for EVENTS_DBLRDY_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_dblrdy::W](W) writer structure"]
impl crate::Writable for EVENTS_DBLRDY_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_DBLRDY to value 0"]
impl crate::Resettable for EVENTS_DBLRDY_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+127
View File
@@ -0,0 +1,127 @@
#[doc = "Register `EVENTS_REPORTRDY` reader"]
pub struct R(crate::R<EVENTS_REPORTRDY_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_REPORTRDY_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_REPORTRDY_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_REPORTRDY_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_REPORTRDY` writer"]
pub struct W(crate::W<EVENTS_REPORTRDY_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_REPORTRDY_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_REPORTRDY_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_REPORTRDY_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `EVENTS_REPORTRDY` reader - Non-null report ready"]
pub type EVENTS_REPORTRDY_R = crate::BitReader<EVENTS_REPORTRDY_A>;
#[doc = "Non-null report ready\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EVENTS_REPORTRDY_A {
#[doc = "0: Event not generated"]
NOT_GENERATED = 0,
#[doc = "1: Event generated"]
GENERATED = 1,
}
impl From<EVENTS_REPORTRDY_A> for bool {
#[inline(always)]
fn from(variant: EVENTS_REPORTRDY_A) -> Self {
variant as u8 != 0
}
}
impl EVENTS_REPORTRDY_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EVENTS_REPORTRDY_A {
match self.bits {
false => EVENTS_REPORTRDY_A::NOT_GENERATED,
true => EVENTS_REPORTRDY_A::GENERATED,
}
}
#[doc = "Checks if the value of the field is `NOT_GENERATED`"]
#[inline(always)]
pub fn is_not_generated(&self) -> bool {
*self == EVENTS_REPORTRDY_A::NOT_GENERATED
}
#[doc = "Checks if the value of the field is `GENERATED`"]
#[inline(always)]
pub fn is_generated(&self) -> bool {
*self == EVENTS_REPORTRDY_A::GENERATED
}
}
#[doc = "Field `EVENTS_REPORTRDY` writer - Non-null report ready"]
pub type EVENTS_REPORTRDY_W<'a, const O: u8> =
crate::BitWriter<'a, u32, EVENTS_REPORTRDY_SPEC, EVENTS_REPORTRDY_A, O>;
impl<'a, const O: u8> EVENTS_REPORTRDY_W<'a, O> {
#[doc = "Event not generated"]
#[inline(always)]
pub fn not_generated(self) -> &'a mut W {
self.variant(EVENTS_REPORTRDY_A::NOT_GENERATED)
}
#[doc = "Event generated"]
#[inline(always)]
pub fn generated(self) -> &'a mut W {
self.variant(EVENTS_REPORTRDY_A::GENERATED)
}
}
impl R {
#[doc = "Bit 0 - Non-null report ready"]
#[inline(always)]
pub fn events_reportrdy(&self) -> EVENTS_REPORTRDY_R {
EVENTS_REPORTRDY_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Non-null report ready"]
#[inline(always)]
pub fn events_reportrdy(&mut self) -> EVENTS_REPORTRDY_W<0> {
EVENTS_REPORTRDY_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 = "Non-null report ready\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [events_reportrdy](index.html) module"]
pub struct EVENTS_REPORTRDY_SPEC;
impl crate::RegisterSpec for EVENTS_REPORTRDY_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_reportrdy::R](R) reader structure"]
impl crate::Readable for EVENTS_REPORTRDY_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_reportrdy::W](W) writer structure"]
impl crate::Writable for EVENTS_REPORTRDY_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_REPORTRDY to value 0"]
impl crate::Resettable for EVENTS_REPORTRDY_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+127
View File
@@ -0,0 +1,127 @@
#[doc = "Register `EVENTS_SAMPLERDY` reader"]
pub struct R(crate::R<EVENTS_SAMPLERDY_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_SAMPLERDY_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_SAMPLERDY_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_SAMPLERDY_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_SAMPLERDY` writer"]
pub struct W(crate::W<EVENTS_SAMPLERDY_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_SAMPLERDY_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_SAMPLERDY_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_SAMPLERDY_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `EVENTS_SAMPLERDY` reader - Event being generated for every new sample value written to the SAMPLE register"]
pub type EVENTS_SAMPLERDY_R = crate::BitReader<EVENTS_SAMPLERDY_A>;
#[doc = "Event being generated for every new sample value written to the SAMPLE register\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EVENTS_SAMPLERDY_A {
#[doc = "0: Event not generated"]
NOT_GENERATED = 0,
#[doc = "1: Event generated"]
GENERATED = 1,
}
impl From<EVENTS_SAMPLERDY_A> for bool {
#[inline(always)]
fn from(variant: EVENTS_SAMPLERDY_A) -> Self {
variant as u8 != 0
}
}
impl EVENTS_SAMPLERDY_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EVENTS_SAMPLERDY_A {
match self.bits {
false => EVENTS_SAMPLERDY_A::NOT_GENERATED,
true => EVENTS_SAMPLERDY_A::GENERATED,
}
}
#[doc = "Checks if the value of the field is `NOT_GENERATED`"]
#[inline(always)]
pub fn is_not_generated(&self) -> bool {
*self == EVENTS_SAMPLERDY_A::NOT_GENERATED
}
#[doc = "Checks if the value of the field is `GENERATED`"]
#[inline(always)]
pub fn is_generated(&self) -> bool {
*self == EVENTS_SAMPLERDY_A::GENERATED
}
}
#[doc = "Field `EVENTS_SAMPLERDY` writer - Event being generated for every new sample value written to the SAMPLE register"]
pub type EVENTS_SAMPLERDY_W<'a, const O: u8> =
crate::BitWriter<'a, u32, EVENTS_SAMPLERDY_SPEC, EVENTS_SAMPLERDY_A, O>;
impl<'a, const O: u8> EVENTS_SAMPLERDY_W<'a, O> {
#[doc = "Event not generated"]
#[inline(always)]
pub fn not_generated(self) -> &'a mut W {
self.variant(EVENTS_SAMPLERDY_A::NOT_GENERATED)
}
#[doc = "Event generated"]
#[inline(always)]
pub fn generated(self) -> &'a mut W {
self.variant(EVENTS_SAMPLERDY_A::GENERATED)
}
}
impl R {
#[doc = "Bit 0 - Event being generated for every new sample value written to the SAMPLE register"]
#[inline(always)]
pub fn events_samplerdy(&self) -> EVENTS_SAMPLERDY_R {
EVENTS_SAMPLERDY_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Event being generated for every new sample value written to the SAMPLE register"]
#[inline(always)]
pub fn events_samplerdy(&mut self) -> EVENTS_SAMPLERDY_W<0> {
EVENTS_SAMPLERDY_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 = "Event being generated for every new sample value written to the SAMPLE 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 [events_samplerdy](index.html) module"]
pub struct EVENTS_SAMPLERDY_SPEC;
impl crate::RegisterSpec for EVENTS_SAMPLERDY_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_samplerdy::R](R) reader structure"]
impl crate::Readable for EVENTS_SAMPLERDY_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_samplerdy::W](W) writer structure"]
impl crate::Writable for EVENTS_SAMPLERDY_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_SAMPLERDY to value 0"]
impl crate::Resettable for EVENTS_SAMPLERDY_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+127
View File
@@ -0,0 +1,127 @@
#[doc = "Register `EVENTS_STOPPED` reader"]
pub struct R(crate::R<EVENTS_STOPPED_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_STOPPED_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_STOPPED_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_STOPPED_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_STOPPED` writer"]
pub struct W(crate::W<EVENTS_STOPPED_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_STOPPED_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_STOPPED_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_STOPPED_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `EVENTS_STOPPED` reader - QDEC has been stopped"]
pub type EVENTS_STOPPED_R = crate::BitReader<EVENTS_STOPPED_A>;
#[doc = "QDEC has been stopped\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EVENTS_STOPPED_A {
#[doc = "0: Event not generated"]
NOT_GENERATED = 0,
#[doc = "1: Event generated"]
GENERATED = 1,
}
impl From<EVENTS_STOPPED_A> for bool {
#[inline(always)]
fn from(variant: EVENTS_STOPPED_A) -> Self {
variant as u8 != 0
}
}
impl EVENTS_STOPPED_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EVENTS_STOPPED_A {
match self.bits {
false => EVENTS_STOPPED_A::NOT_GENERATED,
true => EVENTS_STOPPED_A::GENERATED,
}
}
#[doc = "Checks if the value of the field is `NOT_GENERATED`"]
#[inline(always)]
pub fn is_not_generated(&self) -> bool {
*self == EVENTS_STOPPED_A::NOT_GENERATED
}
#[doc = "Checks if the value of the field is `GENERATED`"]
#[inline(always)]
pub fn is_generated(&self) -> bool {
*self == EVENTS_STOPPED_A::GENERATED
}
}
#[doc = "Field `EVENTS_STOPPED` writer - QDEC has been stopped"]
pub type EVENTS_STOPPED_W<'a, const O: u8> =
crate::BitWriter<'a, u32, EVENTS_STOPPED_SPEC, EVENTS_STOPPED_A, O>;
impl<'a, const O: u8> EVENTS_STOPPED_W<'a, O> {
#[doc = "Event not generated"]
#[inline(always)]
pub fn not_generated(self) -> &'a mut W {
self.variant(EVENTS_STOPPED_A::NOT_GENERATED)
}
#[doc = "Event generated"]
#[inline(always)]
pub fn generated(self) -> &'a mut W {
self.variant(EVENTS_STOPPED_A::GENERATED)
}
}
impl R {
#[doc = "Bit 0 - QDEC has been stopped"]
#[inline(always)]
pub fn events_stopped(&self) -> EVENTS_STOPPED_R {
EVENTS_STOPPED_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - QDEC has been stopped"]
#[inline(always)]
pub fn events_stopped(&mut self) -> EVENTS_STOPPED_W<0> {
EVENTS_STOPPED_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 = "QDEC has been stopped\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_stopped](index.html) module"]
pub struct EVENTS_STOPPED_SPEC;
impl crate::RegisterSpec for EVENTS_STOPPED_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_stopped::R](R) reader structure"]
impl crate::Readable for EVENTS_STOPPED_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_stopped::W](W) writer structure"]
impl crate::Writable for EVENTS_STOPPED_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_STOPPED to value 0"]
impl crate::Resettable for EVENTS_STOPPED_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+401
View File
@@ -0,0 +1,401 @@
#[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 `SAMPLERDY` reader - Write '1' to disable interrupt for event SAMPLERDY"]
pub type SAMPLERDY_R = crate::BitReader<SAMPLERDY_A>;
#[doc = "Write '1' to disable interrupt for event SAMPLERDY\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SAMPLERDY_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<SAMPLERDY_A> for bool {
#[inline(always)]
fn from(variant: SAMPLERDY_A) -> Self {
variant as u8 != 0
}
}
impl SAMPLERDY_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> SAMPLERDY_A {
match self.bits {
false => SAMPLERDY_A::DISABLED,
true => SAMPLERDY_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == SAMPLERDY_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == SAMPLERDY_A::ENABLED
}
}
#[doc = "Write '1' to disable interrupt for event SAMPLERDY\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SAMPLERDY_AW {
#[doc = "1: Disable"]
CLEAR = 1,
}
impl From<SAMPLERDY_AW> for bool {
#[inline(always)]
fn from(variant: SAMPLERDY_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `SAMPLERDY` writer - Write '1' to disable interrupt for event SAMPLERDY"]
pub type SAMPLERDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, SAMPLERDY_AW, O>;
impl<'a, const O: u8> SAMPLERDY_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(SAMPLERDY_AW::CLEAR)
}
}
#[doc = "Field `REPORTRDY` reader - Write '1' to disable interrupt for event REPORTRDY"]
pub type REPORTRDY_R = crate::BitReader<REPORTRDY_A>;
#[doc = "Write '1' to disable interrupt for event REPORTRDY\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum REPORTRDY_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<REPORTRDY_A> for bool {
#[inline(always)]
fn from(variant: REPORTRDY_A) -> Self {
variant as u8 != 0
}
}
impl REPORTRDY_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> REPORTRDY_A {
match self.bits {
false => REPORTRDY_A::DISABLED,
true => REPORTRDY_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == REPORTRDY_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == REPORTRDY_A::ENABLED
}
}
#[doc = "Write '1' to disable interrupt for event REPORTRDY\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum REPORTRDY_AW {
#[doc = "1: Disable"]
CLEAR = 1,
}
impl From<REPORTRDY_AW> for bool {
#[inline(always)]
fn from(variant: REPORTRDY_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `REPORTRDY` writer - Write '1' to disable interrupt for event REPORTRDY"]
pub type REPORTRDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, REPORTRDY_AW, O>;
impl<'a, const O: u8> REPORTRDY_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(REPORTRDY_AW::CLEAR)
}
}
#[doc = "Field `ACCOF` reader - Write '1' to disable interrupt for event ACCOF"]
pub type ACCOF_R = crate::BitReader<ACCOF_A>;
#[doc = "Write '1' to disable interrupt for event ACCOF\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ACCOF_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<ACCOF_A> for bool {
#[inline(always)]
fn from(variant: ACCOF_A) -> Self {
variant as u8 != 0
}
}
impl ACCOF_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ACCOF_A {
match self.bits {
false => ACCOF_A::DISABLED,
true => ACCOF_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ACCOF_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ACCOF_A::ENABLED
}
}
#[doc = "Write '1' to disable interrupt for event ACCOF\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ACCOF_AW {
#[doc = "1: Disable"]
CLEAR = 1,
}
impl From<ACCOF_AW> for bool {
#[inline(always)]
fn from(variant: ACCOF_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `ACCOF` writer - Write '1' to disable interrupt for event ACCOF"]
pub type ACCOF_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, ACCOF_AW, O>;
impl<'a, const O: u8> ACCOF_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(ACCOF_AW::CLEAR)
}
}
#[doc = "Field `DBLRDY` reader - Write '1' to disable interrupt for event DBLRDY"]
pub type DBLRDY_R = crate::BitReader<DBLRDY_A>;
#[doc = "Write '1' to disable interrupt for event DBLRDY\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DBLRDY_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<DBLRDY_A> for bool {
#[inline(always)]
fn from(variant: DBLRDY_A) -> Self {
variant as u8 != 0
}
}
impl DBLRDY_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> DBLRDY_A {
match self.bits {
false => DBLRDY_A::DISABLED,
true => DBLRDY_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == DBLRDY_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == DBLRDY_A::ENABLED
}
}
#[doc = "Write '1' to disable interrupt for event DBLRDY\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DBLRDY_AW {
#[doc = "1: Disable"]
CLEAR = 1,
}
impl From<DBLRDY_AW> for bool {
#[inline(always)]
fn from(variant: DBLRDY_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `DBLRDY` writer - Write '1' to disable interrupt for event DBLRDY"]
pub type DBLRDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, DBLRDY_AW, O>;
impl<'a, const O: u8> DBLRDY_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(DBLRDY_AW::CLEAR)
}
}
#[doc = "Field `STOPPED` reader - Write '1' to disable interrupt for event STOPPED"]
pub type STOPPED_R = crate::BitReader<STOPPED_A>;
#[doc = "Write '1' to disable interrupt for event STOPPED\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum STOPPED_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<STOPPED_A> for bool {
#[inline(always)]
fn from(variant: STOPPED_A) -> Self {
variant as u8 != 0
}
}
impl STOPPED_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> STOPPED_A {
match self.bits {
false => STOPPED_A::DISABLED,
true => STOPPED_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == STOPPED_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == STOPPED_A::ENABLED
}
}
#[doc = "Write '1' to disable interrupt for event STOPPED\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum STOPPED_AW {
#[doc = "1: Disable"]
CLEAR = 1,
}
impl From<STOPPED_AW> for bool {
#[inline(always)]
fn from(variant: STOPPED_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `STOPPED` writer - Write '1' to disable interrupt for event STOPPED"]
pub type STOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, STOPPED_AW, O>;
impl<'a, const O: u8> STOPPED_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(STOPPED_AW::CLEAR)
}
}
impl R {
#[doc = "Bit 0 - Write '1' to disable interrupt for event SAMPLERDY"]
#[inline(always)]
pub fn samplerdy(&self) -> SAMPLERDY_R {
SAMPLERDY_R::new((self.bits & 1) != 0)
}
#[doc = "Bit 1 - Write '1' to disable interrupt for event REPORTRDY"]
#[inline(always)]
pub fn reportrdy(&self) -> REPORTRDY_R {
REPORTRDY_R::new(((self.bits >> 1) & 1) != 0)
}
#[doc = "Bit 2 - Write '1' to disable interrupt for event ACCOF"]
#[inline(always)]
pub fn accof(&self) -> ACCOF_R {
ACCOF_R::new(((self.bits >> 2) & 1) != 0)
}
#[doc = "Bit 3 - Write '1' to disable interrupt for event DBLRDY"]
#[inline(always)]
pub fn dblrdy(&self) -> DBLRDY_R {
DBLRDY_R::new(((self.bits >> 3) & 1) != 0)
}
#[doc = "Bit 4 - Write '1' to disable interrupt for event STOPPED"]
#[inline(always)]
pub fn stopped(&self) -> STOPPED_R {
STOPPED_R::new(((self.bits >> 4) & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Write '1' to disable interrupt for event SAMPLERDY"]
#[inline(always)]
pub fn samplerdy(&mut self) -> SAMPLERDY_W<0> {
SAMPLERDY_W::new(self)
}
#[doc = "Bit 1 - Write '1' to disable interrupt for event REPORTRDY"]
#[inline(always)]
pub fn reportrdy(&mut self) -> REPORTRDY_W<1> {
REPORTRDY_W::new(self)
}
#[doc = "Bit 2 - Write '1' to disable interrupt for event ACCOF"]
#[inline(always)]
pub fn accof(&mut self) -> ACCOF_W<2> {
ACCOF_W::new(self)
}
#[doc = "Bit 3 - Write '1' to disable interrupt for event DBLRDY"]
#[inline(always)]
pub fn dblrdy(&mut self) -> DBLRDY_W<3> {
DBLRDY_W::new(self)
}
#[doc = "Bit 4 - Write '1' to disable interrupt for event STOPPED"]
#[inline(always)]
pub fn stopped(&mut self) -> STOPPED_W<4> {
STOPPED_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
}
}
+401
View File
@@ -0,0 +1,401 @@
#[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 `SAMPLERDY` reader - Write '1' to enable interrupt for event SAMPLERDY"]
pub type SAMPLERDY_R = crate::BitReader<SAMPLERDY_A>;
#[doc = "Write '1' to enable interrupt for event SAMPLERDY\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SAMPLERDY_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<SAMPLERDY_A> for bool {
#[inline(always)]
fn from(variant: SAMPLERDY_A) -> Self {
variant as u8 != 0
}
}
impl SAMPLERDY_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> SAMPLERDY_A {
match self.bits {
false => SAMPLERDY_A::DISABLED,
true => SAMPLERDY_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == SAMPLERDY_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == SAMPLERDY_A::ENABLED
}
}
#[doc = "Write '1' to enable interrupt for event SAMPLERDY\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SAMPLERDY_AW {
#[doc = "1: Enable"]
SET = 1,
}
impl From<SAMPLERDY_AW> for bool {
#[inline(always)]
fn from(variant: SAMPLERDY_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `SAMPLERDY` writer - Write '1' to enable interrupt for event SAMPLERDY"]
pub type SAMPLERDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, SAMPLERDY_AW, O>;
impl<'a, const O: u8> SAMPLERDY_W<'a, O> {
#[doc = "Enable"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(SAMPLERDY_AW::SET)
}
}
#[doc = "Field `REPORTRDY` reader - Write '1' to enable interrupt for event REPORTRDY"]
pub type REPORTRDY_R = crate::BitReader<REPORTRDY_A>;
#[doc = "Write '1' to enable interrupt for event REPORTRDY\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum REPORTRDY_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<REPORTRDY_A> for bool {
#[inline(always)]
fn from(variant: REPORTRDY_A) -> Self {
variant as u8 != 0
}
}
impl REPORTRDY_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> REPORTRDY_A {
match self.bits {
false => REPORTRDY_A::DISABLED,
true => REPORTRDY_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == REPORTRDY_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == REPORTRDY_A::ENABLED
}
}
#[doc = "Write '1' to enable interrupt for event REPORTRDY\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum REPORTRDY_AW {
#[doc = "1: Enable"]
SET = 1,
}
impl From<REPORTRDY_AW> for bool {
#[inline(always)]
fn from(variant: REPORTRDY_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `REPORTRDY` writer - Write '1' to enable interrupt for event REPORTRDY"]
pub type REPORTRDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, REPORTRDY_AW, O>;
impl<'a, const O: u8> REPORTRDY_W<'a, O> {
#[doc = "Enable"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(REPORTRDY_AW::SET)
}
}
#[doc = "Field `ACCOF` reader - Write '1' to enable interrupt for event ACCOF"]
pub type ACCOF_R = crate::BitReader<ACCOF_A>;
#[doc = "Write '1' to enable interrupt for event ACCOF\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ACCOF_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<ACCOF_A> for bool {
#[inline(always)]
fn from(variant: ACCOF_A) -> Self {
variant as u8 != 0
}
}
impl ACCOF_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ACCOF_A {
match self.bits {
false => ACCOF_A::DISABLED,
true => ACCOF_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ACCOF_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ACCOF_A::ENABLED
}
}
#[doc = "Write '1' to enable interrupt for event ACCOF\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ACCOF_AW {
#[doc = "1: Enable"]
SET = 1,
}
impl From<ACCOF_AW> for bool {
#[inline(always)]
fn from(variant: ACCOF_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `ACCOF` writer - Write '1' to enable interrupt for event ACCOF"]
pub type ACCOF_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, ACCOF_AW, O>;
impl<'a, const O: u8> ACCOF_W<'a, O> {
#[doc = "Enable"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(ACCOF_AW::SET)
}
}
#[doc = "Field `DBLRDY` reader - Write '1' to enable interrupt for event DBLRDY"]
pub type DBLRDY_R = crate::BitReader<DBLRDY_A>;
#[doc = "Write '1' to enable interrupt for event DBLRDY\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DBLRDY_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<DBLRDY_A> for bool {
#[inline(always)]
fn from(variant: DBLRDY_A) -> Self {
variant as u8 != 0
}
}
impl DBLRDY_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> DBLRDY_A {
match self.bits {
false => DBLRDY_A::DISABLED,
true => DBLRDY_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == DBLRDY_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == DBLRDY_A::ENABLED
}
}
#[doc = "Write '1' to enable interrupt for event DBLRDY\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DBLRDY_AW {
#[doc = "1: Enable"]
SET = 1,
}
impl From<DBLRDY_AW> for bool {
#[inline(always)]
fn from(variant: DBLRDY_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `DBLRDY` writer - Write '1' to enable interrupt for event DBLRDY"]
pub type DBLRDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, DBLRDY_AW, O>;
impl<'a, const O: u8> DBLRDY_W<'a, O> {
#[doc = "Enable"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(DBLRDY_AW::SET)
}
}
#[doc = "Field `STOPPED` reader - Write '1' to enable interrupt for event STOPPED"]
pub type STOPPED_R = crate::BitReader<STOPPED_A>;
#[doc = "Write '1' to enable interrupt for event STOPPED\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum STOPPED_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<STOPPED_A> for bool {
#[inline(always)]
fn from(variant: STOPPED_A) -> Self {
variant as u8 != 0
}
}
impl STOPPED_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> STOPPED_A {
match self.bits {
false => STOPPED_A::DISABLED,
true => STOPPED_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == STOPPED_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == STOPPED_A::ENABLED
}
}
#[doc = "Write '1' to enable interrupt for event STOPPED\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum STOPPED_AW {
#[doc = "1: Enable"]
SET = 1,
}
impl From<STOPPED_AW> for bool {
#[inline(always)]
fn from(variant: STOPPED_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `STOPPED` writer - Write '1' to enable interrupt for event STOPPED"]
pub type STOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, STOPPED_AW, O>;
impl<'a, const O: u8> STOPPED_W<'a, O> {
#[doc = "Enable"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(STOPPED_AW::SET)
}
}
impl R {
#[doc = "Bit 0 - Write '1' to enable interrupt for event SAMPLERDY"]
#[inline(always)]
pub fn samplerdy(&self) -> SAMPLERDY_R {
SAMPLERDY_R::new((self.bits & 1) != 0)
}
#[doc = "Bit 1 - Write '1' to enable interrupt for event REPORTRDY"]
#[inline(always)]
pub fn reportrdy(&self) -> REPORTRDY_R {
REPORTRDY_R::new(((self.bits >> 1) & 1) != 0)
}
#[doc = "Bit 2 - Write '1' to enable interrupt for event ACCOF"]
#[inline(always)]
pub fn accof(&self) -> ACCOF_R {
ACCOF_R::new(((self.bits >> 2) & 1) != 0)
}
#[doc = "Bit 3 - Write '1' to enable interrupt for event DBLRDY"]
#[inline(always)]
pub fn dblrdy(&self) -> DBLRDY_R {
DBLRDY_R::new(((self.bits >> 3) & 1) != 0)
}
#[doc = "Bit 4 - Write '1' to enable interrupt for event STOPPED"]
#[inline(always)]
pub fn stopped(&self) -> STOPPED_R {
STOPPED_R::new(((self.bits >> 4) & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Write '1' to enable interrupt for event SAMPLERDY"]
#[inline(always)]
pub fn samplerdy(&mut self) -> SAMPLERDY_W<0> {
SAMPLERDY_W::new(self)
}
#[doc = "Bit 1 - Write '1' to enable interrupt for event REPORTRDY"]
#[inline(always)]
pub fn reportrdy(&mut self) -> REPORTRDY_W<1> {
REPORTRDY_W::new(self)
}
#[doc = "Bit 2 - Write '1' to enable interrupt for event ACCOF"]
#[inline(always)]
pub fn accof(&mut self) -> ACCOF_W<2> {
ACCOF_W::new(self)
}
#[doc = "Bit 3 - Write '1' to enable interrupt for event DBLRDY"]
#[inline(always)]
pub fn dblrdy(&mut self) -> DBLRDY_W<3> {
DBLRDY_W::new(self)
}
#[doc = "Bit 4 - Write '1' to enable interrupt for event STOPPED"]
#[inline(always)]
pub fn stopped(&mut self) -> STOPPED_W<4> {
STOPPED_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
}
}
+126
View File
@@ -0,0 +1,126 @@
#[doc = "Register `LEDPOL` reader"]
pub struct R(crate::R<LEDPOL_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<LEDPOL_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<LEDPOL_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<LEDPOL_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `LEDPOL` writer"]
pub struct W(crate::W<LEDPOL_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<LEDPOL_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<LEDPOL_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<LEDPOL_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `LEDPOL` reader - LED output pin polarity"]
pub type LEDPOL_R = crate::BitReader<LEDPOL_A>;
#[doc = "LED output pin polarity\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum LEDPOL_A {
#[doc = "0: Led active on output pin low"]
ACTIVE_LOW = 0,
#[doc = "1: Led active on output pin high"]
ACTIVE_HIGH = 1,
}
impl From<LEDPOL_A> for bool {
#[inline(always)]
fn from(variant: LEDPOL_A) -> Self {
variant as u8 != 0
}
}
impl LEDPOL_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> LEDPOL_A {
match self.bits {
false => LEDPOL_A::ACTIVE_LOW,
true => LEDPOL_A::ACTIVE_HIGH,
}
}
#[doc = "Checks if the value of the field is `ACTIVE_LOW`"]
#[inline(always)]
pub fn is_active_low(&self) -> bool {
*self == LEDPOL_A::ACTIVE_LOW
}
#[doc = "Checks if the value of the field is `ACTIVE_HIGH`"]
#[inline(always)]
pub fn is_active_high(&self) -> bool {
*self == LEDPOL_A::ACTIVE_HIGH
}
}
#[doc = "Field `LEDPOL` writer - LED output pin polarity"]
pub type LEDPOL_W<'a, const O: u8> = crate::BitWriter<'a, u32, LEDPOL_SPEC, LEDPOL_A, O>;
impl<'a, const O: u8> LEDPOL_W<'a, O> {
#[doc = "Led active on output pin low"]
#[inline(always)]
pub fn active_low(self) -> &'a mut W {
self.variant(LEDPOL_A::ACTIVE_LOW)
}
#[doc = "Led active on output pin high"]
#[inline(always)]
pub fn active_high(self) -> &'a mut W {
self.variant(LEDPOL_A::ACTIVE_HIGH)
}
}
impl R {
#[doc = "Bit 0 - LED output pin polarity"]
#[inline(always)]
pub fn ledpol(&self) -> LEDPOL_R {
LEDPOL_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - LED output pin polarity"]
#[inline(always)]
pub fn ledpol(&mut self) -> LEDPOL_W<0> {
LEDPOL_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 = "LED output pin polarity\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 [ledpol](index.html) module"]
pub struct LEDPOL_SPEC;
impl crate::RegisterSpec for LEDPOL_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [ledpol::R](R) reader structure"]
impl crate::Readable for LEDPOL_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [ledpol::W](W) writer structure"]
impl crate::Writable for LEDPOL_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets LEDPOL to value 0"]
impl crate::Resettable for LEDPOL_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+80
View File
@@ -0,0 +1,80 @@
#[doc = "Register `LEDPRE` reader"]
pub struct R(crate::R<LEDPRE_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<LEDPRE_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<LEDPRE_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<LEDPRE_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `LEDPRE` writer"]
pub struct W(crate::W<LEDPRE_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<LEDPRE_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<LEDPRE_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<LEDPRE_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `LEDPRE` reader - Period in us the LED is switched on prior to sampling"]
pub type LEDPRE_R = crate::FieldReader<u16, u16>;
#[doc = "Field `LEDPRE` writer - Period in us the LED is switched on prior to sampling"]
pub type LEDPRE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, LEDPRE_SPEC, u16, u16, 9, O>;
impl R {
#[doc = "Bits 0:8 - Period in us the LED is switched on prior to sampling"]
#[inline(always)]
pub fn ledpre(&self) -> LEDPRE_R {
LEDPRE_R::new((self.bits & 0x01ff) as u16)
}
}
impl W {
#[doc = "Bits 0:8 - Period in us the LED is switched on prior to sampling"]
#[inline(always)]
pub fn ledpre(&mut self) -> LEDPRE_W<0> {
LEDPRE_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 = "Time period the LED is switched ON prior to sampling\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 [ledpre](index.html) module"]
pub struct LEDPRE_SPEC;
impl crate::RegisterSpec for LEDPRE_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [ledpre::R](R) reader structure"]
impl crate::Readable for LEDPRE_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [ledpre::W](W) writer structure"]
impl crate::Writable for LEDPRE_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets LEDPRE to value 0x10"]
impl crate::Resettable for LEDPRE_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0x10
}
}
+22
View File
@@ -0,0 +1,22 @@
#[doc = r"Register block"]
#[repr(C)]
pub struct PSEL {
#[doc = "0x00 - Pin select for LED signal"]
pub led: LED,
#[doc = "0x04 - Pin select for A signal"]
pub a: A,
#[doc = "0x08 - Pin select for B signal"]
pub b: B,
}
#[doc = "LED (rw) register accessor: an alias for `Reg<LED_SPEC>`"]
pub type LED = crate::Reg<led::LED_SPEC>;
#[doc = "Pin select for LED signal"]
pub mod led;
#[doc = "A (rw) register accessor: an alias for `Reg<A_SPEC>`"]
pub type A = crate::Reg<a::A_SPEC>;
#[doc = "Pin select for A signal"]
pub mod a;
#[doc = "B (rw) register accessor: an alias for `Reg<B_SPEC>`"]
pub type B = crate::Reg<b::B_SPEC>;
#[doc = "Pin select for B signal"]
pub mod b;
+154
View File
@@ -0,0 +1,154 @@
#[doc = "Register `A` reader"]
pub struct R(crate::R<A_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<A_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<A_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<A_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `A` writer"]
pub struct W(crate::W<A_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<A_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<A_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<A_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `PIN` reader - Pin number"]
pub type PIN_R = crate::FieldReader<u8, u8>;
#[doc = "Field `PIN` writer - Pin number"]
pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, A_SPEC, u8, u8, 5, O>;
#[doc = "Field `PORT` reader - Port number"]
pub type PORT_R = crate::BitReader<bool>;
#[doc = "Field `PORT` writer - Port number"]
pub type PORT_W<'a, const O: u8> = crate::BitWriter<'a, u32, A_SPEC, bool, O>;
#[doc = "Field `CONNECT` reader - Connection"]
pub type CONNECT_R = crate::BitReader<CONNECT_A>;
#[doc = "Connection\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CONNECT_A {
#[doc = "1: Disconnect"]
DISCONNECTED = 1,
#[doc = "0: Connect"]
CONNECTED = 0,
}
impl From<CONNECT_A> for bool {
#[inline(always)]
fn from(variant: CONNECT_A) -> Self {
variant as u8 != 0
}
}
impl CONNECT_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> CONNECT_A {
match self.bits {
true => CONNECT_A::DISCONNECTED,
false => CONNECT_A::CONNECTED,
}
}
#[doc = "Checks if the value of the field is `DISCONNECTED`"]
#[inline(always)]
pub fn is_disconnected(&self) -> bool {
*self == CONNECT_A::DISCONNECTED
}
#[doc = "Checks if the value of the field is `CONNECTED`"]
#[inline(always)]
pub fn is_connected(&self) -> bool {
*self == CONNECT_A::CONNECTED
}
}
#[doc = "Field `CONNECT` writer - Connection"]
pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, A_SPEC, CONNECT_A, O>;
impl<'a, const O: u8> CONNECT_W<'a, O> {
#[doc = "Disconnect"]
#[inline(always)]
pub fn disconnected(self) -> &'a mut W {
self.variant(CONNECT_A::DISCONNECTED)
}
#[doc = "Connect"]
#[inline(always)]
pub fn connected(self) -> &'a mut W {
self.variant(CONNECT_A::CONNECTED)
}
}
impl R {
#[doc = "Bits 0:4 - Pin number"]
#[inline(always)]
pub fn pin(&self) -> PIN_R {
PIN_R::new((self.bits & 0x1f) as u8)
}
#[doc = "Bit 5 - Port number"]
#[inline(always)]
pub fn port(&self) -> PORT_R {
PORT_R::new(((self.bits >> 5) & 1) != 0)
}
#[doc = "Bit 31 - Connection"]
#[inline(always)]
pub fn connect(&self) -> CONNECT_R {
CONNECT_R::new(((self.bits >> 31) & 1) != 0)
}
}
impl W {
#[doc = "Bits 0:4 - Pin number"]
#[inline(always)]
pub fn pin(&mut self) -> PIN_W<0> {
PIN_W::new(self)
}
#[doc = "Bit 5 - Port number"]
#[inline(always)]
pub fn port(&mut self) -> PORT_W<5> {
PORT_W::new(self)
}
#[doc = "Bit 31 - Connection"]
#[inline(always)]
pub fn connect(&mut self) -> CONNECT_W<31> {
CONNECT_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 = "Pin select for A signal\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 [a](index.html) module"]
pub struct A_SPEC;
impl crate::RegisterSpec for A_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [a::R](R) reader structure"]
impl crate::Readable for A_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [a::W](W) writer structure"]
impl crate::Writable for A_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets A to value 0xffff_ffff"]
impl crate::Resettable for A_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0xffff_ffff
}
}
+154
View File
@@ -0,0 +1,154 @@
#[doc = "Register `B` reader"]
pub struct R(crate::R<B_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<B_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<B_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<B_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `B` writer"]
pub struct W(crate::W<B_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<B_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<B_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<B_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `PIN` reader - Pin number"]
pub type PIN_R = crate::FieldReader<u8, u8>;
#[doc = "Field `PIN` writer - Pin number"]
pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, B_SPEC, u8, u8, 5, O>;
#[doc = "Field `PORT` reader - Port number"]
pub type PORT_R = crate::BitReader<bool>;
#[doc = "Field `PORT` writer - Port number"]
pub type PORT_W<'a, const O: u8> = crate::BitWriter<'a, u32, B_SPEC, bool, O>;
#[doc = "Field `CONNECT` reader - Connection"]
pub type CONNECT_R = crate::BitReader<CONNECT_A>;
#[doc = "Connection\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CONNECT_A {
#[doc = "1: Disconnect"]
DISCONNECTED = 1,
#[doc = "0: Connect"]
CONNECTED = 0,
}
impl From<CONNECT_A> for bool {
#[inline(always)]
fn from(variant: CONNECT_A) -> Self {
variant as u8 != 0
}
}
impl CONNECT_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> CONNECT_A {
match self.bits {
true => CONNECT_A::DISCONNECTED,
false => CONNECT_A::CONNECTED,
}
}
#[doc = "Checks if the value of the field is `DISCONNECTED`"]
#[inline(always)]
pub fn is_disconnected(&self) -> bool {
*self == CONNECT_A::DISCONNECTED
}
#[doc = "Checks if the value of the field is `CONNECTED`"]
#[inline(always)]
pub fn is_connected(&self) -> bool {
*self == CONNECT_A::CONNECTED
}
}
#[doc = "Field `CONNECT` writer - Connection"]
pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, B_SPEC, CONNECT_A, O>;
impl<'a, const O: u8> CONNECT_W<'a, O> {
#[doc = "Disconnect"]
#[inline(always)]
pub fn disconnected(self) -> &'a mut W {
self.variant(CONNECT_A::DISCONNECTED)
}
#[doc = "Connect"]
#[inline(always)]
pub fn connected(self) -> &'a mut W {
self.variant(CONNECT_A::CONNECTED)
}
}
impl R {
#[doc = "Bits 0:4 - Pin number"]
#[inline(always)]
pub fn pin(&self) -> PIN_R {
PIN_R::new((self.bits & 0x1f) as u8)
}
#[doc = "Bit 5 - Port number"]
#[inline(always)]
pub fn port(&self) -> PORT_R {
PORT_R::new(((self.bits >> 5) & 1) != 0)
}
#[doc = "Bit 31 - Connection"]
#[inline(always)]
pub fn connect(&self) -> CONNECT_R {
CONNECT_R::new(((self.bits >> 31) & 1) != 0)
}
}
impl W {
#[doc = "Bits 0:4 - Pin number"]
#[inline(always)]
pub fn pin(&mut self) -> PIN_W<0> {
PIN_W::new(self)
}
#[doc = "Bit 5 - Port number"]
#[inline(always)]
pub fn port(&mut self) -> PORT_W<5> {
PORT_W::new(self)
}
#[doc = "Bit 31 - Connection"]
#[inline(always)]
pub fn connect(&mut self) -> CONNECT_W<31> {
CONNECT_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 = "Pin select for B signal\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 [b](index.html) module"]
pub struct B_SPEC;
impl crate::RegisterSpec for B_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [b::R](R) reader structure"]
impl crate::Readable for B_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [b::W](W) writer structure"]
impl crate::Writable for B_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets B to value 0xffff_ffff"]
impl crate::Resettable for B_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0xffff_ffff
}
}
+154
View File
@@ -0,0 +1,154 @@
#[doc = "Register `LED` reader"]
pub struct R(crate::R<LED_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<LED_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<LED_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<LED_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `LED` writer"]
pub struct W(crate::W<LED_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<LED_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<LED_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<LED_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `PIN` reader - Pin number"]
pub type PIN_R = crate::FieldReader<u8, u8>;
#[doc = "Field `PIN` writer - Pin number"]
pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, LED_SPEC, u8, u8, 5, O>;
#[doc = "Field `PORT` reader - Port number"]
pub type PORT_R = crate::BitReader<bool>;
#[doc = "Field `PORT` writer - Port number"]
pub type PORT_W<'a, const O: u8> = crate::BitWriter<'a, u32, LED_SPEC, bool, O>;
#[doc = "Field `CONNECT` reader - Connection"]
pub type CONNECT_R = crate::BitReader<CONNECT_A>;
#[doc = "Connection\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CONNECT_A {
#[doc = "1: Disconnect"]
DISCONNECTED = 1,
#[doc = "0: Connect"]
CONNECTED = 0,
}
impl From<CONNECT_A> for bool {
#[inline(always)]
fn from(variant: CONNECT_A) -> Self {
variant as u8 != 0
}
}
impl CONNECT_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> CONNECT_A {
match self.bits {
true => CONNECT_A::DISCONNECTED,
false => CONNECT_A::CONNECTED,
}
}
#[doc = "Checks if the value of the field is `DISCONNECTED`"]
#[inline(always)]
pub fn is_disconnected(&self) -> bool {
*self == CONNECT_A::DISCONNECTED
}
#[doc = "Checks if the value of the field is `CONNECTED`"]
#[inline(always)]
pub fn is_connected(&self) -> bool {
*self == CONNECT_A::CONNECTED
}
}
#[doc = "Field `CONNECT` writer - Connection"]
pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, LED_SPEC, CONNECT_A, O>;
impl<'a, const O: u8> CONNECT_W<'a, O> {
#[doc = "Disconnect"]
#[inline(always)]
pub fn disconnected(self) -> &'a mut W {
self.variant(CONNECT_A::DISCONNECTED)
}
#[doc = "Connect"]
#[inline(always)]
pub fn connected(self) -> &'a mut W {
self.variant(CONNECT_A::CONNECTED)
}
}
impl R {
#[doc = "Bits 0:4 - Pin number"]
#[inline(always)]
pub fn pin(&self) -> PIN_R {
PIN_R::new((self.bits & 0x1f) as u8)
}
#[doc = "Bit 5 - Port number"]
#[inline(always)]
pub fn port(&self) -> PORT_R {
PORT_R::new(((self.bits >> 5) & 1) != 0)
}
#[doc = "Bit 31 - Connection"]
#[inline(always)]
pub fn connect(&self) -> CONNECT_R {
CONNECT_R::new(((self.bits >> 31) & 1) != 0)
}
}
impl W {
#[doc = "Bits 0:4 - Pin number"]
#[inline(always)]
pub fn pin(&mut self) -> PIN_W<0> {
PIN_W::new(self)
}
#[doc = "Bit 5 - Port number"]
#[inline(always)]
pub fn port(&mut self) -> PORT_W<5> {
PORT_W::new(self)
}
#[doc = "Bit 31 - Connection"]
#[inline(always)]
pub fn connect(&mut self) -> CONNECT_W<31> {
CONNECT_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 = "Pin select for LED signal\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 [led](index.html) module"]
pub struct LED_SPEC;
impl crate::RegisterSpec for LED_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [led::R](R) reader structure"]
impl crate::Readable for LED_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [led::W](W) writer structure"]
impl crate::Writable for LED_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets LED to value 0xffff_ffff"]
impl crate::Resettable for LED_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0xffff_ffff
}
}
+220
View File
@@ -0,0 +1,220 @@
#[doc = "Register `REPORTPER` reader"]
pub struct R(crate::R<REPORTPER_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<REPORTPER_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<REPORTPER_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<REPORTPER_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `REPORTPER` writer"]
pub struct W(crate::W<REPORTPER_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<REPORTPER_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<REPORTPER_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<REPORTPER_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `REPORTPER` reader - Specifies the number of samples to be accumulated in the ACC register before the REPORTRDY and DBLRDY events can be generated"]
pub type REPORTPER_R = crate::FieldReader<u8, REPORTPER_A>;
#[doc = "Specifies the number of samples to be accumulated in the ACC register before the REPORTRDY and DBLRDY events can be generated\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum REPORTPER_A {
#[doc = "0: 10 samples / report"]
_10SMPL = 0,
#[doc = "1: 40 samples / report"]
_40SMPL = 1,
#[doc = "2: 80 samples / report"]
_80SMPL = 2,
#[doc = "3: 120 samples / report"]
_120SMPL = 3,
#[doc = "4: 160 samples / report"]
_160SMPL = 4,
#[doc = "5: 200 samples / report"]
_200SMPL = 5,
#[doc = "6: 240 samples / report"]
_240SMPL = 6,
#[doc = "7: 280 samples / report"]
_280SMPL = 7,
#[doc = "8: 1 sample / report"]
_1SMPL = 8,
}
impl From<REPORTPER_A> for u8 {
#[inline(always)]
fn from(variant: REPORTPER_A) -> Self {
variant as _
}
}
impl REPORTPER_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> Option<REPORTPER_A> {
match self.bits {
0 => Some(REPORTPER_A::_10SMPL),
1 => Some(REPORTPER_A::_40SMPL),
2 => Some(REPORTPER_A::_80SMPL),
3 => Some(REPORTPER_A::_120SMPL),
4 => Some(REPORTPER_A::_160SMPL),
5 => Some(REPORTPER_A::_200SMPL),
6 => Some(REPORTPER_A::_240SMPL),
7 => Some(REPORTPER_A::_280SMPL),
8 => Some(REPORTPER_A::_1SMPL),
_ => None,
}
}
#[doc = "Checks if the value of the field is `_10SMPL`"]
#[inline(always)]
pub fn is_10smpl(&self) -> bool {
*self == REPORTPER_A::_10SMPL
}
#[doc = "Checks if the value of the field is `_40SMPL`"]
#[inline(always)]
pub fn is_40smpl(&self) -> bool {
*self == REPORTPER_A::_40SMPL
}
#[doc = "Checks if the value of the field is `_80SMPL`"]
#[inline(always)]
pub fn is_80smpl(&self) -> bool {
*self == REPORTPER_A::_80SMPL
}
#[doc = "Checks if the value of the field is `_120SMPL`"]
#[inline(always)]
pub fn is_120smpl(&self) -> bool {
*self == REPORTPER_A::_120SMPL
}
#[doc = "Checks if the value of the field is `_160SMPL`"]
#[inline(always)]
pub fn is_160smpl(&self) -> bool {
*self == REPORTPER_A::_160SMPL
}
#[doc = "Checks if the value of the field is `_200SMPL`"]
#[inline(always)]
pub fn is_200smpl(&self) -> bool {
*self == REPORTPER_A::_200SMPL
}
#[doc = "Checks if the value of the field is `_240SMPL`"]
#[inline(always)]
pub fn is_240smpl(&self) -> bool {
*self == REPORTPER_A::_240SMPL
}
#[doc = "Checks if the value of the field is `_280SMPL`"]
#[inline(always)]
pub fn is_280smpl(&self) -> bool {
*self == REPORTPER_A::_280SMPL
}
#[doc = "Checks if the value of the field is `_1SMPL`"]
#[inline(always)]
pub fn is_1smpl(&self) -> bool {
*self == REPORTPER_A::_1SMPL
}
}
#[doc = "Field `REPORTPER` writer - Specifies the number of samples to be accumulated in the ACC register before the REPORTRDY and DBLRDY events can be generated"]
pub type REPORTPER_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, REPORTPER_SPEC, u8, REPORTPER_A, 4, O>;
impl<'a, const O: u8> REPORTPER_W<'a, O> {
#[doc = "10 samples / report"]
#[inline(always)]
pub fn _10smpl(self) -> &'a mut W {
self.variant(REPORTPER_A::_10SMPL)
}
#[doc = "40 samples / report"]
#[inline(always)]
pub fn _40smpl(self) -> &'a mut W {
self.variant(REPORTPER_A::_40SMPL)
}
#[doc = "80 samples / report"]
#[inline(always)]
pub fn _80smpl(self) -> &'a mut W {
self.variant(REPORTPER_A::_80SMPL)
}
#[doc = "120 samples / report"]
#[inline(always)]
pub fn _120smpl(self) -> &'a mut W {
self.variant(REPORTPER_A::_120SMPL)
}
#[doc = "160 samples / report"]
#[inline(always)]
pub fn _160smpl(self) -> &'a mut W {
self.variant(REPORTPER_A::_160SMPL)
}
#[doc = "200 samples / report"]
#[inline(always)]
pub fn _200smpl(self) -> &'a mut W {
self.variant(REPORTPER_A::_200SMPL)
}
#[doc = "240 samples / report"]
#[inline(always)]
pub fn _240smpl(self) -> &'a mut W {
self.variant(REPORTPER_A::_240SMPL)
}
#[doc = "280 samples / report"]
#[inline(always)]
pub fn _280smpl(self) -> &'a mut W {
self.variant(REPORTPER_A::_280SMPL)
}
#[doc = "1 sample / report"]
#[inline(always)]
pub fn _1smpl(self) -> &'a mut W {
self.variant(REPORTPER_A::_1SMPL)
}
}
impl R {
#[doc = "Bits 0:3 - Specifies the number of samples to be accumulated in the ACC register before the REPORTRDY and DBLRDY events can be generated"]
#[inline(always)]
pub fn reportper(&self) -> REPORTPER_R {
REPORTPER_R::new((self.bits & 0x0f) as u8)
}
}
impl W {
#[doc = "Bits 0:3 - Specifies the number of samples to be accumulated in the ACC register before the REPORTRDY and DBLRDY events can be generated"]
#[inline(always)]
pub fn reportper(&mut self) -> REPORTPER_W<0> {
REPORTPER_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 = "Number of samples to be taken before REPORTRDY and DBLRDY events can be generated\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 [reportper](index.html) module"]
pub struct REPORTPER_SPEC;
impl crate::RegisterSpec for REPORTPER_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [reportper::R](R) reader structure"]
impl crate::Readable for REPORTPER_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [reportper::W](W) writer structure"]
impl crate::Writable for REPORTPER_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets REPORTPER to value 0"]
impl crate::Resettable for REPORTPER_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+40
View File
@@ -0,0 +1,40 @@
#[doc = "Register `SAMPLE` reader"]
pub struct R(crate::R<SAMPLE_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<SAMPLE_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<SAMPLE_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<SAMPLE_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `SAMPLE` reader - Last motion sample"]
pub type SAMPLE_R = crate::FieldReader<u32, u32>;
impl R {
#[doc = "Bits 0:31 - Last motion sample"]
#[inline(always)]
pub fn sample(&self) -> SAMPLE_R {
SAMPLE_R::new(self.bits)
}
}
#[doc = "Motion sample value\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 [sample](index.html) module"]
pub struct SAMPLE_SPEC;
impl crate::RegisterSpec for SAMPLE_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [sample::R](R) reader structure"]
impl crate::Readable for SAMPLE_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets SAMPLE to value 0"]
impl crate::Resettable for SAMPLE_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+246
View File
@@ -0,0 +1,246 @@
#[doc = "Register `SAMPLEPER` reader"]
pub struct R(crate::R<SAMPLEPER_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<SAMPLEPER_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<SAMPLEPER_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<SAMPLEPER_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `SAMPLEPER` writer"]
pub struct W(crate::W<SAMPLEPER_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<SAMPLEPER_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<SAMPLEPER_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<SAMPLEPER_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `SAMPLEPER` reader - Sample period. The SAMPLE register will be updated for every new sample"]
pub type SAMPLEPER_R = crate::FieldReader<u8, SAMPLEPER_A>;
#[doc = "Sample period. The SAMPLE register will be updated for every new sample\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum SAMPLEPER_A {
#[doc = "0: 128 us"]
_128US = 0,
#[doc = "1: 256 us"]
_256US = 1,
#[doc = "2: 512 us"]
_512US = 2,
#[doc = "3: 1024 us"]
_1024US = 3,
#[doc = "4: 2048 us"]
_2048US = 4,
#[doc = "5: 4096 us"]
_4096US = 5,
#[doc = "6: 8192 us"]
_8192US = 6,
#[doc = "7: 16384 us"]
_16384US = 7,
#[doc = "8: 32768 us"]
_32MS = 8,
#[doc = "9: 65536 us"]
_65MS = 9,
#[doc = "10: 131072 us"]
_131MS = 10,
}
impl From<SAMPLEPER_A> for u8 {
#[inline(always)]
fn from(variant: SAMPLEPER_A) -> Self {
variant as _
}
}
impl SAMPLEPER_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> Option<SAMPLEPER_A> {
match self.bits {
0 => Some(SAMPLEPER_A::_128US),
1 => Some(SAMPLEPER_A::_256US),
2 => Some(SAMPLEPER_A::_512US),
3 => Some(SAMPLEPER_A::_1024US),
4 => Some(SAMPLEPER_A::_2048US),
5 => Some(SAMPLEPER_A::_4096US),
6 => Some(SAMPLEPER_A::_8192US),
7 => Some(SAMPLEPER_A::_16384US),
8 => Some(SAMPLEPER_A::_32MS),
9 => Some(SAMPLEPER_A::_65MS),
10 => Some(SAMPLEPER_A::_131MS),
_ => None,
}
}
#[doc = "Checks if the value of the field is `_128US`"]
#[inline(always)]
pub fn is_128us(&self) -> bool {
*self == SAMPLEPER_A::_128US
}
#[doc = "Checks if the value of the field is `_256US`"]
#[inline(always)]
pub fn is_256us(&self) -> bool {
*self == SAMPLEPER_A::_256US
}
#[doc = "Checks if the value of the field is `_512US`"]
#[inline(always)]
pub fn is_512us(&self) -> bool {
*self == SAMPLEPER_A::_512US
}
#[doc = "Checks if the value of the field is `_1024US`"]
#[inline(always)]
pub fn is_1024us(&self) -> bool {
*self == SAMPLEPER_A::_1024US
}
#[doc = "Checks if the value of the field is `_2048US`"]
#[inline(always)]
pub fn is_2048us(&self) -> bool {
*self == SAMPLEPER_A::_2048US
}
#[doc = "Checks if the value of the field is `_4096US`"]
#[inline(always)]
pub fn is_4096us(&self) -> bool {
*self == SAMPLEPER_A::_4096US
}
#[doc = "Checks if the value of the field is `_8192US`"]
#[inline(always)]
pub fn is_8192us(&self) -> bool {
*self == SAMPLEPER_A::_8192US
}
#[doc = "Checks if the value of the field is `_16384US`"]
#[inline(always)]
pub fn is_16384us(&self) -> bool {
*self == SAMPLEPER_A::_16384US
}
#[doc = "Checks if the value of the field is `_32MS`"]
#[inline(always)]
pub fn is_32ms(&self) -> bool {
*self == SAMPLEPER_A::_32MS
}
#[doc = "Checks if the value of the field is `_65MS`"]
#[inline(always)]
pub fn is_65ms(&self) -> bool {
*self == SAMPLEPER_A::_65MS
}
#[doc = "Checks if the value of the field is `_131MS`"]
#[inline(always)]
pub fn is_131ms(&self) -> bool {
*self == SAMPLEPER_A::_131MS
}
}
#[doc = "Field `SAMPLEPER` writer - Sample period. The SAMPLE register will be updated for every new sample"]
pub type SAMPLEPER_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, SAMPLEPER_SPEC, u8, SAMPLEPER_A, 4, O>;
impl<'a, const O: u8> SAMPLEPER_W<'a, O> {
#[doc = "128 us"]
#[inline(always)]
pub fn _128us(self) -> &'a mut W {
self.variant(SAMPLEPER_A::_128US)
}
#[doc = "256 us"]
#[inline(always)]
pub fn _256us(self) -> &'a mut W {
self.variant(SAMPLEPER_A::_256US)
}
#[doc = "512 us"]
#[inline(always)]
pub fn _512us(self) -> &'a mut W {
self.variant(SAMPLEPER_A::_512US)
}
#[doc = "1024 us"]
#[inline(always)]
pub fn _1024us(self) -> &'a mut W {
self.variant(SAMPLEPER_A::_1024US)
}
#[doc = "2048 us"]
#[inline(always)]
pub fn _2048us(self) -> &'a mut W {
self.variant(SAMPLEPER_A::_2048US)
}
#[doc = "4096 us"]
#[inline(always)]
pub fn _4096us(self) -> &'a mut W {
self.variant(SAMPLEPER_A::_4096US)
}
#[doc = "8192 us"]
#[inline(always)]
pub fn _8192us(self) -> &'a mut W {
self.variant(SAMPLEPER_A::_8192US)
}
#[doc = "16384 us"]
#[inline(always)]
pub fn _16384us(self) -> &'a mut W {
self.variant(SAMPLEPER_A::_16384US)
}
#[doc = "32768 us"]
#[inline(always)]
pub fn _32ms(self) -> &'a mut W {
self.variant(SAMPLEPER_A::_32MS)
}
#[doc = "65536 us"]
#[inline(always)]
pub fn _65ms(self) -> &'a mut W {
self.variant(SAMPLEPER_A::_65MS)
}
#[doc = "131072 us"]
#[inline(always)]
pub fn _131ms(self) -> &'a mut W {
self.variant(SAMPLEPER_A::_131MS)
}
}
impl R {
#[doc = "Bits 0:3 - Sample period. The SAMPLE register will be updated for every new sample"]
#[inline(always)]
pub fn sampleper(&self) -> SAMPLEPER_R {
SAMPLEPER_R::new((self.bits & 0x0f) as u8)
}
}
impl W {
#[doc = "Bits 0:3 - Sample period. The SAMPLE register will be updated for every new sample"]
#[inline(always)]
pub fn sampleper(&mut self) -> SAMPLEPER_W<0> {
SAMPLEPER_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 = "Sample period\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 [sampleper](index.html) module"]
pub struct SAMPLEPER_SPEC;
impl crate::RegisterSpec for SAMPLEPER_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [sampleper::R](R) reader structure"]
impl crate::Readable for SAMPLEPER_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [sampleper::W](W) writer structure"]
impl crate::Writable for SAMPLEPER_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets SAMPLEPER to value 0"]
impl crate::Resettable for SAMPLEPER_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+492
View File
@@ -0,0 +1,492 @@
#[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 `REPORTRDY_READCLRACC` reader - Shortcut between event REPORTRDY and task READCLRACC"]
pub type REPORTRDY_READCLRACC_R = crate::BitReader<REPORTRDY_READCLRACC_A>;
#[doc = "Shortcut between event REPORTRDY and task READCLRACC\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum REPORTRDY_READCLRACC_A {
#[doc = "0: Disable shortcut"]
DISABLED = 0,
#[doc = "1: Enable shortcut"]
ENABLED = 1,
}
impl From<REPORTRDY_READCLRACC_A> for bool {
#[inline(always)]
fn from(variant: REPORTRDY_READCLRACC_A) -> Self {
variant as u8 != 0
}
}
impl REPORTRDY_READCLRACC_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> REPORTRDY_READCLRACC_A {
match self.bits {
false => REPORTRDY_READCLRACC_A::DISABLED,
true => REPORTRDY_READCLRACC_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == REPORTRDY_READCLRACC_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == REPORTRDY_READCLRACC_A::ENABLED
}
}
#[doc = "Field `REPORTRDY_READCLRACC` writer - Shortcut between event REPORTRDY and task READCLRACC"]
pub type REPORTRDY_READCLRACC_W<'a, const O: u8> =
crate::BitWriter<'a, u32, SHORTS_SPEC, REPORTRDY_READCLRACC_A, O>;
impl<'a, const O: u8> REPORTRDY_READCLRACC_W<'a, O> {
#[doc = "Disable shortcut"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(REPORTRDY_READCLRACC_A::DISABLED)
}
#[doc = "Enable shortcut"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(REPORTRDY_READCLRACC_A::ENABLED)
}
}
#[doc = "Field `SAMPLERDY_STOP` reader - Shortcut between event SAMPLERDY and task STOP"]
pub type SAMPLERDY_STOP_R = crate::BitReader<SAMPLERDY_STOP_A>;
#[doc = "Shortcut between event SAMPLERDY and task STOP\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SAMPLERDY_STOP_A {
#[doc = "0: Disable shortcut"]
DISABLED = 0,
#[doc = "1: Enable shortcut"]
ENABLED = 1,
}
impl From<SAMPLERDY_STOP_A> for bool {
#[inline(always)]
fn from(variant: SAMPLERDY_STOP_A) -> Self {
variant as u8 != 0
}
}
impl SAMPLERDY_STOP_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> SAMPLERDY_STOP_A {
match self.bits {
false => SAMPLERDY_STOP_A::DISABLED,
true => SAMPLERDY_STOP_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == SAMPLERDY_STOP_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == SAMPLERDY_STOP_A::ENABLED
}
}
#[doc = "Field `SAMPLERDY_STOP` writer - Shortcut between event SAMPLERDY and task STOP"]
pub type SAMPLERDY_STOP_W<'a, const O: u8> =
crate::BitWriter<'a, u32, SHORTS_SPEC, SAMPLERDY_STOP_A, O>;
impl<'a, const O: u8> SAMPLERDY_STOP_W<'a, O> {
#[doc = "Disable shortcut"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(SAMPLERDY_STOP_A::DISABLED)
}
#[doc = "Enable shortcut"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(SAMPLERDY_STOP_A::ENABLED)
}
}
#[doc = "Field `REPORTRDY_RDCLRACC` reader - Shortcut between event REPORTRDY and task RDCLRACC"]
pub type REPORTRDY_RDCLRACC_R = crate::BitReader<REPORTRDY_RDCLRACC_A>;
#[doc = "Shortcut between event REPORTRDY and task RDCLRACC\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum REPORTRDY_RDCLRACC_A {
#[doc = "0: Disable shortcut"]
DISABLED = 0,
#[doc = "1: Enable shortcut"]
ENABLED = 1,
}
impl From<REPORTRDY_RDCLRACC_A> for bool {
#[inline(always)]
fn from(variant: REPORTRDY_RDCLRACC_A) -> Self {
variant as u8 != 0
}
}
impl REPORTRDY_RDCLRACC_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> REPORTRDY_RDCLRACC_A {
match self.bits {
false => REPORTRDY_RDCLRACC_A::DISABLED,
true => REPORTRDY_RDCLRACC_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == REPORTRDY_RDCLRACC_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == REPORTRDY_RDCLRACC_A::ENABLED
}
}
#[doc = "Field `REPORTRDY_RDCLRACC` writer - Shortcut between event REPORTRDY and task RDCLRACC"]
pub type REPORTRDY_RDCLRACC_W<'a, const O: u8> =
crate::BitWriter<'a, u32, SHORTS_SPEC, REPORTRDY_RDCLRACC_A, O>;
impl<'a, const O: u8> REPORTRDY_RDCLRACC_W<'a, O> {
#[doc = "Disable shortcut"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(REPORTRDY_RDCLRACC_A::DISABLED)
}
#[doc = "Enable shortcut"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(REPORTRDY_RDCLRACC_A::ENABLED)
}
}
#[doc = "Field `REPORTRDY_STOP` reader - Shortcut between event REPORTRDY and task STOP"]
pub type REPORTRDY_STOP_R = crate::BitReader<REPORTRDY_STOP_A>;
#[doc = "Shortcut between event REPORTRDY and task STOP\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum REPORTRDY_STOP_A {
#[doc = "0: Disable shortcut"]
DISABLED = 0,
#[doc = "1: Enable shortcut"]
ENABLED = 1,
}
impl From<REPORTRDY_STOP_A> for bool {
#[inline(always)]
fn from(variant: REPORTRDY_STOP_A) -> Self {
variant as u8 != 0
}
}
impl REPORTRDY_STOP_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> REPORTRDY_STOP_A {
match self.bits {
false => REPORTRDY_STOP_A::DISABLED,
true => REPORTRDY_STOP_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == REPORTRDY_STOP_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == REPORTRDY_STOP_A::ENABLED
}
}
#[doc = "Field `REPORTRDY_STOP` writer - Shortcut between event REPORTRDY and task STOP"]
pub type REPORTRDY_STOP_W<'a, const O: u8> =
crate::BitWriter<'a, u32, SHORTS_SPEC, REPORTRDY_STOP_A, O>;
impl<'a, const O: u8> REPORTRDY_STOP_W<'a, O> {
#[doc = "Disable shortcut"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(REPORTRDY_STOP_A::DISABLED)
}
#[doc = "Enable shortcut"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(REPORTRDY_STOP_A::ENABLED)
}
}
#[doc = "Field `DBLRDY_RDCLRDBL` reader - Shortcut between event DBLRDY and task RDCLRDBL"]
pub type DBLRDY_RDCLRDBL_R = crate::BitReader<DBLRDY_RDCLRDBL_A>;
#[doc = "Shortcut between event DBLRDY and task RDCLRDBL\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DBLRDY_RDCLRDBL_A {
#[doc = "0: Disable shortcut"]
DISABLED = 0,
#[doc = "1: Enable shortcut"]
ENABLED = 1,
}
impl From<DBLRDY_RDCLRDBL_A> for bool {
#[inline(always)]
fn from(variant: DBLRDY_RDCLRDBL_A) -> Self {
variant as u8 != 0
}
}
impl DBLRDY_RDCLRDBL_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> DBLRDY_RDCLRDBL_A {
match self.bits {
false => DBLRDY_RDCLRDBL_A::DISABLED,
true => DBLRDY_RDCLRDBL_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == DBLRDY_RDCLRDBL_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == DBLRDY_RDCLRDBL_A::ENABLED
}
}
#[doc = "Field `DBLRDY_RDCLRDBL` writer - Shortcut between event DBLRDY and task RDCLRDBL"]
pub type DBLRDY_RDCLRDBL_W<'a, const O: u8> =
crate::BitWriter<'a, u32, SHORTS_SPEC, DBLRDY_RDCLRDBL_A, O>;
impl<'a, const O: u8> DBLRDY_RDCLRDBL_W<'a, O> {
#[doc = "Disable shortcut"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(DBLRDY_RDCLRDBL_A::DISABLED)
}
#[doc = "Enable shortcut"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(DBLRDY_RDCLRDBL_A::ENABLED)
}
}
#[doc = "Field `DBLRDY_STOP` reader - Shortcut between event DBLRDY and task STOP"]
pub type DBLRDY_STOP_R = crate::BitReader<DBLRDY_STOP_A>;
#[doc = "Shortcut between event DBLRDY and task STOP\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DBLRDY_STOP_A {
#[doc = "0: Disable shortcut"]
DISABLED = 0,
#[doc = "1: Enable shortcut"]
ENABLED = 1,
}
impl From<DBLRDY_STOP_A> for bool {
#[inline(always)]
fn from(variant: DBLRDY_STOP_A) -> Self {
variant as u8 != 0
}
}
impl DBLRDY_STOP_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> DBLRDY_STOP_A {
match self.bits {
false => DBLRDY_STOP_A::DISABLED,
true => DBLRDY_STOP_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == DBLRDY_STOP_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == DBLRDY_STOP_A::ENABLED
}
}
#[doc = "Field `DBLRDY_STOP` writer - Shortcut between event DBLRDY and task STOP"]
pub type DBLRDY_STOP_W<'a, const O: u8> = crate::BitWriter<'a, u32, SHORTS_SPEC, DBLRDY_STOP_A, O>;
impl<'a, const O: u8> DBLRDY_STOP_W<'a, O> {
#[doc = "Disable shortcut"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(DBLRDY_STOP_A::DISABLED)
}
#[doc = "Enable shortcut"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(DBLRDY_STOP_A::ENABLED)
}
}
#[doc = "Field `SAMPLERDY_READCLRACC` reader - Shortcut between event SAMPLERDY and task READCLRACC"]
pub type SAMPLERDY_READCLRACC_R = crate::BitReader<SAMPLERDY_READCLRACC_A>;
#[doc = "Shortcut between event SAMPLERDY and task READCLRACC\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SAMPLERDY_READCLRACC_A {
#[doc = "0: Disable shortcut"]
DISABLED = 0,
#[doc = "1: Enable shortcut"]
ENABLED = 1,
}
impl From<SAMPLERDY_READCLRACC_A> for bool {
#[inline(always)]
fn from(variant: SAMPLERDY_READCLRACC_A) -> Self {
variant as u8 != 0
}
}
impl SAMPLERDY_READCLRACC_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> SAMPLERDY_READCLRACC_A {
match self.bits {
false => SAMPLERDY_READCLRACC_A::DISABLED,
true => SAMPLERDY_READCLRACC_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == SAMPLERDY_READCLRACC_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == SAMPLERDY_READCLRACC_A::ENABLED
}
}
#[doc = "Field `SAMPLERDY_READCLRACC` writer - Shortcut between event SAMPLERDY and task READCLRACC"]
pub type SAMPLERDY_READCLRACC_W<'a, const O: u8> =
crate::BitWriter<'a, u32, SHORTS_SPEC, SAMPLERDY_READCLRACC_A, O>;
impl<'a, const O: u8> SAMPLERDY_READCLRACC_W<'a, O> {
#[doc = "Disable shortcut"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(SAMPLERDY_READCLRACC_A::DISABLED)
}
#[doc = "Enable shortcut"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(SAMPLERDY_READCLRACC_A::ENABLED)
}
}
impl R {
#[doc = "Bit 0 - Shortcut between event REPORTRDY and task READCLRACC"]
#[inline(always)]
pub fn reportrdy_readclracc(&self) -> REPORTRDY_READCLRACC_R {
REPORTRDY_READCLRACC_R::new((self.bits & 1) != 0)
}
#[doc = "Bit 1 - Shortcut between event SAMPLERDY and task STOP"]
#[inline(always)]
pub fn samplerdy_stop(&self) -> SAMPLERDY_STOP_R {
SAMPLERDY_STOP_R::new(((self.bits >> 1) & 1) != 0)
}
#[doc = "Bit 2 - Shortcut between event REPORTRDY and task RDCLRACC"]
#[inline(always)]
pub fn reportrdy_rdclracc(&self) -> REPORTRDY_RDCLRACC_R {
REPORTRDY_RDCLRACC_R::new(((self.bits >> 2) & 1) != 0)
}
#[doc = "Bit 3 - Shortcut between event REPORTRDY and task STOP"]
#[inline(always)]
pub fn reportrdy_stop(&self) -> REPORTRDY_STOP_R {
REPORTRDY_STOP_R::new(((self.bits >> 3) & 1) != 0)
}
#[doc = "Bit 4 - Shortcut between event DBLRDY and task RDCLRDBL"]
#[inline(always)]
pub fn dblrdy_rdclrdbl(&self) -> DBLRDY_RDCLRDBL_R {
DBLRDY_RDCLRDBL_R::new(((self.bits >> 4) & 1) != 0)
}
#[doc = "Bit 5 - Shortcut between event DBLRDY and task STOP"]
#[inline(always)]
pub fn dblrdy_stop(&self) -> DBLRDY_STOP_R {
DBLRDY_STOP_R::new(((self.bits >> 5) & 1) != 0)
}
#[doc = "Bit 6 - Shortcut between event SAMPLERDY and task READCLRACC"]
#[inline(always)]
pub fn samplerdy_readclracc(&self) -> SAMPLERDY_READCLRACC_R {
SAMPLERDY_READCLRACC_R::new(((self.bits >> 6) & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Shortcut between event REPORTRDY and task READCLRACC"]
#[inline(always)]
pub fn reportrdy_readclracc(&mut self) -> REPORTRDY_READCLRACC_W<0> {
REPORTRDY_READCLRACC_W::new(self)
}
#[doc = "Bit 1 - Shortcut between event SAMPLERDY and task STOP"]
#[inline(always)]
pub fn samplerdy_stop(&mut self) -> SAMPLERDY_STOP_W<1> {
SAMPLERDY_STOP_W::new(self)
}
#[doc = "Bit 2 - Shortcut between event REPORTRDY and task RDCLRACC"]
#[inline(always)]
pub fn reportrdy_rdclracc(&mut self) -> REPORTRDY_RDCLRACC_W<2> {
REPORTRDY_RDCLRACC_W::new(self)
}
#[doc = "Bit 3 - Shortcut between event REPORTRDY and task STOP"]
#[inline(always)]
pub fn reportrdy_stop(&mut self) -> REPORTRDY_STOP_W<3> {
REPORTRDY_STOP_W::new(self)
}
#[doc = "Bit 4 - Shortcut between event DBLRDY and task RDCLRDBL"]
#[inline(always)]
pub fn dblrdy_rdclrdbl(&mut self) -> DBLRDY_RDCLRDBL_W<4> {
DBLRDY_RDCLRDBL_W::new(self)
}
#[doc = "Bit 5 - Shortcut between event DBLRDY and task STOP"]
#[inline(always)]
pub fn dblrdy_stop(&mut self) -> DBLRDY_STOP_W<5> {
DBLRDY_STOP_W::new(self)
}
#[doc = "Bit 6 - Shortcut between event SAMPLERDY and task READCLRACC"]
#[inline(always)]
pub fn samplerdy_readclracc(&mut self) -> SAMPLERDY_READCLRACC_W<6> {
SAMPLERDY_READCLRACC_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 = "Shortcuts between local events and tasks\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
}
}
+72
View File
@@ -0,0 +1,72 @@
#[doc = "Register `TASKS_RDCLRACC` writer"]
pub struct W(crate::W<TASKS_RDCLRACC_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<TASKS_RDCLRACC_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_RDCLRACC_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<TASKS_RDCLRACC_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Read and clear ACC\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TASKS_RDCLRACC_AW {
#[doc = "1: Trigger task"]
TRIGGER = 1,
}
impl From<TASKS_RDCLRACC_AW> for bool {
#[inline(always)]
fn from(variant: TASKS_RDCLRACC_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `TASKS_RDCLRACC` writer - Read and clear ACC"]
pub type TASKS_RDCLRACC_W<'a, const O: u8> =
crate::BitWriter<'a, u32, TASKS_RDCLRACC_SPEC, TASKS_RDCLRACC_AW, O>;
impl<'a, const O: u8> TASKS_RDCLRACC_W<'a, O> {
#[doc = "Trigger task"]
#[inline(always)]
pub fn trigger(self) -> &'a mut W {
self.variant(TASKS_RDCLRACC_AW::TRIGGER)
}
}
impl W {
#[doc = "Bit 0 - Read and clear ACC"]
#[inline(always)]
pub fn tasks_rdclracc(&mut self) -> TASKS_RDCLRACC_W<0> {
TASKS_RDCLRACC_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 = "Read and clear ACC\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_rdclracc](index.html) module"]
pub struct TASKS_RDCLRACC_SPEC;
impl crate::RegisterSpec for TASKS_RDCLRACC_SPEC {
type Ux = u32;
}
#[doc = "`write(|w| ..)` method takes [tasks_rdclracc::W](W) writer structure"]
impl crate::Writable for TASKS_RDCLRACC_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets TASKS_RDCLRACC to value 0"]
impl crate::Resettable for TASKS_RDCLRACC_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+72
View File
@@ -0,0 +1,72 @@
#[doc = "Register `TASKS_RDCLRDBL` writer"]
pub struct W(crate::W<TASKS_RDCLRDBL_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<TASKS_RDCLRDBL_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_RDCLRDBL_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<TASKS_RDCLRDBL_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Read and clear ACCDBL\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TASKS_RDCLRDBL_AW {
#[doc = "1: Trigger task"]
TRIGGER = 1,
}
impl From<TASKS_RDCLRDBL_AW> for bool {
#[inline(always)]
fn from(variant: TASKS_RDCLRDBL_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `TASKS_RDCLRDBL` writer - Read and clear ACCDBL"]
pub type TASKS_RDCLRDBL_W<'a, const O: u8> =
crate::BitWriter<'a, u32, TASKS_RDCLRDBL_SPEC, TASKS_RDCLRDBL_AW, O>;
impl<'a, const O: u8> TASKS_RDCLRDBL_W<'a, O> {
#[doc = "Trigger task"]
#[inline(always)]
pub fn trigger(self) -> &'a mut W {
self.variant(TASKS_RDCLRDBL_AW::TRIGGER)
}
}
impl W {
#[doc = "Bit 0 - Read and clear ACCDBL"]
#[inline(always)]
pub fn tasks_rdclrdbl(&mut self) -> TASKS_RDCLRDBL_W<0> {
TASKS_RDCLRDBL_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 = "Read and clear ACCDBL\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_rdclrdbl](index.html) module"]
pub struct TASKS_RDCLRDBL_SPEC;
impl crate::RegisterSpec for TASKS_RDCLRDBL_SPEC {
type Ux = u32;
}
#[doc = "`write(|w| ..)` method takes [tasks_rdclrdbl::W](W) writer structure"]
impl crate::Writable for TASKS_RDCLRDBL_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets TASKS_RDCLRDBL to value 0"]
impl crate::Resettable for TASKS_RDCLRDBL_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+72
View File
@@ -0,0 +1,72 @@
#[doc = "Register `TASKS_READCLRACC` writer"]
pub struct W(crate::W<TASKS_READCLRACC_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<TASKS_READCLRACC_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_READCLRACC_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<TASKS_READCLRACC_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Read and clear ACC and ACCDBL\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TASKS_READCLRACC_AW {
#[doc = "1: Trigger task"]
TRIGGER = 1,
}
impl From<TASKS_READCLRACC_AW> for bool {
#[inline(always)]
fn from(variant: TASKS_READCLRACC_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `TASKS_READCLRACC` writer - Read and clear ACC and ACCDBL"]
pub type TASKS_READCLRACC_W<'a, const O: u8> =
crate::BitWriter<'a, u32, TASKS_READCLRACC_SPEC, TASKS_READCLRACC_AW, O>;
impl<'a, const O: u8> TASKS_READCLRACC_W<'a, O> {
#[doc = "Trigger task"]
#[inline(always)]
pub fn trigger(self) -> &'a mut W {
self.variant(TASKS_READCLRACC_AW::TRIGGER)
}
}
impl W {
#[doc = "Bit 0 - Read and clear ACC and ACCDBL"]
#[inline(always)]
pub fn tasks_readclracc(&mut self) -> TASKS_READCLRACC_W<0> {
TASKS_READCLRACC_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 = "Read and clear ACC and ACCDBL\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_readclracc](index.html) module"]
pub struct TASKS_READCLRACC_SPEC;
impl crate::RegisterSpec for TASKS_READCLRACC_SPEC {
type Ux = u32;
}
#[doc = "`write(|w| ..)` method takes [tasks_readclracc::W](W) writer structure"]
impl crate::Writable for TASKS_READCLRACC_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets TASKS_READCLRACC to value 0"]
impl crate::Resettable for TASKS_READCLRACC_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 = "Task starting the quadrature decoder\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 - Task starting the quadrature decoder"]
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 - Task starting the quadrature decoder"]
#[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 = "Task starting the quadrature decoder\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
}
}
+72
View File
@@ -0,0 +1,72 @@
#[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 = "Task stopping the quadrature decoder\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TASKS_STOP_AW {
#[doc = "1: Trigger task"]
TRIGGER = 1,
}
impl From<TASKS_STOP_AW> for bool {
#[inline(always)]
fn from(variant: TASKS_STOP_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `TASKS_STOP` writer - Task stopping the quadrature decoder"]
pub type TASKS_STOP_W<'a, const O: u8> =
crate::BitWriter<'a, u32, TASKS_STOP_SPEC, TASKS_STOP_AW, O>;
impl<'a, const O: u8> TASKS_STOP_W<'a, O> {
#[doc = "Trigger task"]
#[inline(always)]
pub fn trigger(self) -> &'a mut W {
self.variant(TASKS_STOP_AW::TRIGGER)
}
}
impl W {
#[doc = "Bit 0 - Task stopping the quadrature decoder"]
#[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 = "Task stopping the quadrature decoder\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
}
}