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

+126
View File
@@ -0,0 +1,126 @@
#[doc = "Register `AUTOCOLRESCONFIG` reader"]
pub struct R(crate::R<AUTOCOLRESCONFIG_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<AUTOCOLRESCONFIG_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<AUTOCOLRESCONFIG_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<AUTOCOLRESCONFIG_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `AUTOCOLRESCONFIG` writer"]
pub struct W(crate::W<AUTOCOLRESCONFIG_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<AUTOCOLRESCONFIG_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<AUTOCOLRESCONFIG_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<AUTOCOLRESCONFIG_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `MODE` reader - Enables/disables auto collision resolution"]
pub type MODE_R = crate::BitReader<MODE_A>;
#[doc = "Enables/disables auto collision resolution\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum MODE_A {
#[doc = "0: Auto collision resolution enabled"]
ENABLED = 0,
#[doc = "1: Auto collision resolution disabled"]
DISABLED = 1,
}
impl From<MODE_A> for bool {
#[inline(always)]
fn from(variant: MODE_A) -> Self {
variant as u8 != 0
}
}
impl MODE_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> MODE_A {
match self.bits {
false => MODE_A::ENABLED,
true => MODE_A::DISABLED,
}
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == MODE_A::ENABLED
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == MODE_A::DISABLED
}
}
#[doc = "Field `MODE` writer - Enables/disables auto collision resolution"]
pub type MODE_W<'a, const O: u8> = crate::BitWriter<'a, u32, AUTOCOLRESCONFIG_SPEC, MODE_A, O>;
impl<'a, const O: u8> MODE_W<'a, O> {
#[doc = "Auto collision resolution enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(MODE_A::ENABLED)
}
#[doc = "Auto collision resolution disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(MODE_A::DISABLED)
}
}
impl R {
#[doc = "Bit 0 - Enables/disables auto collision resolution"]
#[inline(always)]
pub fn mode(&self) -> MODE_R {
MODE_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Enables/disables auto collision resolution"]
#[inline(always)]
pub fn mode(&mut self) -> MODE_W<0> {
MODE_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Controls the auto collision resolution function. This setting must be done before the NFCT peripheral is enabled.\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 [autocolresconfig](index.html) module"]
pub struct AUTOCOLRESCONFIG_SPEC;
impl crate::RegisterSpec for AUTOCOLRESCONFIG_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [autocolresconfig::R](R) reader structure"]
impl crate::Readable for AUTOCOLRESCONFIG_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [autocolresconfig::W](W) writer structure"]
impl crate::Writable for AUTOCOLRESCONFIG_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets AUTOCOLRESCONFIG to value 0x02"]
impl crate::Resettable for AUTOCOLRESCONFIG_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0x02
}
}
+81
View File
@@ -0,0 +1,81 @@
#[doc = "Register `ERRORSTATUS` reader"]
pub struct R(crate::R<ERRORSTATUS_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<ERRORSTATUS_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<ERRORSTATUS_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<ERRORSTATUS_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `ERRORSTATUS` writer"]
pub struct W(crate::W<ERRORSTATUS_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<ERRORSTATUS_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<ERRORSTATUS_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<ERRORSTATUS_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `FRAMEDELAYTIMEOUT` reader - No STARTTX task triggered before expiration of the time set in FRAMEDELAYMAX"]
pub type FRAMEDELAYTIMEOUT_R = crate::BitReader<bool>;
#[doc = "Field `FRAMEDELAYTIMEOUT` writer - No STARTTX task triggered before expiration of the time set in FRAMEDELAYMAX"]
pub type FRAMEDELAYTIMEOUT_W<'a, const O: u8> =
crate::BitWriter1C<'a, u32, ERRORSTATUS_SPEC, bool, O>;
impl R {
#[doc = "Bit 0 - No STARTTX task triggered before expiration of the time set in FRAMEDELAYMAX"]
#[inline(always)]
pub fn framedelaytimeout(&self) -> FRAMEDELAYTIMEOUT_R {
FRAMEDELAYTIMEOUT_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - No STARTTX task triggered before expiration of the time set in FRAMEDELAYMAX"]
#[inline(always)]
pub fn framedelaytimeout(&mut self) -> FRAMEDELAYTIMEOUT_W<0> {
FRAMEDELAYTIMEOUT_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 = "NFC Error Status 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 [errorstatus](index.html) module"]
pub struct ERRORSTATUS_SPEC;
impl crate::RegisterSpec for ERRORSTATUS_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [errorstatus::R](R) reader structure"]
impl crate::Readable for ERRORSTATUS_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [errorstatus::W](W) writer structure"]
impl crate::Writable for ERRORSTATUS_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets ERRORSTATUS to value 0"]
impl crate::Resettable for ERRORSTATUS_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
@@ -0,0 +1,81 @@
#[doc = "Register `EVENTS_AUTOCOLRESSTARTED` reader"]
pub struct R(crate::R<EVENTS_AUTOCOLRESSTARTED_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_AUTOCOLRESSTARTED_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_AUTOCOLRESSTARTED_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_AUTOCOLRESSTARTED_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_AUTOCOLRESSTARTED` writer"]
pub struct W(crate::W<EVENTS_AUTOCOLRESSTARTED_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_AUTOCOLRESSTARTED_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_AUTOCOLRESSTARTED_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_AUTOCOLRESSTARTED_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `EVENTS_AUTOCOLRESSTARTED` reader - "]
pub type EVENTS_AUTOCOLRESSTARTED_R = crate::BitReader<bool>;
#[doc = "Field `EVENTS_AUTOCOLRESSTARTED` writer - "]
pub type EVENTS_AUTOCOLRESSTARTED_W<'a, const O: u8> =
crate::BitWriter<'a, u32, EVENTS_AUTOCOLRESSTARTED_SPEC, bool, O>;
impl R {
#[doc = "Bit 0"]
#[inline(always)]
pub fn events_autocolresstarted(&self) -> EVENTS_AUTOCOLRESSTARTED_R {
EVENTS_AUTOCOLRESSTARTED_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0"]
#[inline(always)]
pub fn events_autocolresstarted(&mut self) -> EVENTS_AUTOCOLRESSTARTED_W<0> {
EVENTS_AUTOCOLRESSTARTED_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 = "Auto collision resolution process has started\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_autocolresstarted](index.html) module"]
pub struct EVENTS_AUTOCOLRESSTARTED_SPEC;
impl crate::RegisterSpec for EVENTS_AUTOCOLRESSTARTED_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_autocolresstarted::R](R) reader structure"]
impl crate::Readable for EVENTS_AUTOCOLRESSTARTED_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_autocolresstarted::W](W) writer structure"]
impl crate::Writable for EVENTS_AUTOCOLRESSTARTED_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_AUTOCOLRESSTARTED to value 0"]
impl crate::Resettable for EVENTS_AUTOCOLRESSTARTED_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+81
View File
@@ -0,0 +1,81 @@
#[doc = "Register `EVENTS_COLLISION` reader"]
pub struct R(crate::R<EVENTS_COLLISION_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_COLLISION_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_COLLISION_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_COLLISION_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_COLLISION` writer"]
pub struct W(crate::W<EVENTS_COLLISION_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_COLLISION_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_COLLISION_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_COLLISION_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `EVENTS_COLLISION` reader - "]
pub type EVENTS_COLLISION_R = crate::BitReader<bool>;
#[doc = "Field `EVENTS_COLLISION` writer - "]
pub type EVENTS_COLLISION_W<'a, const O: u8> =
crate::BitWriter<'a, u32, EVENTS_COLLISION_SPEC, bool, O>;
impl R {
#[doc = "Bit 0"]
#[inline(always)]
pub fn events_collision(&self) -> EVENTS_COLLISION_R {
EVENTS_COLLISION_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0"]
#[inline(always)]
pub fn events_collision(&mut self) -> EVENTS_COLLISION_W<0> {
EVENTS_COLLISION_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 = "NFC auto collision resolution error reported.\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_collision](index.html) module"]
pub struct EVENTS_COLLISION_SPEC;
impl crate::RegisterSpec for EVENTS_COLLISION_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_collision::R](R) reader structure"]
impl crate::Readable for EVENTS_COLLISION_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_collision::W](W) writer structure"]
impl crate::Writable for EVENTS_COLLISION_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_COLLISION to value 0"]
impl crate::Resettable for EVENTS_COLLISION_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+80
View File
@@ -0,0 +1,80 @@
#[doc = "Register `EVENTS_ENDRX` reader"]
pub struct R(crate::R<EVENTS_ENDRX_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_ENDRX_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_ENDRX_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_ENDRX_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_ENDRX` writer"]
pub struct W(crate::W<EVENTS_ENDRX_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_ENDRX_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_ENDRX_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_ENDRX_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `EVENTS_ENDRX` reader - "]
pub type EVENTS_ENDRX_R = crate::BitReader<bool>;
#[doc = "Field `EVENTS_ENDRX` writer - "]
pub type EVENTS_ENDRX_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVENTS_ENDRX_SPEC, bool, O>;
impl R {
#[doc = "Bit 0"]
#[inline(always)]
pub fn events_endrx(&self) -> EVENTS_ENDRX_R {
EVENTS_ENDRX_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0"]
#[inline(always)]
pub fn events_endrx(&mut self) -> EVENTS_ENDRX_W<0> {
EVENTS_ENDRX_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 = "RX buffer (as defined by PACKETPTR and MAXLEN) in Data RAM full.\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_endrx](index.html) module"]
pub struct EVENTS_ENDRX_SPEC;
impl crate::RegisterSpec for EVENTS_ENDRX_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_endrx::R](R) reader structure"]
impl crate::Readable for EVENTS_ENDRX_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_endrx::W](W) writer structure"]
impl crate::Writable for EVENTS_ENDRX_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_ENDRX to value 0"]
impl crate::Resettable for EVENTS_ENDRX_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+80
View File
@@ -0,0 +1,80 @@
#[doc = "Register `EVENTS_ENDTX` reader"]
pub struct R(crate::R<EVENTS_ENDTX_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_ENDTX_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_ENDTX_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_ENDTX_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_ENDTX` writer"]
pub struct W(crate::W<EVENTS_ENDTX_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_ENDTX_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_ENDTX_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_ENDTX_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `EVENTS_ENDTX` reader - "]
pub type EVENTS_ENDTX_R = crate::BitReader<bool>;
#[doc = "Field `EVENTS_ENDTX` writer - "]
pub type EVENTS_ENDTX_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVENTS_ENDTX_SPEC, bool, O>;
impl R {
#[doc = "Bit 0"]
#[inline(always)]
pub fn events_endtx(&self) -> EVENTS_ENDTX_R {
EVENTS_ENDTX_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0"]
#[inline(always)]
pub fn events_endtx(&mut self) -> EVENTS_ENDTX_W<0> {
EVENTS_ENDTX_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 = "Transmission of data in RAM has ended, and EasyDMA has ended accessing the TX buffer\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_endtx](index.html) module"]
pub struct EVENTS_ENDTX_SPEC;
impl crate::RegisterSpec for EVENTS_ENDTX_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_endtx::R](R) reader structure"]
impl crate::Readable for EVENTS_ENDTX_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_endtx::W](W) writer structure"]
impl crate::Writable for EVENTS_ENDTX_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_ENDTX to value 0"]
impl crate::Resettable for EVENTS_ENDTX_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+80
View File
@@ -0,0 +1,80 @@
#[doc = "Register `EVENTS_ERROR` reader"]
pub struct R(crate::R<EVENTS_ERROR_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_ERROR_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_ERROR_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_ERROR_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_ERROR` writer"]
pub struct W(crate::W<EVENTS_ERROR_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_ERROR_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_ERROR_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_ERROR_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `EVENTS_ERROR` reader - "]
pub type EVENTS_ERROR_R = crate::BitReader<bool>;
#[doc = "Field `EVENTS_ERROR` writer - "]
pub type EVENTS_ERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVENTS_ERROR_SPEC, bool, O>;
impl R {
#[doc = "Bit 0"]
#[inline(always)]
pub fn events_error(&self) -> EVENTS_ERROR_R {
EVENTS_ERROR_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0"]
#[inline(always)]
pub fn events_error(&mut self) -> EVENTS_ERROR_W<0> {
EVENTS_ERROR_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 = "NFC error reported. The ERRORSTATUS register contains details on the source of the error.\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_error](index.html) module"]
pub struct EVENTS_ERROR_SPEC;
impl crate::RegisterSpec for EVENTS_ERROR_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_error::R](R) reader structure"]
impl crate::Readable for EVENTS_ERROR_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_error::W](W) writer structure"]
impl crate::Writable for EVENTS_ERROR_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_ERROR to value 0"]
impl crate::Resettable for EVENTS_ERROR_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+81
View File
@@ -0,0 +1,81 @@
#[doc = "Register `EVENTS_FIELDDETECTED` reader"]
pub struct R(crate::R<EVENTS_FIELDDETECTED_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_FIELDDETECTED_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_FIELDDETECTED_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_FIELDDETECTED_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_FIELDDETECTED` writer"]
pub struct W(crate::W<EVENTS_FIELDDETECTED_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_FIELDDETECTED_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_FIELDDETECTED_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_FIELDDETECTED_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `EVENTS_FIELDDETECTED` reader - "]
pub type EVENTS_FIELDDETECTED_R = crate::BitReader<bool>;
#[doc = "Field `EVENTS_FIELDDETECTED` writer - "]
pub type EVENTS_FIELDDETECTED_W<'a, const O: u8> =
crate::BitWriter<'a, u32, EVENTS_FIELDDETECTED_SPEC, bool, O>;
impl R {
#[doc = "Bit 0"]
#[inline(always)]
pub fn events_fielddetected(&self) -> EVENTS_FIELDDETECTED_R {
EVENTS_FIELDDETECTED_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0"]
#[inline(always)]
pub fn events_fielddetected(&mut self) -> EVENTS_FIELDDETECTED_W<0> {
EVENTS_FIELDDETECTED_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 = "Remote NFC field 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_fielddetected](index.html) module"]
pub struct EVENTS_FIELDDETECTED_SPEC;
impl crate::RegisterSpec for EVENTS_FIELDDETECTED_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_fielddetected::R](R) reader structure"]
impl crate::Readable for EVENTS_FIELDDETECTED_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_fielddetected::W](W) writer structure"]
impl crate::Writable for EVENTS_FIELDDETECTED_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_FIELDDETECTED to value 0"]
impl crate::Resettable for EVENTS_FIELDDETECTED_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+81
View File
@@ -0,0 +1,81 @@
#[doc = "Register `EVENTS_FIELDLOST` reader"]
pub struct R(crate::R<EVENTS_FIELDLOST_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_FIELDLOST_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_FIELDLOST_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_FIELDLOST_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_FIELDLOST` writer"]
pub struct W(crate::W<EVENTS_FIELDLOST_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_FIELDLOST_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_FIELDLOST_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_FIELDLOST_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `EVENTS_FIELDLOST` reader - "]
pub type EVENTS_FIELDLOST_R = crate::BitReader<bool>;
#[doc = "Field `EVENTS_FIELDLOST` writer - "]
pub type EVENTS_FIELDLOST_W<'a, const O: u8> =
crate::BitWriter<'a, u32, EVENTS_FIELDLOST_SPEC, bool, O>;
impl R {
#[doc = "Bit 0"]
#[inline(always)]
pub fn events_fieldlost(&self) -> EVENTS_FIELDLOST_R {
EVENTS_FIELDLOST_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0"]
#[inline(always)]
pub fn events_fieldlost(&mut self) -> EVENTS_FIELDLOST_W<0> {
EVENTS_FIELDLOST_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 = "Remote NFC field lost\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_fieldlost](index.html) module"]
pub struct EVENTS_FIELDLOST_SPEC;
impl crate::RegisterSpec for EVENTS_FIELDLOST_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_fieldlost::R](R) reader structure"]
impl crate::Readable for EVENTS_FIELDLOST_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_fieldlost::W](W) writer structure"]
impl crate::Writable for EVENTS_FIELDLOST_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_FIELDLOST to value 0"]
impl crate::Resettable for EVENTS_FIELDLOST_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+80
View File
@@ -0,0 +1,80 @@
#[doc = "Register `EVENTS_READY` reader"]
pub struct R(crate::R<EVENTS_READY_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_READY_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_READY_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_READY_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_READY` writer"]
pub struct W(crate::W<EVENTS_READY_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_READY_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_READY_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_READY_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `EVENTS_READY` reader - "]
pub type EVENTS_READY_R = crate::BitReader<bool>;
#[doc = "Field `EVENTS_READY` writer - "]
pub type EVENTS_READY_W<'a, const O: u8> = crate::BitWriter<'a, u32, EVENTS_READY_SPEC, bool, O>;
impl R {
#[doc = "Bit 0"]
#[inline(always)]
pub fn events_ready(&self) -> EVENTS_READY_R {
EVENTS_READY_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0"]
#[inline(always)]
pub fn events_ready(&mut self) -> EVENTS_READY_W<0> {
EVENTS_READY_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 = "The NFCT peripheral is ready to receive and send frames\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_ready](index.html) module"]
pub struct EVENTS_READY_SPEC;
impl crate::RegisterSpec for EVENTS_READY_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_ready::R](R) reader structure"]
impl crate::Readable for EVENTS_READY_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_ready::W](W) writer structure"]
impl crate::Writable for EVENTS_READY_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_READY to value 0"]
impl crate::Resettable for EVENTS_READY_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+81
View File
@@ -0,0 +1,81 @@
#[doc = "Register `EVENTS_RXERROR` reader"]
pub struct R(crate::R<EVENTS_RXERROR_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_RXERROR_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_RXERROR_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_RXERROR_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_RXERROR` writer"]
pub struct W(crate::W<EVENTS_RXERROR_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_RXERROR_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_RXERROR_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_RXERROR_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `EVENTS_RXERROR` reader - "]
pub type EVENTS_RXERROR_R = crate::BitReader<bool>;
#[doc = "Field `EVENTS_RXERROR` writer - "]
pub type EVENTS_RXERROR_W<'a, const O: u8> =
crate::BitWriter<'a, u32, EVENTS_RXERROR_SPEC, bool, O>;
impl R {
#[doc = "Bit 0"]
#[inline(always)]
pub fn events_rxerror(&self) -> EVENTS_RXERROR_R {
EVENTS_RXERROR_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0"]
#[inline(always)]
pub fn events_rxerror(&mut self) -> EVENTS_RXERROR_W<0> {
EVENTS_RXERROR_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 = "NFC RX frame error reported. The FRAMESTATUS.RX register contains details on the source of the error.\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_rxerror](index.html) module"]
pub struct EVENTS_RXERROR_SPEC;
impl crate::RegisterSpec for EVENTS_RXERROR_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_rxerror::R](R) reader structure"]
impl crate::Readable for EVENTS_RXERROR_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_rxerror::W](W) writer structure"]
impl crate::Writable for EVENTS_RXERROR_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_RXERROR to value 0"]
impl crate::Resettable for EVENTS_RXERROR_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+81
View File
@@ -0,0 +1,81 @@
#[doc = "Register `EVENTS_RXFRAMEEND` reader"]
pub struct R(crate::R<EVENTS_RXFRAMEEND_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_RXFRAMEEND_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_RXFRAMEEND_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_RXFRAMEEND_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_RXFRAMEEND` writer"]
pub struct W(crate::W<EVENTS_RXFRAMEEND_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_RXFRAMEEND_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_RXFRAMEEND_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_RXFRAMEEND_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `EVENTS_RXFRAMEEND` reader - "]
pub type EVENTS_RXFRAMEEND_R = crate::BitReader<bool>;
#[doc = "Field `EVENTS_RXFRAMEEND` writer - "]
pub type EVENTS_RXFRAMEEND_W<'a, const O: u8> =
crate::BitWriter<'a, u32, EVENTS_RXFRAMEEND_SPEC, bool, O>;
impl R {
#[doc = "Bit 0"]
#[inline(always)]
pub fn events_rxframeend(&self) -> EVENTS_RXFRAMEEND_R {
EVENTS_RXFRAMEEND_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0"]
#[inline(always)]
pub fn events_rxframeend(&mut self) -> EVENTS_RXFRAMEEND_W<0> {
EVENTS_RXFRAMEEND_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 = "Received data has been checked (CRC, parity) and transferred to RAM, and EasyDMA has ended accessing the RX buffer\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_rxframeend](index.html) module"]
pub struct EVENTS_RXFRAMEEND_SPEC;
impl crate::RegisterSpec for EVENTS_RXFRAMEEND_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_rxframeend::R](R) reader structure"]
impl crate::Readable for EVENTS_RXFRAMEEND_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_rxframeend::W](W) writer structure"]
impl crate::Writable for EVENTS_RXFRAMEEND_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_RXFRAMEEND to value 0"]
impl crate::Resettable for EVENTS_RXFRAMEEND_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+81
View File
@@ -0,0 +1,81 @@
#[doc = "Register `EVENTS_RXFRAMESTART` reader"]
pub struct R(crate::R<EVENTS_RXFRAMESTART_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_RXFRAMESTART_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_RXFRAMESTART_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_RXFRAMESTART_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_RXFRAMESTART` writer"]
pub struct W(crate::W<EVENTS_RXFRAMESTART_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_RXFRAMESTART_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_RXFRAMESTART_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_RXFRAMESTART_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `EVENTS_RXFRAMESTART` reader - "]
pub type EVENTS_RXFRAMESTART_R = crate::BitReader<bool>;
#[doc = "Field `EVENTS_RXFRAMESTART` writer - "]
pub type EVENTS_RXFRAMESTART_W<'a, const O: u8> =
crate::BitWriter<'a, u32, EVENTS_RXFRAMESTART_SPEC, bool, O>;
impl R {
#[doc = "Bit 0"]
#[inline(always)]
pub fn events_rxframestart(&self) -> EVENTS_RXFRAMESTART_R {
EVENTS_RXFRAMESTART_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0"]
#[inline(always)]
pub fn events_rxframestart(&mut self) -> EVENTS_RXFRAMESTART_W<0> {
EVENTS_RXFRAMESTART_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 = "Marks the end of the first symbol of a received frame\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_rxframestart](index.html) module"]
pub struct EVENTS_RXFRAMESTART_SPEC;
impl crate::RegisterSpec for EVENTS_RXFRAMESTART_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_rxframestart::R](R) reader structure"]
impl crate::Readable for EVENTS_RXFRAMESTART_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_rxframestart::W](W) writer structure"]
impl crate::Writable for EVENTS_RXFRAMESTART_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_RXFRAMESTART to value 0"]
impl crate::Resettable for EVENTS_RXFRAMESTART_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+81
View File
@@ -0,0 +1,81 @@
#[doc = "Register `EVENTS_SELECTED` reader"]
pub struct R(crate::R<EVENTS_SELECTED_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_SELECTED_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_SELECTED_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_SELECTED_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_SELECTED` writer"]
pub struct W(crate::W<EVENTS_SELECTED_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_SELECTED_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_SELECTED_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_SELECTED_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `EVENTS_SELECTED` reader - "]
pub type EVENTS_SELECTED_R = crate::BitReader<bool>;
#[doc = "Field `EVENTS_SELECTED` writer - "]
pub type EVENTS_SELECTED_W<'a, const O: u8> =
crate::BitWriter<'a, u32, EVENTS_SELECTED_SPEC, bool, O>;
impl R {
#[doc = "Bit 0"]
#[inline(always)]
pub fn events_selected(&self) -> EVENTS_SELECTED_R {
EVENTS_SELECTED_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0"]
#[inline(always)]
pub fn events_selected(&mut self) -> EVENTS_SELECTED_W<0> {
EVENTS_SELECTED_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 = "NFC auto collision resolution successfully completed\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_selected](index.html) module"]
pub struct EVENTS_SELECTED_SPEC;
impl crate::RegisterSpec for EVENTS_SELECTED_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_selected::R](R) reader structure"]
impl crate::Readable for EVENTS_SELECTED_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_selected::W](W) writer structure"]
impl crate::Writable for EVENTS_SELECTED_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_SELECTED to value 0"]
impl crate::Resettable for EVENTS_SELECTED_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+81
View File
@@ -0,0 +1,81 @@
#[doc = "Register `EVENTS_STARTED` reader"]
pub struct R(crate::R<EVENTS_STARTED_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_STARTED_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_STARTED_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_STARTED_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_STARTED` writer"]
pub struct W(crate::W<EVENTS_STARTED_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_STARTED_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_STARTED_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_STARTED_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `EVENTS_STARTED` reader - "]
pub type EVENTS_STARTED_R = crate::BitReader<bool>;
#[doc = "Field `EVENTS_STARTED` writer - "]
pub type EVENTS_STARTED_W<'a, const O: u8> =
crate::BitWriter<'a, u32, EVENTS_STARTED_SPEC, bool, O>;
impl R {
#[doc = "Bit 0"]
#[inline(always)]
pub fn events_started(&self) -> EVENTS_STARTED_R {
EVENTS_STARTED_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0"]
#[inline(always)]
pub fn events_started(&mut self) -> EVENTS_STARTED_W<0> {
EVENTS_STARTED_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 = "EasyDMA is ready to receive or send frames.\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_started](index.html) module"]
pub struct EVENTS_STARTED_SPEC;
impl crate::RegisterSpec for EVENTS_STARTED_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_started::R](R) reader structure"]
impl crate::Readable for EVENTS_STARTED_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_started::W](W) writer structure"]
impl crate::Writable for EVENTS_STARTED_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_STARTED to value 0"]
impl crate::Resettable for EVENTS_STARTED_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+81
View File
@@ -0,0 +1,81 @@
#[doc = "Register `EVENTS_TXFRAMEEND` reader"]
pub struct R(crate::R<EVENTS_TXFRAMEEND_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_TXFRAMEEND_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_TXFRAMEEND_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_TXFRAMEEND_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_TXFRAMEEND` writer"]
pub struct W(crate::W<EVENTS_TXFRAMEEND_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_TXFRAMEEND_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_TXFRAMEEND_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_TXFRAMEEND_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `EVENTS_TXFRAMEEND` reader - "]
pub type EVENTS_TXFRAMEEND_R = crate::BitReader<bool>;
#[doc = "Field `EVENTS_TXFRAMEEND` writer - "]
pub type EVENTS_TXFRAMEEND_W<'a, const O: u8> =
crate::BitWriter<'a, u32, EVENTS_TXFRAMEEND_SPEC, bool, O>;
impl R {
#[doc = "Bit 0"]
#[inline(always)]
pub fn events_txframeend(&self) -> EVENTS_TXFRAMEEND_R {
EVENTS_TXFRAMEEND_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0"]
#[inline(always)]
pub fn events_txframeend(&mut self) -> EVENTS_TXFRAMEEND_W<0> {
EVENTS_TXFRAMEEND_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 = "Marks the end of the last transmitted on-air symbol of a frame\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_txframeend](index.html) module"]
pub struct EVENTS_TXFRAMEEND_SPEC;
impl crate::RegisterSpec for EVENTS_TXFRAMEEND_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_txframeend::R](R) reader structure"]
impl crate::Readable for EVENTS_TXFRAMEEND_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_txframeend::W](W) writer structure"]
impl crate::Writable for EVENTS_TXFRAMEEND_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_TXFRAMEEND to value 0"]
impl crate::Resettable for EVENTS_TXFRAMEEND_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+81
View File
@@ -0,0 +1,81 @@
#[doc = "Register `EVENTS_TXFRAMESTART` reader"]
pub struct R(crate::R<EVENTS_TXFRAMESTART_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_TXFRAMESTART_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_TXFRAMESTART_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_TXFRAMESTART_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_TXFRAMESTART` writer"]
pub struct W(crate::W<EVENTS_TXFRAMESTART_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_TXFRAMESTART_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_TXFRAMESTART_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_TXFRAMESTART_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `EVENTS_TXFRAMESTART` reader - "]
pub type EVENTS_TXFRAMESTART_R = crate::BitReader<bool>;
#[doc = "Field `EVENTS_TXFRAMESTART` writer - "]
pub type EVENTS_TXFRAMESTART_W<'a, const O: u8> =
crate::BitWriter<'a, u32, EVENTS_TXFRAMESTART_SPEC, bool, O>;
impl R {
#[doc = "Bit 0"]
#[inline(always)]
pub fn events_txframestart(&self) -> EVENTS_TXFRAMESTART_R {
EVENTS_TXFRAMESTART_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0"]
#[inline(always)]
pub fn events_txframestart(&mut self) -> EVENTS_TXFRAMESTART_W<0> {
EVENTS_TXFRAMESTART_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 = "Marks the start of the first symbol of a transmitted frame\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_txframestart](index.html) module"]
pub struct EVENTS_TXFRAMESTART_SPEC;
impl crate::RegisterSpec for EVENTS_TXFRAMESTART_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_txframestart::R](R) reader structure"]
impl crate::Readable for EVENTS_TXFRAMESTART_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_txframestart::W](W) writer structure"]
impl crate::Writable for EVENTS_TXFRAMESTART_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_TXFRAMESTART to value 0"]
impl crate::Resettable for EVENTS_TXFRAMESTART_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+115
View File
@@ -0,0 +1,115 @@
#[doc = "Register `FIELDPRESENT` reader"]
pub struct R(crate::R<FIELDPRESENT_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<FIELDPRESENT_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<FIELDPRESENT_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<FIELDPRESENT_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `FIELDPRESENT` reader - Indicates if a valid field is present. Available only in the activated state."]
pub type FIELDPRESENT_R = crate::BitReader<FIELDPRESENT_A>;
#[doc = "Indicates if a valid field is present. Available only in the activated state.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum FIELDPRESENT_A {
#[doc = "0: No valid field detected"]
NO_FIELD = 0,
#[doc = "1: Valid field detected"]
FIELD_PRESENT = 1,
}
impl From<FIELDPRESENT_A> for bool {
#[inline(always)]
fn from(variant: FIELDPRESENT_A) -> Self {
variant as u8 != 0
}
}
impl FIELDPRESENT_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> FIELDPRESENT_A {
match self.bits {
false => FIELDPRESENT_A::NO_FIELD,
true => FIELDPRESENT_A::FIELD_PRESENT,
}
}
#[doc = "Checks if the value of the field is `NO_FIELD`"]
#[inline(always)]
pub fn is_no_field(&self) -> bool {
*self == FIELDPRESENT_A::NO_FIELD
}
#[doc = "Checks if the value of the field is `FIELD_PRESENT`"]
#[inline(always)]
pub fn is_field_present(&self) -> bool {
*self == FIELDPRESENT_A::FIELD_PRESENT
}
}
#[doc = "Field `LOCKDETECT` reader - Indicates if the low level has locked to the field"]
pub type LOCKDETECT_R = crate::BitReader<LOCKDETECT_A>;
#[doc = "Indicates if the low level has locked to the field\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum LOCKDETECT_A {
#[doc = "0: Not locked to field"]
NOT_LOCKED = 0,
#[doc = "1: Locked to field"]
LOCKED = 1,
}
impl From<LOCKDETECT_A> for bool {
#[inline(always)]
fn from(variant: LOCKDETECT_A) -> Self {
variant as u8 != 0
}
}
impl LOCKDETECT_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> LOCKDETECT_A {
match self.bits {
false => LOCKDETECT_A::NOT_LOCKED,
true => LOCKDETECT_A::LOCKED,
}
}
#[doc = "Checks if the value of the field is `NOT_LOCKED`"]
#[inline(always)]
pub fn is_not_locked(&self) -> bool {
*self == LOCKDETECT_A::NOT_LOCKED
}
#[doc = "Checks if the value of the field is `LOCKED`"]
#[inline(always)]
pub fn is_locked(&self) -> bool {
*self == LOCKDETECT_A::LOCKED
}
}
impl R {
#[doc = "Bit 0 - Indicates if a valid field is present. Available only in the activated state."]
#[inline(always)]
pub fn fieldpresent(&self) -> FIELDPRESENT_R {
FIELDPRESENT_R::new((self.bits & 1) != 0)
}
#[doc = "Bit 1 - Indicates if the low level has locked to the field"]
#[inline(always)]
pub fn lockdetect(&self) -> LOCKDETECT_R {
LOCKDETECT_R::new(((self.bits >> 1) & 1) != 0)
}
}
#[doc = "Indicates the presence or not of a valid field\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 [fieldpresent](index.html) module"]
pub struct FIELDPRESENT_SPEC;
impl crate::RegisterSpec for FIELDPRESENT_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [fieldpresent::R](R) reader structure"]
impl crate::Readable for FIELDPRESENT_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets FIELDPRESENT to value 0"]
impl crate::Resettable for FIELDPRESENT_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+81
View File
@@ -0,0 +1,81 @@
#[doc = "Register `FRAMEDELAYMAX` reader"]
pub struct R(crate::R<FRAMEDELAYMAX_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<FRAMEDELAYMAX_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<FRAMEDELAYMAX_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<FRAMEDELAYMAX_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `FRAMEDELAYMAX` writer"]
pub struct W(crate::W<FRAMEDELAYMAX_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<FRAMEDELAYMAX_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<FRAMEDELAYMAX_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<FRAMEDELAYMAX_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `FRAMEDELAYMAX` reader - Maximum frame delay in number of 13.56 MHz clocks"]
pub type FRAMEDELAYMAX_R = crate::FieldReader<u32, u32>;
#[doc = "Field `FRAMEDELAYMAX` writer - Maximum frame delay in number of 13.56 MHz clocks"]
pub type FRAMEDELAYMAX_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, FRAMEDELAYMAX_SPEC, u32, u32, 20, O>;
impl R {
#[doc = "Bits 0:19 - Maximum frame delay in number of 13.56 MHz clocks"]
#[inline(always)]
pub fn framedelaymax(&self) -> FRAMEDELAYMAX_R {
FRAMEDELAYMAX_R::new((self.bits & 0x000f_ffff) as u32)
}
}
impl W {
#[doc = "Bits 0:19 - Maximum frame delay in number of 13.56 MHz clocks"]
#[inline(always)]
pub fn framedelaymax(&mut self) -> FRAMEDELAYMAX_W<0> {
FRAMEDELAYMAX_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 = "Maximum frame delay\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 [framedelaymax](index.html) module"]
pub struct FRAMEDELAYMAX_SPEC;
impl crate::RegisterSpec for FRAMEDELAYMAX_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [framedelaymax::R](R) reader structure"]
impl crate::Readable for FRAMEDELAYMAX_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [framedelaymax::W](W) writer structure"]
impl crate::Writable for FRAMEDELAYMAX_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets FRAMEDELAYMAX to value 0x1000"]
impl crate::Resettable for FRAMEDELAYMAX_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0x1000
}
}
+81
View File
@@ -0,0 +1,81 @@
#[doc = "Register `FRAMEDELAYMIN` reader"]
pub struct R(crate::R<FRAMEDELAYMIN_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<FRAMEDELAYMIN_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<FRAMEDELAYMIN_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<FRAMEDELAYMIN_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `FRAMEDELAYMIN` writer"]
pub struct W(crate::W<FRAMEDELAYMIN_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<FRAMEDELAYMIN_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<FRAMEDELAYMIN_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<FRAMEDELAYMIN_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `FRAMEDELAYMIN` reader - Minimum frame delay in number of 13.56 MHz clocks"]
pub type FRAMEDELAYMIN_R = crate::FieldReader<u16, u16>;
#[doc = "Field `FRAMEDELAYMIN` writer - Minimum frame delay in number of 13.56 MHz clocks"]
pub type FRAMEDELAYMIN_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, FRAMEDELAYMIN_SPEC, u16, u16, 16, O>;
impl R {
#[doc = "Bits 0:15 - Minimum frame delay in number of 13.56 MHz clocks"]
#[inline(always)]
pub fn framedelaymin(&self) -> FRAMEDELAYMIN_R {
FRAMEDELAYMIN_R::new((self.bits & 0xffff) as u16)
}
}
impl W {
#[doc = "Bits 0:15 - Minimum frame delay in number of 13.56 MHz clocks"]
#[inline(always)]
pub fn framedelaymin(&mut self) -> FRAMEDELAYMIN_W<0> {
FRAMEDELAYMIN_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 = "Minimum frame delay\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 [framedelaymin](index.html) module"]
pub struct FRAMEDELAYMIN_SPEC;
impl crate::RegisterSpec for FRAMEDELAYMIN_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [framedelaymin::R](R) reader structure"]
impl crate::Readable for FRAMEDELAYMIN_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [framedelaymin::W](W) writer structure"]
impl crate::Writable for FRAMEDELAYMIN_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets FRAMEDELAYMIN to value 0x0480"]
impl crate::Resettable for FRAMEDELAYMIN_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0x0480
}
}
+155
View File
@@ -0,0 +1,155 @@
#[doc = "Register `FRAMEDELAYMODE` reader"]
pub struct R(crate::R<FRAMEDELAYMODE_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<FRAMEDELAYMODE_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<FRAMEDELAYMODE_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<FRAMEDELAYMODE_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `FRAMEDELAYMODE` writer"]
pub struct W(crate::W<FRAMEDELAYMODE_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<FRAMEDELAYMODE_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<FRAMEDELAYMODE_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<FRAMEDELAYMODE_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `FRAMEDELAYMODE` reader - Configuration register for the Frame Delay Timer"]
pub type FRAMEDELAYMODE_R = crate::FieldReader<u8, FRAMEDELAYMODE_A>;
#[doc = "Configuration register for the Frame Delay Timer\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum FRAMEDELAYMODE_A {
#[doc = "0: Transmission is independent of frame timer and will start when the STARTTX task is triggered. No timeout."]
FREE_RUN = 0,
#[doc = "1: Frame is transmitted between FRAMEDELAYMIN and FRAMEDELAYMAX"]
WINDOW = 1,
#[doc = "2: Frame is transmitted exactly at FRAMEDELAYMAX"]
EXACT_VAL = 2,
#[doc = "3: Frame is transmitted on a bit grid between FRAMEDELAYMIN and FRAMEDELAYMAX"]
WINDOW_GRID = 3,
}
impl From<FRAMEDELAYMODE_A> for u8 {
#[inline(always)]
fn from(variant: FRAMEDELAYMODE_A) -> Self {
variant as _
}
}
impl FRAMEDELAYMODE_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> FRAMEDELAYMODE_A {
match self.bits {
0 => FRAMEDELAYMODE_A::FREE_RUN,
1 => FRAMEDELAYMODE_A::WINDOW,
2 => FRAMEDELAYMODE_A::EXACT_VAL,
3 => FRAMEDELAYMODE_A::WINDOW_GRID,
_ => unreachable!(),
}
}
#[doc = "Checks if the value of the field is `FREE_RUN`"]
#[inline(always)]
pub fn is_free_run(&self) -> bool {
*self == FRAMEDELAYMODE_A::FREE_RUN
}
#[doc = "Checks if the value of the field is `WINDOW`"]
#[inline(always)]
pub fn is_window(&self) -> bool {
*self == FRAMEDELAYMODE_A::WINDOW
}
#[doc = "Checks if the value of the field is `EXACT_VAL`"]
#[inline(always)]
pub fn is_exact_val(&self) -> bool {
*self == FRAMEDELAYMODE_A::EXACT_VAL
}
#[doc = "Checks if the value of the field is `WINDOW_GRID`"]
#[inline(always)]
pub fn is_window_grid(&self) -> bool {
*self == FRAMEDELAYMODE_A::WINDOW_GRID
}
}
#[doc = "Field `FRAMEDELAYMODE` writer - Configuration register for the Frame Delay Timer"]
pub type FRAMEDELAYMODE_W<'a, const O: u8> =
crate::FieldWriterSafe<'a, u32, FRAMEDELAYMODE_SPEC, u8, FRAMEDELAYMODE_A, 2, O>;
impl<'a, const O: u8> FRAMEDELAYMODE_W<'a, O> {
#[doc = "Transmission is independent of frame timer and will start when the STARTTX task is triggered. No timeout."]
#[inline(always)]
pub fn free_run(self) -> &'a mut W {
self.variant(FRAMEDELAYMODE_A::FREE_RUN)
}
#[doc = "Frame is transmitted between FRAMEDELAYMIN and FRAMEDELAYMAX"]
#[inline(always)]
pub fn window(self) -> &'a mut W {
self.variant(FRAMEDELAYMODE_A::WINDOW)
}
#[doc = "Frame is transmitted exactly at FRAMEDELAYMAX"]
#[inline(always)]
pub fn exact_val(self) -> &'a mut W {
self.variant(FRAMEDELAYMODE_A::EXACT_VAL)
}
#[doc = "Frame is transmitted on a bit grid between FRAMEDELAYMIN and FRAMEDELAYMAX"]
#[inline(always)]
pub fn window_grid(self) -> &'a mut W {
self.variant(FRAMEDELAYMODE_A::WINDOW_GRID)
}
}
impl R {
#[doc = "Bits 0:1 - Configuration register for the Frame Delay Timer"]
#[inline(always)]
pub fn framedelaymode(&self) -> FRAMEDELAYMODE_R {
FRAMEDELAYMODE_R::new((self.bits & 3) as u8)
}
}
impl W {
#[doc = "Bits 0:1 - Configuration register for the Frame Delay Timer"]
#[inline(always)]
pub fn framedelaymode(&mut self) -> FRAMEDELAYMODE_W<0> {
FRAMEDELAYMODE_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Configuration register for the Frame Delay Timer\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [framedelaymode](index.html) module"]
pub struct FRAMEDELAYMODE_SPEC;
impl crate::RegisterSpec for FRAMEDELAYMODE_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [framedelaymode::R](R) reader structure"]
impl crate::Readable for FRAMEDELAYMODE_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [framedelaymode::W](W) writer structure"]
impl crate::Writable for FRAMEDELAYMODE_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets FRAMEDELAYMODE to value 0x01"]
impl crate::Resettable for FRAMEDELAYMODE_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0x01
}
}
+10
View File
@@ -0,0 +1,10 @@
#[doc = r"Register block"]
#[repr(C)]
pub struct FRAMESTATUS {
#[doc = "0x00 - Result of last incoming frame"]
pub rx: RX,
}
#[doc = "RX (rw) register accessor: an alias for `Reg<RX_SPEC>`"]
pub type RX = crate::Reg<rx::RX_SPEC>;
#[doc = "Result of last incoming frame"]
pub mod rx;
+246
View File
@@ -0,0 +1,246 @@
#[doc = "Register `RX` reader"]
pub struct R(crate::R<RX_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<RX_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<RX_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<RX_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `RX` writer"]
pub struct W(crate::W<RX_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<RX_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<RX_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<RX_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `CRCERROR` reader - No valid end of frame (EoF) detected"]
pub type CRCERROR_R = crate::BitReader<CRCERROR_A>;
#[doc = "No valid end of frame (EoF) detected\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CRCERROR_A {
#[doc = "0: Valid CRC detected"]
CRCCORRECT = 0,
#[doc = "1: CRC received does not match local check"]
CRCERROR = 1,
}
impl From<CRCERROR_A> for bool {
#[inline(always)]
fn from(variant: CRCERROR_A) -> Self {
variant as u8 != 0
}
}
impl CRCERROR_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> CRCERROR_A {
match self.bits {
false => CRCERROR_A::CRCCORRECT,
true => CRCERROR_A::CRCERROR,
}
}
#[doc = "Checks if the value of the field is `CRCCORRECT`"]
#[inline(always)]
pub fn is_crccorrect(&self) -> bool {
*self == CRCERROR_A::CRCCORRECT
}
#[doc = "Checks if the value of the field is `CRCERROR`"]
#[inline(always)]
pub fn is_crcerror(&self) -> bool {
*self == CRCERROR_A::CRCERROR
}
}
#[doc = "Field `CRCERROR` writer - No valid end of frame (EoF) detected"]
pub type CRCERROR_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, RX_SPEC, CRCERROR_A, O>;
impl<'a, const O: u8> CRCERROR_W<'a, O> {
#[doc = "Valid CRC detected"]
#[inline(always)]
pub fn crccorrect(self) -> &'a mut W {
self.variant(CRCERROR_A::CRCCORRECT)
}
#[doc = "CRC received does not match local check"]
#[inline(always)]
pub fn crcerror(self) -> &'a mut W {
self.variant(CRCERROR_A::CRCERROR)
}
}
#[doc = "Field `PARITYSTATUS` reader - Parity status of received frame"]
pub type PARITYSTATUS_R = crate::BitReader<PARITYSTATUS_A>;
#[doc = "Parity status of received frame\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum PARITYSTATUS_A {
#[doc = "0: Frame received with parity OK"]
PARITY_OK = 0,
#[doc = "1: Frame received with parity error"]
PARITY_ERROR = 1,
}
impl From<PARITYSTATUS_A> for bool {
#[inline(always)]
fn from(variant: PARITYSTATUS_A) -> Self {
variant as u8 != 0
}
}
impl PARITYSTATUS_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> PARITYSTATUS_A {
match self.bits {
false => PARITYSTATUS_A::PARITY_OK,
true => PARITYSTATUS_A::PARITY_ERROR,
}
}
#[doc = "Checks if the value of the field is `PARITY_OK`"]
#[inline(always)]
pub fn is_parity_ok(&self) -> bool {
*self == PARITYSTATUS_A::PARITY_OK
}
#[doc = "Checks if the value of the field is `PARITY_ERROR`"]
#[inline(always)]
pub fn is_parity_error(&self) -> bool {
*self == PARITYSTATUS_A::PARITY_ERROR
}
}
#[doc = "Field `PARITYSTATUS` writer - Parity status of received frame"]
pub type PARITYSTATUS_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, RX_SPEC, PARITYSTATUS_A, O>;
impl<'a, const O: u8> PARITYSTATUS_W<'a, O> {
#[doc = "Frame received with parity OK"]
#[inline(always)]
pub fn parity_ok(self) -> &'a mut W {
self.variant(PARITYSTATUS_A::PARITY_OK)
}
#[doc = "Frame received with parity error"]
#[inline(always)]
pub fn parity_error(self) -> &'a mut W {
self.variant(PARITYSTATUS_A::PARITY_ERROR)
}
}
#[doc = "Field `OVERRUN` reader - Overrun detected"]
pub type OVERRUN_R = crate::BitReader<OVERRUN_A>;
#[doc = "Overrun detected\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum OVERRUN_A {
#[doc = "0: No overrun detected"]
NO_OVERRUN = 0,
#[doc = "1: Overrun error"]
OVERRUN = 1,
}
impl From<OVERRUN_A> for bool {
#[inline(always)]
fn from(variant: OVERRUN_A) -> Self {
variant as u8 != 0
}
}
impl OVERRUN_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> OVERRUN_A {
match self.bits {
false => OVERRUN_A::NO_OVERRUN,
true => OVERRUN_A::OVERRUN,
}
}
#[doc = "Checks if the value of the field is `NO_OVERRUN`"]
#[inline(always)]
pub fn is_no_overrun(&self) -> bool {
*self == OVERRUN_A::NO_OVERRUN
}
#[doc = "Checks if the value of the field is `OVERRUN`"]
#[inline(always)]
pub fn is_overrun(&self) -> bool {
*self == OVERRUN_A::OVERRUN
}
}
#[doc = "Field `OVERRUN` writer - Overrun detected"]
pub type OVERRUN_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, RX_SPEC, OVERRUN_A, O>;
impl<'a, const O: u8> OVERRUN_W<'a, O> {
#[doc = "No overrun detected"]
#[inline(always)]
pub fn no_overrun(self) -> &'a mut W {
self.variant(OVERRUN_A::NO_OVERRUN)
}
#[doc = "Overrun error"]
#[inline(always)]
pub fn overrun(self) -> &'a mut W {
self.variant(OVERRUN_A::OVERRUN)
}
}
impl R {
#[doc = "Bit 0 - No valid end of frame (EoF) detected"]
#[inline(always)]
pub fn crcerror(&self) -> CRCERROR_R {
CRCERROR_R::new((self.bits & 1) != 0)
}
#[doc = "Bit 2 - Parity status of received frame"]
#[inline(always)]
pub fn paritystatus(&self) -> PARITYSTATUS_R {
PARITYSTATUS_R::new(((self.bits >> 2) & 1) != 0)
}
#[doc = "Bit 3 - Overrun detected"]
#[inline(always)]
pub fn overrun(&self) -> OVERRUN_R {
OVERRUN_R::new(((self.bits >> 3) & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - No valid end of frame (EoF) detected"]
#[inline(always)]
pub fn crcerror(&mut self) -> CRCERROR_W<0> {
CRCERROR_W::new(self)
}
#[doc = "Bit 2 - Parity status of received frame"]
#[inline(always)]
pub fn paritystatus(&mut self) -> PARITYSTATUS_W<2> {
PARITYSTATUS_W::new(self)
}
#[doc = "Bit 3 - Overrun detected"]
#[inline(always)]
pub fn overrun(&mut self) -> OVERRUN_W<3> {
OVERRUN_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 = "Result of last incoming frame\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 [rx](index.html) module"]
pub struct RX_SPEC;
impl crate::RegisterSpec for RX_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [rx::R](R) reader structure"]
impl crate::Readable for RX_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [rx::W](W) writer structure"]
impl crate::Writable for RX_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets RX to value 0"]
impl crate::Resettable for RX_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+968
View File
@@ -0,0 +1,968 @@
#[doc = "Register `INTEN` reader"]
pub struct R(crate::R<INTEN_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<INTEN_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<INTEN_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<INTEN_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `INTEN` writer"]
pub struct W(crate::W<INTEN_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<INTEN_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<INTEN_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<INTEN_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `READY` reader - Enable or disable interrupt for READY event"]
pub type READY_R = crate::BitReader<READY_A>;
#[doc = "Enable or disable interrupt for READY event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum READY_A {
#[doc = "0: Disable"]
DISABLED = 0,
#[doc = "1: Enable"]
ENABLED = 1,
}
impl From<READY_A> for bool {
#[inline(always)]
fn from(variant: READY_A) -> Self {
variant as u8 != 0
}
}
impl READY_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> READY_A {
match self.bits {
false => READY_A::DISABLED,
true => READY_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == READY_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == READY_A::ENABLED
}
}
#[doc = "Field `READY` writer - Enable or disable interrupt for READY event"]
pub type READY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, READY_A, O>;
impl<'a, const O: u8> READY_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(READY_A::DISABLED)
}
#[doc = "Enable"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(READY_A::ENABLED)
}
}
#[doc = "Field `FIELDDETECTED` reader - Enable or disable interrupt for FIELDDETECTED event"]
pub type FIELDDETECTED_R = crate::BitReader<FIELDDETECTED_A>;
#[doc = "Enable or disable interrupt for FIELDDETECTED event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum FIELDDETECTED_A {
#[doc = "0: Disable"]
DISABLED = 0,
#[doc = "1: Enable"]
ENABLED = 1,
}
impl From<FIELDDETECTED_A> for bool {
#[inline(always)]
fn from(variant: FIELDDETECTED_A) -> Self {
variant as u8 != 0
}
}
impl FIELDDETECTED_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> FIELDDETECTED_A {
match self.bits {
false => FIELDDETECTED_A::DISABLED,
true => FIELDDETECTED_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == FIELDDETECTED_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == FIELDDETECTED_A::ENABLED
}
}
#[doc = "Field `FIELDDETECTED` writer - Enable or disable interrupt for FIELDDETECTED event"]
pub type FIELDDETECTED_W<'a, const O: u8> =
crate::BitWriter<'a, u32, INTEN_SPEC, FIELDDETECTED_A, O>;
impl<'a, const O: u8> FIELDDETECTED_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(FIELDDETECTED_A::DISABLED)
}
#[doc = "Enable"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(FIELDDETECTED_A::ENABLED)
}
}
#[doc = "Field `FIELDLOST` reader - Enable or disable interrupt for FIELDLOST event"]
pub type FIELDLOST_R = crate::BitReader<FIELDLOST_A>;
#[doc = "Enable or disable interrupt for FIELDLOST event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum FIELDLOST_A {
#[doc = "0: Disable"]
DISABLED = 0,
#[doc = "1: Enable"]
ENABLED = 1,
}
impl From<FIELDLOST_A> for bool {
#[inline(always)]
fn from(variant: FIELDLOST_A) -> Self {
variant as u8 != 0
}
}
impl FIELDLOST_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> FIELDLOST_A {
match self.bits {
false => FIELDLOST_A::DISABLED,
true => FIELDLOST_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == FIELDLOST_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == FIELDLOST_A::ENABLED
}
}
#[doc = "Field `FIELDLOST` writer - Enable or disable interrupt for FIELDLOST event"]
pub type FIELDLOST_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, FIELDLOST_A, O>;
impl<'a, const O: u8> FIELDLOST_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(FIELDLOST_A::DISABLED)
}
#[doc = "Enable"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(FIELDLOST_A::ENABLED)
}
}
#[doc = "Field `TXFRAMESTART` reader - Enable or disable interrupt for TXFRAMESTART event"]
pub type TXFRAMESTART_R = crate::BitReader<TXFRAMESTART_A>;
#[doc = "Enable or disable interrupt for TXFRAMESTART event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TXFRAMESTART_A {
#[doc = "0: Disable"]
DISABLED = 0,
#[doc = "1: Enable"]
ENABLED = 1,
}
impl From<TXFRAMESTART_A> for bool {
#[inline(always)]
fn from(variant: TXFRAMESTART_A) -> Self {
variant as u8 != 0
}
}
impl TXFRAMESTART_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> TXFRAMESTART_A {
match self.bits {
false => TXFRAMESTART_A::DISABLED,
true => TXFRAMESTART_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == TXFRAMESTART_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == TXFRAMESTART_A::ENABLED
}
}
#[doc = "Field `TXFRAMESTART` writer - Enable or disable interrupt for TXFRAMESTART event"]
pub type TXFRAMESTART_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, TXFRAMESTART_A, O>;
impl<'a, const O: u8> TXFRAMESTART_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(TXFRAMESTART_A::DISABLED)
}
#[doc = "Enable"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(TXFRAMESTART_A::ENABLED)
}
}
#[doc = "Field `TXFRAMEEND` reader - Enable or disable interrupt for TXFRAMEEND event"]
pub type TXFRAMEEND_R = crate::BitReader<TXFRAMEEND_A>;
#[doc = "Enable or disable interrupt for TXFRAMEEND event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TXFRAMEEND_A {
#[doc = "0: Disable"]
DISABLED = 0,
#[doc = "1: Enable"]
ENABLED = 1,
}
impl From<TXFRAMEEND_A> for bool {
#[inline(always)]
fn from(variant: TXFRAMEEND_A) -> Self {
variant as u8 != 0
}
}
impl TXFRAMEEND_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> TXFRAMEEND_A {
match self.bits {
false => TXFRAMEEND_A::DISABLED,
true => TXFRAMEEND_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == TXFRAMEEND_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == TXFRAMEEND_A::ENABLED
}
}
#[doc = "Field `TXFRAMEEND` writer - Enable or disable interrupt for TXFRAMEEND event"]
pub type TXFRAMEEND_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, TXFRAMEEND_A, O>;
impl<'a, const O: u8> TXFRAMEEND_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(TXFRAMEEND_A::DISABLED)
}
#[doc = "Enable"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(TXFRAMEEND_A::ENABLED)
}
}
#[doc = "Field `RXFRAMESTART` reader - Enable or disable interrupt for RXFRAMESTART event"]
pub type RXFRAMESTART_R = crate::BitReader<RXFRAMESTART_A>;
#[doc = "Enable or disable interrupt for RXFRAMESTART event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RXFRAMESTART_A {
#[doc = "0: Disable"]
DISABLED = 0,
#[doc = "1: Enable"]
ENABLED = 1,
}
impl From<RXFRAMESTART_A> for bool {
#[inline(always)]
fn from(variant: RXFRAMESTART_A) -> Self {
variant as u8 != 0
}
}
impl RXFRAMESTART_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RXFRAMESTART_A {
match self.bits {
false => RXFRAMESTART_A::DISABLED,
true => RXFRAMESTART_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == RXFRAMESTART_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == RXFRAMESTART_A::ENABLED
}
}
#[doc = "Field `RXFRAMESTART` writer - Enable or disable interrupt for RXFRAMESTART event"]
pub type RXFRAMESTART_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, RXFRAMESTART_A, O>;
impl<'a, const O: u8> RXFRAMESTART_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(RXFRAMESTART_A::DISABLED)
}
#[doc = "Enable"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(RXFRAMESTART_A::ENABLED)
}
}
#[doc = "Field `RXFRAMEEND` reader - Enable or disable interrupt for RXFRAMEEND event"]
pub type RXFRAMEEND_R = crate::BitReader<RXFRAMEEND_A>;
#[doc = "Enable or disable interrupt for RXFRAMEEND event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RXFRAMEEND_A {
#[doc = "0: Disable"]
DISABLED = 0,
#[doc = "1: Enable"]
ENABLED = 1,
}
impl From<RXFRAMEEND_A> for bool {
#[inline(always)]
fn from(variant: RXFRAMEEND_A) -> Self {
variant as u8 != 0
}
}
impl RXFRAMEEND_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RXFRAMEEND_A {
match self.bits {
false => RXFRAMEEND_A::DISABLED,
true => RXFRAMEEND_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == RXFRAMEEND_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == RXFRAMEEND_A::ENABLED
}
}
#[doc = "Field `RXFRAMEEND` writer - Enable or disable interrupt for RXFRAMEEND event"]
pub type RXFRAMEEND_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, RXFRAMEEND_A, O>;
impl<'a, const O: u8> RXFRAMEEND_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(RXFRAMEEND_A::DISABLED)
}
#[doc = "Enable"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(RXFRAMEEND_A::ENABLED)
}
}
#[doc = "Field `ERROR` reader - Enable or disable interrupt for ERROR event"]
pub type ERROR_R = crate::BitReader<ERROR_A>;
#[doc = "Enable or disable interrupt for ERROR event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ERROR_A {
#[doc = "0: Disable"]
DISABLED = 0,
#[doc = "1: Enable"]
ENABLED = 1,
}
impl From<ERROR_A> for bool {
#[inline(always)]
fn from(variant: ERROR_A) -> Self {
variant as u8 != 0
}
}
impl ERROR_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ERROR_A {
match self.bits {
false => ERROR_A::DISABLED,
true => ERROR_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ERROR_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ERROR_A::ENABLED
}
}
#[doc = "Field `ERROR` writer - Enable or disable interrupt for ERROR event"]
pub type ERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, ERROR_A, O>;
impl<'a, const O: u8> ERROR_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ERROR_A::DISABLED)
}
#[doc = "Enable"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ERROR_A::ENABLED)
}
}
#[doc = "Field `RXERROR` reader - Enable or disable interrupt for RXERROR event"]
pub type RXERROR_R = crate::BitReader<RXERROR_A>;
#[doc = "Enable or disable interrupt for RXERROR event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RXERROR_A {
#[doc = "0: Disable"]
DISABLED = 0,
#[doc = "1: Enable"]
ENABLED = 1,
}
impl From<RXERROR_A> for bool {
#[inline(always)]
fn from(variant: RXERROR_A) -> Self {
variant as u8 != 0
}
}
impl RXERROR_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RXERROR_A {
match self.bits {
false => RXERROR_A::DISABLED,
true => RXERROR_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == RXERROR_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == RXERROR_A::ENABLED
}
}
#[doc = "Field `RXERROR` writer - Enable or disable interrupt for RXERROR event"]
pub type RXERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, RXERROR_A, O>;
impl<'a, const O: u8> RXERROR_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(RXERROR_A::DISABLED)
}
#[doc = "Enable"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(RXERROR_A::ENABLED)
}
}
#[doc = "Field `ENDRX` reader - Enable or disable interrupt for ENDRX event"]
pub type ENDRX_R = crate::BitReader<ENDRX_A>;
#[doc = "Enable or disable interrupt for ENDRX event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ENDRX_A {
#[doc = "0: Disable"]
DISABLED = 0,
#[doc = "1: Enable"]
ENABLED = 1,
}
impl From<ENDRX_A> for bool {
#[inline(always)]
fn from(variant: ENDRX_A) -> Self {
variant as u8 != 0
}
}
impl ENDRX_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ENDRX_A {
match self.bits {
false => ENDRX_A::DISABLED,
true => ENDRX_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ENDRX_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ENDRX_A::ENABLED
}
}
#[doc = "Field `ENDRX` writer - Enable or disable interrupt for ENDRX event"]
pub type ENDRX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, ENDRX_A, O>;
impl<'a, const O: u8> ENDRX_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ENDRX_A::DISABLED)
}
#[doc = "Enable"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ENDRX_A::ENABLED)
}
}
#[doc = "Field `ENDTX` reader - Enable or disable interrupt for ENDTX event"]
pub type ENDTX_R = crate::BitReader<ENDTX_A>;
#[doc = "Enable or disable interrupt for ENDTX event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ENDTX_A {
#[doc = "0: Disable"]
DISABLED = 0,
#[doc = "1: Enable"]
ENABLED = 1,
}
impl From<ENDTX_A> for bool {
#[inline(always)]
fn from(variant: ENDTX_A) -> Self {
variant as u8 != 0
}
}
impl ENDTX_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ENDTX_A {
match self.bits {
false => ENDTX_A::DISABLED,
true => ENDTX_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ENDTX_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ENDTX_A::ENABLED
}
}
#[doc = "Field `ENDTX` writer - Enable or disable interrupt for ENDTX event"]
pub type ENDTX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, ENDTX_A, O>;
impl<'a, const O: u8> ENDTX_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ENDTX_A::DISABLED)
}
#[doc = "Enable"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ENDTX_A::ENABLED)
}
}
#[doc = "Field `AUTOCOLRESSTARTED` reader - Enable or disable interrupt for AUTOCOLRESSTARTED event"]
pub type AUTOCOLRESSTARTED_R = crate::BitReader<AUTOCOLRESSTARTED_A>;
#[doc = "Enable or disable interrupt for AUTOCOLRESSTARTED event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum AUTOCOLRESSTARTED_A {
#[doc = "0: Disable"]
DISABLED = 0,
#[doc = "1: Enable"]
ENABLED = 1,
}
impl From<AUTOCOLRESSTARTED_A> for bool {
#[inline(always)]
fn from(variant: AUTOCOLRESSTARTED_A) -> Self {
variant as u8 != 0
}
}
impl AUTOCOLRESSTARTED_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> AUTOCOLRESSTARTED_A {
match self.bits {
false => AUTOCOLRESSTARTED_A::DISABLED,
true => AUTOCOLRESSTARTED_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == AUTOCOLRESSTARTED_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == AUTOCOLRESSTARTED_A::ENABLED
}
}
#[doc = "Field `AUTOCOLRESSTARTED` writer - Enable or disable interrupt for AUTOCOLRESSTARTED event"]
pub type AUTOCOLRESSTARTED_W<'a, const O: u8> =
crate::BitWriter<'a, u32, INTEN_SPEC, AUTOCOLRESSTARTED_A, O>;
impl<'a, const O: u8> AUTOCOLRESSTARTED_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(AUTOCOLRESSTARTED_A::DISABLED)
}
#[doc = "Enable"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(AUTOCOLRESSTARTED_A::ENABLED)
}
}
#[doc = "Field `COLLISION` reader - Enable or disable interrupt for COLLISION event"]
pub type COLLISION_R = crate::BitReader<COLLISION_A>;
#[doc = "Enable or disable interrupt for COLLISION event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum COLLISION_A {
#[doc = "0: Disable"]
DISABLED = 0,
#[doc = "1: Enable"]
ENABLED = 1,
}
impl From<COLLISION_A> for bool {
#[inline(always)]
fn from(variant: COLLISION_A) -> Self {
variant as u8 != 0
}
}
impl COLLISION_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> COLLISION_A {
match self.bits {
false => COLLISION_A::DISABLED,
true => COLLISION_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == COLLISION_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == COLLISION_A::ENABLED
}
}
#[doc = "Field `COLLISION` writer - Enable or disable interrupt for COLLISION event"]
pub type COLLISION_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, COLLISION_A, O>;
impl<'a, const O: u8> COLLISION_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(COLLISION_A::DISABLED)
}
#[doc = "Enable"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(COLLISION_A::ENABLED)
}
}
#[doc = "Field `SELECTED` reader - Enable or disable interrupt for SELECTED event"]
pub type SELECTED_R = crate::BitReader<SELECTED_A>;
#[doc = "Enable or disable interrupt for SELECTED event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SELECTED_A {
#[doc = "0: Disable"]
DISABLED = 0,
#[doc = "1: Enable"]
ENABLED = 1,
}
impl From<SELECTED_A> for bool {
#[inline(always)]
fn from(variant: SELECTED_A) -> Self {
variant as u8 != 0
}
}
impl SELECTED_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> SELECTED_A {
match self.bits {
false => SELECTED_A::DISABLED,
true => SELECTED_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == SELECTED_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == SELECTED_A::ENABLED
}
}
#[doc = "Field `SELECTED` writer - Enable or disable interrupt for SELECTED event"]
pub type SELECTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, SELECTED_A, O>;
impl<'a, const O: u8> SELECTED_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(SELECTED_A::DISABLED)
}
#[doc = "Enable"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(SELECTED_A::ENABLED)
}
}
#[doc = "Field `STARTED` reader - Enable or disable interrupt for STARTED event"]
pub type STARTED_R = crate::BitReader<STARTED_A>;
#[doc = "Enable or disable interrupt for STARTED event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum STARTED_A {
#[doc = "0: Disable"]
DISABLED = 0,
#[doc = "1: Enable"]
ENABLED = 1,
}
impl From<STARTED_A> for bool {
#[inline(always)]
fn from(variant: STARTED_A) -> Self {
variant as u8 != 0
}
}
impl STARTED_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> STARTED_A {
match self.bits {
false => STARTED_A::DISABLED,
true => STARTED_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == STARTED_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == STARTED_A::ENABLED
}
}
#[doc = "Field `STARTED` writer - Enable or disable interrupt for STARTED event"]
pub type STARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, STARTED_A, O>;
impl<'a, const O: u8> STARTED_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(STARTED_A::DISABLED)
}
#[doc = "Enable"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(STARTED_A::ENABLED)
}
}
impl R {
#[doc = "Bit 0 - Enable or disable interrupt for READY event"]
#[inline(always)]
pub fn ready(&self) -> READY_R {
READY_R::new((self.bits & 1) != 0)
}
#[doc = "Bit 1 - Enable or disable interrupt for FIELDDETECTED event"]
#[inline(always)]
pub fn fielddetected(&self) -> FIELDDETECTED_R {
FIELDDETECTED_R::new(((self.bits >> 1) & 1) != 0)
}
#[doc = "Bit 2 - Enable or disable interrupt for FIELDLOST event"]
#[inline(always)]
pub fn fieldlost(&self) -> FIELDLOST_R {
FIELDLOST_R::new(((self.bits >> 2) & 1) != 0)
}
#[doc = "Bit 3 - Enable or disable interrupt for TXFRAMESTART event"]
#[inline(always)]
pub fn txframestart(&self) -> TXFRAMESTART_R {
TXFRAMESTART_R::new(((self.bits >> 3) & 1) != 0)
}
#[doc = "Bit 4 - Enable or disable interrupt for TXFRAMEEND event"]
#[inline(always)]
pub fn txframeend(&self) -> TXFRAMEEND_R {
TXFRAMEEND_R::new(((self.bits >> 4) & 1) != 0)
}
#[doc = "Bit 5 - Enable or disable interrupt for RXFRAMESTART event"]
#[inline(always)]
pub fn rxframestart(&self) -> RXFRAMESTART_R {
RXFRAMESTART_R::new(((self.bits >> 5) & 1) != 0)
}
#[doc = "Bit 6 - Enable or disable interrupt for RXFRAMEEND event"]
#[inline(always)]
pub fn rxframeend(&self) -> RXFRAMEEND_R {
RXFRAMEEND_R::new(((self.bits >> 6) & 1) != 0)
}
#[doc = "Bit 7 - Enable or disable interrupt for ERROR event"]
#[inline(always)]
pub fn error(&self) -> ERROR_R {
ERROR_R::new(((self.bits >> 7) & 1) != 0)
}
#[doc = "Bit 10 - Enable or disable interrupt for RXERROR event"]
#[inline(always)]
pub fn rxerror(&self) -> RXERROR_R {
RXERROR_R::new(((self.bits >> 10) & 1) != 0)
}
#[doc = "Bit 11 - Enable or disable interrupt for ENDRX event"]
#[inline(always)]
pub fn endrx(&self) -> ENDRX_R {
ENDRX_R::new(((self.bits >> 11) & 1) != 0)
}
#[doc = "Bit 12 - Enable or disable interrupt for ENDTX event"]
#[inline(always)]
pub fn endtx(&self) -> ENDTX_R {
ENDTX_R::new(((self.bits >> 12) & 1) != 0)
}
#[doc = "Bit 14 - Enable or disable interrupt for AUTOCOLRESSTARTED event"]
#[inline(always)]
pub fn autocolresstarted(&self) -> AUTOCOLRESSTARTED_R {
AUTOCOLRESSTARTED_R::new(((self.bits >> 14) & 1) != 0)
}
#[doc = "Bit 18 - Enable or disable interrupt for COLLISION event"]
#[inline(always)]
pub fn collision(&self) -> COLLISION_R {
COLLISION_R::new(((self.bits >> 18) & 1) != 0)
}
#[doc = "Bit 19 - Enable or disable interrupt for SELECTED event"]
#[inline(always)]
pub fn selected(&self) -> SELECTED_R {
SELECTED_R::new(((self.bits >> 19) & 1) != 0)
}
#[doc = "Bit 20 - Enable or disable interrupt for STARTED event"]
#[inline(always)]
pub fn started(&self) -> STARTED_R {
STARTED_R::new(((self.bits >> 20) & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Enable or disable interrupt for READY event"]
#[inline(always)]
pub fn ready(&mut self) -> READY_W<0> {
READY_W::new(self)
}
#[doc = "Bit 1 - Enable or disable interrupt for FIELDDETECTED event"]
#[inline(always)]
pub fn fielddetected(&mut self) -> FIELDDETECTED_W<1> {
FIELDDETECTED_W::new(self)
}
#[doc = "Bit 2 - Enable or disable interrupt for FIELDLOST event"]
#[inline(always)]
pub fn fieldlost(&mut self) -> FIELDLOST_W<2> {
FIELDLOST_W::new(self)
}
#[doc = "Bit 3 - Enable or disable interrupt for TXFRAMESTART event"]
#[inline(always)]
pub fn txframestart(&mut self) -> TXFRAMESTART_W<3> {
TXFRAMESTART_W::new(self)
}
#[doc = "Bit 4 - Enable or disable interrupt for TXFRAMEEND event"]
#[inline(always)]
pub fn txframeend(&mut self) -> TXFRAMEEND_W<4> {
TXFRAMEEND_W::new(self)
}
#[doc = "Bit 5 - Enable or disable interrupt for RXFRAMESTART event"]
#[inline(always)]
pub fn rxframestart(&mut self) -> RXFRAMESTART_W<5> {
RXFRAMESTART_W::new(self)
}
#[doc = "Bit 6 - Enable or disable interrupt for RXFRAMEEND event"]
#[inline(always)]
pub fn rxframeend(&mut self) -> RXFRAMEEND_W<6> {
RXFRAMEEND_W::new(self)
}
#[doc = "Bit 7 - Enable or disable interrupt for ERROR event"]
#[inline(always)]
pub fn error(&mut self) -> ERROR_W<7> {
ERROR_W::new(self)
}
#[doc = "Bit 10 - Enable or disable interrupt for RXERROR event"]
#[inline(always)]
pub fn rxerror(&mut self) -> RXERROR_W<10> {
RXERROR_W::new(self)
}
#[doc = "Bit 11 - Enable or disable interrupt for ENDRX event"]
#[inline(always)]
pub fn endrx(&mut self) -> ENDRX_W<11> {
ENDRX_W::new(self)
}
#[doc = "Bit 12 - Enable or disable interrupt for ENDTX event"]
#[inline(always)]
pub fn endtx(&mut self) -> ENDTX_W<12> {
ENDTX_W::new(self)
}
#[doc = "Bit 14 - Enable or disable interrupt for AUTOCOLRESSTARTED event"]
#[inline(always)]
pub fn autocolresstarted(&mut self) -> AUTOCOLRESSTARTED_W<14> {
AUTOCOLRESSTARTED_W::new(self)
}
#[doc = "Bit 18 - Enable or disable interrupt for COLLISION event"]
#[inline(always)]
pub fn collision(&mut self) -> COLLISION_W<18> {
COLLISION_W::new(self)
}
#[doc = "Bit 19 - Enable or disable interrupt for SELECTED event"]
#[inline(always)]
pub fn selected(&mut self) -> SELECTED_W<19> {
SELECTED_W::new(self)
}
#[doc = "Bit 20 - Enable or disable interrupt for STARTED event"]
#[inline(always)]
pub fn started(&mut self) -> STARTED_W<20> {
STARTED_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 or 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 [inten](index.html) module"]
pub struct INTEN_SPEC;
impl crate::RegisterSpec for INTEN_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [inten::R](R) reader structure"]
impl crate::Readable for INTEN_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [inten::W](W) writer structure"]
impl crate::Writable for INTEN_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets INTEN to value 0"]
impl crate::Resettable for INTEN_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+80
View File
@@ -0,0 +1,80 @@
#[doc = "Register `MAXLEN` reader"]
pub struct R(crate::R<MAXLEN_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<MAXLEN_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<MAXLEN_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<MAXLEN_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `MAXLEN` writer"]
pub struct W(crate::W<MAXLEN_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<MAXLEN_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<MAXLEN_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<MAXLEN_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `MAXLEN` reader - Size of the RAM buffer allocated to TXD and RXD data storage each"]
pub type MAXLEN_R = crate::FieldReader<u16, u16>;
#[doc = "Field `MAXLEN` writer - Size of the RAM buffer allocated to TXD and RXD data storage each"]
pub type MAXLEN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MAXLEN_SPEC, u16, u16, 9, O>;
impl R {
#[doc = "Bits 0:8 - Size of the RAM buffer allocated to TXD and RXD data storage each"]
#[inline(always)]
pub fn maxlen(&self) -> MAXLEN_R {
MAXLEN_R::new((self.bits & 0x01ff) as u16)
}
}
impl W {
#[doc = "Bits 0:8 - Size of the RAM buffer allocated to TXD and RXD data storage each"]
#[inline(always)]
pub fn maxlen(&mut self) -> MAXLEN_W<0> {
MAXLEN_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 = "Size of the RAM buffer allocated to TXD and RXD data storage each\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 [maxlen](index.html) module"]
pub struct MAXLEN_SPEC;
impl crate::RegisterSpec for MAXLEN_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [maxlen::R](R) reader structure"]
impl crate::Readable for MAXLEN_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [maxlen::W](W) writer structure"]
impl crate::Writable for MAXLEN_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets MAXLEN to value 0"]
impl crate::Resettable for MAXLEN_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+111
View File
@@ -0,0 +1,111 @@
#[doc = "Register `NFCID1_2ND_LAST` reader"]
pub struct R(crate::R<NFCID1_2ND_LAST_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<NFCID1_2ND_LAST_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<NFCID1_2ND_LAST_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<NFCID1_2ND_LAST_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `NFCID1_2ND_LAST` writer"]
pub struct W(crate::W<NFCID1_2ND_LAST_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<NFCID1_2ND_LAST_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<NFCID1_2ND_LAST_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<NFCID1_2ND_LAST_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `NFCID1_V` reader - NFCID1 byte V"]
pub type NFCID1_V_R = crate::FieldReader<u8, u8>;
#[doc = "Field `NFCID1_V` writer - NFCID1 byte V"]
pub type NFCID1_V_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, NFCID1_2ND_LAST_SPEC, u8, u8, 8, O>;
#[doc = "Field `NFCID1_U` reader - NFCID1 byte U"]
pub type NFCID1_U_R = crate::FieldReader<u8, u8>;
#[doc = "Field `NFCID1_U` writer - NFCID1 byte U"]
pub type NFCID1_U_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, NFCID1_2ND_LAST_SPEC, u8, u8, 8, O>;
#[doc = "Field `NFCID1_T` reader - NFCID1 byte T"]
pub type NFCID1_T_R = crate::FieldReader<u8, u8>;
#[doc = "Field `NFCID1_T` writer - NFCID1 byte T"]
pub type NFCID1_T_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, NFCID1_2ND_LAST_SPEC, u8, u8, 8, O>;
impl R {
#[doc = "Bits 0:7 - NFCID1 byte V"]
#[inline(always)]
pub fn nfcid1_v(&self) -> NFCID1_V_R {
NFCID1_V_R::new((self.bits & 0xff) as u8)
}
#[doc = "Bits 8:15 - NFCID1 byte U"]
#[inline(always)]
pub fn nfcid1_u(&self) -> NFCID1_U_R {
NFCID1_U_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 16:23 - NFCID1 byte T"]
#[inline(always)]
pub fn nfcid1_t(&self) -> NFCID1_T_R {
NFCID1_T_R::new(((self.bits >> 16) & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 0:7 - NFCID1 byte V"]
#[inline(always)]
pub fn nfcid1_v(&mut self) -> NFCID1_V_W<0> {
NFCID1_V_W::new(self)
}
#[doc = "Bits 8:15 - NFCID1 byte U"]
#[inline(always)]
pub fn nfcid1_u(&mut self) -> NFCID1_U_W<8> {
NFCID1_U_W::new(self)
}
#[doc = "Bits 16:23 - NFCID1 byte T"]
#[inline(always)]
pub fn nfcid1_t(&mut self) -> NFCID1_T_W<16> {
NFCID1_T_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 = "Second last NFCID1 part (7 or 10 bytes ID)\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 [nfcid1_2nd_last](index.html) module"]
pub struct NFCID1_2ND_LAST_SPEC;
impl crate::RegisterSpec for NFCID1_2ND_LAST_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [nfcid1_2nd_last::R](R) reader structure"]
impl crate::Readable for NFCID1_2ND_LAST_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [nfcid1_2nd_last::W](W) writer structure"]
impl crate::Writable for NFCID1_2ND_LAST_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets NFCID1_2ND_LAST to value 0"]
impl crate::Resettable for NFCID1_2ND_LAST_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+111
View File
@@ -0,0 +1,111 @@
#[doc = "Register `NFCID1_3RD_LAST` reader"]
pub struct R(crate::R<NFCID1_3RD_LAST_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<NFCID1_3RD_LAST_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<NFCID1_3RD_LAST_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<NFCID1_3RD_LAST_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `NFCID1_3RD_LAST` writer"]
pub struct W(crate::W<NFCID1_3RD_LAST_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<NFCID1_3RD_LAST_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<NFCID1_3RD_LAST_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<NFCID1_3RD_LAST_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `NFCID1_S` reader - NFCID1 byte S"]
pub type NFCID1_S_R = crate::FieldReader<u8, u8>;
#[doc = "Field `NFCID1_S` writer - NFCID1 byte S"]
pub type NFCID1_S_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, NFCID1_3RD_LAST_SPEC, u8, u8, 8, O>;
#[doc = "Field `NFCID1_R` reader - NFCID1 byte R"]
pub type NFCID1_R_R = crate::FieldReader<u8, u8>;
#[doc = "Field `NFCID1_R` writer - NFCID1 byte R"]
pub type NFCID1_R_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, NFCID1_3RD_LAST_SPEC, u8, u8, 8, O>;
#[doc = "Field `NFCID1_Q` reader - NFCID1 byte Q"]
pub type NFCID1_Q_R = crate::FieldReader<u8, u8>;
#[doc = "Field `NFCID1_Q` writer - NFCID1 byte Q"]
pub type NFCID1_Q_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, NFCID1_3RD_LAST_SPEC, u8, u8, 8, O>;
impl R {
#[doc = "Bits 0:7 - NFCID1 byte S"]
#[inline(always)]
pub fn nfcid1_s(&self) -> NFCID1_S_R {
NFCID1_S_R::new((self.bits & 0xff) as u8)
}
#[doc = "Bits 8:15 - NFCID1 byte R"]
#[inline(always)]
pub fn nfcid1_r(&self) -> NFCID1_R_R {
NFCID1_R_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 16:23 - NFCID1 byte Q"]
#[inline(always)]
pub fn nfcid1_q(&self) -> NFCID1_Q_R {
NFCID1_Q_R::new(((self.bits >> 16) & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 0:7 - NFCID1 byte S"]
#[inline(always)]
pub fn nfcid1_s(&mut self) -> NFCID1_S_W<0> {
NFCID1_S_W::new(self)
}
#[doc = "Bits 8:15 - NFCID1 byte R"]
#[inline(always)]
pub fn nfcid1_r(&mut self) -> NFCID1_R_W<8> {
NFCID1_R_W::new(self)
}
#[doc = "Bits 16:23 - NFCID1 byte Q"]
#[inline(always)]
pub fn nfcid1_q(&mut self) -> NFCID1_Q_W<16> {
NFCID1_Q_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 = "Third last NFCID1 part (10 bytes ID)\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 [nfcid1_3rd_last](index.html) module"]
pub struct NFCID1_3RD_LAST_SPEC;
impl crate::RegisterSpec for NFCID1_3RD_LAST_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [nfcid1_3rd_last::R](R) reader structure"]
impl crate::Readable for NFCID1_3RD_LAST_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [nfcid1_3rd_last::W](W) writer structure"]
impl crate::Writable for NFCID1_3RD_LAST_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets NFCID1_3RD_LAST to value 0"]
impl crate::Resettable for NFCID1_3RD_LAST_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+122
View File
@@ -0,0 +1,122 @@
#[doc = "Register `NFCID1_LAST` reader"]
pub struct R(crate::R<NFCID1_LAST_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<NFCID1_LAST_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<NFCID1_LAST_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<NFCID1_LAST_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `NFCID1_LAST` writer"]
pub struct W(crate::W<NFCID1_LAST_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<NFCID1_LAST_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<NFCID1_LAST_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<NFCID1_LAST_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `NFCID1_Z` reader - NFCID1 byte Z (very last byte sent)"]
pub type NFCID1_Z_R = crate::FieldReader<u8, u8>;
#[doc = "Field `NFCID1_Z` writer - NFCID1 byte Z (very last byte sent)"]
pub type NFCID1_Z_W<'a, const O: u8> = crate::FieldWriter<'a, u32, NFCID1_LAST_SPEC, u8, u8, 8, O>;
#[doc = "Field `NFCID1_Y` reader - NFCID1 byte Y"]
pub type NFCID1_Y_R = crate::FieldReader<u8, u8>;
#[doc = "Field `NFCID1_Y` writer - NFCID1 byte Y"]
pub type NFCID1_Y_W<'a, const O: u8> = crate::FieldWriter<'a, u32, NFCID1_LAST_SPEC, u8, u8, 8, O>;
#[doc = "Field `NFCID1_X` reader - NFCID1 byte X"]
pub type NFCID1_X_R = crate::FieldReader<u8, u8>;
#[doc = "Field `NFCID1_X` writer - NFCID1 byte X"]
pub type NFCID1_X_W<'a, const O: u8> = crate::FieldWriter<'a, u32, NFCID1_LAST_SPEC, u8, u8, 8, O>;
#[doc = "Field `NFCID1_W` reader - NFCID1 byte W"]
pub type NFCID1_W_R = crate::FieldReader<u8, u8>;
#[doc = "Field `NFCID1_W` writer - NFCID1 byte W"]
pub type NFCID1_W_W<'a, const O: u8> = crate::FieldWriter<'a, u32, NFCID1_LAST_SPEC, u8, u8, 8, O>;
impl R {
#[doc = "Bits 0:7 - NFCID1 byte Z (very last byte sent)"]
#[inline(always)]
pub fn nfcid1_z(&self) -> NFCID1_Z_R {
NFCID1_Z_R::new((self.bits & 0xff) as u8)
}
#[doc = "Bits 8:15 - NFCID1 byte Y"]
#[inline(always)]
pub fn nfcid1_y(&self) -> NFCID1_Y_R {
NFCID1_Y_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 16:23 - NFCID1 byte X"]
#[inline(always)]
pub fn nfcid1_x(&self) -> NFCID1_X_R {
NFCID1_X_R::new(((self.bits >> 16) & 0xff) as u8)
}
#[doc = "Bits 24:31 - NFCID1 byte W"]
#[inline(always)]
pub fn nfcid1_w(&self) -> NFCID1_W_R {
NFCID1_W_R::new(((self.bits >> 24) & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 0:7 - NFCID1 byte Z (very last byte sent)"]
#[inline(always)]
pub fn nfcid1_z(&mut self) -> NFCID1_Z_W<0> {
NFCID1_Z_W::new(self)
}
#[doc = "Bits 8:15 - NFCID1 byte Y"]
#[inline(always)]
pub fn nfcid1_y(&mut self) -> NFCID1_Y_W<8> {
NFCID1_Y_W::new(self)
}
#[doc = "Bits 16:23 - NFCID1 byte X"]
#[inline(always)]
pub fn nfcid1_x(&mut self) -> NFCID1_X_W<16> {
NFCID1_X_W::new(self)
}
#[doc = "Bits 24:31 - NFCID1 byte W"]
#[inline(always)]
pub fn nfcid1_w(&mut self) -> NFCID1_W_W<24> {
NFCID1_W_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 = "Last NFCID1 part (4, 7 or 10 bytes ID)\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 [nfcid1_last](index.html) module"]
pub struct NFCID1_LAST_SPEC;
impl crate::RegisterSpec for NFCID1_LAST_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [nfcid1_last::R](R) reader structure"]
impl crate::Readable for NFCID1_LAST_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [nfcid1_last::W](W) writer structure"]
impl crate::Writable for NFCID1_LAST_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets NFCID1_LAST to value 0x6363"]
impl crate::Resettable for NFCID1_LAST_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0x6363
}
}
+108
View File
@@ -0,0 +1,108 @@
#[doc = "Register `NFCTAGSTATE` reader"]
pub struct R(crate::R<NFCTAGSTATE_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<NFCTAGSTATE_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<NFCTAGSTATE_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<NFCTAGSTATE_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `NFCTAGSTATE` reader - NfcTag state"]
pub type NFCTAGSTATE_R = crate::FieldReader<u8, NFCTAGSTATE_A>;
#[doc = "NfcTag state\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum NFCTAGSTATE_A {
#[doc = "0: Disabled or sense"]
DISABLED = 0,
#[doc = "2: RampUp"]
RAMP_UP = 2,
#[doc = "3: Idle"]
IDLE = 3,
#[doc = "4: Receive"]
RECEIVE = 4,
#[doc = "5: FrameDelay"]
FRAME_DELAY = 5,
#[doc = "6: Transmit"]
TRANSMIT = 6,
}
impl From<NFCTAGSTATE_A> for u8 {
#[inline(always)]
fn from(variant: NFCTAGSTATE_A) -> Self {
variant as _
}
}
impl NFCTAGSTATE_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> Option<NFCTAGSTATE_A> {
match self.bits {
0 => Some(NFCTAGSTATE_A::DISABLED),
2 => Some(NFCTAGSTATE_A::RAMP_UP),
3 => Some(NFCTAGSTATE_A::IDLE),
4 => Some(NFCTAGSTATE_A::RECEIVE),
5 => Some(NFCTAGSTATE_A::FRAME_DELAY),
6 => Some(NFCTAGSTATE_A::TRANSMIT),
_ => None,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == NFCTAGSTATE_A::DISABLED
}
#[doc = "Checks if the value of the field is `RAMP_UP`"]
#[inline(always)]
pub fn is_ramp_up(&self) -> bool {
*self == NFCTAGSTATE_A::RAMP_UP
}
#[doc = "Checks if the value of the field is `IDLE`"]
#[inline(always)]
pub fn is_idle(&self) -> bool {
*self == NFCTAGSTATE_A::IDLE
}
#[doc = "Checks if the value of the field is `RECEIVE`"]
#[inline(always)]
pub fn is_receive(&self) -> bool {
*self == NFCTAGSTATE_A::RECEIVE
}
#[doc = "Checks if the value of the field is `FRAME_DELAY`"]
#[inline(always)]
pub fn is_frame_delay(&self) -> bool {
*self == NFCTAGSTATE_A::FRAME_DELAY
}
#[doc = "Checks if the value of the field is `TRANSMIT`"]
#[inline(always)]
pub fn is_transmit(&self) -> bool {
*self == NFCTAGSTATE_A::TRANSMIT
}
}
impl R {
#[doc = "Bits 0:2 - NfcTag state"]
#[inline(always)]
pub fn nfctagstate(&self) -> NFCTAGSTATE_R {
NFCTAGSTATE_R::new((self.bits & 7) as u8)
}
}
#[doc = "NfcTag state register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [nfctagstate](index.html) module"]
pub struct NFCTAGSTATE_SPEC;
impl crate::RegisterSpec for NFCTAGSTATE_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [nfctagstate::R](R) reader structure"]
impl crate::Readable for NFCTAGSTATE_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets NFCTAGSTATE to value 0"]
impl crate::Resettable for NFCTAGSTATE_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+80
View File
@@ -0,0 +1,80 @@
#[doc = "Register `PACKETPTR` reader"]
pub struct R(crate::R<PACKETPTR_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<PACKETPTR_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<PACKETPTR_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<PACKETPTR_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `PACKETPTR` writer"]
pub struct W(crate::W<PACKETPTR_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<PACKETPTR_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<PACKETPTR_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<PACKETPTR_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `PTR` reader - Packet pointer for TXD and RXD data storage in Data RAM. This address is a byte-aligned RAM address."]
pub type PTR_R = crate::FieldReader<u32, u32>;
#[doc = "Field `PTR` writer - Packet pointer for TXD and RXD data storage in Data RAM. This address is a byte-aligned RAM address."]
pub type PTR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PACKETPTR_SPEC, u32, u32, 32, O>;
impl R {
#[doc = "Bits 0:31 - Packet pointer for TXD and RXD data storage in Data RAM. This address is a byte-aligned RAM address."]
#[inline(always)]
pub fn ptr(&self) -> PTR_R {
PTR_R::new(self.bits)
}
}
impl W {
#[doc = "Bits 0:31 - Packet pointer for TXD and RXD data storage in Data RAM. This address is a byte-aligned RAM address."]
#[inline(always)]
pub fn ptr(&mut self) -> PTR_W<0> {
PTR_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 = "Packet pointer for TXD and RXD data storage in Data RAM\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 [packetptr](index.html) module"]
pub struct PACKETPTR_SPEC;
impl crate::RegisterSpec for PACKETPTR_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [packetptr::R](R) reader structure"]
impl crate::Readable for PACKETPTR_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [packetptr::W](W) writer structure"]
impl crate::Writable for PACKETPTR_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets PACKETPTR to value 0"]
impl crate::Resettable for PACKETPTR_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+16
View File
@@ -0,0 +1,16 @@
#[doc = r"Register block"]
#[repr(C)]
pub struct RXD {
#[doc = "0x00 - Configuration of incoming frames"]
pub frameconfig: FRAMECONFIG,
#[doc = "0x04 - Size of last incoming frame"]
pub amount: AMOUNT,
}
#[doc = "FRAMECONFIG (rw) register accessor: an alias for `Reg<FRAMECONFIG_SPEC>`"]
pub type FRAMECONFIG = crate::Reg<frameconfig::FRAMECONFIG_SPEC>;
#[doc = "Configuration of incoming frames"]
pub mod frameconfig;
#[doc = "AMOUNT (r) register accessor: an alias for `Reg<AMOUNT_SPEC>`"]
pub type AMOUNT = crate::Reg<amount::AMOUNT_SPEC>;
#[doc = "Size of last incoming frame"]
pub mod amount;
+47
View File
@@ -0,0 +1,47 @@
#[doc = "Register `AMOUNT` reader"]
pub struct R(crate::R<AMOUNT_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<AMOUNT_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<AMOUNT_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<AMOUNT_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `RXDATABITS` reader - Number of bits in the last byte in the frame, if less than 8 (including CRC, but excluding parity and SoF/EoF framing)."]
pub type RXDATABITS_R = crate::FieldReader<u8, u8>;
#[doc = "Field `RXDATABYTES` reader - Number of complete bytes received in the frame (including CRC, but excluding parity and SoF/EoF framing)"]
pub type RXDATABYTES_R = crate::FieldReader<u16, u16>;
impl R {
#[doc = "Bits 0:2 - Number of bits in the last byte in the frame, if less than 8 (including CRC, but excluding parity and SoF/EoF framing)."]
#[inline(always)]
pub fn rxdatabits(&self) -> RXDATABITS_R {
RXDATABITS_R::new((self.bits & 7) as u8)
}
#[doc = "Bits 3:11 - Number of complete bytes received in the frame (including CRC, but excluding parity and SoF/EoF framing)"]
#[inline(always)]
pub fn rxdatabytes(&self) -> RXDATABYTES_R {
RXDATABYTES_R::new(((self.bits >> 3) & 0x01ff) as u16)
}
}
#[doc = "Size of last incoming frame\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 [amount](index.html) module"]
pub struct AMOUNT_SPEC;
impl crate::RegisterSpec for AMOUNT_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [amount::R](R) reader structure"]
impl crate::Readable for AMOUNT_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets AMOUNT to value 0"]
impl crate::Resettable for AMOUNT_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+246
View File
@@ -0,0 +1,246 @@
#[doc = "Register `FRAMECONFIG` reader"]
pub struct R(crate::R<FRAMECONFIG_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<FRAMECONFIG_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<FRAMECONFIG_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<FRAMECONFIG_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `FRAMECONFIG` writer"]
pub struct W(crate::W<FRAMECONFIG_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<FRAMECONFIG_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<FRAMECONFIG_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<FRAMECONFIG_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `PARITY` reader - Indicates if parity expected in RX frame"]
pub type PARITY_R = crate::BitReader<PARITY_A>;
#[doc = "Indicates if parity expected in RX frame\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum PARITY_A {
#[doc = "0: Parity is not expected in RX frames"]
NO_PARITY = 0,
#[doc = "1: Parity is expected in RX frames"]
PARITY = 1,
}
impl From<PARITY_A> for bool {
#[inline(always)]
fn from(variant: PARITY_A) -> Self {
variant as u8 != 0
}
}
impl PARITY_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> PARITY_A {
match self.bits {
false => PARITY_A::NO_PARITY,
true => PARITY_A::PARITY,
}
}
#[doc = "Checks if the value of the field is `NO_PARITY`"]
#[inline(always)]
pub fn is_no_parity(&self) -> bool {
*self == PARITY_A::NO_PARITY
}
#[doc = "Checks if the value of the field is `PARITY`"]
#[inline(always)]
pub fn is_parity(&self) -> bool {
*self == PARITY_A::PARITY
}
}
#[doc = "Field `PARITY` writer - Indicates if parity expected in RX frame"]
pub type PARITY_W<'a, const O: u8> = crate::BitWriter<'a, u32, FRAMECONFIG_SPEC, PARITY_A, O>;
impl<'a, const O: u8> PARITY_W<'a, O> {
#[doc = "Parity is not expected in RX frames"]
#[inline(always)]
pub fn no_parity(self) -> &'a mut W {
self.variant(PARITY_A::NO_PARITY)
}
#[doc = "Parity is expected in RX frames"]
#[inline(always)]
pub fn parity(self) -> &'a mut W {
self.variant(PARITY_A::PARITY)
}
}
#[doc = "Field `SOF` reader - SoF expected or not in RX frames"]
pub type SOF_R = crate::BitReader<SOF_A>;
#[doc = "SoF expected or not in RX frames\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SOF_A {
#[doc = "0: SoF symbol is not expected in RX frames"]
NO_SO_F = 0,
#[doc = "1: SoF symbol is expected in RX frames"]
SO_F = 1,
}
impl From<SOF_A> for bool {
#[inline(always)]
fn from(variant: SOF_A) -> Self {
variant as u8 != 0
}
}
impl SOF_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> SOF_A {
match self.bits {
false => SOF_A::NO_SO_F,
true => SOF_A::SO_F,
}
}
#[doc = "Checks if the value of the field is `NO_SO_F`"]
#[inline(always)]
pub fn is_no_so_f(&self) -> bool {
*self == SOF_A::NO_SO_F
}
#[doc = "Checks if the value of the field is `SO_F`"]
#[inline(always)]
pub fn is_so_f(&self) -> bool {
*self == SOF_A::SO_F
}
}
#[doc = "Field `SOF` writer - SoF expected or not in RX frames"]
pub type SOF_W<'a, const O: u8> = crate::BitWriter<'a, u32, FRAMECONFIG_SPEC, SOF_A, O>;
impl<'a, const O: u8> SOF_W<'a, O> {
#[doc = "SoF symbol is not expected in RX frames"]
#[inline(always)]
pub fn no_so_f(self) -> &'a mut W {
self.variant(SOF_A::NO_SO_F)
}
#[doc = "SoF symbol is expected in RX frames"]
#[inline(always)]
pub fn so_f(self) -> &'a mut W {
self.variant(SOF_A::SO_F)
}
}
#[doc = "Field `CRCMODERX` reader - CRC mode for incoming frames"]
pub type CRCMODERX_R = crate::BitReader<CRCMODERX_A>;
#[doc = "CRC mode for incoming frames\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CRCMODERX_A {
#[doc = "0: CRC is not expected in RX frames"]
NO_CRCRX = 0,
#[doc = "1: Last 16 bits in RX frame is CRC, CRC is checked and CRCSTATUS updated"]
CRC16RX = 1,
}
impl From<CRCMODERX_A> for bool {
#[inline(always)]
fn from(variant: CRCMODERX_A) -> Self {
variant as u8 != 0
}
}
impl CRCMODERX_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> CRCMODERX_A {
match self.bits {
false => CRCMODERX_A::NO_CRCRX,
true => CRCMODERX_A::CRC16RX,
}
}
#[doc = "Checks if the value of the field is `NO_CRCRX`"]
#[inline(always)]
pub fn is_no_crcrx(&self) -> bool {
*self == CRCMODERX_A::NO_CRCRX
}
#[doc = "Checks if the value of the field is `CRC16RX`"]
#[inline(always)]
pub fn is_crc16rx(&self) -> bool {
*self == CRCMODERX_A::CRC16RX
}
}
#[doc = "Field `CRCMODERX` writer - CRC mode for incoming frames"]
pub type CRCMODERX_W<'a, const O: u8> = crate::BitWriter<'a, u32, FRAMECONFIG_SPEC, CRCMODERX_A, O>;
impl<'a, const O: u8> CRCMODERX_W<'a, O> {
#[doc = "CRC is not expected in RX frames"]
#[inline(always)]
pub fn no_crcrx(self) -> &'a mut W {
self.variant(CRCMODERX_A::NO_CRCRX)
}
#[doc = "Last 16 bits in RX frame is CRC, CRC is checked and CRCSTATUS updated"]
#[inline(always)]
pub fn crc16rx(self) -> &'a mut W {
self.variant(CRCMODERX_A::CRC16RX)
}
}
impl R {
#[doc = "Bit 0 - Indicates if parity expected in RX frame"]
#[inline(always)]
pub fn parity(&self) -> PARITY_R {
PARITY_R::new((self.bits & 1) != 0)
}
#[doc = "Bit 2 - SoF expected or not in RX frames"]
#[inline(always)]
pub fn sof(&self) -> SOF_R {
SOF_R::new(((self.bits >> 2) & 1) != 0)
}
#[doc = "Bit 4 - CRC mode for incoming frames"]
#[inline(always)]
pub fn crcmoderx(&self) -> CRCMODERX_R {
CRCMODERX_R::new(((self.bits >> 4) & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Indicates if parity expected in RX frame"]
#[inline(always)]
pub fn parity(&mut self) -> PARITY_W<0> {
PARITY_W::new(self)
}
#[doc = "Bit 2 - SoF expected or not in RX frames"]
#[inline(always)]
pub fn sof(&mut self) -> SOF_W<2> {
SOF_W::new(self)
}
#[doc = "Bit 4 - CRC mode for incoming frames"]
#[inline(always)]
pub fn crcmoderx(&mut self) -> CRCMODERX_W<4> {
CRCMODERX_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Configuration of incoming frames\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 [frameconfig](index.html) module"]
pub struct FRAMECONFIG_SPEC;
impl crate::RegisterSpec for FRAMECONFIG_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [frameconfig::R](R) reader structure"]
impl crate::Readable for FRAMECONFIG_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [frameconfig::W](W) writer structure"]
impl crate::Writable for FRAMECONFIG_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets FRAMECONFIG to value 0x15"]
impl crate::Resettable for FRAMECONFIG_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0x15
}
}
+136
View File
@@ -0,0 +1,136 @@
#[doc = "Register `SELRES` reader"]
pub struct R(crate::R<SELRES_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<SELRES_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<SELRES_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<SELRES_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `SELRES` writer"]
pub struct W(crate::W<SELRES_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<SELRES_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<SELRES_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<SELRES_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `RFU10` reader - Reserved for future use. Shall be 0."]
pub type RFU10_R = crate::FieldReader<u8, u8>;
#[doc = "Field `RFU10` writer - Reserved for future use. Shall be 0."]
pub type RFU10_W<'a, const O: u8> = crate::FieldWriter<'a, u32, SELRES_SPEC, u8, u8, 2, O>;
#[doc = "Field `CASCADE` reader - Cascade as defined by the b3 of SEL_RES response in the NFC Forum, NFC Digital Protocol Technical Specification (controlled by hardware, shall be 0)"]
pub type CASCADE_R = crate::BitReader<bool>;
#[doc = "Field `CASCADE` writer - Cascade as defined by the b3 of SEL_RES response in the NFC Forum, NFC Digital Protocol Technical Specification (controlled by hardware, shall be 0)"]
pub type CASCADE_W<'a, const O: u8> = crate::BitWriter<'a, u32, SELRES_SPEC, bool, O>;
#[doc = "Field `RFU43` reader - Reserved for future use. Shall be 0."]
pub type RFU43_R = crate::FieldReader<u8, u8>;
#[doc = "Field `RFU43` writer - Reserved for future use. Shall be 0."]
pub type RFU43_W<'a, const O: u8> = crate::FieldWriter<'a, u32, SELRES_SPEC, u8, u8, 2, O>;
#[doc = "Field `PROTOCOL` reader - Protocol as defined by the b7:b6 of SEL_RES response in the NFC Forum, NFC Digital Protocol Technical Specification"]
pub type PROTOCOL_R = crate::FieldReader<u8, u8>;
#[doc = "Field `PROTOCOL` writer - Protocol as defined by the b7:b6 of SEL_RES response in the NFC Forum, NFC Digital Protocol Technical Specification"]
pub type PROTOCOL_W<'a, const O: u8> = crate::FieldWriter<'a, u32, SELRES_SPEC, u8, u8, 2, O>;
#[doc = "Field `RFU7` reader - Reserved for future use. Shall be 0."]
pub type RFU7_R = crate::BitReader<bool>;
#[doc = "Field `RFU7` writer - Reserved for future use. Shall be 0."]
pub type RFU7_W<'a, const O: u8> = crate::BitWriter<'a, u32, SELRES_SPEC, bool, O>;
impl R {
#[doc = "Bits 0:1 - Reserved for future use. Shall be 0."]
#[inline(always)]
pub fn rfu10(&self) -> RFU10_R {
RFU10_R::new((self.bits & 3) as u8)
}
#[doc = "Bit 2 - Cascade as defined by the b3 of SEL_RES response in the NFC Forum, NFC Digital Protocol Technical Specification (controlled by hardware, shall be 0)"]
#[inline(always)]
pub fn cascade(&self) -> CASCADE_R {
CASCADE_R::new(((self.bits >> 2) & 1) != 0)
}
#[doc = "Bits 3:4 - Reserved for future use. Shall be 0."]
#[inline(always)]
pub fn rfu43(&self) -> RFU43_R {
RFU43_R::new(((self.bits >> 3) & 3) as u8)
}
#[doc = "Bits 5:6 - Protocol as defined by the b7:b6 of SEL_RES response in the NFC Forum, NFC Digital Protocol Technical Specification"]
#[inline(always)]
pub fn protocol(&self) -> PROTOCOL_R {
PROTOCOL_R::new(((self.bits >> 5) & 3) as u8)
}
#[doc = "Bit 7 - Reserved for future use. Shall be 0."]
#[inline(always)]
pub fn rfu7(&self) -> RFU7_R {
RFU7_R::new(((self.bits >> 7) & 1) != 0)
}
}
impl W {
#[doc = "Bits 0:1 - Reserved for future use. Shall be 0."]
#[inline(always)]
pub fn rfu10(&mut self) -> RFU10_W<0> {
RFU10_W::new(self)
}
#[doc = "Bit 2 - Cascade as defined by the b3 of SEL_RES response in the NFC Forum, NFC Digital Protocol Technical Specification (controlled by hardware, shall be 0)"]
#[inline(always)]
pub fn cascade(&mut self) -> CASCADE_W<2> {
CASCADE_W::new(self)
}
#[doc = "Bits 3:4 - Reserved for future use. Shall be 0."]
#[inline(always)]
pub fn rfu43(&mut self) -> RFU43_W<3> {
RFU43_W::new(self)
}
#[doc = "Bits 5:6 - Protocol as defined by the b7:b6 of SEL_RES response in the NFC Forum, NFC Digital Protocol Technical Specification"]
#[inline(always)]
pub fn protocol(&mut self) -> PROTOCOL_W<5> {
PROTOCOL_W::new(self)
}
#[doc = "Bit 7 - Reserved for future use. Shall be 0."]
#[inline(always)]
pub fn rfu7(&mut self) -> RFU7_W<7> {
RFU7_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 = "NFC-A SEL_RES auto-response settings\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 [selres](index.html) module"]
pub struct SELRES_SPEC;
impl crate::RegisterSpec for SELRES_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [selres::R](R) reader structure"]
impl crate::Readable for SELRES_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [selres::W](W) writer structure"]
impl crate::Writable for SELRES_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets SELRES to value 0"]
impl crate::Resettable for SELRES_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+299
View File
@@ -0,0 +1,299 @@
#[doc = "Register `SENSRES` reader"]
pub struct R(crate::R<SENSRES_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<SENSRES_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<SENSRES_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<SENSRES_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `SENSRES` writer"]
pub struct W(crate::W<SENSRES_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<SENSRES_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<SENSRES_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<SENSRES_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BITFRAMESDD` reader - Bit frame SDD as defined by the b5:b1 of byte 1 in SENS_RES response in the NFC Forum, NFC Digital Protocol Technical Specification"]
pub type BITFRAMESDD_R = crate::FieldReader<u8, BITFRAMESDD_A>;
#[doc = "Bit frame SDD as defined by the b5:b1 of byte 1 in SENS_RES response in the NFC Forum, NFC Digital Protocol Technical Specification\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum BITFRAMESDD_A {
#[doc = "0: SDD pattern 00000"]
SDD00000 = 0,
#[doc = "1: SDD pattern 00001"]
SDD00001 = 1,
#[doc = "2: SDD pattern 00010"]
SDD00010 = 2,
#[doc = "4: SDD pattern 00100"]
SDD00100 = 4,
#[doc = "8: SDD pattern 01000"]
SDD01000 = 8,
#[doc = "16: SDD pattern 10000"]
SDD10000 = 16,
}
impl From<BITFRAMESDD_A> for u8 {
#[inline(always)]
fn from(variant: BITFRAMESDD_A) -> Self {
variant as _
}
}
impl BITFRAMESDD_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> Option<BITFRAMESDD_A> {
match self.bits {
0 => Some(BITFRAMESDD_A::SDD00000),
1 => Some(BITFRAMESDD_A::SDD00001),
2 => Some(BITFRAMESDD_A::SDD00010),
4 => Some(BITFRAMESDD_A::SDD00100),
8 => Some(BITFRAMESDD_A::SDD01000),
16 => Some(BITFRAMESDD_A::SDD10000),
_ => None,
}
}
#[doc = "Checks if the value of the field is `SDD00000`"]
#[inline(always)]
pub fn is_sdd00000(&self) -> bool {
*self == BITFRAMESDD_A::SDD00000
}
#[doc = "Checks if the value of the field is `SDD00001`"]
#[inline(always)]
pub fn is_sdd00001(&self) -> bool {
*self == BITFRAMESDD_A::SDD00001
}
#[doc = "Checks if the value of the field is `SDD00010`"]
#[inline(always)]
pub fn is_sdd00010(&self) -> bool {
*self == BITFRAMESDD_A::SDD00010
}
#[doc = "Checks if the value of the field is `SDD00100`"]
#[inline(always)]
pub fn is_sdd00100(&self) -> bool {
*self == BITFRAMESDD_A::SDD00100
}
#[doc = "Checks if the value of the field is `SDD01000`"]
#[inline(always)]
pub fn is_sdd01000(&self) -> bool {
*self == BITFRAMESDD_A::SDD01000
}
#[doc = "Checks if the value of the field is `SDD10000`"]
#[inline(always)]
pub fn is_sdd10000(&self) -> bool {
*self == BITFRAMESDD_A::SDD10000
}
}
#[doc = "Field `BITFRAMESDD` writer - Bit frame SDD as defined by the b5:b1 of byte 1 in SENS_RES response in the NFC Forum, NFC Digital Protocol Technical Specification"]
pub type BITFRAMESDD_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, SENSRES_SPEC, u8, BITFRAMESDD_A, 5, O>;
impl<'a, const O: u8> BITFRAMESDD_W<'a, O> {
#[doc = "SDD pattern 00000"]
#[inline(always)]
pub fn sdd00000(self) -> &'a mut W {
self.variant(BITFRAMESDD_A::SDD00000)
}
#[doc = "SDD pattern 00001"]
#[inline(always)]
pub fn sdd00001(self) -> &'a mut W {
self.variant(BITFRAMESDD_A::SDD00001)
}
#[doc = "SDD pattern 00010"]
#[inline(always)]
pub fn sdd00010(self) -> &'a mut W {
self.variant(BITFRAMESDD_A::SDD00010)
}
#[doc = "SDD pattern 00100"]
#[inline(always)]
pub fn sdd00100(self) -> &'a mut W {
self.variant(BITFRAMESDD_A::SDD00100)
}
#[doc = "SDD pattern 01000"]
#[inline(always)]
pub fn sdd01000(self) -> &'a mut W {
self.variant(BITFRAMESDD_A::SDD01000)
}
#[doc = "SDD pattern 10000"]
#[inline(always)]
pub fn sdd10000(self) -> &'a mut W {
self.variant(BITFRAMESDD_A::SDD10000)
}
}
#[doc = "Field `RFU5` reader - Reserved for future use. Shall be 0."]
pub type RFU5_R = crate::BitReader<bool>;
#[doc = "Field `RFU5` writer - Reserved for future use. Shall be 0."]
pub type RFU5_W<'a, const O: u8> = crate::BitWriter<'a, u32, SENSRES_SPEC, bool, O>;
#[doc = "Field `NFCIDSIZE` reader - NFCID1 size. This value is used by the auto collision resolution engine."]
pub type NFCIDSIZE_R = crate::FieldReader<u8, NFCIDSIZE_A>;
#[doc = "NFCID1 size. This value is used by the auto collision resolution engine.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum NFCIDSIZE_A {
#[doc = "0: NFCID1 size: single (4 bytes)"]
NFCID1SINGLE = 0,
#[doc = "1: NFCID1 size: double (7 bytes)"]
NFCID1DOUBLE = 1,
#[doc = "2: NFCID1 size: triple (10 bytes)"]
NFCID1TRIPLE = 2,
}
impl From<NFCIDSIZE_A> for u8 {
#[inline(always)]
fn from(variant: NFCIDSIZE_A) -> Self {
variant as _
}
}
impl NFCIDSIZE_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> Option<NFCIDSIZE_A> {
match self.bits {
0 => Some(NFCIDSIZE_A::NFCID1SINGLE),
1 => Some(NFCIDSIZE_A::NFCID1DOUBLE),
2 => Some(NFCIDSIZE_A::NFCID1TRIPLE),
_ => None,
}
}
#[doc = "Checks if the value of the field is `NFCID1SINGLE`"]
#[inline(always)]
pub fn is_nfcid1single(&self) -> bool {
*self == NFCIDSIZE_A::NFCID1SINGLE
}
#[doc = "Checks if the value of the field is `NFCID1DOUBLE`"]
#[inline(always)]
pub fn is_nfcid1double(&self) -> bool {
*self == NFCIDSIZE_A::NFCID1DOUBLE
}
#[doc = "Checks if the value of the field is `NFCID1TRIPLE`"]
#[inline(always)]
pub fn is_nfcid1triple(&self) -> bool {
*self == NFCIDSIZE_A::NFCID1TRIPLE
}
}
#[doc = "Field `NFCIDSIZE` writer - NFCID1 size. This value is used by the auto collision resolution engine."]
pub type NFCIDSIZE_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, SENSRES_SPEC, u8, NFCIDSIZE_A, 2, O>;
impl<'a, const O: u8> NFCIDSIZE_W<'a, O> {
#[doc = "NFCID1 size: single (4 bytes)"]
#[inline(always)]
pub fn nfcid1single(self) -> &'a mut W {
self.variant(NFCIDSIZE_A::NFCID1SINGLE)
}
#[doc = "NFCID1 size: double (7 bytes)"]
#[inline(always)]
pub fn nfcid1double(self) -> &'a mut W {
self.variant(NFCIDSIZE_A::NFCID1DOUBLE)
}
#[doc = "NFCID1 size: triple (10 bytes)"]
#[inline(always)]
pub fn nfcid1triple(self) -> &'a mut W {
self.variant(NFCIDSIZE_A::NFCID1TRIPLE)
}
}
#[doc = "Field `PLATFCONFIG` reader - Tag platform configuration as defined by the b4:b1 of byte 2 in SENS_RES response in the NFC Forum, NFC Digital Protocol Technical Specification"]
pub type PLATFCONFIG_R = crate::FieldReader<u8, u8>;
#[doc = "Field `PLATFCONFIG` writer - Tag platform configuration as defined by the b4:b1 of byte 2 in SENS_RES response in the NFC Forum, NFC Digital Protocol Technical Specification"]
pub type PLATFCONFIG_W<'a, const O: u8> = crate::FieldWriter<'a, u32, SENSRES_SPEC, u8, u8, 4, O>;
#[doc = "Field `RFU74` reader - Reserved for future use. Shall be 0."]
pub type RFU74_R = crate::FieldReader<u8, u8>;
#[doc = "Field `RFU74` writer - Reserved for future use. Shall be 0."]
pub type RFU74_W<'a, const O: u8> = crate::FieldWriter<'a, u32, SENSRES_SPEC, u8, u8, 4, O>;
impl R {
#[doc = "Bits 0:4 - Bit frame SDD as defined by the b5:b1 of byte 1 in SENS_RES response in the NFC Forum, NFC Digital Protocol Technical Specification"]
#[inline(always)]
pub fn bitframesdd(&self) -> BITFRAMESDD_R {
BITFRAMESDD_R::new((self.bits & 0x1f) as u8)
}
#[doc = "Bit 5 - Reserved for future use. Shall be 0."]
#[inline(always)]
pub fn rfu5(&self) -> RFU5_R {
RFU5_R::new(((self.bits >> 5) & 1) != 0)
}
#[doc = "Bits 6:7 - NFCID1 size. This value is used by the auto collision resolution engine."]
#[inline(always)]
pub fn nfcidsize(&self) -> NFCIDSIZE_R {
NFCIDSIZE_R::new(((self.bits >> 6) & 3) as u8)
}
#[doc = "Bits 8:11 - Tag platform configuration as defined by the b4:b1 of byte 2 in SENS_RES response in the NFC Forum, NFC Digital Protocol Technical Specification"]
#[inline(always)]
pub fn platfconfig(&self) -> PLATFCONFIG_R {
PLATFCONFIG_R::new(((self.bits >> 8) & 0x0f) as u8)
}
#[doc = "Bits 12:15 - Reserved for future use. Shall be 0."]
#[inline(always)]
pub fn rfu74(&self) -> RFU74_R {
RFU74_R::new(((self.bits >> 12) & 0x0f) as u8)
}
}
impl W {
#[doc = "Bits 0:4 - Bit frame SDD as defined by the b5:b1 of byte 1 in SENS_RES response in the NFC Forum, NFC Digital Protocol Technical Specification"]
#[inline(always)]
pub fn bitframesdd(&mut self) -> BITFRAMESDD_W<0> {
BITFRAMESDD_W::new(self)
}
#[doc = "Bit 5 - Reserved for future use. Shall be 0."]
#[inline(always)]
pub fn rfu5(&mut self) -> RFU5_W<5> {
RFU5_W::new(self)
}
#[doc = "Bits 6:7 - NFCID1 size. This value is used by the auto collision resolution engine."]
#[inline(always)]
pub fn nfcidsize(&mut self) -> NFCIDSIZE_W<6> {
NFCIDSIZE_W::new(self)
}
#[doc = "Bits 8:11 - Tag platform configuration as defined by the b4:b1 of byte 2 in SENS_RES response in the NFC Forum, NFC Digital Protocol Technical Specification"]
#[inline(always)]
pub fn platfconfig(&mut self) -> PLATFCONFIG_W<8> {
PLATFCONFIG_W::new(self)
}
#[doc = "Bits 12:15 - Reserved for future use. Shall be 0."]
#[inline(always)]
pub fn rfu74(&mut self) -> RFU74_W<12> {
RFU74_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 = "NFC-A SENS_RES auto-response settings\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 [sensres](index.html) module"]
pub struct SENSRES_SPEC;
impl crate::RegisterSpec for SENSRES_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [sensres::R](R) reader structure"]
impl crate::Readable for SENSRES_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [sensres::W](W) writer structure"]
impl crate::Writable for SENSRES_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets SENSRES to value 0x01"]
impl crate::Resettable for SENSRES_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0x01
}
}
+249
View File
@@ -0,0 +1,249 @@
#[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 `FIELDDETECTED_ACTIVATE` reader - Shortcut between FIELDDETECTED event and ACTIVATE task"]
pub type FIELDDETECTED_ACTIVATE_R = crate::BitReader<FIELDDETECTED_ACTIVATE_A>;
#[doc = "Shortcut between FIELDDETECTED event and ACTIVATE task\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum FIELDDETECTED_ACTIVATE_A {
#[doc = "0: Disable shortcut"]
DISABLED = 0,
#[doc = "1: Enable shortcut"]
ENABLED = 1,
}
impl From<FIELDDETECTED_ACTIVATE_A> for bool {
#[inline(always)]
fn from(variant: FIELDDETECTED_ACTIVATE_A) -> Self {
variant as u8 != 0
}
}
impl FIELDDETECTED_ACTIVATE_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> FIELDDETECTED_ACTIVATE_A {
match self.bits {
false => FIELDDETECTED_ACTIVATE_A::DISABLED,
true => FIELDDETECTED_ACTIVATE_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == FIELDDETECTED_ACTIVATE_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == FIELDDETECTED_ACTIVATE_A::ENABLED
}
}
#[doc = "Field `FIELDDETECTED_ACTIVATE` writer - Shortcut between FIELDDETECTED event and ACTIVATE task"]
pub type FIELDDETECTED_ACTIVATE_W<'a, const O: u8> =
crate::BitWriter<'a, u32, SHORTS_SPEC, FIELDDETECTED_ACTIVATE_A, O>;
impl<'a, const O: u8> FIELDDETECTED_ACTIVATE_W<'a, O> {
#[doc = "Disable shortcut"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(FIELDDETECTED_ACTIVATE_A::DISABLED)
}
#[doc = "Enable shortcut"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(FIELDDETECTED_ACTIVATE_A::ENABLED)
}
}
#[doc = "Field `FIELDLOST_SENSE` reader - Shortcut between FIELDLOST event and SENSE task"]
pub type FIELDLOST_SENSE_R = crate::BitReader<FIELDLOST_SENSE_A>;
#[doc = "Shortcut between FIELDLOST event and SENSE task\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum FIELDLOST_SENSE_A {
#[doc = "0: Disable shortcut"]
DISABLED = 0,
#[doc = "1: Enable shortcut"]
ENABLED = 1,
}
impl From<FIELDLOST_SENSE_A> for bool {
#[inline(always)]
fn from(variant: FIELDLOST_SENSE_A) -> Self {
variant as u8 != 0
}
}
impl FIELDLOST_SENSE_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> FIELDLOST_SENSE_A {
match self.bits {
false => FIELDLOST_SENSE_A::DISABLED,
true => FIELDLOST_SENSE_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == FIELDLOST_SENSE_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == FIELDLOST_SENSE_A::ENABLED
}
}
#[doc = "Field `FIELDLOST_SENSE` writer - Shortcut between FIELDLOST event and SENSE task"]
pub type FIELDLOST_SENSE_W<'a, const O: u8> =
crate::BitWriter<'a, u32, SHORTS_SPEC, FIELDLOST_SENSE_A, O>;
impl<'a, const O: u8> FIELDLOST_SENSE_W<'a, O> {
#[doc = "Disable shortcut"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(FIELDLOST_SENSE_A::DISABLED)
}
#[doc = "Enable shortcut"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(FIELDLOST_SENSE_A::ENABLED)
}
}
#[doc = "Field `TXFRAMEEND_ENABLERXDATA` reader - Shortcut between TXFRAMEEND event and ENABLERXDATA task"]
pub type TXFRAMEEND_ENABLERXDATA_R = crate::BitReader<TXFRAMEEND_ENABLERXDATA_A>;
#[doc = "Shortcut between TXFRAMEEND event and ENABLERXDATA task\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TXFRAMEEND_ENABLERXDATA_A {
#[doc = "0: Disable shortcut"]
DISABLED = 0,
#[doc = "1: Enable shortcut"]
ENABLED = 1,
}
impl From<TXFRAMEEND_ENABLERXDATA_A> for bool {
#[inline(always)]
fn from(variant: TXFRAMEEND_ENABLERXDATA_A) -> Self {
variant as u8 != 0
}
}
impl TXFRAMEEND_ENABLERXDATA_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> TXFRAMEEND_ENABLERXDATA_A {
match self.bits {
false => TXFRAMEEND_ENABLERXDATA_A::DISABLED,
true => TXFRAMEEND_ENABLERXDATA_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == TXFRAMEEND_ENABLERXDATA_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == TXFRAMEEND_ENABLERXDATA_A::ENABLED
}
}
#[doc = "Field `TXFRAMEEND_ENABLERXDATA` writer - Shortcut between TXFRAMEEND event and ENABLERXDATA task"]
pub type TXFRAMEEND_ENABLERXDATA_W<'a, const O: u8> =
crate::BitWriter<'a, u32, SHORTS_SPEC, TXFRAMEEND_ENABLERXDATA_A, O>;
impl<'a, const O: u8> TXFRAMEEND_ENABLERXDATA_W<'a, O> {
#[doc = "Disable shortcut"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(TXFRAMEEND_ENABLERXDATA_A::DISABLED)
}
#[doc = "Enable shortcut"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(TXFRAMEEND_ENABLERXDATA_A::ENABLED)
}
}
impl R {
#[doc = "Bit 0 - Shortcut between FIELDDETECTED event and ACTIVATE task"]
#[inline(always)]
pub fn fielddetected_activate(&self) -> FIELDDETECTED_ACTIVATE_R {
FIELDDETECTED_ACTIVATE_R::new((self.bits & 1) != 0)
}
#[doc = "Bit 1 - Shortcut between FIELDLOST event and SENSE task"]
#[inline(always)]
pub fn fieldlost_sense(&self) -> FIELDLOST_SENSE_R {
FIELDLOST_SENSE_R::new(((self.bits >> 1) & 1) != 0)
}
#[doc = "Bit 5 - Shortcut between TXFRAMEEND event and ENABLERXDATA task"]
#[inline(always)]
pub fn txframeend_enablerxdata(&self) -> TXFRAMEEND_ENABLERXDATA_R {
TXFRAMEEND_ENABLERXDATA_R::new(((self.bits >> 5) & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Shortcut between FIELDDETECTED event and ACTIVATE task"]
#[inline(always)]
pub fn fielddetected_activate(&mut self) -> FIELDDETECTED_ACTIVATE_W<0> {
FIELDDETECTED_ACTIVATE_W::new(self)
}
#[doc = "Bit 1 - Shortcut between FIELDLOST event and SENSE task"]
#[inline(always)]
pub fn fieldlost_sense(&mut self) -> FIELDLOST_SENSE_W<1> {
FIELDLOST_SENSE_W::new(self)
}
#[doc = "Bit 5 - Shortcut between TXFRAMEEND event and ENABLERXDATA task"]
#[inline(always)]
pub fn txframeend_enablerxdata(&mut self) -> TXFRAMEEND_ENABLERXDATA_W<5> {
TXFRAMEEND_ENABLERXDATA_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Shortcut register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [shorts](index.html) module"]
pub struct SHORTS_SPEC;
impl crate::RegisterSpec for SHORTS_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [shorts::R](R) reader structure"]
impl crate::Readable for SHORTS_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [shorts::W](W) writer structure"]
impl crate::Writable for SHORTS_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets SHORTS to value 0"]
impl crate::Resettable for SHORTS_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+74
View File
@@ -0,0 +1,74 @@
#[doc = "Register `SLEEPSTATE` reader"]
pub struct R(crate::R<SLEEPSTATE_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<SLEEPSTATE_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<SLEEPSTATE_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<SLEEPSTATE_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `SLEEPSTATE` reader - Reflects the sleep state during automatic collision resolution. Set to IDLE by a GOIDLE task. Set to SLEEP_A when a valid SLEEP_REQ frame is received or by a GOSLEEP task."]
pub type SLEEPSTATE_R = crate::BitReader<SLEEPSTATE_A>;
#[doc = "Reflects the sleep state during automatic collision resolution. Set to IDLE by a GOIDLE task. Set to SLEEP_A when a valid SLEEP_REQ frame is received or by a GOSLEEP task.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SLEEPSTATE_A {
#[doc = "0: State is IDLE."]
IDLE = 0,
#[doc = "1: State is SLEEP_A."]
SLEEP_A = 1,
}
impl From<SLEEPSTATE_A> for bool {
#[inline(always)]
fn from(variant: SLEEPSTATE_A) -> Self {
variant as u8 != 0
}
}
impl SLEEPSTATE_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> SLEEPSTATE_A {
match self.bits {
false => SLEEPSTATE_A::IDLE,
true => SLEEPSTATE_A::SLEEP_A,
}
}
#[doc = "Checks if the value of the field is `IDLE`"]
#[inline(always)]
pub fn is_idle(&self) -> bool {
*self == SLEEPSTATE_A::IDLE
}
#[doc = "Checks if the value of the field is `SLEEP_A`"]
#[inline(always)]
pub fn is_sleep_a(&self) -> bool {
*self == SLEEPSTATE_A::SLEEP_A
}
}
impl R {
#[doc = "Bit 0 - Reflects the sleep state during automatic collision resolution. Set to IDLE by a GOIDLE task. Set to SLEEP_A when a valid SLEEP_REQ frame is received or by a GOSLEEP task."]
#[inline(always)]
pub fn sleepstate(&self) -> SLEEPSTATE_R {
SLEEPSTATE_R::new((self.bits & 1) != 0)
}
}
#[doc = "Sleep state during automatic collision resolution\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 [sleepstate](index.html) module"]
pub struct SLEEPSTATE_SPEC;
impl crate::RegisterSpec for SLEEPSTATE_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [sleepstate::R](R) reader structure"]
impl crate::Readable for SLEEPSTATE_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets SLEEPSTATE to value 0"]
impl crate::Resettable for SLEEPSTATE_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+53
View File
@@ -0,0 +1,53 @@
#[doc = "Register `TASKS_ACTIVATE` writer"]
pub struct W(crate::W<TASKS_ACTIVATE_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<TASKS_ACTIVATE_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_ACTIVATE_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<TASKS_ACTIVATE_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `TASKS_ACTIVATE` writer - "]
pub type TASKS_ACTIVATE_W<'a, const O: u8> =
crate::BitWriter<'a, u32, TASKS_ACTIVATE_SPEC, bool, O>;
impl W {
#[doc = "Bit 0"]
#[inline(always)]
pub fn tasks_activate(&mut self) -> TASKS_ACTIVATE_W<0> {
TASKS_ACTIVATE_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 = "Activate NFCT peripheral for incoming and outgoing frames, change state to activated\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_activate](index.html) module"]
pub struct TASKS_ACTIVATE_SPEC;
impl crate::RegisterSpec for TASKS_ACTIVATE_SPEC {
type Ux = u32;
}
#[doc = "`write(|w| ..)` method takes [tasks_activate::W](W) writer structure"]
impl crate::Writable for TASKS_ACTIVATE_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets TASKS_ACTIVATE to value 0"]
impl crate::Resettable for TASKS_ACTIVATE_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+52
View File
@@ -0,0 +1,52 @@
#[doc = "Register `TASKS_DISABLE` writer"]
pub struct W(crate::W<TASKS_DISABLE_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<TASKS_DISABLE_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_DISABLE_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<TASKS_DISABLE_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `TASKS_DISABLE` writer - "]
pub type TASKS_DISABLE_W<'a, const O: u8> = crate::BitWriter<'a, u32, TASKS_DISABLE_SPEC, bool, O>;
impl W {
#[doc = "Bit 0"]
#[inline(always)]
pub fn tasks_disable(&mut self) -> TASKS_DISABLE_W<0> {
TASKS_DISABLE_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 NFCT peripheral\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_disable](index.html) module"]
pub struct TASKS_DISABLE_SPEC;
impl crate::RegisterSpec for TASKS_DISABLE_SPEC {
type Ux = u32;
}
#[doc = "`write(|w| ..)` method takes [tasks_disable::W](W) writer structure"]
impl crate::Writable for TASKS_DISABLE_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets TASKS_DISABLE to value 0"]
impl crate::Resettable for TASKS_DISABLE_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+53
View File
@@ -0,0 +1,53 @@
#[doc = "Register `TASKS_ENABLERXDATA` writer"]
pub struct W(crate::W<TASKS_ENABLERXDATA_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<TASKS_ENABLERXDATA_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_ENABLERXDATA_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<TASKS_ENABLERXDATA_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `TASKS_ENABLERXDATA` writer - "]
pub type TASKS_ENABLERXDATA_W<'a, const O: u8> =
crate::BitWriter<'a, u32, TASKS_ENABLERXDATA_SPEC, bool, O>;
impl W {
#[doc = "Bit 0"]
#[inline(always)]
pub fn tasks_enablerxdata(&mut self) -> TASKS_ENABLERXDATA_W<0> {
TASKS_ENABLERXDATA_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 = "Initializes the EasyDMA for receive.\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_enablerxdata](index.html) module"]
pub struct TASKS_ENABLERXDATA_SPEC;
impl crate::RegisterSpec for TASKS_ENABLERXDATA_SPEC {
type Ux = u32;
}
#[doc = "`write(|w| ..)` method takes [tasks_enablerxdata::W](W) writer structure"]
impl crate::Writable for TASKS_ENABLERXDATA_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets TASKS_ENABLERXDATA to value 0"]
impl crate::Resettable for TASKS_ENABLERXDATA_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+52
View File
@@ -0,0 +1,52 @@
#[doc = "Register `TASKS_GOIDLE` writer"]
pub struct W(crate::W<TASKS_GOIDLE_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<TASKS_GOIDLE_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_GOIDLE_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<TASKS_GOIDLE_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `TASKS_GOIDLE` writer - "]
pub type TASKS_GOIDLE_W<'a, const O: u8> = crate::BitWriter<'a, u32, TASKS_GOIDLE_SPEC, bool, O>;
impl W {
#[doc = "Bit 0"]
#[inline(always)]
pub fn tasks_goidle(&mut self) -> TASKS_GOIDLE_W<0> {
TASKS_GOIDLE_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 = "Force state machine to IDLE state\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_goidle](index.html) module"]
pub struct TASKS_GOIDLE_SPEC;
impl crate::RegisterSpec for TASKS_GOIDLE_SPEC {
type Ux = u32;
}
#[doc = "`write(|w| ..)` method takes [tasks_goidle::W](W) writer structure"]
impl crate::Writable for TASKS_GOIDLE_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets TASKS_GOIDLE to value 0"]
impl crate::Resettable for TASKS_GOIDLE_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+52
View File
@@ -0,0 +1,52 @@
#[doc = "Register `TASKS_GOSLEEP` writer"]
pub struct W(crate::W<TASKS_GOSLEEP_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<TASKS_GOSLEEP_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_GOSLEEP_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<TASKS_GOSLEEP_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `TASKS_GOSLEEP` writer - "]
pub type TASKS_GOSLEEP_W<'a, const O: u8> = crate::BitWriter<'a, u32, TASKS_GOSLEEP_SPEC, bool, O>;
impl W {
#[doc = "Bit 0"]
#[inline(always)]
pub fn tasks_gosleep(&mut self) -> TASKS_GOSLEEP_W<0> {
TASKS_GOSLEEP_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 = "Force state machine to SLEEP_A state\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_gosleep](index.html) module"]
pub struct TASKS_GOSLEEP_SPEC;
impl crate::RegisterSpec for TASKS_GOSLEEP_SPEC {
type Ux = u32;
}
#[doc = "`write(|w| ..)` method takes [tasks_gosleep::W](W) writer structure"]
impl crate::Writable for TASKS_GOSLEEP_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets TASKS_GOSLEEP to value 0"]
impl crate::Resettable for TASKS_GOSLEEP_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+52
View File
@@ -0,0 +1,52 @@
#[doc = "Register `TASKS_SENSE` writer"]
pub struct W(crate::W<TASKS_SENSE_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<TASKS_SENSE_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_SENSE_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<TASKS_SENSE_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `TASKS_SENSE` writer - "]
pub type TASKS_SENSE_W<'a, const O: u8> = crate::BitWriter<'a, u32, TASKS_SENSE_SPEC, bool, O>;
impl W {
#[doc = "Bit 0"]
#[inline(always)]
pub fn tasks_sense(&mut self) -> TASKS_SENSE_W<0> {
TASKS_SENSE_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 NFC sense field mode, change state to sense mode\n\nThis register you can [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [tasks_sense](index.html) module"]
pub struct TASKS_SENSE_SPEC;
impl crate::RegisterSpec for TASKS_SENSE_SPEC {
type Ux = u32;
}
#[doc = "`write(|w| ..)` method takes [tasks_sense::W](W) writer structure"]
impl crate::Writable for TASKS_SENSE_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets TASKS_SENSE to value 0"]
impl crate::Resettable for TASKS_SENSE_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+52
View File
@@ -0,0 +1,52 @@
#[doc = "Register `TASKS_STARTTX` writer"]
pub struct W(crate::W<TASKS_STARTTX_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<TASKS_STARTTX_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_STARTTX_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<TASKS_STARTTX_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `TASKS_STARTTX` writer - "]
pub type TASKS_STARTTX_W<'a, const O: u8> = crate::BitWriter<'a, u32, TASKS_STARTTX_SPEC, bool, O>;
impl W {
#[doc = "Bit 0"]
#[inline(always)]
pub fn tasks_starttx(&mut self) -> TASKS_STARTTX_W<0> {
TASKS_STARTTX_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Start transmission of an outgoing frame, change state to transmit\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_starttx](index.html) module"]
pub struct TASKS_STARTTX_SPEC;
impl crate::RegisterSpec for TASKS_STARTTX_SPEC {
type Ux = u32;
}
#[doc = "`write(|w| ..)` method takes [tasks_starttx::W](W) writer structure"]
impl crate::Writable for TASKS_STARTTX_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets TASKS_STARTTX to value 0"]
impl crate::Resettable for TASKS_STARTTX_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+16
View File
@@ -0,0 +1,16 @@
#[doc = r"Register block"]
#[repr(C)]
pub struct TXD {
#[doc = "0x00 - Configuration of outgoing frames"]
pub frameconfig: FRAMECONFIG,
#[doc = "0x04 - Size of outgoing frame"]
pub amount: AMOUNT,
}
#[doc = "FRAMECONFIG (rw) register accessor: an alias for `Reg<FRAMECONFIG_SPEC>`"]
pub type FRAMECONFIG = crate::Reg<frameconfig::FRAMECONFIG_SPEC>;
#[doc = "Configuration of outgoing frames"]
pub mod frameconfig;
#[doc = "AMOUNT (rw) register accessor: an alias for `Reg<AMOUNT_SPEC>`"]
pub type AMOUNT = crate::Reg<amount::AMOUNT_SPEC>;
#[doc = "Size of outgoing frame"]
pub mod amount;
+94
View File
@@ -0,0 +1,94 @@
#[doc = "Register `AMOUNT` reader"]
pub struct R(crate::R<AMOUNT_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<AMOUNT_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<AMOUNT_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<AMOUNT_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `AMOUNT` writer"]
pub struct W(crate::W<AMOUNT_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<AMOUNT_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<AMOUNT_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<AMOUNT_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `TXDATABITS` reader - Number of bits in the last or first byte read from RAM that shall be included in the frame (excluding parity bit)."]
pub type TXDATABITS_R = crate::FieldReader<u8, u8>;
#[doc = "Field `TXDATABITS` writer - Number of bits in the last or first byte read from RAM that shall be included in the frame (excluding parity bit)."]
pub type TXDATABITS_W<'a, const O: u8> = crate::FieldWriter<'a, u32, AMOUNT_SPEC, u8, u8, 3, O>;
#[doc = "Field `TXDATABYTES` reader - Number of complete bytes that shall be included in the frame, excluding CRC, parity and framing"]
pub type TXDATABYTES_R = crate::FieldReader<u16, u16>;
#[doc = "Field `TXDATABYTES` writer - Number of complete bytes that shall be included in the frame, excluding CRC, parity and framing"]
pub type TXDATABYTES_W<'a, const O: u8> = crate::FieldWriter<'a, u32, AMOUNT_SPEC, u16, u16, 9, O>;
impl R {
#[doc = "Bits 0:2 - Number of bits in the last or first byte read from RAM that shall be included in the frame (excluding parity bit)."]
#[inline(always)]
pub fn txdatabits(&self) -> TXDATABITS_R {
TXDATABITS_R::new((self.bits & 7) as u8)
}
#[doc = "Bits 3:11 - Number of complete bytes that shall be included in the frame, excluding CRC, parity and framing"]
#[inline(always)]
pub fn txdatabytes(&self) -> TXDATABYTES_R {
TXDATABYTES_R::new(((self.bits >> 3) & 0x01ff) as u16)
}
}
impl W {
#[doc = "Bits 0:2 - Number of bits in the last or first byte read from RAM that shall be included in the frame (excluding parity bit)."]
#[inline(always)]
pub fn txdatabits(&mut self) -> TXDATABITS_W<0> {
TXDATABITS_W::new(self)
}
#[doc = "Bits 3:11 - Number of complete bytes that shall be included in the frame, excluding CRC, parity and framing"]
#[inline(always)]
pub fn txdatabytes(&mut self) -> TXDATABYTES_W<3> {
TXDATABYTES_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 = "Size of outgoing frame\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 [amount](index.html) module"]
pub struct AMOUNT_SPEC;
impl crate::RegisterSpec for AMOUNT_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [amount::R](R) reader structure"]
impl crate::Readable for AMOUNT_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [amount::W](W) writer structure"]
impl crate::Writable for AMOUNT_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets AMOUNT to value 0"]
impl crate::Resettable for AMOUNT_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+307
View File
@@ -0,0 +1,307 @@
#[doc = "Register `FRAMECONFIG` reader"]
pub struct R(crate::R<FRAMECONFIG_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<FRAMECONFIG_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<FRAMECONFIG_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<FRAMECONFIG_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `FRAMECONFIG` writer"]
pub struct W(crate::W<FRAMECONFIG_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<FRAMECONFIG_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<FRAMECONFIG_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<FRAMECONFIG_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `PARITY` reader - Indicates if parity is added to the frame"]
pub type PARITY_R = crate::BitReader<PARITY_A>;
#[doc = "Indicates if parity is added to the frame\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum PARITY_A {
#[doc = "0: Parity is not added to TX frames"]
NO_PARITY = 0,
#[doc = "1: Parity is added to TX frames"]
PARITY = 1,
}
impl From<PARITY_A> for bool {
#[inline(always)]
fn from(variant: PARITY_A) -> Self {
variant as u8 != 0
}
}
impl PARITY_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> PARITY_A {
match self.bits {
false => PARITY_A::NO_PARITY,
true => PARITY_A::PARITY,
}
}
#[doc = "Checks if the value of the field is `NO_PARITY`"]
#[inline(always)]
pub fn is_no_parity(&self) -> bool {
*self == PARITY_A::NO_PARITY
}
#[doc = "Checks if the value of the field is `PARITY`"]
#[inline(always)]
pub fn is_parity(&self) -> bool {
*self == PARITY_A::PARITY
}
}
#[doc = "Field `PARITY` writer - Indicates if parity is added to the frame"]
pub type PARITY_W<'a, const O: u8> = crate::BitWriter<'a, u32, FRAMECONFIG_SPEC, PARITY_A, O>;
impl<'a, const O: u8> PARITY_W<'a, O> {
#[doc = "Parity is not added to TX frames"]
#[inline(always)]
pub fn no_parity(self) -> &'a mut W {
self.variant(PARITY_A::NO_PARITY)
}
#[doc = "Parity is added to TX frames"]
#[inline(always)]
pub fn parity(self) -> &'a mut W {
self.variant(PARITY_A::PARITY)
}
}
#[doc = "Field `DISCARDMODE` reader - Discarding unused bits at start or end of a frame"]
pub type DISCARDMODE_R = crate::BitReader<DISCARDMODE_A>;
#[doc = "Discarding unused bits at start or end of a frame\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DISCARDMODE_A {
#[doc = "0: Unused bits are discarded at end of frame (EoF)"]
DISCARD_END = 0,
#[doc = "1: Unused bits are discarded at start of frame (SoF)"]
DISCARD_START = 1,
}
impl From<DISCARDMODE_A> for bool {
#[inline(always)]
fn from(variant: DISCARDMODE_A) -> Self {
variant as u8 != 0
}
}
impl DISCARDMODE_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> DISCARDMODE_A {
match self.bits {
false => DISCARDMODE_A::DISCARD_END,
true => DISCARDMODE_A::DISCARD_START,
}
}
#[doc = "Checks if the value of the field is `DISCARD_END`"]
#[inline(always)]
pub fn is_discard_end(&self) -> bool {
*self == DISCARDMODE_A::DISCARD_END
}
#[doc = "Checks if the value of the field is `DISCARD_START`"]
#[inline(always)]
pub fn is_discard_start(&self) -> bool {
*self == DISCARDMODE_A::DISCARD_START
}
}
#[doc = "Field `DISCARDMODE` writer - Discarding unused bits at start or end of a frame"]
pub type DISCARDMODE_W<'a, const O: u8> =
crate::BitWriter<'a, u32, FRAMECONFIG_SPEC, DISCARDMODE_A, O>;
impl<'a, const O: u8> DISCARDMODE_W<'a, O> {
#[doc = "Unused bits are discarded at end of frame (EoF)"]
#[inline(always)]
pub fn discard_end(self) -> &'a mut W {
self.variant(DISCARDMODE_A::DISCARD_END)
}
#[doc = "Unused bits are discarded at start of frame (SoF)"]
#[inline(always)]
pub fn discard_start(self) -> &'a mut W {
self.variant(DISCARDMODE_A::DISCARD_START)
}
}
#[doc = "Field `SOF` reader - Adding SoF or not in TX frames"]
pub type SOF_R = crate::BitReader<SOF_A>;
#[doc = "Adding SoF or not in TX frames\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SOF_A {
#[doc = "0: SoF symbol not added"]
NO_SO_F = 0,
#[doc = "1: SoF symbol added"]
SO_F = 1,
}
impl From<SOF_A> for bool {
#[inline(always)]
fn from(variant: SOF_A) -> Self {
variant as u8 != 0
}
}
impl SOF_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> SOF_A {
match self.bits {
false => SOF_A::NO_SO_F,
true => SOF_A::SO_F,
}
}
#[doc = "Checks if the value of the field is `NO_SO_F`"]
#[inline(always)]
pub fn is_no_so_f(&self) -> bool {
*self == SOF_A::NO_SO_F
}
#[doc = "Checks if the value of the field is `SO_F`"]
#[inline(always)]
pub fn is_so_f(&self) -> bool {
*self == SOF_A::SO_F
}
}
#[doc = "Field `SOF` writer - Adding SoF or not in TX frames"]
pub type SOF_W<'a, const O: u8> = crate::BitWriter<'a, u32, FRAMECONFIG_SPEC, SOF_A, O>;
impl<'a, const O: u8> SOF_W<'a, O> {
#[doc = "SoF symbol not added"]
#[inline(always)]
pub fn no_so_f(self) -> &'a mut W {
self.variant(SOF_A::NO_SO_F)
}
#[doc = "SoF symbol added"]
#[inline(always)]
pub fn so_f(self) -> &'a mut W {
self.variant(SOF_A::SO_F)
}
}
#[doc = "Field `CRCMODETX` reader - CRC mode for outgoing frames"]
pub type CRCMODETX_R = crate::BitReader<CRCMODETX_A>;
#[doc = "CRC mode for outgoing frames\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CRCMODETX_A {
#[doc = "0: CRC is not added to the frame"]
NO_CRCTX = 0,
#[doc = "1: 16 bit CRC added to the frame based on all the data read from RAM that is used in the frame"]
CRC16TX = 1,
}
impl From<CRCMODETX_A> for bool {
#[inline(always)]
fn from(variant: CRCMODETX_A) -> Self {
variant as u8 != 0
}
}
impl CRCMODETX_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> CRCMODETX_A {
match self.bits {
false => CRCMODETX_A::NO_CRCTX,
true => CRCMODETX_A::CRC16TX,
}
}
#[doc = "Checks if the value of the field is `NO_CRCTX`"]
#[inline(always)]
pub fn is_no_crctx(&self) -> bool {
*self == CRCMODETX_A::NO_CRCTX
}
#[doc = "Checks if the value of the field is `CRC16TX`"]
#[inline(always)]
pub fn is_crc16tx(&self) -> bool {
*self == CRCMODETX_A::CRC16TX
}
}
#[doc = "Field `CRCMODETX` writer - CRC mode for outgoing frames"]
pub type CRCMODETX_W<'a, const O: u8> = crate::BitWriter<'a, u32, FRAMECONFIG_SPEC, CRCMODETX_A, O>;
impl<'a, const O: u8> CRCMODETX_W<'a, O> {
#[doc = "CRC is not added to the frame"]
#[inline(always)]
pub fn no_crctx(self) -> &'a mut W {
self.variant(CRCMODETX_A::NO_CRCTX)
}
#[doc = "16 bit CRC added to the frame based on all the data read from RAM that is used in the frame"]
#[inline(always)]
pub fn crc16tx(self) -> &'a mut W {
self.variant(CRCMODETX_A::CRC16TX)
}
}
impl R {
#[doc = "Bit 0 - Indicates if parity is added to the frame"]
#[inline(always)]
pub fn parity(&self) -> PARITY_R {
PARITY_R::new((self.bits & 1) != 0)
}
#[doc = "Bit 1 - Discarding unused bits at start or end of a frame"]
#[inline(always)]
pub fn discardmode(&self) -> DISCARDMODE_R {
DISCARDMODE_R::new(((self.bits >> 1) & 1) != 0)
}
#[doc = "Bit 2 - Adding SoF or not in TX frames"]
#[inline(always)]
pub fn sof(&self) -> SOF_R {
SOF_R::new(((self.bits >> 2) & 1) != 0)
}
#[doc = "Bit 4 - CRC mode for outgoing frames"]
#[inline(always)]
pub fn crcmodetx(&self) -> CRCMODETX_R {
CRCMODETX_R::new(((self.bits >> 4) & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Indicates if parity is added to the frame"]
#[inline(always)]
pub fn parity(&mut self) -> PARITY_W<0> {
PARITY_W::new(self)
}
#[doc = "Bit 1 - Discarding unused bits at start or end of a frame"]
#[inline(always)]
pub fn discardmode(&mut self) -> DISCARDMODE_W<1> {
DISCARDMODE_W::new(self)
}
#[doc = "Bit 2 - Adding SoF or not in TX frames"]
#[inline(always)]
pub fn sof(&mut self) -> SOF_W<2> {
SOF_W::new(self)
}
#[doc = "Bit 4 - CRC mode for outgoing frames"]
#[inline(always)]
pub fn crcmodetx(&mut self) -> CRCMODETX_W<4> {
CRCMODETX_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Configuration of outgoing frames\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 [frameconfig](index.html) module"]
pub struct FRAMECONFIG_SPEC;
impl crate::RegisterSpec for FRAMECONFIG_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [frameconfig::R](R) reader structure"]
impl crate::Readable for FRAMECONFIG_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [frameconfig::W](W) writer structure"]
impl crate::Writable for FRAMECONFIG_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets FRAMECONFIG to value 0x17"]
impl crate::Resettable for FRAMECONFIG_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0x17
}
}