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

+80
View File
@@ -0,0 +1,80 @@
#[doc = "Register `BASE0` reader"]
pub struct R(crate::R<BASE0_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<BASE0_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<BASE0_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<BASE0_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `BASE0` writer"]
pub struct W(crate::W<BASE0_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<BASE0_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<BASE0_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<BASE0_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BASE0` reader - Base address 0"]
pub type BASE0_R = crate::FieldReader<u32, u32>;
#[doc = "Field `BASE0` writer - Base address 0"]
pub type BASE0_W<'a, const O: u8> = crate::FieldWriter<'a, u32, BASE0_SPEC, u32, u32, 32, O>;
impl R {
#[doc = "Bits 0:31 - Base address 0"]
#[inline(always)]
pub fn base0(&self) -> BASE0_R {
BASE0_R::new(self.bits)
}
}
impl W {
#[doc = "Bits 0:31 - Base address 0"]
#[inline(always)]
pub fn base0(&mut self) -> BASE0_W<0> {
BASE0_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 = "Base address 0\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 [base0](index.html) module"]
pub struct BASE0_SPEC;
impl crate::RegisterSpec for BASE0_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [base0::R](R) reader structure"]
impl crate::Readable for BASE0_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [base0::W](W) writer structure"]
impl crate::Writable for BASE0_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets BASE0 to value 0"]
impl crate::Resettable for BASE0_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+80
View File
@@ -0,0 +1,80 @@
#[doc = "Register `BASE1` reader"]
pub struct R(crate::R<BASE1_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<BASE1_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<BASE1_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<BASE1_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `BASE1` writer"]
pub struct W(crate::W<BASE1_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<BASE1_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<BASE1_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<BASE1_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BASE1` reader - Base address 1"]
pub type BASE1_R = crate::FieldReader<u32, u32>;
#[doc = "Field `BASE1` writer - Base address 1"]
pub type BASE1_W<'a, const O: u8> = crate::FieldWriter<'a, u32, BASE1_SPEC, u32, u32, 32, O>;
impl R {
#[doc = "Bits 0:31 - Base address 1"]
#[inline(always)]
pub fn base1(&self) -> BASE1_R {
BASE1_R::new(self.bits)
}
}
impl W {
#[doc = "Bits 0:31 - Base address 1"]
#[inline(always)]
pub fn base1(&mut self) -> BASE1_W<0> {
BASE1_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 = "Base address 1\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 [base1](index.html) module"]
pub struct BASE1_SPEC;
impl crate::RegisterSpec for BASE1_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [base1::R](R) reader structure"]
impl crate::Readable for BASE1_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [base1::W](W) writer structure"]
impl crate::Writable for BASE1_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets BASE1 to value 0"]
impl crate::Resettable for BASE1_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+80
View File
@@ -0,0 +1,80 @@
#[doc = "Register `BCC` reader"]
pub struct R(crate::R<BCC_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<BCC_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<BCC_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<BCC_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `BCC` writer"]
pub struct W(crate::W<BCC_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<BCC_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<BCC_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<BCC_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BCC` reader - Bit counter compare"]
pub type BCC_R = crate::FieldReader<u32, u32>;
#[doc = "Field `BCC` writer - Bit counter compare"]
pub type BCC_W<'a, const O: u8> = crate::FieldWriter<'a, u32, BCC_SPEC, u32, u32, 32, O>;
impl R {
#[doc = "Bits 0:31 - Bit counter compare"]
#[inline(always)]
pub fn bcc(&self) -> BCC_R {
BCC_R::new(self.bits)
}
}
impl W {
#[doc = "Bits 0:31 - Bit counter compare"]
#[inline(always)]
pub fn bcc(&mut self) -> BCC_W<0> {
BCC_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 = "Bit counter compare\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 [bcc](index.html) module"]
pub struct BCC_SPEC;
impl crate::RegisterSpec for BCC_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [bcc::R](R) reader structure"]
impl crate::Readable for BCC_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [bcc::W](W) writer structure"]
impl crate::Writable for BCC_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets BCC to value 0"]
impl crate::Resettable for BCC_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+214
View File
@@ -0,0 +1,214 @@
#[doc = "Register `CRCCNF` reader"]
pub struct R(crate::R<CRCCNF_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CRCCNF_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CRCCNF_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CRCCNF_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `CRCCNF` writer"]
pub struct W(crate::W<CRCCNF_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<CRCCNF_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<CRCCNF_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<CRCCNF_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `LEN` reader - CRC length in number of bytes."]
pub type LEN_R = crate::FieldReader<u8, LEN_A>;
#[doc = "CRC length in number of bytes.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum LEN_A {
#[doc = "0: CRC length is zero and CRC calculation is disabled"]
DISABLED = 0,
#[doc = "1: CRC length is one byte and CRC calculation is enabled"]
ONE = 1,
#[doc = "2: CRC length is two bytes and CRC calculation is enabled"]
TWO = 2,
#[doc = "3: CRC length is three bytes and CRC calculation is enabled"]
THREE = 3,
}
impl From<LEN_A> for u8 {
#[inline(always)]
fn from(variant: LEN_A) -> Self {
variant as _
}
}
impl LEN_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> LEN_A {
match self.bits {
0 => LEN_A::DISABLED,
1 => LEN_A::ONE,
2 => LEN_A::TWO,
3 => LEN_A::THREE,
_ => unreachable!(),
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == LEN_A::DISABLED
}
#[doc = "Checks if the value of the field is `ONE`"]
#[inline(always)]
pub fn is_one(&self) -> bool {
*self == LEN_A::ONE
}
#[doc = "Checks if the value of the field is `TWO`"]
#[inline(always)]
pub fn is_two(&self) -> bool {
*self == LEN_A::TWO
}
#[doc = "Checks if the value of the field is `THREE`"]
#[inline(always)]
pub fn is_three(&self) -> bool {
*self == LEN_A::THREE
}
}
#[doc = "Field `LEN` writer - CRC length in number of bytes."]
pub type LEN_W<'a, const O: u8> = crate::FieldWriterSafe<'a, u32, CRCCNF_SPEC, u8, LEN_A, 2, O>;
impl<'a, const O: u8> LEN_W<'a, O> {
#[doc = "CRC length is zero and CRC calculation is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(LEN_A::DISABLED)
}
#[doc = "CRC length is one byte and CRC calculation is enabled"]
#[inline(always)]
pub fn one(self) -> &'a mut W {
self.variant(LEN_A::ONE)
}
#[doc = "CRC length is two bytes and CRC calculation is enabled"]
#[inline(always)]
pub fn two(self) -> &'a mut W {
self.variant(LEN_A::TWO)
}
#[doc = "CRC length is three bytes and CRC calculation is enabled"]
#[inline(always)]
pub fn three(self) -> &'a mut W {
self.variant(LEN_A::THREE)
}
}
#[doc = "Field `SKIPADDR` reader - Include or exclude packet address field out of CRC calculation."]
pub type SKIPADDR_R = crate::BitReader<SKIPADDR_A>;
#[doc = "Include or exclude packet address field out of CRC calculation.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SKIPADDR_A {
#[doc = "0: CRC calculation includes address field"]
INCLUDE = 0,
#[doc = "1: CRC calculation does not include address field. The CRC calculation will start at the first byte after the address."]
SKIP = 1,
}
impl From<SKIPADDR_A> for bool {
#[inline(always)]
fn from(variant: SKIPADDR_A) -> Self {
variant as u8 != 0
}
}
impl SKIPADDR_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> SKIPADDR_A {
match self.bits {
false => SKIPADDR_A::INCLUDE,
true => SKIPADDR_A::SKIP,
}
}
#[doc = "Checks if the value of the field is `INCLUDE`"]
#[inline(always)]
pub fn is_include(&self) -> bool {
*self == SKIPADDR_A::INCLUDE
}
#[doc = "Checks if the value of the field is `SKIP`"]
#[inline(always)]
pub fn is_skip(&self) -> bool {
*self == SKIPADDR_A::SKIP
}
}
#[doc = "Field `SKIPADDR` writer - Include or exclude packet address field out of CRC calculation."]
pub type SKIPADDR_W<'a, const O: u8> = crate::BitWriter<'a, u32, CRCCNF_SPEC, SKIPADDR_A, O>;
impl<'a, const O: u8> SKIPADDR_W<'a, O> {
#[doc = "CRC calculation includes address field"]
#[inline(always)]
pub fn include(self) -> &'a mut W {
self.variant(SKIPADDR_A::INCLUDE)
}
#[doc = "CRC calculation does not include address field. The CRC calculation will start at the first byte after the address."]
#[inline(always)]
pub fn skip(self) -> &'a mut W {
self.variant(SKIPADDR_A::SKIP)
}
}
impl R {
#[doc = "Bits 0:1 - CRC length in number of bytes."]
#[inline(always)]
pub fn len(&self) -> LEN_R {
LEN_R::new((self.bits & 3) as u8)
}
#[doc = "Bit 8 - Include or exclude packet address field out of CRC calculation."]
#[inline(always)]
pub fn skipaddr(&self) -> SKIPADDR_R {
SKIPADDR_R::new(((self.bits >> 8) & 1) != 0)
}
}
impl W {
#[doc = "Bits 0:1 - CRC length in number of bytes."]
#[inline(always)]
pub fn len(&mut self) -> LEN_W<0> {
LEN_W::new(self)
}
#[doc = "Bit 8 - Include or exclude packet address field out of CRC calculation."]
#[inline(always)]
pub fn skipaddr(&mut self) -> SKIPADDR_W<8> {
SKIPADDR_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 = "CRC configuration\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [crccnf](index.html) module"]
pub struct CRCCNF_SPEC;
impl crate::RegisterSpec for CRCCNF_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [crccnf::R](R) reader structure"]
impl crate::Readable for CRCCNF_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [crccnf::W](W) writer structure"]
impl crate::Writable for CRCCNF_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets CRCCNF to value 0"]
impl crate::Resettable for CRCCNF_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+80
View File
@@ -0,0 +1,80 @@
#[doc = "Register `CRCINIT` reader"]
pub struct R(crate::R<CRCINIT_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CRCINIT_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CRCINIT_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CRCINIT_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `CRCINIT` writer"]
pub struct W(crate::W<CRCINIT_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<CRCINIT_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<CRCINIT_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<CRCINIT_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `CRCINIT` reader - CRC initial value"]
pub type CRCINIT_R = crate::FieldReader<u32, u32>;
#[doc = "Field `CRCINIT` writer - CRC initial value"]
pub type CRCINIT_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CRCINIT_SPEC, u32, u32, 24, O>;
impl R {
#[doc = "Bits 0:23 - CRC initial value"]
#[inline(always)]
pub fn crcinit(&self) -> CRCINIT_R {
CRCINIT_R::new((self.bits & 0x00ff_ffff) as u32)
}
}
impl W {
#[doc = "Bits 0:23 - CRC initial value"]
#[inline(always)]
pub fn crcinit(&mut self) -> CRCINIT_W<0> {
CRCINIT_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 = "CRC initial value\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [crcinit](index.html) module"]
pub struct CRCINIT_SPEC;
impl crate::RegisterSpec for CRCINIT_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [crcinit::R](R) reader structure"]
impl crate::Readable for CRCINIT_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [crcinit::W](W) writer structure"]
impl crate::Writable for CRCINIT_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets CRCINIT to value 0"]
impl crate::Resettable for CRCINIT_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+80
View File
@@ -0,0 +1,80 @@
#[doc = "Register `CRCPOLY` reader"]
pub struct R(crate::R<CRCPOLY_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CRCPOLY_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CRCPOLY_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CRCPOLY_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `CRCPOLY` writer"]
pub struct W(crate::W<CRCPOLY_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<CRCPOLY_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<CRCPOLY_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<CRCPOLY_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `CRCPOLY` reader - CRC polynomial"]
pub type CRCPOLY_R = crate::FieldReader<u32, u32>;
#[doc = "Field `CRCPOLY` writer - CRC polynomial"]
pub type CRCPOLY_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CRCPOLY_SPEC, u32, u32, 24, O>;
impl R {
#[doc = "Bits 0:23 - CRC polynomial"]
#[inline(always)]
pub fn crcpoly(&self) -> CRCPOLY_R {
CRCPOLY_R::new((self.bits & 0x00ff_ffff) as u32)
}
}
impl W {
#[doc = "Bits 0:23 - CRC polynomial"]
#[inline(always)]
pub fn crcpoly(&mut self) -> CRCPOLY_W<0> {
CRCPOLY_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 = "CRC polynomial\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 [crcpoly](index.html) module"]
pub struct CRCPOLY_SPEC;
impl crate::RegisterSpec for CRCPOLY_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [crcpoly::R](R) reader structure"]
impl crate::Readable for CRCPOLY_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [crcpoly::W](W) writer structure"]
impl crate::Writable for CRCPOLY_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets CRCPOLY to value 0"]
impl crate::Resettable for CRCPOLY_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+74
View File
@@ -0,0 +1,74 @@
#[doc = "Register `CRCSTATUS` reader"]
pub struct R(crate::R<CRCSTATUS_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CRCSTATUS_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CRCSTATUS_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CRCSTATUS_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `CRCSTATUS` reader - CRC status of packet received"]
pub type CRCSTATUS_R = crate::BitReader<CRCSTATUS_A>;
#[doc = "CRC status of packet received\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CRCSTATUS_A {
#[doc = "0: Packet received with CRC error"]
CRCERROR = 0,
#[doc = "1: Packet received with CRC ok"]
CRCOK = 1,
}
impl From<CRCSTATUS_A> for bool {
#[inline(always)]
fn from(variant: CRCSTATUS_A) -> Self {
variant as u8 != 0
}
}
impl CRCSTATUS_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> CRCSTATUS_A {
match self.bits {
false => CRCSTATUS_A::CRCERROR,
true => CRCSTATUS_A::CRCOK,
}
}
#[doc = "Checks if the value of the field is `CRCERROR`"]
#[inline(always)]
pub fn is_crcerror(&self) -> bool {
*self == CRCSTATUS_A::CRCERROR
}
#[doc = "Checks if the value of the field is `CRCOK`"]
#[inline(always)]
pub fn is_crcok(&self) -> bool {
*self == CRCSTATUS_A::CRCOK
}
}
impl R {
#[doc = "Bit 0 - CRC status of packet received"]
#[inline(always)]
pub fn crcstatus(&self) -> CRCSTATUS_R {
CRCSTATUS_R::new((self.bits & 1) != 0)
}
}
#[doc = "CRC status\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [crcstatus](index.html) module"]
pub struct CRCSTATUS_SPEC;
impl crate::RegisterSpec for CRCSTATUS_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [crcstatus::R](R) reader structure"]
impl crate::Readable for CRCSTATUS_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets CRCSTATUS to value 0"]
impl crate::Resettable for CRCSTATUS_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+81
View File
@@ -0,0 +1,81 @@
#[doc = "Register `DAB[%s]` reader"]
pub struct R(crate::R<DAB_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DAB_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DAB_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DAB_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DAB[%s]` writer"]
pub struct W(crate::W<DAB_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DAB_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<DAB_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DAB_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `DAB` reader - Device address base segment 0"]
pub type DAB_R = crate::FieldReader<u32, u32>;
#[doc = "Field `DAB` writer - Device address base segment 0"]
pub type DAB_W<'a, const O: u8> = crate::FieldWriter<'a, u32, DAB_SPEC, u32, u32, 32, O>;
impl R {
#[doc = "Bits 0:31 - Device address base segment 0"]
#[inline(always)]
pub fn dab(&self) -> DAB_R {
DAB_R::new(self.bits)
}
}
impl W {
#[doc = "Bits 0:31 - Device address base segment 0"]
#[inline(always)]
pub fn dab(&mut self) -> DAB_W<0> {
DAB_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Description collection\\[0\\]: Device address base segment 0\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 [dab](index.html) module"]
pub struct DAB_SPEC;
impl crate::RegisterSpec for DAB_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [dab::R](R) reader structure"]
impl crate::Readable for DAB_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [dab::W](W) writer structure"]
impl crate::Writable for DAB_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DAB[%s]
to value 0"]
impl crate::Resettable for DAB_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+658
View File
@@ -0,0 +1,658 @@
#[doc = "Register `DACNF` reader"]
pub struct R(crate::R<DACNF_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DACNF_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DACNF_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DACNF_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DACNF` writer"]
pub struct W(crate::W<DACNF_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DACNF_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<DACNF_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DACNF_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `ENA0` reader - Enable or disable device address matching using device address 0"]
pub type ENA0_R = crate::BitReader<ENA0_A>;
#[doc = "Enable or disable device address matching using device address 0\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ENA0_A {
#[doc = "0: Disabled"]
DISABLED = 0,
#[doc = "1: Enabled"]
ENABLED = 1,
}
impl From<ENA0_A> for bool {
#[inline(always)]
fn from(variant: ENA0_A) -> Self {
variant as u8 != 0
}
}
impl ENA0_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ENA0_A {
match self.bits {
false => ENA0_A::DISABLED,
true => ENA0_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ENA0_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ENA0_A::ENABLED
}
}
#[doc = "Field `ENA0` writer - Enable or disable device address matching using device address 0"]
pub type ENA0_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, ENA0_A, O>;
impl<'a, const O: u8> ENA0_W<'a, O> {
#[doc = "Disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ENA0_A::DISABLED)
}
#[doc = "Enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ENA0_A::ENABLED)
}
}
#[doc = "Field `ENA1` reader - Enable or disable device address matching using device address 1"]
pub type ENA1_R = crate::BitReader<ENA1_A>;
#[doc = "Enable or disable device address matching using device address 1\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ENA1_A {
#[doc = "0: Disabled"]
DISABLED = 0,
#[doc = "1: Enabled"]
ENABLED = 1,
}
impl From<ENA1_A> for bool {
#[inline(always)]
fn from(variant: ENA1_A) -> Self {
variant as u8 != 0
}
}
impl ENA1_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ENA1_A {
match self.bits {
false => ENA1_A::DISABLED,
true => ENA1_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ENA1_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ENA1_A::ENABLED
}
}
#[doc = "Field `ENA1` writer - Enable or disable device address matching using device address 1"]
pub type ENA1_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, ENA1_A, O>;
impl<'a, const O: u8> ENA1_W<'a, O> {
#[doc = "Disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ENA1_A::DISABLED)
}
#[doc = "Enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ENA1_A::ENABLED)
}
}
#[doc = "Field `ENA2` reader - Enable or disable device address matching using device address 2"]
pub type ENA2_R = crate::BitReader<ENA2_A>;
#[doc = "Enable or disable device address matching using device address 2\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ENA2_A {
#[doc = "0: Disabled"]
DISABLED = 0,
#[doc = "1: Enabled"]
ENABLED = 1,
}
impl From<ENA2_A> for bool {
#[inline(always)]
fn from(variant: ENA2_A) -> Self {
variant as u8 != 0
}
}
impl ENA2_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ENA2_A {
match self.bits {
false => ENA2_A::DISABLED,
true => ENA2_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ENA2_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ENA2_A::ENABLED
}
}
#[doc = "Field `ENA2` writer - Enable or disable device address matching using device address 2"]
pub type ENA2_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, ENA2_A, O>;
impl<'a, const O: u8> ENA2_W<'a, O> {
#[doc = "Disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ENA2_A::DISABLED)
}
#[doc = "Enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ENA2_A::ENABLED)
}
}
#[doc = "Field `ENA3` reader - Enable or disable device address matching using device address 3"]
pub type ENA3_R = crate::BitReader<ENA3_A>;
#[doc = "Enable or disable device address matching using device address 3\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ENA3_A {
#[doc = "0: Disabled"]
DISABLED = 0,
#[doc = "1: Enabled"]
ENABLED = 1,
}
impl From<ENA3_A> for bool {
#[inline(always)]
fn from(variant: ENA3_A) -> Self {
variant as u8 != 0
}
}
impl ENA3_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ENA3_A {
match self.bits {
false => ENA3_A::DISABLED,
true => ENA3_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ENA3_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ENA3_A::ENABLED
}
}
#[doc = "Field `ENA3` writer - Enable or disable device address matching using device address 3"]
pub type ENA3_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, ENA3_A, O>;
impl<'a, const O: u8> ENA3_W<'a, O> {
#[doc = "Disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ENA3_A::DISABLED)
}
#[doc = "Enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ENA3_A::ENABLED)
}
}
#[doc = "Field `ENA4` reader - Enable or disable device address matching using device address 4"]
pub type ENA4_R = crate::BitReader<ENA4_A>;
#[doc = "Enable or disable device address matching using device address 4\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ENA4_A {
#[doc = "0: Disabled"]
DISABLED = 0,
#[doc = "1: Enabled"]
ENABLED = 1,
}
impl From<ENA4_A> for bool {
#[inline(always)]
fn from(variant: ENA4_A) -> Self {
variant as u8 != 0
}
}
impl ENA4_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ENA4_A {
match self.bits {
false => ENA4_A::DISABLED,
true => ENA4_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ENA4_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ENA4_A::ENABLED
}
}
#[doc = "Field `ENA4` writer - Enable or disable device address matching using device address 4"]
pub type ENA4_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, ENA4_A, O>;
impl<'a, const O: u8> ENA4_W<'a, O> {
#[doc = "Disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ENA4_A::DISABLED)
}
#[doc = "Enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ENA4_A::ENABLED)
}
}
#[doc = "Field `ENA5` reader - Enable or disable device address matching using device address 5"]
pub type ENA5_R = crate::BitReader<ENA5_A>;
#[doc = "Enable or disable device address matching using device address 5\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ENA5_A {
#[doc = "0: Disabled"]
DISABLED = 0,
#[doc = "1: Enabled"]
ENABLED = 1,
}
impl From<ENA5_A> for bool {
#[inline(always)]
fn from(variant: ENA5_A) -> Self {
variant as u8 != 0
}
}
impl ENA5_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ENA5_A {
match self.bits {
false => ENA5_A::DISABLED,
true => ENA5_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ENA5_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ENA5_A::ENABLED
}
}
#[doc = "Field `ENA5` writer - Enable or disable device address matching using device address 5"]
pub type ENA5_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, ENA5_A, O>;
impl<'a, const O: u8> ENA5_W<'a, O> {
#[doc = "Disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ENA5_A::DISABLED)
}
#[doc = "Enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ENA5_A::ENABLED)
}
}
#[doc = "Field `ENA6` reader - Enable or disable device address matching using device address 6"]
pub type ENA6_R = crate::BitReader<ENA6_A>;
#[doc = "Enable or disable device address matching using device address 6\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ENA6_A {
#[doc = "0: Disabled"]
DISABLED = 0,
#[doc = "1: Enabled"]
ENABLED = 1,
}
impl From<ENA6_A> for bool {
#[inline(always)]
fn from(variant: ENA6_A) -> Self {
variant as u8 != 0
}
}
impl ENA6_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ENA6_A {
match self.bits {
false => ENA6_A::DISABLED,
true => ENA6_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ENA6_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ENA6_A::ENABLED
}
}
#[doc = "Field `ENA6` writer - Enable or disable device address matching using device address 6"]
pub type ENA6_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, ENA6_A, O>;
impl<'a, const O: u8> ENA6_W<'a, O> {
#[doc = "Disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ENA6_A::DISABLED)
}
#[doc = "Enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ENA6_A::ENABLED)
}
}
#[doc = "Field `ENA7` reader - Enable or disable device address matching using device address 7"]
pub type ENA7_R = crate::BitReader<ENA7_A>;
#[doc = "Enable or disable device address matching using device address 7\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ENA7_A {
#[doc = "0: Disabled"]
DISABLED = 0,
#[doc = "1: Enabled"]
ENABLED = 1,
}
impl From<ENA7_A> for bool {
#[inline(always)]
fn from(variant: ENA7_A) -> Self {
variant as u8 != 0
}
}
impl ENA7_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ENA7_A {
match self.bits {
false => ENA7_A::DISABLED,
true => ENA7_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ENA7_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ENA7_A::ENABLED
}
}
#[doc = "Field `ENA7` writer - Enable or disable device address matching using device address 7"]
pub type ENA7_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, ENA7_A, O>;
impl<'a, const O: u8> ENA7_W<'a, O> {
#[doc = "Disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ENA7_A::DISABLED)
}
#[doc = "Enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ENA7_A::ENABLED)
}
}
#[doc = "Field `TXADD0` reader - TxAdd for device address 0"]
pub type TXADD0_R = crate::BitReader<bool>;
#[doc = "Field `TXADD0` writer - TxAdd for device address 0"]
pub type TXADD0_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, bool, O>;
#[doc = "Field `TXADD1` reader - TxAdd for device address 1"]
pub type TXADD1_R = crate::BitReader<bool>;
#[doc = "Field `TXADD1` writer - TxAdd for device address 1"]
pub type TXADD1_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, bool, O>;
#[doc = "Field `TXADD2` reader - TxAdd for device address 2"]
pub type TXADD2_R = crate::BitReader<bool>;
#[doc = "Field `TXADD2` writer - TxAdd for device address 2"]
pub type TXADD2_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, bool, O>;
#[doc = "Field `TXADD3` reader - TxAdd for device address 3"]
pub type TXADD3_R = crate::BitReader<bool>;
#[doc = "Field `TXADD3` writer - TxAdd for device address 3"]
pub type TXADD3_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, bool, O>;
#[doc = "Field `TXADD4` reader - TxAdd for device address 4"]
pub type TXADD4_R = crate::BitReader<bool>;
#[doc = "Field `TXADD4` writer - TxAdd for device address 4"]
pub type TXADD4_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, bool, O>;
#[doc = "Field `TXADD5` reader - TxAdd for device address 5"]
pub type TXADD5_R = crate::BitReader<bool>;
#[doc = "Field `TXADD5` writer - TxAdd for device address 5"]
pub type TXADD5_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, bool, O>;
#[doc = "Field `TXADD6` reader - TxAdd for device address 6"]
pub type TXADD6_R = crate::BitReader<bool>;
#[doc = "Field `TXADD6` writer - TxAdd for device address 6"]
pub type TXADD6_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, bool, O>;
#[doc = "Field `TXADD7` reader - TxAdd for device address 7"]
pub type TXADD7_R = crate::BitReader<bool>;
#[doc = "Field `TXADD7` writer - TxAdd for device address 7"]
pub type TXADD7_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, bool, O>;
impl R {
#[doc = "Bit 0 - Enable or disable device address matching using device address 0"]
#[inline(always)]
pub fn ena0(&self) -> ENA0_R {
ENA0_R::new((self.bits & 1) != 0)
}
#[doc = "Bit 1 - Enable or disable device address matching using device address 1"]
#[inline(always)]
pub fn ena1(&self) -> ENA1_R {
ENA1_R::new(((self.bits >> 1) & 1) != 0)
}
#[doc = "Bit 2 - Enable or disable device address matching using device address 2"]
#[inline(always)]
pub fn ena2(&self) -> ENA2_R {
ENA2_R::new(((self.bits >> 2) & 1) != 0)
}
#[doc = "Bit 3 - Enable or disable device address matching using device address 3"]
#[inline(always)]
pub fn ena3(&self) -> ENA3_R {
ENA3_R::new(((self.bits >> 3) & 1) != 0)
}
#[doc = "Bit 4 - Enable or disable device address matching using device address 4"]
#[inline(always)]
pub fn ena4(&self) -> ENA4_R {
ENA4_R::new(((self.bits >> 4) & 1) != 0)
}
#[doc = "Bit 5 - Enable or disable device address matching using device address 5"]
#[inline(always)]
pub fn ena5(&self) -> ENA5_R {
ENA5_R::new(((self.bits >> 5) & 1) != 0)
}
#[doc = "Bit 6 - Enable or disable device address matching using device address 6"]
#[inline(always)]
pub fn ena6(&self) -> ENA6_R {
ENA6_R::new(((self.bits >> 6) & 1) != 0)
}
#[doc = "Bit 7 - Enable or disable device address matching using device address 7"]
#[inline(always)]
pub fn ena7(&self) -> ENA7_R {
ENA7_R::new(((self.bits >> 7) & 1) != 0)
}
#[doc = "Bit 8 - TxAdd for device address 0"]
#[inline(always)]
pub fn txadd0(&self) -> TXADD0_R {
TXADD0_R::new(((self.bits >> 8) & 1) != 0)
}
#[doc = "Bit 9 - TxAdd for device address 1"]
#[inline(always)]
pub fn txadd1(&self) -> TXADD1_R {
TXADD1_R::new(((self.bits >> 9) & 1) != 0)
}
#[doc = "Bit 10 - TxAdd for device address 2"]
#[inline(always)]
pub fn txadd2(&self) -> TXADD2_R {
TXADD2_R::new(((self.bits >> 10) & 1) != 0)
}
#[doc = "Bit 11 - TxAdd for device address 3"]
#[inline(always)]
pub fn txadd3(&self) -> TXADD3_R {
TXADD3_R::new(((self.bits >> 11) & 1) != 0)
}
#[doc = "Bit 12 - TxAdd for device address 4"]
#[inline(always)]
pub fn txadd4(&self) -> TXADD4_R {
TXADD4_R::new(((self.bits >> 12) & 1) != 0)
}
#[doc = "Bit 13 - TxAdd for device address 5"]
#[inline(always)]
pub fn txadd5(&self) -> TXADD5_R {
TXADD5_R::new(((self.bits >> 13) & 1) != 0)
}
#[doc = "Bit 14 - TxAdd for device address 6"]
#[inline(always)]
pub fn txadd6(&self) -> TXADD6_R {
TXADD6_R::new(((self.bits >> 14) & 1) != 0)
}
#[doc = "Bit 15 - TxAdd for device address 7"]
#[inline(always)]
pub fn txadd7(&self) -> TXADD7_R {
TXADD7_R::new(((self.bits >> 15) & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Enable or disable device address matching using device address 0"]
#[inline(always)]
pub fn ena0(&mut self) -> ENA0_W<0> {
ENA0_W::new(self)
}
#[doc = "Bit 1 - Enable or disable device address matching using device address 1"]
#[inline(always)]
pub fn ena1(&mut self) -> ENA1_W<1> {
ENA1_W::new(self)
}
#[doc = "Bit 2 - Enable or disable device address matching using device address 2"]
#[inline(always)]
pub fn ena2(&mut self) -> ENA2_W<2> {
ENA2_W::new(self)
}
#[doc = "Bit 3 - Enable or disable device address matching using device address 3"]
#[inline(always)]
pub fn ena3(&mut self) -> ENA3_W<3> {
ENA3_W::new(self)
}
#[doc = "Bit 4 - Enable or disable device address matching using device address 4"]
#[inline(always)]
pub fn ena4(&mut self) -> ENA4_W<4> {
ENA4_W::new(self)
}
#[doc = "Bit 5 - Enable or disable device address matching using device address 5"]
#[inline(always)]
pub fn ena5(&mut self) -> ENA5_W<5> {
ENA5_W::new(self)
}
#[doc = "Bit 6 - Enable or disable device address matching using device address 6"]
#[inline(always)]
pub fn ena6(&mut self) -> ENA6_W<6> {
ENA6_W::new(self)
}
#[doc = "Bit 7 - Enable or disable device address matching using device address 7"]
#[inline(always)]
pub fn ena7(&mut self) -> ENA7_W<7> {
ENA7_W::new(self)
}
#[doc = "Bit 8 - TxAdd for device address 0"]
#[inline(always)]
pub fn txadd0(&mut self) -> TXADD0_W<8> {
TXADD0_W::new(self)
}
#[doc = "Bit 9 - TxAdd for device address 1"]
#[inline(always)]
pub fn txadd1(&mut self) -> TXADD1_W<9> {
TXADD1_W::new(self)
}
#[doc = "Bit 10 - TxAdd for device address 2"]
#[inline(always)]
pub fn txadd2(&mut self) -> TXADD2_W<10> {
TXADD2_W::new(self)
}
#[doc = "Bit 11 - TxAdd for device address 3"]
#[inline(always)]
pub fn txadd3(&mut self) -> TXADD3_W<11> {
TXADD3_W::new(self)
}
#[doc = "Bit 12 - TxAdd for device address 4"]
#[inline(always)]
pub fn txadd4(&mut self) -> TXADD4_W<12> {
TXADD4_W::new(self)
}
#[doc = "Bit 13 - TxAdd for device address 5"]
#[inline(always)]
pub fn txadd5(&mut self) -> TXADD5_W<13> {
TXADD5_W::new(self)
}
#[doc = "Bit 14 - TxAdd for device address 6"]
#[inline(always)]
pub fn txadd6(&mut self) -> TXADD6_W<14> {
TXADD6_W::new(self)
}
#[doc = "Bit 15 - TxAdd for device address 7"]
#[inline(always)]
pub fn txadd7(&mut self) -> TXADD7_W<15> {
TXADD7_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 = "Device address match configuration\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [dacnf](index.html) module"]
pub struct DACNF_SPEC;
impl crate::RegisterSpec for DACNF_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [dacnf::R](R) reader structure"]
impl crate::Readable for DACNF_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [dacnf::W](W) writer structure"]
impl crate::Writable for DACNF_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DACNF to value 0"]
impl crate::Resettable for DACNF_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+40
View File
@@ -0,0 +1,40 @@
#[doc = "Register `DAI` reader"]
pub struct R(crate::R<DAI_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DAI_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DAI_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DAI_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `DAI` reader - Device address match index"]
pub type DAI_R = crate::FieldReader<u8, u8>;
impl R {
#[doc = "Bits 0:2 - Device address match index"]
#[inline(always)]
pub fn dai(&self) -> DAI_R {
DAI_R::new((self.bits & 7) as u8)
}
}
#[doc = "Device address match index\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 [dai](index.html) module"]
pub struct DAI_SPEC;
impl crate::RegisterSpec for DAI_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [dai::R](R) reader structure"]
impl crate::Readable for DAI_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets DAI to value 0"]
impl crate::Resettable for DAI_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+81
View File
@@ -0,0 +1,81 @@
#[doc = "Register `DAP[%s]` reader"]
pub struct R(crate::R<DAP_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DAP_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DAP_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DAP_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DAP[%s]` writer"]
pub struct W(crate::W<DAP_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DAP_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<DAP_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DAP_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `DAP` reader - Device address prefix 0"]
pub type DAP_R = crate::FieldReader<u16, u16>;
#[doc = "Field `DAP` writer - Device address prefix 0"]
pub type DAP_W<'a, const O: u8> = crate::FieldWriter<'a, u32, DAP_SPEC, u16, u16, 16, O>;
impl R {
#[doc = "Bits 0:15 - Device address prefix 0"]
#[inline(always)]
pub fn dap(&self) -> DAP_R {
DAP_R::new((self.bits & 0xffff) as u16)
}
}
impl W {
#[doc = "Bits 0:15 - Device address prefix 0"]
#[inline(always)]
pub fn dap(&mut self) -> DAP_W<0> {
DAP_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Description collection\\[0\\]: Device address prefix 0\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 [dap](index.html) module"]
pub struct DAP_SPEC;
impl crate::RegisterSpec for DAP_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [dap::R](R) reader structure"]
impl crate::Readable for DAP_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [dap::W](W) writer structure"]
impl crate::Writable for DAP_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DAP[%s]
to value 0"]
impl crate::Resettable for DAP_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+81
View File
@@ -0,0 +1,81 @@
#[doc = "Register `DATAWHITEIV` reader"]
pub struct R(crate::R<DATAWHITEIV_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATAWHITEIV_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATAWHITEIV_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATAWHITEIV_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATAWHITEIV` writer"]
pub struct W(crate::W<DATAWHITEIV_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATAWHITEIV_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<DATAWHITEIV_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATAWHITEIV_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `DATAWHITEIV` reader - Data whitening initial value. Bit 6 is hard-wired to '1', writing '0' to it has no effect, and it will always be read back and used by the device as '1'."]
pub type DATAWHITEIV_R = crate::FieldReader<u8, u8>;
#[doc = "Field `DATAWHITEIV` writer - Data whitening initial value. Bit 6 is hard-wired to '1', writing '0' to it has no effect, and it will always be read back and used by the device as '1'."]
pub type DATAWHITEIV_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, DATAWHITEIV_SPEC, u8, u8, 7, O>;
impl R {
#[doc = "Bits 0:6 - Data whitening initial value. Bit 6 is hard-wired to '1', writing '0' to it has no effect, and it will always be read back and used by the device as '1'."]
#[inline(always)]
pub fn datawhiteiv(&self) -> DATAWHITEIV_R {
DATAWHITEIV_R::new((self.bits & 0x7f) as u8)
}
}
impl W {
#[doc = "Bits 0:6 - Data whitening initial value. Bit 6 is hard-wired to '1', writing '0' to it has no effect, and it will always be read back and used by the device as '1'."]
#[inline(always)]
pub fn datawhiteiv(&mut self) -> DATAWHITEIV_W<0> {
DATAWHITEIV_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 = "Data whitening initial value\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [datawhiteiv](index.html) module"]
pub struct DATAWHITEIV_SPEC;
impl crate::RegisterSpec for DATAWHITEIV_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [datawhiteiv::R](R) reader structure"]
impl crate::Readable for DATAWHITEIV_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [datawhiteiv::W](W) writer structure"]
impl crate::Writable for DATAWHITEIV_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATAWHITEIV to value 0x40"]
impl crate::Resettable for DATAWHITEIV_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0x40
}
}
+64
View File
@@ -0,0 +1,64 @@
#[doc = "Register `EVENTS_ADDRESS` reader"]
pub struct R(crate::R<EVENTS_ADDRESS_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_ADDRESS_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_ADDRESS_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_ADDRESS_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_ADDRESS` writer"]
pub struct W(crate::W<EVENTS_ADDRESS_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_ADDRESS_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_ADDRESS_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_ADDRESS_SPEC>) -> Self {
W(writer)
}
}
impl W {
#[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 = "Address sent or received\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_address](index.html) module"]
pub struct EVENTS_ADDRESS_SPEC;
impl crate::RegisterSpec for EVENTS_ADDRESS_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_address::R](R) reader structure"]
impl crate::Readable for EVENTS_ADDRESS_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_address::W](W) writer structure"]
impl crate::Writable for EVENTS_ADDRESS_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_ADDRESS to value 0"]
impl crate::Resettable for EVENTS_ADDRESS_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+64
View File
@@ -0,0 +1,64 @@
#[doc = "Register `EVENTS_BCMATCH` reader"]
pub struct R(crate::R<EVENTS_BCMATCH_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_BCMATCH_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_BCMATCH_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_BCMATCH_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_BCMATCH` writer"]
pub struct W(crate::W<EVENTS_BCMATCH_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_BCMATCH_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_BCMATCH_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_BCMATCH_SPEC>) -> Self {
W(writer)
}
}
impl W {
#[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 = "Bit counter reached bit count value.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [events_bcmatch](index.html) module"]
pub struct EVENTS_BCMATCH_SPEC;
impl crate::RegisterSpec for EVENTS_BCMATCH_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_bcmatch::R](R) reader structure"]
impl crate::Readable for EVENTS_BCMATCH_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_bcmatch::W](W) writer structure"]
impl crate::Writable for EVENTS_BCMATCH_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_BCMATCH to value 0"]
impl crate::Resettable for EVENTS_BCMATCH_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+64
View File
@@ -0,0 +1,64 @@
#[doc = "Register `EVENTS_CRCERROR` reader"]
pub struct R(crate::R<EVENTS_CRCERROR_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_CRCERROR_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_CRCERROR_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_CRCERROR_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_CRCERROR` writer"]
pub struct W(crate::W<EVENTS_CRCERROR_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_CRCERROR_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_CRCERROR_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_CRCERROR_SPEC>) -> Self {
W(writer)
}
}
impl W {
#[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 received with CRC 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_crcerror](index.html) module"]
pub struct EVENTS_CRCERROR_SPEC;
impl crate::RegisterSpec for EVENTS_CRCERROR_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_crcerror::R](R) reader structure"]
impl crate::Readable for EVENTS_CRCERROR_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_crcerror::W](W) writer structure"]
impl crate::Writable for EVENTS_CRCERROR_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_CRCERROR to value 0"]
impl crate::Resettable for EVENTS_CRCERROR_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+64
View File
@@ -0,0 +1,64 @@
#[doc = "Register `EVENTS_CRCOK` reader"]
pub struct R(crate::R<EVENTS_CRCOK_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_CRCOK_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_CRCOK_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_CRCOK_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_CRCOK` writer"]
pub struct W(crate::W<EVENTS_CRCOK_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_CRCOK_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_CRCOK_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_CRCOK_SPEC>) -> Self {
W(writer)
}
}
impl W {
#[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 received with CRC ok\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_crcok](index.html) module"]
pub struct EVENTS_CRCOK_SPEC;
impl crate::RegisterSpec for EVENTS_CRCOK_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_crcok::R](R) reader structure"]
impl crate::Readable for EVENTS_CRCOK_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_crcok::W](W) writer structure"]
impl crate::Writable for EVENTS_CRCOK_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_CRCOK to value 0"]
impl crate::Resettable for EVENTS_CRCOK_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+64
View File
@@ -0,0 +1,64 @@
#[doc = "Register `EVENTS_DEVMATCH` reader"]
pub struct R(crate::R<EVENTS_DEVMATCH_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_DEVMATCH_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_DEVMATCH_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_DEVMATCH_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_DEVMATCH` writer"]
pub struct W(crate::W<EVENTS_DEVMATCH_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_DEVMATCH_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_DEVMATCH_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_DEVMATCH_SPEC>) -> Self {
W(writer)
}
}
impl W {
#[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 = "A device address match occurred on the last received packet\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_devmatch](index.html) module"]
pub struct EVENTS_DEVMATCH_SPEC;
impl crate::RegisterSpec for EVENTS_DEVMATCH_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_devmatch::R](R) reader structure"]
impl crate::Readable for EVENTS_DEVMATCH_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_devmatch::W](W) writer structure"]
impl crate::Writable for EVENTS_DEVMATCH_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_DEVMATCH to value 0"]
impl crate::Resettable for EVENTS_DEVMATCH_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+64
View File
@@ -0,0 +1,64 @@
#[doc = "Register `EVENTS_DEVMISS` reader"]
pub struct R(crate::R<EVENTS_DEVMISS_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_DEVMISS_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_DEVMISS_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_DEVMISS_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_DEVMISS` writer"]
pub struct W(crate::W<EVENTS_DEVMISS_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_DEVMISS_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_DEVMISS_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_DEVMISS_SPEC>) -> Self {
W(writer)
}
}
impl W {
#[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 = "No device address match occurred on the last received packet\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_devmiss](index.html) module"]
pub struct EVENTS_DEVMISS_SPEC;
impl crate::RegisterSpec for EVENTS_DEVMISS_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_devmiss::R](R) reader structure"]
impl crate::Readable for EVENTS_DEVMISS_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_devmiss::W](W) writer structure"]
impl crate::Writable for EVENTS_DEVMISS_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_DEVMISS to value 0"]
impl crate::Resettable for EVENTS_DEVMISS_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+64
View File
@@ -0,0 +1,64 @@
#[doc = "Register `EVENTS_DISABLED` reader"]
pub struct R(crate::R<EVENTS_DISABLED_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_DISABLED_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_DISABLED_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_DISABLED_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_DISABLED` writer"]
pub struct W(crate::W<EVENTS_DISABLED_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_DISABLED_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_DISABLED_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_DISABLED_SPEC>) -> Self {
W(writer)
}
}
impl W {
#[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 = "RADIO has been disabled\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_disabled](index.html) module"]
pub struct EVENTS_DISABLED_SPEC;
impl crate::RegisterSpec for EVENTS_DISABLED_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_disabled::R](R) reader structure"]
impl crate::Readable for EVENTS_DISABLED_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_disabled::W](W) writer structure"]
impl crate::Writable for EVENTS_DISABLED_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_DISABLED to value 0"]
impl crate::Resettable for EVENTS_DISABLED_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+64
View File
@@ -0,0 +1,64 @@
#[doc = "Register `EVENTS_END` reader"]
pub struct R(crate::R<EVENTS_END_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_END_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_END_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_END_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_END` writer"]
pub struct W(crate::W<EVENTS_END_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_END_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_END_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_END_SPEC>) -> Self {
W(writer)
}
}
impl W {
#[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 sent or received\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_end](index.html) module"]
pub struct EVENTS_END_SPEC;
impl crate::RegisterSpec for EVENTS_END_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_end::R](R) reader structure"]
impl crate::Readable for EVENTS_END_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_end::W](W) writer structure"]
impl crate::Writable for EVENTS_END_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_END to value 0"]
impl crate::Resettable for EVENTS_END_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+64
View File
@@ -0,0 +1,64 @@
#[doc = "Register `EVENTS_PAYLOAD` reader"]
pub struct R(crate::R<EVENTS_PAYLOAD_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_PAYLOAD_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_PAYLOAD_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_PAYLOAD_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_PAYLOAD` writer"]
pub struct W(crate::W<EVENTS_PAYLOAD_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_PAYLOAD_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_PAYLOAD_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_PAYLOAD_SPEC>) -> Self {
W(writer)
}
}
impl W {
#[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 payload sent or received\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_payload](index.html) module"]
pub struct EVENTS_PAYLOAD_SPEC;
impl crate::RegisterSpec for EVENTS_PAYLOAD_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_payload::R](R) reader structure"]
impl crate::Readable for EVENTS_PAYLOAD_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_payload::W](W) writer structure"]
impl crate::Writable for EVENTS_PAYLOAD_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_PAYLOAD to value 0"]
impl crate::Resettable for EVENTS_PAYLOAD_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+64
View File
@@ -0,0 +1,64 @@
#[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)
}
}
impl W {
#[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 = "RADIO has ramped up and is ready to be 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_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
}
}
+64
View File
@@ -0,0 +1,64 @@
#[doc = "Register `EVENTS_RSSIEND` reader"]
pub struct R(crate::R<EVENTS_RSSIEND_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_RSSIEND_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_RSSIEND_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_RSSIEND_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_RSSIEND` writer"]
pub struct W(crate::W<EVENTS_RSSIEND_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_RSSIEND_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_RSSIEND_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_RSSIEND_SPEC>) -> Self {
W(writer)
}
}
impl W {
#[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 = "Sampling of receive signal strength complete.\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_rssiend](index.html) module"]
pub struct EVENTS_RSSIEND_SPEC;
impl crate::RegisterSpec for EVENTS_RSSIEND_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_rssiend::R](R) reader structure"]
impl crate::Readable for EVENTS_RSSIEND_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_rssiend::W](W) writer structure"]
impl crate::Writable for EVENTS_RSSIEND_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_RSSIEND to value 0"]
impl crate::Resettable for EVENTS_RSSIEND_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+140
View File
@@ -0,0 +1,140 @@
#[doc = "Register `FREQUENCY` reader"]
pub struct R(crate::R<FREQUENCY_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<FREQUENCY_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<FREQUENCY_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<FREQUENCY_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `FREQUENCY` writer"]
pub struct W(crate::W<FREQUENCY_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<FREQUENCY_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<FREQUENCY_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<FREQUENCY_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `FREQUENCY` reader - Radio channel frequency"]
pub type FREQUENCY_R = crate::FieldReader<u8, u8>;
#[doc = "Field `FREQUENCY` writer - Radio channel frequency"]
pub type FREQUENCY_W<'a, const O: u8> = crate::FieldWriter<'a, u32, FREQUENCY_SPEC, u8, u8, 7, O>;
#[doc = "Field `MAP` reader - Channel map selection."]
pub type MAP_R = crate::BitReader<MAP_A>;
#[doc = "Channel map selection.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum MAP_A {
#[doc = "0: Channel map between 2400 MHZ .. 2500 MHz"]
DEFAULT = 0,
#[doc = "1: Channel map between 2360 MHZ .. 2460 MHz"]
LOW = 1,
}
impl From<MAP_A> for bool {
#[inline(always)]
fn from(variant: MAP_A) -> Self {
variant as u8 != 0
}
}
impl MAP_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> MAP_A {
match self.bits {
false => MAP_A::DEFAULT,
true => MAP_A::LOW,
}
}
#[doc = "Checks if the value of the field is `DEFAULT`"]
#[inline(always)]
pub fn is_default(&self) -> bool {
*self == MAP_A::DEFAULT
}
#[doc = "Checks if the value of the field is `LOW`"]
#[inline(always)]
pub fn is_low(&self) -> bool {
*self == MAP_A::LOW
}
}
#[doc = "Field `MAP` writer - Channel map selection."]
pub type MAP_W<'a, const O: u8> = crate::BitWriter<'a, u32, FREQUENCY_SPEC, MAP_A, O>;
impl<'a, const O: u8> MAP_W<'a, O> {
#[doc = "Channel map between 2400 MHZ .. 2500 MHz"]
#[inline(always)]
pub fn default(self) -> &'a mut W {
self.variant(MAP_A::DEFAULT)
}
#[doc = "Channel map between 2360 MHZ .. 2460 MHz"]
#[inline(always)]
pub fn low(self) -> &'a mut W {
self.variant(MAP_A::LOW)
}
}
impl R {
#[doc = "Bits 0:6 - Radio channel frequency"]
#[inline(always)]
pub fn frequency(&self) -> FREQUENCY_R {
FREQUENCY_R::new((self.bits & 0x7f) as u8)
}
#[doc = "Bit 8 - Channel map selection."]
#[inline(always)]
pub fn map(&self) -> MAP_R {
MAP_R::new(((self.bits >> 8) & 1) != 0)
}
}
impl W {
#[doc = "Bits 0:6 - Radio channel frequency"]
#[inline(always)]
pub fn frequency(&mut self) -> FREQUENCY_W<0> {
FREQUENCY_W::new(self)
}
#[doc = "Bit 8 - Channel map selection."]
#[inline(always)]
pub fn map(&mut self) -> MAP_W<8> {
MAP_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 = "Frequency\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 [frequency](index.html) module"]
pub struct FREQUENCY_SPEC;
impl crate::RegisterSpec for FREQUENCY_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [frequency::R](R) reader structure"]
impl crate::Readable for FREQUENCY_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [frequency::W](W) writer structure"]
impl crate::Writable for FREQUENCY_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets FREQUENCY to value 0x02"]
impl crate::Resettable for FREQUENCY_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0x02
}
}
+803
View File
@@ -0,0 +1,803 @@
#[doc = "Register `INTENCLR` reader"]
pub struct R(crate::R<INTENCLR_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<INTENCLR_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<INTENCLR_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<INTENCLR_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `INTENCLR` writer"]
pub struct W(crate::W<INTENCLR_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<INTENCLR_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<INTENCLR_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<INTENCLR_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `READY` reader - Write '1' to Disable interrupt for READY event"]
pub type READY_R = crate::BitReader<READY_A>;
#[doc = "Write '1' to Disable interrupt for READY event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum READY_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
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 = "Write '1' to Disable interrupt for READY event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum READY_AW {
#[doc = "1: Disable"]
CLEAR = 1,
}
impl From<READY_AW> for bool {
#[inline(always)]
fn from(variant: READY_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `READY` writer - Write '1' to Disable interrupt for READY event"]
pub type READY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, READY_AW, O>;
impl<'a, const O: u8> READY_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(READY_AW::CLEAR)
}
}
#[doc = "Field `ADDRESS` reader - Write '1' to Disable interrupt for ADDRESS event"]
pub type ADDRESS_R = crate::BitReader<ADDRESS_A>;
#[doc = "Write '1' to Disable interrupt for ADDRESS event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ADDRESS_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<ADDRESS_A> for bool {
#[inline(always)]
fn from(variant: ADDRESS_A) -> Self {
variant as u8 != 0
}
}
impl ADDRESS_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ADDRESS_A {
match self.bits {
false => ADDRESS_A::DISABLED,
true => ADDRESS_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ADDRESS_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ADDRESS_A::ENABLED
}
}
#[doc = "Write '1' to Disable interrupt for ADDRESS event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ADDRESS_AW {
#[doc = "1: Disable"]
CLEAR = 1,
}
impl From<ADDRESS_AW> for bool {
#[inline(always)]
fn from(variant: ADDRESS_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `ADDRESS` writer - Write '1' to Disable interrupt for ADDRESS event"]
pub type ADDRESS_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, ADDRESS_AW, O>;
impl<'a, const O: u8> ADDRESS_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(ADDRESS_AW::CLEAR)
}
}
#[doc = "Field `PAYLOAD` reader - Write '1' to Disable interrupt for PAYLOAD event"]
pub type PAYLOAD_R = crate::BitReader<PAYLOAD_A>;
#[doc = "Write '1' to Disable interrupt for PAYLOAD event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum PAYLOAD_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<PAYLOAD_A> for bool {
#[inline(always)]
fn from(variant: PAYLOAD_A) -> Self {
variant as u8 != 0
}
}
impl PAYLOAD_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> PAYLOAD_A {
match self.bits {
false => PAYLOAD_A::DISABLED,
true => PAYLOAD_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == PAYLOAD_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == PAYLOAD_A::ENABLED
}
}
#[doc = "Write '1' to Disable interrupt for PAYLOAD event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum PAYLOAD_AW {
#[doc = "1: Disable"]
CLEAR = 1,
}
impl From<PAYLOAD_AW> for bool {
#[inline(always)]
fn from(variant: PAYLOAD_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `PAYLOAD` writer - Write '1' to Disable interrupt for PAYLOAD event"]
pub type PAYLOAD_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, PAYLOAD_AW, O>;
impl<'a, const O: u8> PAYLOAD_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(PAYLOAD_AW::CLEAR)
}
}
#[doc = "Field `END` reader - Write '1' to Disable interrupt for END event"]
pub type END_R = crate::BitReader<END_A>;
#[doc = "Write '1' to Disable interrupt for END event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum END_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<END_A> for bool {
#[inline(always)]
fn from(variant: END_A) -> Self {
variant as u8 != 0
}
}
impl END_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> END_A {
match self.bits {
false => END_A::DISABLED,
true => END_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == END_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == END_A::ENABLED
}
}
#[doc = "Write '1' to Disable interrupt for END event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum END_AW {
#[doc = "1: Disable"]
CLEAR = 1,
}
impl From<END_AW> for bool {
#[inline(always)]
fn from(variant: END_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `END` writer - Write '1' to Disable interrupt for END event"]
pub type END_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, END_AW, O>;
impl<'a, const O: u8> END_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(END_AW::CLEAR)
}
}
#[doc = "Field `DISABLED` reader - Write '1' to Disable interrupt for DISABLED event"]
pub type DISABLED_R = crate::BitReader<DISABLED_A>;
#[doc = "Write '1' to Disable interrupt for DISABLED event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DISABLED_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<DISABLED_A> for bool {
#[inline(always)]
fn from(variant: DISABLED_A) -> Self {
variant as u8 != 0
}
}
impl DISABLED_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> DISABLED_A {
match self.bits {
false => DISABLED_A::DISABLED,
true => DISABLED_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == DISABLED_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == DISABLED_A::ENABLED
}
}
#[doc = "Write '1' to Disable interrupt for DISABLED event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DISABLED_AW {
#[doc = "1: Disable"]
CLEAR = 1,
}
impl From<DISABLED_AW> for bool {
#[inline(always)]
fn from(variant: DISABLED_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `DISABLED` writer - Write '1' to Disable interrupt for DISABLED event"]
pub type DISABLED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, DISABLED_AW, O>;
impl<'a, const O: u8> DISABLED_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(DISABLED_AW::CLEAR)
}
}
#[doc = "Field `DEVMATCH` reader - Write '1' to Disable interrupt for DEVMATCH event"]
pub type DEVMATCH_R = crate::BitReader<DEVMATCH_A>;
#[doc = "Write '1' to Disable interrupt for DEVMATCH event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DEVMATCH_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<DEVMATCH_A> for bool {
#[inline(always)]
fn from(variant: DEVMATCH_A) -> Self {
variant as u8 != 0
}
}
impl DEVMATCH_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> DEVMATCH_A {
match self.bits {
false => DEVMATCH_A::DISABLED,
true => DEVMATCH_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == DEVMATCH_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == DEVMATCH_A::ENABLED
}
}
#[doc = "Write '1' to Disable interrupt for DEVMATCH event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DEVMATCH_AW {
#[doc = "1: Disable"]
CLEAR = 1,
}
impl From<DEVMATCH_AW> for bool {
#[inline(always)]
fn from(variant: DEVMATCH_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `DEVMATCH` writer - Write '1' to Disable interrupt for DEVMATCH event"]
pub type DEVMATCH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, DEVMATCH_AW, O>;
impl<'a, const O: u8> DEVMATCH_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(DEVMATCH_AW::CLEAR)
}
}
#[doc = "Field `DEVMISS` reader - Write '1' to Disable interrupt for DEVMISS event"]
pub type DEVMISS_R = crate::BitReader<DEVMISS_A>;
#[doc = "Write '1' to Disable interrupt for DEVMISS event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DEVMISS_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<DEVMISS_A> for bool {
#[inline(always)]
fn from(variant: DEVMISS_A) -> Self {
variant as u8 != 0
}
}
impl DEVMISS_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> DEVMISS_A {
match self.bits {
false => DEVMISS_A::DISABLED,
true => DEVMISS_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == DEVMISS_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == DEVMISS_A::ENABLED
}
}
#[doc = "Write '1' to Disable interrupt for DEVMISS event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DEVMISS_AW {
#[doc = "1: Disable"]
CLEAR = 1,
}
impl From<DEVMISS_AW> for bool {
#[inline(always)]
fn from(variant: DEVMISS_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `DEVMISS` writer - Write '1' to Disable interrupt for DEVMISS event"]
pub type DEVMISS_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, DEVMISS_AW, O>;
impl<'a, const O: u8> DEVMISS_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(DEVMISS_AW::CLEAR)
}
}
#[doc = "Field `RSSIEND` reader - Write '1' to Disable interrupt for RSSIEND event"]
pub type RSSIEND_R = crate::BitReader<RSSIEND_A>;
#[doc = "Write '1' to Disable interrupt for RSSIEND event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RSSIEND_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<RSSIEND_A> for bool {
#[inline(always)]
fn from(variant: RSSIEND_A) -> Self {
variant as u8 != 0
}
}
impl RSSIEND_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RSSIEND_A {
match self.bits {
false => RSSIEND_A::DISABLED,
true => RSSIEND_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == RSSIEND_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == RSSIEND_A::ENABLED
}
}
#[doc = "Write '1' to Disable interrupt for RSSIEND event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RSSIEND_AW {
#[doc = "1: Disable"]
CLEAR = 1,
}
impl From<RSSIEND_AW> for bool {
#[inline(always)]
fn from(variant: RSSIEND_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `RSSIEND` writer - Write '1' to Disable interrupt for RSSIEND event"]
pub type RSSIEND_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, RSSIEND_AW, O>;
impl<'a, const O: u8> RSSIEND_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(RSSIEND_AW::CLEAR)
}
}
#[doc = "Field `BCMATCH` reader - Write '1' to Disable interrupt for BCMATCH event"]
pub type BCMATCH_R = crate::BitReader<BCMATCH_A>;
#[doc = "Write '1' to Disable interrupt for BCMATCH event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum BCMATCH_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<BCMATCH_A> for bool {
#[inline(always)]
fn from(variant: BCMATCH_A) -> Self {
variant as u8 != 0
}
}
impl BCMATCH_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> BCMATCH_A {
match self.bits {
false => BCMATCH_A::DISABLED,
true => BCMATCH_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == BCMATCH_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == BCMATCH_A::ENABLED
}
}
#[doc = "Write '1' to Disable interrupt for BCMATCH event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum BCMATCH_AW {
#[doc = "1: Disable"]
CLEAR = 1,
}
impl From<BCMATCH_AW> for bool {
#[inline(always)]
fn from(variant: BCMATCH_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `BCMATCH` writer - Write '1' to Disable interrupt for BCMATCH event"]
pub type BCMATCH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, BCMATCH_AW, O>;
impl<'a, const O: u8> BCMATCH_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(BCMATCH_AW::CLEAR)
}
}
#[doc = "Field `CRCOK` reader - Write '1' to Disable interrupt for CRCOK event"]
pub type CRCOK_R = crate::BitReader<CRCOK_A>;
#[doc = "Write '1' to Disable interrupt for CRCOK event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CRCOK_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<CRCOK_A> for bool {
#[inline(always)]
fn from(variant: CRCOK_A) -> Self {
variant as u8 != 0
}
}
impl CRCOK_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> CRCOK_A {
match self.bits {
false => CRCOK_A::DISABLED,
true => CRCOK_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == CRCOK_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == CRCOK_A::ENABLED
}
}
#[doc = "Write '1' to Disable interrupt for CRCOK event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CRCOK_AW {
#[doc = "1: Disable"]
CLEAR = 1,
}
impl From<CRCOK_AW> for bool {
#[inline(always)]
fn from(variant: CRCOK_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `CRCOK` writer - Write '1' to Disable interrupt for CRCOK event"]
pub type CRCOK_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, CRCOK_AW, O>;
impl<'a, const O: u8> CRCOK_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(CRCOK_AW::CLEAR)
}
}
#[doc = "Field `CRCERROR` reader - Write '1' to Disable interrupt for CRCERROR event"]
pub type CRCERROR_R = crate::BitReader<CRCERROR_A>;
#[doc = "Write '1' to Disable interrupt for CRCERROR event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CRCERROR_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 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::DISABLED,
true => CRCERROR_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == CRCERROR_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == CRCERROR_A::ENABLED
}
}
#[doc = "Write '1' to Disable interrupt for CRCERROR event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CRCERROR_AW {
#[doc = "1: Disable"]
CLEAR = 1,
}
impl From<CRCERROR_AW> for bool {
#[inline(always)]
fn from(variant: CRCERROR_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `CRCERROR` writer - Write '1' to Disable interrupt for CRCERROR event"]
pub type CRCERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, CRCERROR_AW, O>;
impl<'a, const O: u8> CRCERROR_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(CRCERROR_AW::CLEAR)
}
}
impl R {
#[doc = "Bit 0 - Write '1' to Disable interrupt for READY event"]
#[inline(always)]
pub fn ready(&self) -> READY_R {
READY_R::new((self.bits & 1) != 0)
}
#[doc = "Bit 1 - Write '1' to Disable interrupt for ADDRESS event"]
#[inline(always)]
pub fn address(&self) -> ADDRESS_R {
ADDRESS_R::new(((self.bits >> 1) & 1) != 0)
}
#[doc = "Bit 2 - Write '1' to Disable interrupt for PAYLOAD event"]
#[inline(always)]
pub fn payload(&self) -> PAYLOAD_R {
PAYLOAD_R::new(((self.bits >> 2) & 1) != 0)
}
#[doc = "Bit 3 - Write '1' to Disable interrupt for END event"]
#[inline(always)]
pub fn end(&self) -> END_R {
END_R::new(((self.bits >> 3) & 1) != 0)
}
#[doc = "Bit 4 - Write '1' to Disable interrupt for DISABLED event"]
#[inline(always)]
pub fn disabled(&self) -> DISABLED_R {
DISABLED_R::new(((self.bits >> 4) & 1) != 0)
}
#[doc = "Bit 5 - Write '1' to Disable interrupt for DEVMATCH event"]
#[inline(always)]
pub fn devmatch(&self) -> DEVMATCH_R {
DEVMATCH_R::new(((self.bits >> 5) & 1) != 0)
}
#[doc = "Bit 6 - Write '1' to Disable interrupt for DEVMISS event"]
#[inline(always)]
pub fn devmiss(&self) -> DEVMISS_R {
DEVMISS_R::new(((self.bits >> 6) & 1) != 0)
}
#[doc = "Bit 7 - Write '1' to Disable interrupt for RSSIEND event"]
#[inline(always)]
pub fn rssiend(&self) -> RSSIEND_R {
RSSIEND_R::new(((self.bits >> 7) & 1) != 0)
}
#[doc = "Bit 10 - Write '1' to Disable interrupt for BCMATCH event"]
#[inline(always)]
pub fn bcmatch(&self) -> BCMATCH_R {
BCMATCH_R::new(((self.bits >> 10) & 1) != 0)
}
#[doc = "Bit 12 - Write '1' to Disable interrupt for CRCOK event"]
#[inline(always)]
pub fn crcok(&self) -> CRCOK_R {
CRCOK_R::new(((self.bits >> 12) & 1) != 0)
}
#[doc = "Bit 13 - Write '1' to Disable interrupt for CRCERROR event"]
#[inline(always)]
pub fn crcerror(&self) -> CRCERROR_R {
CRCERROR_R::new(((self.bits >> 13) & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Write '1' to Disable interrupt for READY event"]
#[inline(always)]
pub fn ready(&mut self) -> READY_W<0> {
READY_W::new(self)
}
#[doc = "Bit 1 - Write '1' to Disable interrupt for ADDRESS event"]
#[inline(always)]
pub fn address(&mut self) -> ADDRESS_W<1> {
ADDRESS_W::new(self)
}
#[doc = "Bit 2 - Write '1' to Disable interrupt for PAYLOAD event"]
#[inline(always)]
pub fn payload(&mut self) -> PAYLOAD_W<2> {
PAYLOAD_W::new(self)
}
#[doc = "Bit 3 - Write '1' to Disable interrupt for END event"]
#[inline(always)]
pub fn end(&mut self) -> END_W<3> {
END_W::new(self)
}
#[doc = "Bit 4 - Write '1' to Disable interrupt for DISABLED event"]
#[inline(always)]
pub fn disabled(&mut self) -> DISABLED_W<4> {
DISABLED_W::new(self)
}
#[doc = "Bit 5 - Write '1' to Disable interrupt for DEVMATCH event"]
#[inline(always)]
pub fn devmatch(&mut self) -> DEVMATCH_W<5> {
DEVMATCH_W::new(self)
}
#[doc = "Bit 6 - Write '1' to Disable interrupt for DEVMISS event"]
#[inline(always)]
pub fn devmiss(&mut self) -> DEVMISS_W<6> {
DEVMISS_W::new(self)
}
#[doc = "Bit 7 - Write '1' to Disable interrupt for RSSIEND event"]
#[inline(always)]
pub fn rssiend(&mut self) -> RSSIEND_W<7> {
RSSIEND_W::new(self)
}
#[doc = "Bit 10 - Write '1' to Disable interrupt for BCMATCH event"]
#[inline(always)]
pub fn bcmatch(&mut self) -> BCMATCH_W<10> {
BCMATCH_W::new(self)
}
#[doc = "Bit 12 - Write '1' to Disable interrupt for CRCOK event"]
#[inline(always)]
pub fn crcok(&mut self) -> CRCOK_W<12> {
CRCOK_W::new(self)
}
#[doc = "Bit 13 - Write '1' to Disable interrupt for CRCERROR event"]
#[inline(always)]
pub fn crcerror(&mut self) -> CRCERROR_W<13> {
CRCERROR_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Disable interrupt\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [intenclr](index.html) module"]
pub struct INTENCLR_SPEC;
impl crate::RegisterSpec for INTENCLR_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [intenclr::R](R) reader structure"]
impl crate::Readable for INTENCLR_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"]
impl crate::Writable for INTENCLR_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets INTENCLR to value 0"]
impl crate::Resettable for INTENCLR_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+803
View File
@@ -0,0 +1,803 @@
#[doc = "Register `INTENSET` reader"]
pub struct R(crate::R<INTENSET_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<INTENSET_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<INTENSET_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<INTENSET_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `INTENSET` writer"]
pub struct W(crate::W<INTENSET_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<INTENSET_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<INTENSET_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<INTENSET_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `READY` reader - Write '1' to Enable interrupt for READY event"]
pub type READY_R = crate::BitReader<READY_A>;
#[doc = "Write '1' to Enable interrupt for READY event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum READY_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
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 = "Write '1' to Enable interrupt for READY event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum READY_AW {
#[doc = "1: Enable"]
SET = 1,
}
impl From<READY_AW> for bool {
#[inline(always)]
fn from(variant: READY_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `READY` writer - Write '1' to Enable interrupt for READY event"]
pub type READY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, READY_AW, O>;
impl<'a, const O: u8> READY_W<'a, O> {
#[doc = "Enable"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(READY_AW::SET)
}
}
#[doc = "Field `ADDRESS` reader - Write '1' to Enable interrupt for ADDRESS event"]
pub type ADDRESS_R = crate::BitReader<ADDRESS_A>;
#[doc = "Write '1' to Enable interrupt for ADDRESS event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ADDRESS_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<ADDRESS_A> for bool {
#[inline(always)]
fn from(variant: ADDRESS_A) -> Self {
variant as u8 != 0
}
}
impl ADDRESS_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ADDRESS_A {
match self.bits {
false => ADDRESS_A::DISABLED,
true => ADDRESS_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ADDRESS_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ADDRESS_A::ENABLED
}
}
#[doc = "Write '1' to Enable interrupt for ADDRESS event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ADDRESS_AW {
#[doc = "1: Enable"]
SET = 1,
}
impl From<ADDRESS_AW> for bool {
#[inline(always)]
fn from(variant: ADDRESS_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `ADDRESS` writer - Write '1' to Enable interrupt for ADDRESS event"]
pub type ADDRESS_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, ADDRESS_AW, O>;
impl<'a, const O: u8> ADDRESS_W<'a, O> {
#[doc = "Enable"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(ADDRESS_AW::SET)
}
}
#[doc = "Field `PAYLOAD` reader - Write '1' to Enable interrupt for PAYLOAD event"]
pub type PAYLOAD_R = crate::BitReader<PAYLOAD_A>;
#[doc = "Write '1' to Enable interrupt for PAYLOAD event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum PAYLOAD_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<PAYLOAD_A> for bool {
#[inline(always)]
fn from(variant: PAYLOAD_A) -> Self {
variant as u8 != 0
}
}
impl PAYLOAD_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> PAYLOAD_A {
match self.bits {
false => PAYLOAD_A::DISABLED,
true => PAYLOAD_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == PAYLOAD_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == PAYLOAD_A::ENABLED
}
}
#[doc = "Write '1' to Enable interrupt for PAYLOAD event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum PAYLOAD_AW {
#[doc = "1: Enable"]
SET = 1,
}
impl From<PAYLOAD_AW> for bool {
#[inline(always)]
fn from(variant: PAYLOAD_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `PAYLOAD` writer - Write '1' to Enable interrupt for PAYLOAD event"]
pub type PAYLOAD_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, PAYLOAD_AW, O>;
impl<'a, const O: u8> PAYLOAD_W<'a, O> {
#[doc = "Enable"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(PAYLOAD_AW::SET)
}
}
#[doc = "Field `END` reader - Write '1' to Enable interrupt for END event"]
pub type END_R = crate::BitReader<END_A>;
#[doc = "Write '1' to Enable interrupt for END event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum END_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<END_A> for bool {
#[inline(always)]
fn from(variant: END_A) -> Self {
variant as u8 != 0
}
}
impl END_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> END_A {
match self.bits {
false => END_A::DISABLED,
true => END_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == END_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == END_A::ENABLED
}
}
#[doc = "Write '1' to Enable interrupt for END event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum END_AW {
#[doc = "1: Enable"]
SET = 1,
}
impl From<END_AW> for bool {
#[inline(always)]
fn from(variant: END_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `END` writer - Write '1' to Enable interrupt for END event"]
pub type END_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, END_AW, O>;
impl<'a, const O: u8> END_W<'a, O> {
#[doc = "Enable"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(END_AW::SET)
}
}
#[doc = "Field `DISABLED` reader - Write '1' to Enable interrupt for DISABLED event"]
pub type DISABLED_R = crate::BitReader<DISABLED_A>;
#[doc = "Write '1' to Enable interrupt for DISABLED event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DISABLED_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<DISABLED_A> for bool {
#[inline(always)]
fn from(variant: DISABLED_A) -> Self {
variant as u8 != 0
}
}
impl DISABLED_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> DISABLED_A {
match self.bits {
false => DISABLED_A::DISABLED,
true => DISABLED_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == DISABLED_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == DISABLED_A::ENABLED
}
}
#[doc = "Write '1' to Enable interrupt for DISABLED event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DISABLED_AW {
#[doc = "1: Enable"]
SET = 1,
}
impl From<DISABLED_AW> for bool {
#[inline(always)]
fn from(variant: DISABLED_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `DISABLED` writer - Write '1' to Enable interrupt for DISABLED event"]
pub type DISABLED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, DISABLED_AW, O>;
impl<'a, const O: u8> DISABLED_W<'a, O> {
#[doc = "Enable"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(DISABLED_AW::SET)
}
}
#[doc = "Field `DEVMATCH` reader - Write '1' to Enable interrupt for DEVMATCH event"]
pub type DEVMATCH_R = crate::BitReader<DEVMATCH_A>;
#[doc = "Write '1' to Enable interrupt for DEVMATCH event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DEVMATCH_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<DEVMATCH_A> for bool {
#[inline(always)]
fn from(variant: DEVMATCH_A) -> Self {
variant as u8 != 0
}
}
impl DEVMATCH_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> DEVMATCH_A {
match self.bits {
false => DEVMATCH_A::DISABLED,
true => DEVMATCH_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == DEVMATCH_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == DEVMATCH_A::ENABLED
}
}
#[doc = "Write '1' to Enable interrupt for DEVMATCH event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DEVMATCH_AW {
#[doc = "1: Enable"]
SET = 1,
}
impl From<DEVMATCH_AW> for bool {
#[inline(always)]
fn from(variant: DEVMATCH_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `DEVMATCH` writer - Write '1' to Enable interrupt for DEVMATCH event"]
pub type DEVMATCH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, DEVMATCH_AW, O>;
impl<'a, const O: u8> DEVMATCH_W<'a, O> {
#[doc = "Enable"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(DEVMATCH_AW::SET)
}
}
#[doc = "Field `DEVMISS` reader - Write '1' to Enable interrupt for DEVMISS event"]
pub type DEVMISS_R = crate::BitReader<DEVMISS_A>;
#[doc = "Write '1' to Enable interrupt for DEVMISS event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DEVMISS_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<DEVMISS_A> for bool {
#[inline(always)]
fn from(variant: DEVMISS_A) -> Self {
variant as u8 != 0
}
}
impl DEVMISS_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> DEVMISS_A {
match self.bits {
false => DEVMISS_A::DISABLED,
true => DEVMISS_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == DEVMISS_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == DEVMISS_A::ENABLED
}
}
#[doc = "Write '1' to Enable interrupt for DEVMISS event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DEVMISS_AW {
#[doc = "1: Enable"]
SET = 1,
}
impl From<DEVMISS_AW> for bool {
#[inline(always)]
fn from(variant: DEVMISS_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `DEVMISS` writer - Write '1' to Enable interrupt for DEVMISS event"]
pub type DEVMISS_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, DEVMISS_AW, O>;
impl<'a, const O: u8> DEVMISS_W<'a, O> {
#[doc = "Enable"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(DEVMISS_AW::SET)
}
}
#[doc = "Field `RSSIEND` reader - Write '1' to Enable interrupt for RSSIEND event"]
pub type RSSIEND_R = crate::BitReader<RSSIEND_A>;
#[doc = "Write '1' to Enable interrupt for RSSIEND event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RSSIEND_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<RSSIEND_A> for bool {
#[inline(always)]
fn from(variant: RSSIEND_A) -> Self {
variant as u8 != 0
}
}
impl RSSIEND_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RSSIEND_A {
match self.bits {
false => RSSIEND_A::DISABLED,
true => RSSIEND_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == RSSIEND_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == RSSIEND_A::ENABLED
}
}
#[doc = "Write '1' to Enable interrupt for RSSIEND event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RSSIEND_AW {
#[doc = "1: Enable"]
SET = 1,
}
impl From<RSSIEND_AW> for bool {
#[inline(always)]
fn from(variant: RSSIEND_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `RSSIEND` writer - Write '1' to Enable interrupt for RSSIEND event"]
pub type RSSIEND_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, RSSIEND_AW, O>;
impl<'a, const O: u8> RSSIEND_W<'a, O> {
#[doc = "Enable"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(RSSIEND_AW::SET)
}
}
#[doc = "Field `BCMATCH` reader - Write '1' to Enable interrupt for BCMATCH event"]
pub type BCMATCH_R = crate::BitReader<BCMATCH_A>;
#[doc = "Write '1' to Enable interrupt for BCMATCH event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum BCMATCH_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<BCMATCH_A> for bool {
#[inline(always)]
fn from(variant: BCMATCH_A) -> Self {
variant as u8 != 0
}
}
impl BCMATCH_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> BCMATCH_A {
match self.bits {
false => BCMATCH_A::DISABLED,
true => BCMATCH_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == BCMATCH_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == BCMATCH_A::ENABLED
}
}
#[doc = "Write '1' to Enable interrupt for BCMATCH event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum BCMATCH_AW {
#[doc = "1: Enable"]
SET = 1,
}
impl From<BCMATCH_AW> for bool {
#[inline(always)]
fn from(variant: BCMATCH_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `BCMATCH` writer - Write '1' to Enable interrupt for BCMATCH event"]
pub type BCMATCH_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, BCMATCH_AW, O>;
impl<'a, const O: u8> BCMATCH_W<'a, O> {
#[doc = "Enable"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(BCMATCH_AW::SET)
}
}
#[doc = "Field `CRCOK` reader - Write '1' to Enable interrupt for CRCOK event"]
pub type CRCOK_R = crate::BitReader<CRCOK_A>;
#[doc = "Write '1' to Enable interrupt for CRCOK event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CRCOK_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<CRCOK_A> for bool {
#[inline(always)]
fn from(variant: CRCOK_A) -> Self {
variant as u8 != 0
}
}
impl CRCOK_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> CRCOK_A {
match self.bits {
false => CRCOK_A::DISABLED,
true => CRCOK_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == CRCOK_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == CRCOK_A::ENABLED
}
}
#[doc = "Write '1' to Enable interrupt for CRCOK event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CRCOK_AW {
#[doc = "1: Enable"]
SET = 1,
}
impl From<CRCOK_AW> for bool {
#[inline(always)]
fn from(variant: CRCOK_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `CRCOK` writer - Write '1' to Enable interrupt for CRCOK event"]
pub type CRCOK_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, CRCOK_AW, O>;
impl<'a, const O: u8> CRCOK_W<'a, O> {
#[doc = "Enable"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(CRCOK_AW::SET)
}
}
#[doc = "Field `CRCERROR` reader - Write '1' to Enable interrupt for CRCERROR event"]
pub type CRCERROR_R = crate::BitReader<CRCERROR_A>;
#[doc = "Write '1' to Enable interrupt for CRCERROR event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CRCERROR_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 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::DISABLED,
true => CRCERROR_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == CRCERROR_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == CRCERROR_A::ENABLED
}
}
#[doc = "Write '1' to Enable interrupt for CRCERROR event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CRCERROR_AW {
#[doc = "1: Enable"]
SET = 1,
}
impl From<CRCERROR_AW> for bool {
#[inline(always)]
fn from(variant: CRCERROR_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `CRCERROR` writer - Write '1' to Enable interrupt for CRCERROR event"]
pub type CRCERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, CRCERROR_AW, O>;
impl<'a, const O: u8> CRCERROR_W<'a, O> {
#[doc = "Enable"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(CRCERROR_AW::SET)
}
}
impl R {
#[doc = "Bit 0 - Write '1' to Enable interrupt for READY event"]
#[inline(always)]
pub fn ready(&self) -> READY_R {
READY_R::new((self.bits & 1) != 0)
}
#[doc = "Bit 1 - Write '1' to Enable interrupt for ADDRESS event"]
#[inline(always)]
pub fn address(&self) -> ADDRESS_R {
ADDRESS_R::new(((self.bits >> 1) & 1) != 0)
}
#[doc = "Bit 2 - Write '1' to Enable interrupt for PAYLOAD event"]
#[inline(always)]
pub fn payload(&self) -> PAYLOAD_R {
PAYLOAD_R::new(((self.bits >> 2) & 1) != 0)
}
#[doc = "Bit 3 - Write '1' to Enable interrupt for END event"]
#[inline(always)]
pub fn end(&self) -> END_R {
END_R::new(((self.bits >> 3) & 1) != 0)
}
#[doc = "Bit 4 - Write '1' to Enable interrupt for DISABLED event"]
#[inline(always)]
pub fn disabled(&self) -> DISABLED_R {
DISABLED_R::new(((self.bits >> 4) & 1) != 0)
}
#[doc = "Bit 5 - Write '1' to Enable interrupt for DEVMATCH event"]
#[inline(always)]
pub fn devmatch(&self) -> DEVMATCH_R {
DEVMATCH_R::new(((self.bits >> 5) & 1) != 0)
}
#[doc = "Bit 6 - Write '1' to Enable interrupt for DEVMISS event"]
#[inline(always)]
pub fn devmiss(&self) -> DEVMISS_R {
DEVMISS_R::new(((self.bits >> 6) & 1) != 0)
}
#[doc = "Bit 7 - Write '1' to Enable interrupt for RSSIEND event"]
#[inline(always)]
pub fn rssiend(&self) -> RSSIEND_R {
RSSIEND_R::new(((self.bits >> 7) & 1) != 0)
}
#[doc = "Bit 10 - Write '1' to Enable interrupt for BCMATCH event"]
#[inline(always)]
pub fn bcmatch(&self) -> BCMATCH_R {
BCMATCH_R::new(((self.bits >> 10) & 1) != 0)
}
#[doc = "Bit 12 - Write '1' to Enable interrupt for CRCOK event"]
#[inline(always)]
pub fn crcok(&self) -> CRCOK_R {
CRCOK_R::new(((self.bits >> 12) & 1) != 0)
}
#[doc = "Bit 13 - Write '1' to Enable interrupt for CRCERROR event"]
#[inline(always)]
pub fn crcerror(&self) -> CRCERROR_R {
CRCERROR_R::new(((self.bits >> 13) & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Write '1' to Enable interrupt for READY event"]
#[inline(always)]
pub fn ready(&mut self) -> READY_W<0> {
READY_W::new(self)
}
#[doc = "Bit 1 - Write '1' to Enable interrupt for ADDRESS event"]
#[inline(always)]
pub fn address(&mut self) -> ADDRESS_W<1> {
ADDRESS_W::new(self)
}
#[doc = "Bit 2 - Write '1' to Enable interrupt for PAYLOAD event"]
#[inline(always)]
pub fn payload(&mut self) -> PAYLOAD_W<2> {
PAYLOAD_W::new(self)
}
#[doc = "Bit 3 - Write '1' to Enable interrupt for END event"]
#[inline(always)]
pub fn end(&mut self) -> END_W<3> {
END_W::new(self)
}
#[doc = "Bit 4 - Write '1' to Enable interrupt for DISABLED event"]
#[inline(always)]
pub fn disabled(&mut self) -> DISABLED_W<4> {
DISABLED_W::new(self)
}
#[doc = "Bit 5 - Write '1' to Enable interrupt for DEVMATCH event"]
#[inline(always)]
pub fn devmatch(&mut self) -> DEVMATCH_W<5> {
DEVMATCH_W::new(self)
}
#[doc = "Bit 6 - Write '1' to Enable interrupt for DEVMISS event"]
#[inline(always)]
pub fn devmiss(&mut self) -> DEVMISS_W<6> {
DEVMISS_W::new(self)
}
#[doc = "Bit 7 - Write '1' to Enable interrupt for RSSIEND event"]
#[inline(always)]
pub fn rssiend(&mut self) -> RSSIEND_W<7> {
RSSIEND_W::new(self)
}
#[doc = "Bit 10 - Write '1' to Enable interrupt for BCMATCH event"]
#[inline(always)]
pub fn bcmatch(&mut self) -> BCMATCH_W<10> {
BCMATCH_W::new(self)
}
#[doc = "Bit 12 - Write '1' to Enable interrupt for CRCOK event"]
#[inline(always)]
pub fn crcok(&mut self) -> CRCOK_W<12> {
CRCOK_W::new(self)
}
#[doc = "Bit 13 - Write '1' to Enable interrupt for CRCERROR event"]
#[inline(always)]
pub fn crcerror(&mut self) -> CRCERROR_W<13> {
CRCERROR_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Enable interrupt\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [intenset](index.html) module"]
pub struct INTENSET_SPEC;
impl crate::RegisterSpec for INTENSET_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [intenset::R](R) reader structure"]
impl crate::Readable for INTENSET_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"]
impl crate::Writable for INTENSET_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets INTENSET to value 0"]
impl crate::Resettable for INTENSET_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+167
View File
@@ -0,0 +1,167 @@
#[doc = "Register `MODE` reader"]
pub struct R(crate::R<MODE_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<MODE_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<MODE_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<MODE_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `MODE` writer"]
pub struct W(crate::W<MODE_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<MODE_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<MODE_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<MODE_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `MODE` reader - Radio data rate and modulation setting. The radio supports Frequency-shift Keying (FSK) modulation."]
pub type MODE_R = crate::FieldReader<u8, MODE_A>;
#[doc = "Radio data rate and modulation setting. The radio supports Frequency-shift Keying (FSK) modulation.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum MODE_A {
#[doc = "0: 1 Mbit/s Nordic proprietary radio mode"]
NRF_1MBIT = 0,
#[doc = "1: 2 Mbit/s Nordic proprietary radio mode"]
NRF_2MBIT = 1,
#[doc = "2: Deprecated enumerator - 250 kbit/s Nordic proprietary radio mode"]
NRF_250KBIT = 2,
#[doc = "3: 1 Mbit/s Bluetooth Low Energy"]
BLE_1MBIT = 3,
#[doc = "4: 2 Mbit/s Bluetooth Low Energy"]
BLE_2MBIT = 4,
}
impl From<MODE_A> for u8 {
#[inline(always)]
fn from(variant: MODE_A) -> Self {
variant as _
}
}
impl MODE_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> Option<MODE_A> {
match self.bits {
0 => Some(MODE_A::NRF_1MBIT),
1 => Some(MODE_A::NRF_2MBIT),
2 => Some(MODE_A::NRF_250KBIT),
3 => Some(MODE_A::BLE_1MBIT),
4 => Some(MODE_A::BLE_2MBIT),
_ => None,
}
}
#[doc = "Checks if the value of the field is `NRF_1MBIT`"]
#[inline(always)]
pub fn is_nrf_1mbit(&self) -> bool {
*self == MODE_A::NRF_1MBIT
}
#[doc = "Checks if the value of the field is `NRF_2MBIT`"]
#[inline(always)]
pub fn is_nrf_2mbit(&self) -> bool {
*self == MODE_A::NRF_2MBIT
}
#[doc = "Checks if the value of the field is `NRF_250KBIT`"]
#[inline(always)]
pub fn is_nrf_250kbit(&self) -> bool {
*self == MODE_A::NRF_250KBIT
}
#[doc = "Checks if the value of the field is `BLE_1MBIT`"]
#[inline(always)]
pub fn is_ble_1mbit(&self) -> bool {
*self == MODE_A::BLE_1MBIT
}
#[doc = "Checks if the value of the field is `BLE_2MBIT`"]
#[inline(always)]
pub fn is_ble_2mbit(&self) -> bool {
*self == MODE_A::BLE_2MBIT
}
}
#[doc = "Field `MODE` writer - Radio data rate and modulation setting. The radio supports Frequency-shift Keying (FSK) modulation."]
pub type MODE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MODE_SPEC, u8, MODE_A, 4, O>;
impl<'a, const O: u8> MODE_W<'a, O> {
#[doc = "1 Mbit/s Nordic proprietary radio mode"]
#[inline(always)]
pub fn nrf_1mbit(self) -> &'a mut W {
self.variant(MODE_A::NRF_1MBIT)
}
#[doc = "2 Mbit/s Nordic proprietary radio mode"]
#[inline(always)]
pub fn nrf_2mbit(self) -> &'a mut W {
self.variant(MODE_A::NRF_2MBIT)
}
#[doc = "Deprecated enumerator - 250 kbit/s Nordic proprietary radio mode"]
#[inline(always)]
pub fn nrf_250kbit(self) -> &'a mut W {
self.variant(MODE_A::NRF_250KBIT)
}
#[doc = "1 Mbit/s Bluetooth Low Energy"]
#[inline(always)]
pub fn ble_1mbit(self) -> &'a mut W {
self.variant(MODE_A::BLE_1MBIT)
}
#[doc = "2 Mbit/s Bluetooth Low Energy"]
#[inline(always)]
pub fn ble_2mbit(self) -> &'a mut W {
self.variant(MODE_A::BLE_2MBIT)
}
}
impl R {
#[doc = "Bits 0:3 - Radio data rate and modulation setting. The radio supports Frequency-shift Keying (FSK) modulation."]
#[inline(always)]
pub fn mode(&self) -> MODE_R {
MODE_R::new((self.bits & 0x0f) as u8)
}
}
impl W {
#[doc = "Bits 0:3 - Radio data rate and modulation setting. The radio supports Frequency-shift Keying (FSK) modulation."]
#[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 = "Data rate and modulation\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [mode](index.html) module"]
pub struct MODE_SPEC;
impl crate::RegisterSpec for MODE_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [mode::R](R) reader structure"]
impl crate::Readable for MODE_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [mode::W](W) writer structure"]
impl crate::Writable for MODE_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets MODE to value 0"]
impl crate::Resettable for MODE_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+201
View File
@@ -0,0 +1,201 @@
#[doc = "Register `MODECNF0` reader"]
pub struct R(crate::R<MODECNF0_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<MODECNF0_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<MODECNF0_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<MODECNF0_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `MODECNF0` writer"]
pub struct W(crate::W<MODECNF0_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<MODECNF0_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<MODECNF0_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<MODECNF0_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `RU` reader - Radio ramp-up time"]
pub type RU_R = crate::BitReader<RU_A>;
#[doc = "Radio ramp-up time\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RU_A {
#[doc = "0: Default ramp-up time (tRXEN), compatible with firmware written for nRF51"]
DEFAULT = 0,
#[doc = "1: Fast ramp-up (tRXEN,FAST), see electrical specification for more information"]
FAST = 1,
}
impl From<RU_A> for bool {
#[inline(always)]
fn from(variant: RU_A) -> Self {
variant as u8 != 0
}
}
impl RU_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RU_A {
match self.bits {
false => RU_A::DEFAULT,
true => RU_A::FAST,
}
}
#[doc = "Checks if the value of the field is `DEFAULT`"]
#[inline(always)]
pub fn is_default(&self) -> bool {
*self == RU_A::DEFAULT
}
#[doc = "Checks if the value of the field is `FAST`"]
#[inline(always)]
pub fn is_fast(&self) -> bool {
*self == RU_A::FAST
}
}
#[doc = "Field `RU` writer - Radio ramp-up time"]
pub type RU_W<'a, const O: u8> = crate::BitWriter<'a, u32, MODECNF0_SPEC, RU_A, O>;
impl<'a, const O: u8> RU_W<'a, O> {
#[doc = "Default ramp-up time (tRXEN), compatible with firmware written for nRF51"]
#[inline(always)]
pub fn default(self) -> &'a mut W {
self.variant(RU_A::DEFAULT)
}
#[doc = "Fast ramp-up (tRXEN,FAST), see electrical specification for more information"]
#[inline(always)]
pub fn fast(self) -> &'a mut W {
self.variant(RU_A::FAST)
}
}
#[doc = "Field `DTX` reader - Default TX value"]
pub type DTX_R = crate::FieldReader<u8, DTX_A>;
#[doc = "Default TX value\n\nValue on reset: 2"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum DTX_A {
#[doc = "0: Transmit '1'"]
B1 = 0,
#[doc = "1: Transmit '0'"]
B0 = 1,
#[doc = "2: Transmit center frequency"]
CENTER = 2,
}
impl From<DTX_A> for u8 {
#[inline(always)]
fn from(variant: DTX_A) -> Self {
variant as _
}
}
impl DTX_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> Option<DTX_A> {
match self.bits {
0 => Some(DTX_A::B1),
1 => Some(DTX_A::B0),
2 => Some(DTX_A::CENTER),
_ => None,
}
}
#[doc = "Checks if the value of the field is `B1`"]
#[inline(always)]
pub fn is_b1(&self) -> bool {
*self == DTX_A::B1
}
#[doc = "Checks if the value of the field is `B0`"]
#[inline(always)]
pub fn is_b0(&self) -> bool {
*self == DTX_A::B0
}
#[doc = "Checks if the value of the field is `CENTER`"]
#[inline(always)]
pub fn is_center(&self) -> bool {
*self == DTX_A::CENTER
}
}
#[doc = "Field `DTX` writer - Default TX value"]
pub type DTX_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MODECNF0_SPEC, u8, DTX_A, 2, O>;
impl<'a, const O: u8> DTX_W<'a, O> {
#[doc = "Transmit '1'"]
#[inline(always)]
pub fn b1(self) -> &'a mut W {
self.variant(DTX_A::B1)
}
#[doc = "Transmit '0'"]
#[inline(always)]
pub fn b0(self) -> &'a mut W {
self.variant(DTX_A::B0)
}
#[doc = "Transmit center frequency"]
#[inline(always)]
pub fn center(self) -> &'a mut W {
self.variant(DTX_A::CENTER)
}
}
impl R {
#[doc = "Bit 0 - Radio ramp-up time"]
#[inline(always)]
pub fn ru(&self) -> RU_R {
RU_R::new((self.bits & 1) != 0)
}
#[doc = "Bits 8:9 - Default TX value"]
#[inline(always)]
pub fn dtx(&self) -> DTX_R {
DTX_R::new(((self.bits >> 8) & 3) as u8)
}
}
impl W {
#[doc = "Bit 0 - Radio ramp-up time"]
#[inline(always)]
pub fn ru(&mut self) -> RU_W<0> {
RU_W::new(self)
}
#[doc = "Bits 8:9 - Default TX value"]
#[inline(always)]
pub fn dtx(&mut self) -> DTX_W<8> {
DTX_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 = "Radio mode configuration register 0\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 [modecnf0](index.html) module"]
pub struct MODECNF0_SPEC;
impl crate::RegisterSpec for MODECNF0_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [modecnf0::R](R) reader structure"]
impl crate::Readable for MODECNF0_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [modecnf0::W](W) writer structure"]
impl crate::Writable for MODECNF0_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets MODECNF0 to value 0x0200"]
impl crate::Resettable for MODECNF0_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0x0200
}
}
+81
View File
@@ -0,0 +1,81 @@
#[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 `PACKETPTR` reader - Packet pointer"]
pub type PACKETPTR_R = crate::FieldReader<u32, u32>;
#[doc = "Field `PACKETPTR` writer - Packet pointer"]
pub type PACKETPTR_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, PACKETPTR_SPEC, u32, u32, 32, O>;
impl R {
#[doc = "Bits 0:31 - Packet pointer"]
#[inline(always)]
pub fn packetptr(&self) -> PACKETPTR_R {
PACKETPTR_R::new(self.bits)
}
}
impl W {
#[doc = "Bits 0:31 - Packet pointer"]
#[inline(always)]
pub fn packetptr(&mut self) -> PACKETPTR_W<0> {
PACKETPTR_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\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
}
}
+228
View File
@@ -0,0 +1,228 @@
#[doc = "Register `PCNF0` reader"]
pub struct R(crate::R<PCNF0_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<PCNF0_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<PCNF0_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<PCNF0_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `PCNF0` writer"]
pub struct W(crate::W<PCNF0_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<PCNF0_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<PCNF0_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<PCNF0_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `LFLEN` reader - Length on air of LENGTH field in number of bits."]
pub type LFLEN_R = crate::FieldReader<u8, u8>;
#[doc = "Field `LFLEN` writer - Length on air of LENGTH field in number of bits."]
pub type LFLEN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PCNF0_SPEC, u8, u8, 4, O>;
#[doc = "Field `S0LEN` reader - Length on air of S0 field in number of bytes."]
pub type S0LEN_R = crate::BitReader<bool>;
#[doc = "Field `S0LEN` writer - Length on air of S0 field in number of bytes."]
pub type S0LEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PCNF0_SPEC, bool, O>;
#[doc = "Field `S1LEN` reader - Length on air of S1 field in number of bits."]
pub type S1LEN_R = crate::FieldReader<u8, u8>;
#[doc = "Field `S1LEN` writer - Length on air of S1 field in number of bits."]
pub type S1LEN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PCNF0_SPEC, u8, u8, 4, O>;
#[doc = "Field `S1INCL` reader - Include or exclude S1 field in RAM"]
pub type S1INCL_R = crate::BitReader<S1INCL_A>;
#[doc = "Include or exclude S1 field in RAM\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum S1INCL_A {
#[doc = "0: Include S1 field in RAM only if S1LEN &gt; 0"]
AUTOMATIC = 0,
#[doc = "1: Always include S1 field in RAM independent of S1LEN"]
INCLUDE = 1,
}
impl From<S1INCL_A> for bool {
#[inline(always)]
fn from(variant: S1INCL_A) -> Self {
variant as u8 != 0
}
}
impl S1INCL_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> S1INCL_A {
match self.bits {
false => S1INCL_A::AUTOMATIC,
true => S1INCL_A::INCLUDE,
}
}
#[doc = "Checks if the value of the field is `AUTOMATIC`"]
#[inline(always)]
pub fn is_automatic(&self) -> bool {
*self == S1INCL_A::AUTOMATIC
}
#[doc = "Checks if the value of the field is `INCLUDE`"]
#[inline(always)]
pub fn is_include(&self) -> bool {
*self == S1INCL_A::INCLUDE
}
}
#[doc = "Field `S1INCL` writer - Include or exclude S1 field in RAM"]
pub type S1INCL_W<'a, const O: u8> = crate::BitWriter<'a, u32, PCNF0_SPEC, S1INCL_A, O>;
impl<'a, const O: u8> S1INCL_W<'a, O> {
#[doc = "Include S1 field in RAM only if S1LEN &gt; 0"]
#[inline(always)]
pub fn automatic(self) -> &'a mut W {
self.variant(S1INCL_A::AUTOMATIC)
}
#[doc = "Always include S1 field in RAM independent of S1LEN"]
#[inline(always)]
pub fn include(self) -> &'a mut W {
self.variant(S1INCL_A::INCLUDE)
}
}
#[doc = "Field `PLEN` reader - Length of preamble on air. Decision point: TASKS_START task"]
pub type PLEN_R = crate::BitReader<PLEN_A>;
#[doc = "Length of preamble on air. Decision point: TASKS_START task\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum PLEN_A {
#[doc = "0: 8-bit preamble"]
_8BIT = 0,
#[doc = "1: 16-bit preamble"]
_16BIT = 1,
}
impl From<PLEN_A> for bool {
#[inline(always)]
fn from(variant: PLEN_A) -> Self {
variant as u8 != 0
}
}
impl PLEN_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> PLEN_A {
match self.bits {
false => PLEN_A::_8BIT,
true => PLEN_A::_16BIT,
}
}
#[doc = "Checks if the value of the field is `_8BIT`"]
#[inline(always)]
pub fn is_8bit(&self) -> bool {
*self == PLEN_A::_8BIT
}
#[doc = "Checks if the value of the field is `_16BIT`"]
#[inline(always)]
pub fn is_16bit(&self) -> bool {
*self == PLEN_A::_16BIT
}
}
#[doc = "Field `PLEN` writer - Length of preamble on air. Decision point: TASKS_START task"]
pub type PLEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PCNF0_SPEC, PLEN_A, O>;
impl<'a, const O: u8> PLEN_W<'a, O> {
#[doc = "8-bit preamble"]
#[inline(always)]
pub fn _8bit(self) -> &'a mut W {
self.variant(PLEN_A::_8BIT)
}
#[doc = "16-bit preamble"]
#[inline(always)]
pub fn _16bit(self) -> &'a mut W {
self.variant(PLEN_A::_16BIT)
}
}
impl R {
#[doc = "Bits 0:3 - Length on air of LENGTH field in number of bits."]
#[inline(always)]
pub fn lflen(&self) -> LFLEN_R {
LFLEN_R::new((self.bits & 0x0f) as u8)
}
#[doc = "Bit 8 - Length on air of S0 field in number of bytes."]
#[inline(always)]
pub fn s0len(&self) -> S0LEN_R {
S0LEN_R::new(((self.bits >> 8) & 1) != 0)
}
#[doc = "Bits 16:19 - Length on air of S1 field in number of bits."]
#[inline(always)]
pub fn s1len(&self) -> S1LEN_R {
S1LEN_R::new(((self.bits >> 16) & 0x0f) as u8)
}
#[doc = "Bit 20 - Include or exclude S1 field in RAM"]
#[inline(always)]
pub fn s1incl(&self) -> S1INCL_R {
S1INCL_R::new(((self.bits >> 20) & 1) != 0)
}
#[doc = "Bit 24 - Length of preamble on air. Decision point: TASKS_START task"]
#[inline(always)]
pub fn plen(&self) -> PLEN_R {
PLEN_R::new(((self.bits >> 24) & 1) != 0)
}
}
impl W {
#[doc = "Bits 0:3 - Length on air of LENGTH field in number of bits."]
#[inline(always)]
pub fn lflen(&mut self) -> LFLEN_W<0> {
LFLEN_W::new(self)
}
#[doc = "Bit 8 - Length on air of S0 field in number of bytes."]
#[inline(always)]
pub fn s0len(&mut self) -> S0LEN_W<8> {
S0LEN_W::new(self)
}
#[doc = "Bits 16:19 - Length on air of S1 field in number of bits."]
#[inline(always)]
pub fn s1len(&mut self) -> S1LEN_W<16> {
S1LEN_W::new(self)
}
#[doc = "Bit 20 - Include or exclude S1 field in RAM"]
#[inline(always)]
pub fn s1incl(&mut self) -> S1INCL_W<20> {
S1INCL_W::new(self)
}
#[doc = "Bit 24 - Length of preamble on air. Decision point: TASKS_START task"]
#[inline(always)]
pub fn plen(&mut self) -> PLEN_W<24> {
PLEN_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 configuration register 0\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 [pcnf0](index.html) module"]
pub struct PCNF0_SPEC;
impl crate::RegisterSpec for PCNF0_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [pcnf0::R](R) reader structure"]
impl crate::Readable for PCNF0_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [pcnf0::W](W) writer structure"]
impl crate::Writable for PCNF0_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets PCNF0 to value 0"]
impl crate::Resettable for PCNF0_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+228
View File
@@ -0,0 +1,228 @@
#[doc = "Register `PCNF1` reader"]
pub struct R(crate::R<PCNF1_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<PCNF1_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<PCNF1_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<PCNF1_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `PCNF1` writer"]
pub struct W(crate::W<PCNF1_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<PCNF1_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<PCNF1_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<PCNF1_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `MAXLEN` reader - Maximum length of packet payload. If the packet payload is larger than MAXLEN, the radio will truncate the payload to MAXLEN."]
pub type MAXLEN_R = crate::FieldReader<u8, u8>;
#[doc = "Field `MAXLEN` writer - Maximum length of packet payload. If the packet payload is larger than MAXLEN, the radio will truncate the payload to MAXLEN."]
pub type MAXLEN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PCNF1_SPEC, u8, u8, 8, O>;
#[doc = "Field `STATLEN` reader - Static length in number of bytes"]
pub type STATLEN_R = crate::FieldReader<u8, u8>;
#[doc = "Field `STATLEN` writer - Static length in number of bytes"]
pub type STATLEN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PCNF1_SPEC, u8, u8, 8, O>;
#[doc = "Field `BALEN` reader - Base address length in number of bytes"]
pub type BALEN_R = crate::FieldReader<u8, u8>;
#[doc = "Field `BALEN` writer - Base address length in number of bytes"]
pub type BALEN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PCNF1_SPEC, u8, u8, 3, O>;
#[doc = "Field `ENDIAN` reader - On air endianness of packet, this applies to the S0, LENGTH, S1 and the PAYLOAD fields."]
pub type ENDIAN_R = crate::BitReader<ENDIAN_A>;
#[doc = "On air endianness of packet, this applies to the S0, LENGTH, S1 and the PAYLOAD fields.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ENDIAN_A {
#[doc = "0: Least Significant bit on air first"]
LITTLE = 0,
#[doc = "1: Most significant bit on air first"]
BIG = 1,
}
impl From<ENDIAN_A> for bool {
#[inline(always)]
fn from(variant: ENDIAN_A) -> Self {
variant as u8 != 0
}
}
impl ENDIAN_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ENDIAN_A {
match self.bits {
false => ENDIAN_A::LITTLE,
true => ENDIAN_A::BIG,
}
}
#[doc = "Checks if the value of the field is `LITTLE`"]
#[inline(always)]
pub fn is_little(&self) -> bool {
*self == ENDIAN_A::LITTLE
}
#[doc = "Checks if the value of the field is `BIG`"]
#[inline(always)]
pub fn is_big(&self) -> bool {
*self == ENDIAN_A::BIG
}
}
#[doc = "Field `ENDIAN` writer - On air endianness of packet, this applies to the S0, LENGTH, S1 and the PAYLOAD fields."]
pub type ENDIAN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PCNF1_SPEC, ENDIAN_A, O>;
impl<'a, const O: u8> ENDIAN_W<'a, O> {
#[doc = "Least Significant bit on air first"]
#[inline(always)]
pub fn little(self) -> &'a mut W {
self.variant(ENDIAN_A::LITTLE)
}
#[doc = "Most significant bit on air first"]
#[inline(always)]
pub fn big(self) -> &'a mut W {
self.variant(ENDIAN_A::BIG)
}
}
#[doc = "Field `WHITEEN` reader - Enable or disable packet whitening"]
pub type WHITEEN_R = crate::BitReader<WHITEEN_A>;
#[doc = "Enable or disable packet whitening\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum WHITEEN_A {
#[doc = "0: Disable"]
DISABLED = 0,
#[doc = "1: Enable"]
ENABLED = 1,
}
impl From<WHITEEN_A> for bool {
#[inline(always)]
fn from(variant: WHITEEN_A) -> Self {
variant as u8 != 0
}
}
impl WHITEEN_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> WHITEEN_A {
match self.bits {
false => WHITEEN_A::DISABLED,
true => WHITEEN_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == WHITEEN_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == WHITEEN_A::ENABLED
}
}
#[doc = "Field `WHITEEN` writer - Enable or disable packet whitening"]
pub type WHITEEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PCNF1_SPEC, WHITEEN_A, O>;
impl<'a, const O: u8> WHITEEN_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(WHITEEN_A::DISABLED)
}
#[doc = "Enable"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(WHITEEN_A::ENABLED)
}
}
impl R {
#[doc = "Bits 0:7 - Maximum length of packet payload. If the packet payload is larger than MAXLEN, the radio will truncate the payload to MAXLEN."]
#[inline(always)]
pub fn maxlen(&self) -> MAXLEN_R {
MAXLEN_R::new((self.bits & 0xff) as u8)
}
#[doc = "Bits 8:15 - Static length in number of bytes"]
#[inline(always)]
pub fn statlen(&self) -> STATLEN_R {
STATLEN_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 16:18 - Base address length in number of bytes"]
#[inline(always)]
pub fn balen(&self) -> BALEN_R {
BALEN_R::new(((self.bits >> 16) & 7) as u8)
}
#[doc = "Bit 24 - On air endianness of packet, this applies to the S0, LENGTH, S1 and the PAYLOAD fields."]
#[inline(always)]
pub fn endian(&self) -> ENDIAN_R {
ENDIAN_R::new(((self.bits >> 24) & 1) != 0)
}
#[doc = "Bit 25 - Enable or disable packet whitening"]
#[inline(always)]
pub fn whiteen(&self) -> WHITEEN_R {
WHITEEN_R::new(((self.bits >> 25) & 1) != 0)
}
}
impl W {
#[doc = "Bits 0:7 - Maximum length of packet payload. If the packet payload is larger than MAXLEN, the radio will truncate the payload to MAXLEN."]
#[inline(always)]
pub fn maxlen(&mut self) -> MAXLEN_W<0> {
MAXLEN_W::new(self)
}
#[doc = "Bits 8:15 - Static length in number of bytes"]
#[inline(always)]
pub fn statlen(&mut self) -> STATLEN_W<8> {
STATLEN_W::new(self)
}
#[doc = "Bits 16:18 - Base address length in number of bytes"]
#[inline(always)]
pub fn balen(&mut self) -> BALEN_W<16> {
BALEN_W::new(self)
}
#[doc = "Bit 24 - On air endianness of packet, this applies to the S0, LENGTH, S1 and the PAYLOAD fields."]
#[inline(always)]
pub fn endian(&mut self) -> ENDIAN_W<24> {
ENDIAN_W::new(self)
}
#[doc = "Bit 25 - Enable or disable packet whitening"]
#[inline(always)]
pub fn whiteen(&mut self) -> WHITEEN_W<25> {
WHITEEN_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 configuration register 1\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 [pcnf1](index.html) module"]
pub struct PCNF1_SPEC;
impl crate::RegisterSpec for PCNF1_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [pcnf1::R](R) reader structure"]
impl crate::Readable for PCNF1_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [pcnf1::W](W) writer structure"]
impl crate::Writable for PCNF1_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets PCNF1 to value 0"]
impl crate::Resettable for PCNF1_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+126
View File
@@ -0,0 +1,126 @@
#[doc = "Register `POWER` reader"]
pub struct R(crate::R<POWER_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<POWER_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<POWER_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<POWER_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `POWER` writer"]
pub struct W(crate::W<POWER_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<POWER_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<POWER_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<POWER_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `POWER` reader - Peripheral power control. The peripheral and its registers will be reset to its initial state by switching the peripheral off and then back on again."]
pub type POWER_R = crate::BitReader<POWER_A>;
#[doc = "Peripheral power control. The peripheral and its registers will be reset to its initial state by switching the peripheral off and then back on again.\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum POWER_A {
#[doc = "0: Peripheral is powered off"]
DISABLED = 0,
#[doc = "1: Peripheral is powered on"]
ENABLED = 1,
}
impl From<POWER_A> for bool {
#[inline(always)]
fn from(variant: POWER_A) -> Self {
variant as u8 != 0
}
}
impl POWER_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> POWER_A {
match self.bits {
false => POWER_A::DISABLED,
true => POWER_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == POWER_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == POWER_A::ENABLED
}
}
#[doc = "Field `POWER` writer - Peripheral power control. The peripheral and its registers will be reset to its initial state by switching the peripheral off and then back on again."]
pub type POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWER_SPEC, POWER_A, O>;
impl<'a, const O: u8> POWER_W<'a, O> {
#[doc = "Peripheral is powered off"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(POWER_A::DISABLED)
}
#[doc = "Peripheral is powered on"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(POWER_A::ENABLED)
}
}
impl R {
#[doc = "Bit 0 - Peripheral power control. The peripheral and its registers will be reset to its initial state by switching the peripheral off and then back on again."]
#[inline(always)]
pub fn power(&self) -> POWER_R {
POWER_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Peripheral power control. The peripheral and its registers will be reset to its initial state by switching the peripheral off and then back on again."]
#[inline(always)]
pub fn power(&mut self) -> POWER_W<0> {
POWER_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 = "Peripheral power control\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 [power](index.html) module"]
pub struct POWER_SPEC;
impl crate::RegisterSpec for POWER_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [power::R](R) reader structure"]
impl crate::Readable for POWER_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [power::W](W) writer structure"]
impl crate::Writable for POWER_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets POWER to value 0x01"]
impl crate::Resettable for POWER_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0x01
}
}
+122
View File
@@ -0,0 +1,122 @@
#[doc = "Register `PREFIX0` reader"]
pub struct R(crate::R<PREFIX0_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<PREFIX0_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<PREFIX0_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<PREFIX0_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `PREFIX0` writer"]
pub struct W(crate::W<PREFIX0_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<PREFIX0_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<PREFIX0_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<PREFIX0_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `AP0` reader - Address prefix 0."]
pub type AP0_R = crate::FieldReader<u8, u8>;
#[doc = "Field `AP0` writer - Address prefix 0."]
pub type AP0_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PREFIX0_SPEC, u8, u8, 8, O>;
#[doc = "Field `AP1` reader - Address prefix 1."]
pub type AP1_R = crate::FieldReader<u8, u8>;
#[doc = "Field `AP1` writer - Address prefix 1."]
pub type AP1_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PREFIX0_SPEC, u8, u8, 8, O>;
#[doc = "Field `AP2` reader - Address prefix 2."]
pub type AP2_R = crate::FieldReader<u8, u8>;
#[doc = "Field `AP2` writer - Address prefix 2."]
pub type AP2_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PREFIX0_SPEC, u8, u8, 8, O>;
#[doc = "Field `AP3` reader - Address prefix 3."]
pub type AP3_R = crate::FieldReader<u8, u8>;
#[doc = "Field `AP3` writer - Address prefix 3."]
pub type AP3_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PREFIX0_SPEC, u8, u8, 8, O>;
impl R {
#[doc = "Bits 0:7 - Address prefix 0."]
#[inline(always)]
pub fn ap0(&self) -> AP0_R {
AP0_R::new((self.bits & 0xff) as u8)
}
#[doc = "Bits 8:15 - Address prefix 1."]
#[inline(always)]
pub fn ap1(&self) -> AP1_R {
AP1_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 16:23 - Address prefix 2."]
#[inline(always)]
pub fn ap2(&self) -> AP2_R {
AP2_R::new(((self.bits >> 16) & 0xff) as u8)
}
#[doc = "Bits 24:31 - Address prefix 3."]
#[inline(always)]
pub fn ap3(&self) -> AP3_R {
AP3_R::new(((self.bits >> 24) & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 0:7 - Address prefix 0."]
#[inline(always)]
pub fn ap0(&mut self) -> AP0_W<0> {
AP0_W::new(self)
}
#[doc = "Bits 8:15 - Address prefix 1."]
#[inline(always)]
pub fn ap1(&mut self) -> AP1_W<8> {
AP1_W::new(self)
}
#[doc = "Bits 16:23 - Address prefix 2."]
#[inline(always)]
pub fn ap2(&mut self) -> AP2_W<16> {
AP2_W::new(self)
}
#[doc = "Bits 24:31 - Address prefix 3."]
#[inline(always)]
pub fn ap3(&mut self) -> AP3_W<24> {
AP3_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 = "Prefixes bytes for logical addresses 0-3\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 [prefix0](index.html) module"]
pub struct PREFIX0_SPEC;
impl crate::RegisterSpec for PREFIX0_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [prefix0::R](R) reader structure"]
impl crate::Readable for PREFIX0_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [prefix0::W](W) writer structure"]
impl crate::Writable for PREFIX0_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets PREFIX0 to value 0"]
impl crate::Resettable for PREFIX0_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+122
View File
@@ -0,0 +1,122 @@
#[doc = "Register `PREFIX1` reader"]
pub struct R(crate::R<PREFIX1_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<PREFIX1_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<PREFIX1_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<PREFIX1_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `PREFIX1` writer"]
pub struct W(crate::W<PREFIX1_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<PREFIX1_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<PREFIX1_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<PREFIX1_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `AP4` reader - Address prefix 4."]
pub type AP4_R = crate::FieldReader<u8, u8>;
#[doc = "Field `AP4` writer - Address prefix 4."]
pub type AP4_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PREFIX1_SPEC, u8, u8, 8, O>;
#[doc = "Field `AP5` reader - Address prefix 5."]
pub type AP5_R = crate::FieldReader<u8, u8>;
#[doc = "Field `AP5` writer - Address prefix 5."]
pub type AP5_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PREFIX1_SPEC, u8, u8, 8, O>;
#[doc = "Field `AP6` reader - Address prefix 6."]
pub type AP6_R = crate::FieldReader<u8, u8>;
#[doc = "Field `AP6` writer - Address prefix 6."]
pub type AP6_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PREFIX1_SPEC, u8, u8, 8, O>;
#[doc = "Field `AP7` reader - Address prefix 7."]
pub type AP7_R = crate::FieldReader<u8, u8>;
#[doc = "Field `AP7` writer - Address prefix 7."]
pub type AP7_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PREFIX1_SPEC, u8, u8, 8, O>;
impl R {
#[doc = "Bits 0:7 - Address prefix 4."]
#[inline(always)]
pub fn ap4(&self) -> AP4_R {
AP4_R::new((self.bits & 0xff) as u8)
}
#[doc = "Bits 8:15 - Address prefix 5."]
#[inline(always)]
pub fn ap5(&self) -> AP5_R {
AP5_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 16:23 - Address prefix 6."]
#[inline(always)]
pub fn ap6(&self) -> AP6_R {
AP6_R::new(((self.bits >> 16) & 0xff) as u8)
}
#[doc = "Bits 24:31 - Address prefix 7."]
#[inline(always)]
pub fn ap7(&self) -> AP7_R {
AP7_R::new(((self.bits >> 24) & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 0:7 - Address prefix 4."]
#[inline(always)]
pub fn ap4(&mut self) -> AP4_W<0> {
AP4_W::new(self)
}
#[doc = "Bits 8:15 - Address prefix 5."]
#[inline(always)]
pub fn ap5(&mut self) -> AP5_W<8> {
AP5_W::new(self)
}
#[doc = "Bits 16:23 - Address prefix 6."]
#[inline(always)]
pub fn ap6(&mut self) -> AP6_W<16> {
AP6_W::new(self)
}
#[doc = "Bits 24:31 - Address prefix 7."]
#[inline(always)]
pub fn ap7(&mut self) -> AP7_W<24> {
AP7_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 = "Prefixes bytes for logical addresses 4-7\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 [prefix1](index.html) module"]
pub struct PREFIX1_SPEC;
impl crate::RegisterSpec for PREFIX1_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [prefix1::R](R) reader structure"]
impl crate::Readable for PREFIX1_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [prefix1::W](W) writer structure"]
impl crate::Writable for PREFIX1_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets PREFIX1 to value 0"]
impl crate::Resettable for PREFIX1_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+40
View File
@@ -0,0 +1,40 @@
#[doc = "Register `RSSISAMPLE` reader"]
pub struct R(crate::R<RSSISAMPLE_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<RSSISAMPLE_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<RSSISAMPLE_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<RSSISAMPLE_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `RSSISAMPLE` reader - RSSI sample"]
pub type RSSISAMPLE_R = crate::FieldReader<u8, u8>;
impl R {
#[doc = "Bits 0:6 - RSSI sample"]
#[inline(always)]
pub fn rssisample(&self) -> RSSISAMPLE_R {
RSSISAMPLE_R::new((self.bits & 0x7f) as u8)
}
}
#[doc = "RSSI sample\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 [rssisample](index.html) module"]
pub struct RSSISAMPLE_SPEC;
impl crate::RegisterSpec for RSSISAMPLE_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [rssisample::R](R) reader structure"]
impl crate::Readable for RSSISAMPLE_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets RSSISAMPLE to value 0"]
impl crate::Resettable for RSSISAMPLE_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+546
View File
@@ -0,0 +1,546 @@
#[doc = "Register `RXADDRESSES` reader"]
pub struct R(crate::R<RXADDRESSES_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<RXADDRESSES_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<RXADDRESSES_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<RXADDRESSES_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `RXADDRESSES` writer"]
pub struct W(crate::W<RXADDRESSES_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<RXADDRESSES_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<RXADDRESSES_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<RXADDRESSES_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `ADDR0` reader - Enable or disable reception on logical address 0."]
pub type ADDR0_R = crate::BitReader<ADDR0_A>;
#[doc = "Enable or disable reception on logical address 0.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ADDR0_A {
#[doc = "0: Disable"]
DISABLED = 0,
#[doc = "1: Enable"]
ENABLED = 1,
}
impl From<ADDR0_A> for bool {
#[inline(always)]
fn from(variant: ADDR0_A) -> Self {
variant as u8 != 0
}
}
impl ADDR0_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ADDR0_A {
match self.bits {
false => ADDR0_A::DISABLED,
true => ADDR0_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ADDR0_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ADDR0_A::ENABLED
}
}
#[doc = "Field `ADDR0` writer - Enable or disable reception on logical address 0."]
pub type ADDR0_W<'a, const O: u8> = crate::BitWriter<'a, u32, RXADDRESSES_SPEC, ADDR0_A, O>;
impl<'a, const O: u8> ADDR0_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ADDR0_A::DISABLED)
}
#[doc = "Enable"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ADDR0_A::ENABLED)
}
}
#[doc = "Field `ADDR1` reader - Enable or disable reception on logical address 1."]
pub type ADDR1_R = crate::BitReader<ADDR1_A>;
#[doc = "Enable or disable reception on logical address 1.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ADDR1_A {
#[doc = "0: Disable"]
DISABLED = 0,
#[doc = "1: Enable"]
ENABLED = 1,
}
impl From<ADDR1_A> for bool {
#[inline(always)]
fn from(variant: ADDR1_A) -> Self {
variant as u8 != 0
}
}
impl ADDR1_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ADDR1_A {
match self.bits {
false => ADDR1_A::DISABLED,
true => ADDR1_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ADDR1_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ADDR1_A::ENABLED
}
}
#[doc = "Field `ADDR1` writer - Enable or disable reception on logical address 1."]
pub type ADDR1_W<'a, const O: u8> = crate::BitWriter<'a, u32, RXADDRESSES_SPEC, ADDR1_A, O>;
impl<'a, const O: u8> ADDR1_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ADDR1_A::DISABLED)
}
#[doc = "Enable"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ADDR1_A::ENABLED)
}
}
#[doc = "Field `ADDR2` reader - Enable or disable reception on logical address 2."]
pub type ADDR2_R = crate::BitReader<ADDR2_A>;
#[doc = "Enable or disable reception on logical address 2.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ADDR2_A {
#[doc = "0: Disable"]
DISABLED = 0,
#[doc = "1: Enable"]
ENABLED = 1,
}
impl From<ADDR2_A> for bool {
#[inline(always)]
fn from(variant: ADDR2_A) -> Self {
variant as u8 != 0
}
}
impl ADDR2_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ADDR2_A {
match self.bits {
false => ADDR2_A::DISABLED,
true => ADDR2_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ADDR2_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ADDR2_A::ENABLED
}
}
#[doc = "Field `ADDR2` writer - Enable or disable reception on logical address 2."]
pub type ADDR2_W<'a, const O: u8> = crate::BitWriter<'a, u32, RXADDRESSES_SPEC, ADDR2_A, O>;
impl<'a, const O: u8> ADDR2_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ADDR2_A::DISABLED)
}
#[doc = "Enable"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ADDR2_A::ENABLED)
}
}
#[doc = "Field `ADDR3` reader - Enable or disable reception on logical address 3."]
pub type ADDR3_R = crate::BitReader<ADDR3_A>;
#[doc = "Enable or disable reception on logical address 3.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ADDR3_A {
#[doc = "0: Disable"]
DISABLED = 0,
#[doc = "1: Enable"]
ENABLED = 1,
}
impl From<ADDR3_A> for bool {
#[inline(always)]
fn from(variant: ADDR3_A) -> Self {
variant as u8 != 0
}
}
impl ADDR3_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ADDR3_A {
match self.bits {
false => ADDR3_A::DISABLED,
true => ADDR3_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ADDR3_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ADDR3_A::ENABLED
}
}
#[doc = "Field `ADDR3` writer - Enable or disable reception on logical address 3."]
pub type ADDR3_W<'a, const O: u8> = crate::BitWriter<'a, u32, RXADDRESSES_SPEC, ADDR3_A, O>;
impl<'a, const O: u8> ADDR3_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ADDR3_A::DISABLED)
}
#[doc = "Enable"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ADDR3_A::ENABLED)
}
}
#[doc = "Field `ADDR4` reader - Enable or disable reception on logical address 4."]
pub type ADDR4_R = crate::BitReader<ADDR4_A>;
#[doc = "Enable or disable reception on logical address 4.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ADDR4_A {
#[doc = "0: Disable"]
DISABLED = 0,
#[doc = "1: Enable"]
ENABLED = 1,
}
impl From<ADDR4_A> for bool {
#[inline(always)]
fn from(variant: ADDR4_A) -> Self {
variant as u8 != 0
}
}
impl ADDR4_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ADDR4_A {
match self.bits {
false => ADDR4_A::DISABLED,
true => ADDR4_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ADDR4_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ADDR4_A::ENABLED
}
}
#[doc = "Field `ADDR4` writer - Enable or disable reception on logical address 4."]
pub type ADDR4_W<'a, const O: u8> = crate::BitWriter<'a, u32, RXADDRESSES_SPEC, ADDR4_A, O>;
impl<'a, const O: u8> ADDR4_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ADDR4_A::DISABLED)
}
#[doc = "Enable"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ADDR4_A::ENABLED)
}
}
#[doc = "Field `ADDR5` reader - Enable or disable reception on logical address 5."]
pub type ADDR5_R = crate::BitReader<ADDR5_A>;
#[doc = "Enable or disable reception on logical address 5.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ADDR5_A {
#[doc = "0: Disable"]
DISABLED = 0,
#[doc = "1: Enable"]
ENABLED = 1,
}
impl From<ADDR5_A> for bool {
#[inline(always)]
fn from(variant: ADDR5_A) -> Self {
variant as u8 != 0
}
}
impl ADDR5_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ADDR5_A {
match self.bits {
false => ADDR5_A::DISABLED,
true => ADDR5_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ADDR5_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ADDR5_A::ENABLED
}
}
#[doc = "Field `ADDR5` writer - Enable or disable reception on logical address 5."]
pub type ADDR5_W<'a, const O: u8> = crate::BitWriter<'a, u32, RXADDRESSES_SPEC, ADDR5_A, O>;
impl<'a, const O: u8> ADDR5_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ADDR5_A::DISABLED)
}
#[doc = "Enable"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ADDR5_A::ENABLED)
}
}
#[doc = "Field `ADDR6` reader - Enable or disable reception on logical address 6."]
pub type ADDR6_R = crate::BitReader<ADDR6_A>;
#[doc = "Enable or disable reception on logical address 6.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ADDR6_A {
#[doc = "0: Disable"]
DISABLED = 0,
#[doc = "1: Enable"]
ENABLED = 1,
}
impl From<ADDR6_A> for bool {
#[inline(always)]
fn from(variant: ADDR6_A) -> Self {
variant as u8 != 0
}
}
impl ADDR6_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ADDR6_A {
match self.bits {
false => ADDR6_A::DISABLED,
true => ADDR6_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ADDR6_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ADDR6_A::ENABLED
}
}
#[doc = "Field `ADDR6` writer - Enable or disable reception on logical address 6."]
pub type ADDR6_W<'a, const O: u8> = crate::BitWriter<'a, u32, RXADDRESSES_SPEC, ADDR6_A, O>;
impl<'a, const O: u8> ADDR6_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ADDR6_A::DISABLED)
}
#[doc = "Enable"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ADDR6_A::ENABLED)
}
}
#[doc = "Field `ADDR7` reader - Enable or disable reception on logical address 7."]
pub type ADDR7_R = crate::BitReader<ADDR7_A>;
#[doc = "Enable or disable reception on logical address 7.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ADDR7_A {
#[doc = "0: Disable"]
DISABLED = 0,
#[doc = "1: Enable"]
ENABLED = 1,
}
impl From<ADDR7_A> for bool {
#[inline(always)]
fn from(variant: ADDR7_A) -> Self {
variant as u8 != 0
}
}
impl ADDR7_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ADDR7_A {
match self.bits {
false => ADDR7_A::DISABLED,
true => ADDR7_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ADDR7_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ADDR7_A::ENABLED
}
}
#[doc = "Field `ADDR7` writer - Enable or disable reception on logical address 7."]
pub type ADDR7_W<'a, const O: u8> = crate::BitWriter<'a, u32, RXADDRESSES_SPEC, ADDR7_A, O>;
impl<'a, const O: u8> ADDR7_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ADDR7_A::DISABLED)
}
#[doc = "Enable"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ADDR7_A::ENABLED)
}
}
impl R {
#[doc = "Bit 0 - Enable or disable reception on logical address 0."]
#[inline(always)]
pub fn addr0(&self) -> ADDR0_R {
ADDR0_R::new((self.bits & 1) != 0)
}
#[doc = "Bit 1 - Enable or disable reception on logical address 1."]
#[inline(always)]
pub fn addr1(&self) -> ADDR1_R {
ADDR1_R::new(((self.bits >> 1) & 1) != 0)
}
#[doc = "Bit 2 - Enable or disable reception on logical address 2."]
#[inline(always)]
pub fn addr2(&self) -> ADDR2_R {
ADDR2_R::new(((self.bits >> 2) & 1) != 0)
}
#[doc = "Bit 3 - Enable or disable reception on logical address 3."]
#[inline(always)]
pub fn addr3(&self) -> ADDR3_R {
ADDR3_R::new(((self.bits >> 3) & 1) != 0)
}
#[doc = "Bit 4 - Enable or disable reception on logical address 4."]
#[inline(always)]
pub fn addr4(&self) -> ADDR4_R {
ADDR4_R::new(((self.bits >> 4) & 1) != 0)
}
#[doc = "Bit 5 - Enable or disable reception on logical address 5."]
#[inline(always)]
pub fn addr5(&self) -> ADDR5_R {
ADDR5_R::new(((self.bits >> 5) & 1) != 0)
}
#[doc = "Bit 6 - Enable or disable reception on logical address 6."]
#[inline(always)]
pub fn addr6(&self) -> ADDR6_R {
ADDR6_R::new(((self.bits >> 6) & 1) != 0)
}
#[doc = "Bit 7 - Enable or disable reception on logical address 7."]
#[inline(always)]
pub fn addr7(&self) -> ADDR7_R {
ADDR7_R::new(((self.bits >> 7) & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Enable or disable reception on logical address 0."]
#[inline(always)]
pub fn addr0(&mut self) -> ADDR0_W<0> {
ADDR0_W::new(self)
}
#[doc = "Bit 1 - Enable or disable reception on logical address 1."]
#[inline(always)]
pub fn addr1(&mut self) -> ADDR1_W<1> {
ADDR1_W::new(self)
}
#[doc = "Bit 2 - Enable or disable reception on logical address 2."]
#[inline(always)]
pub fn addr2(&mut self) -> ADDR2_W<2> {
ADDR2_W::new(self)
}
#[doc = "Bit 3 - Enable or disable reception on logical address 3."]
#[inline(always)]
pub fn addr3(&mut self) -> ADDR3_W<3> {
ADDR3_W::new(self)
}
#[doc = "Bit 4 - Enable or disable reception on logical address 4."]
#[inline(always)]
pub fn addr4(&mut self) -> ADDR4_W<4> {
ADDR4_W::new(self)
}
#[doc = "Bit 5 - Enable or disable reception on logical address 5."]
#[inline(always)]
pub fn addr5(&mut self) -> ADDR5_W<5> {
ADDR5_W::new(self)
}
#[doc = "Bit 6 - Enable or disable reception on logical address 6."]
#[inline(always)]
pub fn addr6(&mut self) -> ADDR6_W<6> {
ADDR6_W::new(self)
}
#[doc = "Bit 7 - Enable or disable reception on logical address 7."]
#[inline(always)]
pub fn addr7(&mut self) -> ADDR7_W<7> {
ADDR7_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 = "Receive address select\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 [rxaddresses](index.html) module"]
pub struct RXADDRESSES_SPEC;
impl crate::RegisterSpec for RXADDRESSES_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [rxaddresses::R](R) reader structure"]
impl crate::Readable for RXADDRESSES_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [rxaddresses::W](W) writer structure"]
impl crate::Writable for RXADDRESSES_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets RXADDRESSES to value 0"]
impl crate::Resettable for RXADDRESSES_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+40
View File
@@ -0,0 +1,40 @@
#[doc = "Register `RXCRC` reader"]
pub struct R(crate::R<RXCRC_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<RXCRC_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<RXCRC_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<RXCRC_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `RXCRC` reader - CRC field of previously received packet"]
pub type RXCRC_R = crate::FieldReader<u32, u32>;
impl R {
#[doc = "Bits 0:23 - CRC field of previously received packet"]
#[inline(always)]
pub fn rxcrc(&self) -> RXCRC_R {
RXCRC_R::new((self.bits & 0x00ff_ffff) as u32)
}
}
#[doc = "CRC field of previously received packet\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 [rxcrc](index.html) module"]
pub struct RXCRC_SPEC;
impl crate::RegisterSpec for RXCRC_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [rxcrc::R](R) reader structure"]
impl crate::Readable for RXCRC_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets RXCRC to value 0"]
impl crate::Resettable for RXCRC_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+40
View File
@@ -0,0 +1,40 @@
#[doc = "Register `RXMATCH` reader"]
pub struct R(crate::R<RXMATCH_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<RXMATCH_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<RXMATCH_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<RXMATCH_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `RXMATCH` reader - Received address"]
pub type RXMATCH_R = crate::FieldReader<u8, u8>;
impl R {
#[doc = "Bits 0:2 - Received address"]
#[inline(always)]
pub fn rxmatch(&self) -> RXMATCH_R {
RXMATCH_R::new((self.bits & 7) as u8)
}
}
#[doc = "Received address\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 [rxmatch](index.html) module"]
pub struct RXMATCH_SPEC;
impl crate::RegisterSpec for RXMATCH_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [rxmatch::R](R) reader structure"]
impl crate::Readable for RXMATCH_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets RXMATCH to value 0"]
impl crate::Resettable for RXMATCH_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+551
View File
@@ -0,0 +1,551 @@
#[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 `READY_START` reader - Shortcut between READY event and START task"]
pub type READY_START_R = crate::BitReader<READY_START_A>;
#[doc = "Shortcut between READY event and START task\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum READY_START_A {
#[doc = "0: Disable shortcut"]
DISABLED = 0,
#[doc = "1: Enable shortcut"]
ENABLED = 1,
}
impl From<READY_START_A> for bool {
#[inline(always)]
fn from(variant: READY_START_A) -> Self {
variant as u8 != 0
}
}
impl READY_START_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> READY_START_A {
match self.bits {
false => READY_START_A::DISABLED,
true => READY_START_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == READY_START_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == READY_START_A::ENABLED
}
}
#[doc = "Field `READY_START` writer - Shortcut between READY event and START task"]
pub type READY_START_W<'a, const O: u8> = crate::BitWriter<'a, u32, SHORTS_SPEC, READY_START_A, O>;
impl<'a, const O: u8> READY_START_W<'a, O> {
#[doc = "Disable shortcut"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(READY_START_A::DISABLED)
}
#[doc = "Enable shortcut"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(READY_START_A::ENABLED)
}
}
#[doc = "Field `END_DISABLE` reader - Shortcut between END event and DISABLE task"]
pub type END_DISABLE_R = crate::BitReader<END_DISABLE_A>;
#[doc = "Shortcut between END event and DISABLE task\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum END_DISABLE_A {
#[doc = "0: Disable shortcut"]
DISABLED = 0,
#[doc = "1: Enable shortcut"]
ENABLED = 1,
}
impl From<END_DISABLE_A> for bool {
#[inline(always)]
fn from(variant: END_DISABLE_A) -> Self {
variant as u8 != 0
}
}
impl END_DISABLE_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> END_DISABLE_A {
match self.bits {
false => END_DISABLE_A::DISABLED,
true => END_DISABLE_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == END_DISABLE_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == END_DISABLE_A::ENABLED
}
}
#[doc = "Field `END_DISABLE` writer - Shortcut between END event and DISABLE task"]
pub type END_DISABLE_W<'a, const O: u8> = crate::BitWriter<'a, u32, SHORTS_SPEC, END_DISABLE_A, O>;
impl<'a, const O: u8> END_DISABLE_W<'a, O> {
#[doc = "Disable shortcut"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(END_DISABLE_A::DISABLED)
}
#[doc = "Enable shortcut"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(END_DISABLE_A::ENABLED)
}
}
#[doc = "Field `DISABLED_TXEN` reader - Shortcut between DISABLED event and TXEN task"]
pub type DISABLED_TXEN_R = crate::BitReader<DISABLED_TXEN_A>;
#[doc = "Shortcut between DISABLED event and TXEN task\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DISABLED_TXEN_A {
#[doc = "0: Disable shortcut"]
DISABLED = 0,
#[doc = "1: Enable shortcut"]
ENABLED = 1,
}
impl From<DISABLED_TXEN_A> for bool {
#[inline(always)]
fn from(variant: DISABLED_TXEN_A) -> Self {
variant as u8 != 0
}
}
impl DISABLED_TXEN_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> DISABLED_TXEN_A {
match self.bits {
false => DISABLED_TXEN_A::DISABLED,
true => DISABLED_TXEN_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == DISABLED_TXEN_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == DISABLED_TXEN_A::ENABLED
}
}
#[doc = "Field `DISABLED_TXEN` writer - Shortcut between DISABLED event and TXEN task"]
pub type DISABLED_TXEN_W<'a, const O: u8> =
crate::BitWriter<'a, u32, SHORTS_SPEC, DISABLED_TXEN_A, O>;
impl<'a, const O: u8> DISABLED_TXEN_W<'a, O> {
#[doc = "Disable shortcut"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(DISABLED_TXEN_A::DISABLED)
}
#[doc = "Enable shortcut"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(DISABLED_TXEN_A::ENABLED)
}
}
#[doc = "Field `DISABLED_RXEN` reader - Shortcut between DISABLED event and RXEN task"]
pub type DISABLED_RXEN_R = crate::BitReader<DISABLED_RXEN_A>;
#[doc = "Shortcut between DISABLED event and RXEN task\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DISABLED_RXEN_A {
#[doc = "0: Disable shortcut"]
DISABLED = 0,
#[doc = "1: Enable shortcut"]
ENABLED = 1,
}
impl From<DISABLED_RXEN_A> for bool {
#[inline(always)]
fn from(variant: DISABLED_RXEN_A) -> Self {
variant as u8 != 0
}
}
impl DISABLED_RXEN_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> DISABLED_RXEN_A {
match self.bits {
false => DISABLED_RXEN_A::DISABLED,
true => DISABLED_RXEN_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == DISABLED_RXEN_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == DISABLED_RXEN_A::ENABLED
}
}
#[doc = "Field `DISABLED_RXEN` writer - Shortcut between DISABLED event and RXEN task"]
pub type DISABLED_RXEN_W<'a, const O: u8> =
crate::BitWriter<'a, u32, SHORTS_SPEC, DISABLED_RXEN_A, O>;
impl<'a, const O: u8> DISABLED_RXEN_W<'a, O> {
#[doc = "Disable shortcut"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(DISABLED_RXEN_A::DISABLED)
}
#[doc = "Enable shortcut"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(DISABLED_RXEN_A::ENABLED)
}
}
#[doc = "Field `ADDRESS_RSSISTART` reader - Shortcut between ADDRESS event and RSSISTART task"]
pub type ADDRESS_RSSISTART_R = crate::BitReader<ADDRESS_RSSISTART_A>;
#[doc = "Shortcut between ADDRESS event and RSSISTART task\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ADDRESS_RSSISTART_A {
#[doc = "0: Disable shortcut"]
DISABLED = 0,
#[doc = "1: Enable shortcut"]
ENABLED = 1,
}
impl From<ADDRESS_RSSISTART_A> for bool {
#[inline(always)]
fn from(variant: ADDRESS_RSSISTART_A) -> Self {
variant as u8 != 0
}
}
impl ADDRESS_RSSISTART_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ADDRESS_RSSISTART_A {
match self.bits {
false => ADDRESS_RSSISTART_A::DISABLED,
true => ADDRESS_RSSISTART_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ADDRESS_RSSISTART_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ADDRESS_RSSISTART_A::ENABLED
}
}
#[doc = "Field `ADDRESS_RSSISTART` writer - Shortcut between ADDRESS event and RSSISTART task"]
pub type ADDRESS_RSSISTART_W<'a, const O: u8> =
crate::BitWriter<'a, u32, SHORTS_SPEC, ADDRESS_RSSISTART_A, O>;
impl<'a, const O: u8> ADDRESS_RSSISTART_W<'a, O> {
#[doc = "Disable shortcut"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ADDRESS_RSSISTART_A::DISABLED)
}
#[doc = "Enable shortcut"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ADDRESS_RSSISTART_A::ENABLED)
}
}
#[doc = "Field `END_START` reader - Shortcut between END event and START task"]
pub type END_START_R = crate::BitReader<END_START_A>;
#[doc = "Shortcut between END event and START task\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum END_START_A {
#[doc = "0: Disable shortcut"]
DISABLED = 0,
#[doc = "1: Enable shortcut"]
ENABLED = 1,
}
impl From<END_START_A> for bool {
#[inline(always)]
fn from(variant: END_START_A) -> Self {
variant as u8 != 0
}
}
impl END_START_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> END_START_A {
match self.bits {
false => END_START_A::DISABLED,
true => END_START_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == END_START_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == END_START_A::ENABLED
}
}
#[doc = "Field `END_START` writer - Shortcut between END event and START task"]
pub type END_START_W<'a, const O: u8> = crate::BitWriter<'a, u32, SHORTS_SPEC, END_START_A, O>;
impl<'a, const O: u8> END_START_W<'a, O> {
#[doc = "Disable shortcut"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(END_START_A::DISABLED)
}
#[doc = "Enable shortcut"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(END_START_A::ENABLED)
}
}
#[doc = "Field `ADDRESS_BCSTART` reader - Shortcut between ADDRESS event and BCSTART task"]
pub type ADDRESS_BCSTART_R = crate::BitReader<ADDRESS_BCSTART_A>;
#[doc = "Shortcut between ADDRESS event and BCSTART task\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ADDRESS_BCSTART_A {
#[doc = "0: Disable shortcut"]
DISABLED = 0,
#[doc = "1: Enable shortcut"]
ENABLED = 1,
}
impl From<ADDRESS_BCSTART_A> for bool {
#[inline(always)]
fn from(variant: ADDRESS_BCSTART_A) -> Self {
variant as u8 != 0
}
}
impl ADDRESS_BCSTART_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ADDRESS_BCSTART_A {
match self.bits {
false => ADDRESS_BCSTART_A::DISABLED,
true => ADDRESS_BCSTART_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ADDRESS_BCSTART_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ADDRESS_BCSTART_A::ENABLED
}
}
#[doc = "Field `ADDRESS_BCSTART` writer - Shortcut between ADDRESS event and BCSTART task"]
pub type ADDRESS_BCSTART_W<'a, const O: u8> =
crate::BitWriter<'a, u32, SHORTS_SPEC, ADDRESS_BCSTART_A, O>;
impl<'a, const O: u8> ADDRESS_BCSTART_W<'a, O> {
#[doc = "Disable shortcut"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ADDRESS_BCSTART_A::DISABLED)
}
#[doc = "Enable shortcut"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ADDRESS_BCSTART_A::ENABLED)
}
}
#[doc = "Field `DISABLED_RSSISTOP` reader - Shortcut between DISABLED event and RSSISTOP task"]
pub type DISABLED_RSSISTOP_R = crate::BitReader<DISABLED_RSSISTOP_A>;
#[doc = "Shortcut between DISABLED event and RSSISTOP task\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DISABLED_RSSISTOP_A {
#[doc = "0: Disable shortcut"]
DISABLED = 0,
#[doc = "1: Enable shortcut"]
ENABLED = 1,
}
impl From<DISABLED_RSSISTOP_A> for bool {
#[inline(always)]
fn from(variant: DISABLED_RSSISTOP_A) -> Self {
variant as u8 != 0
}
}
impl DISABLED_RSSISTOP_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> DISABLED_RSSISTOP_A {
match self.bits {
false => DISABLED_RSSISTOP_A::DISABLED,
true => DISABLED_RSSISTOP_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == DISABLED_RSSISTOP_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == DISABLED_RSSISTOP_A::ENABLED
}
}
#[doc = "Field `DISABLED_RSSISTOP` writer - Shortcut between DISABLED event and RSSISTOP task"]
pub type DISABLED_RSSISTOP_W<'a, const O: u8> =
crate::BitWriter<'a, u32, SHORTS_SPEC, DISABLED_RSSISTOP_A, O>;
impl<'a, const O: u8> DISABLED_RSSISTOP_W<'a, O> {
#[doc = "Disable shortcut"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(DISABLED_RSSISTOP_A::DISABLED)
}
#[doc = "Enable shortcut"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(DISABLED_RSSISTOP_A::ENABLED)
}
}
impl R {
#[doc = "Bit 0 - Shortcut between READY event and START task"]
#[inline(always)]
pub fn ready_start(&self) -> READY_START_R {
READY_START_R::new((self.bits & 1) != 0)
}
#[doc = "Bit 1 - Shortcut between END event and DISABLE task"]
#[inline(always)]
pub fn end_disable(&self) -> END_DISABLE_R {
END_DISABLE_R::new(((self.bits >> 1) & 1) != 0)
}
#[doc = "Bit 2 - Shortcut between DISABLED event and TXEN task"]
#[inline(always)]
pub fn disabled_txen(&self) -> DISABLED_TXEN_R {
DISABLED_TXEN_R::new(((self.bits >> 2) & 1) != 0)
}
#[doc = "Bit 3 - Shortcut between DISABLED event and RXEN task"]
#[inline(always)]
pub fn disabled_rxen(&self) -> DISABLED_RXEN_R {
DISABLED_RXEN_R::new(((self.bits >> 3) & 1) != 0)
}
#[doc = "Bit 4 - Shortcut between ADDRESS event and RSSISTART task"]
#[inline(always)]
pub fn address_rssistart(&self) -> ADDRESS_RSSISTART_R {
ADDRESS_RSSISTART_R::new(((self.bits >> 4) & 1) != 0)
}
#[doc = "Bit 5 - Shortcut between END event and START task"]
#[inline(always)]
pub fn end_start(&self) -> END_START_R {
END_START_R::new(((self.bits >> 5) & 1) != 0)
}
#[doc = "Bit 6 - Shortcut between ADDRESS event and BCSTART task"]
#[inline(always)]
pub fn address_bcstart(&self) -> ADDRESS_BCSTART_R {
ADDRESS_BCSTART_R::new(((self.bits >> 6) & 1) != 0)
}
#[doc = "Bit 8 - Shortcut between DISABLED event and RSSISTOP task"]
#[inline(always)]
pub fn disabled_rssistop(&self) -> DISABLED_RSSISTOP_R {
DISABLED_RSSISTOP_R::new(((self.bits >> 8) & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Shortcut between READY event and START task"]
#[inline(always)]
pub fn ready_start(&mut self) -> READY_START_W<0> {
READY_START_W::new(self)
}
#[doc = "Bit 1 - Shortcut between END event and DISABLE task"]
#[inline(always)]
pub fn end_disable(&mut self) -> END_DISABLE_W<1> {
END_DISABLE_W::new(self)
}
#[doc = "Bit 2 - Shortcut between DISABLED event and TXEN task"]
#[inline(always)]
pub fn disabled_txen(&mut self) -> DISABLED_TXEN_W<2> {
DISABLED_TXEN_W::new(self)
}
#[doc = "Bit 3 - Shortcut between DISABLED event and RXEN task"]
#[inline(always)]
pub fn disabled_rxen(&mut self) -> DISABLED_RXEN_W<3> {
DISABLED_RXEN_W::new(self)
}
#[doc = "Bit 4 - Shortcut between ADDRESS event and RSSISTART task"]
#[inline(always)]
pub fn address_rssistart(&mut self) -> ADDRESS_RSSISTART_W<4> {
ADDRESS_RSSISTART_W::new(self)
}
#[doc = "Bit 5 - Shortcut between END event and START task"]
#[inline(always)]
pub fn end_start(&mut self) -> END_START_W<5> {
END_START_W::new(self)
}
#[doc = "Bit 6 - Shortcut between ADDRESS event and BCSTART task"]
#[inline(always)]
pub fn address_bcstart(&mut self) -> ADDRESS_BCSTART_W<6> {
ADDRESS_BCSTART_W::new(self)
}
#[doc = "Bit 8 - Shortcut between DISABLED event and RSSISTOP task"]
#[inline(always)]
pub fn disabled_rssistop(&mut self) -> DISABLED_RSSISTOP_W<8> {
DISABLED_RSSISTOP_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
}
}
+132
View File
@@ -0,0 +1,132 @@
#[doc = "Register `STATE` reader"]
pub struct R(crate::R<STATE_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<STATE_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<STATE_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<STATE_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `STATE` reader - Current radio state"]
pub type STATE_R = crate::FieldReader<u8, STATE_A>;
#[doc = "Current radio state\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum STATE_A {
#[doc = "0: RADIO is in the Disabled state"]
DISABLED = 0,
#[doc = "1: RADIO is in the RXRU state"]
RX_RU = 1,
#[doc = "2: RADIO is in the RXIDLE state"]
RX_IDLE = 2,
#[doc = "3: RADIO is in the RX state"]
RX = 3,
#[doc = "4: RADIO is in the RXDISABLED state"]
RX_DISABLE = 4,
#[doc = "9: RADIO is in the TXRU state"]
TX_RU = 9,
#[doc = "10: RADIO is in the TXIDLE state"]
TX_IDLE = 10,
#[doc = "11: RADIO is in the TX state"]
TX = 11,
#[doc = "12: RADIO is in the TXDISABLED state"]
TX_DISABLE = 12,
}
impl From<STATE_A> for u8 {
#[inline(always)]
fn from(variant: STATE_A) -> Self {
variant as _
}
}
impl STATE_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> Option<STATE_A> {
match self.bits {
0 => Some(STATE_A::DISABLED),
1 => Some(STATE_A::RX_RU),
2 => Some(STATE_A::RX_IDLE),
3 => Some(STATE_A::RX),
4 => Some(STATE_A::RX_DISABLE),
9 => Some(STATE_A::TX_RU),
10 => Some(STATE_A::TX_IDLE),
11 => Some(STATE_A::TX),
12 => Some(STATE_A::TX_DISABLE),
_ => None,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == STATE_A::DISABLED
}
#[doc = "Checks if the value of the field is `RX_RU`"]
#[inline(always)]
pub fn is_rx_ru(&self) -> bool {
*self == STATE_A::RX_RU
}
#[doc = "Checks if the value of the field is `RX_IDLE`"]
#[inline(always)]
pub fn is_rx_idle(&self) -> bool {
*self == STATE_A::RX_IDLE
}
#[doc = "Checks if the value of the field is `RX`"]
#[inline(always)]
pub fn is_rx(&self) -> bool {
*self == STATE_A::RX
}
#[doc = "Checks if the value of the field is `RX_DISABLE`"]
#[inline(always)]
pub fn is_rx_disable(&self) -> bool {
*self == STATE_A::RX_DISABLE
}
#[doc = "Checks if the value of the field is `TX_RU`"]
#[inline(always)]
pub fn is_tx_ru(&self) -> bool {
*self == STATE_A::TX_RU
}
#[doc = "Checks if the value of the field is `TX_IDLE`"]
#[inline(always)]
pub fn is_tx_idle(&self) -> bool {
*self == STATE_A::TX_IDLE
}
#[doc = "Checks if the value of the field is `TX`"]
#[inline(always)]
pub fn is_tx(&self) -> bool {
*self == STATE_A::TX
}
#[doc = "Checks if the value of the field is `TX_DISABLE`"]
#[inline(always)]
pub fn is_tx_disable(&self) -> bool {
*self == STATE_A::TX_DISABLE
}
}
impl R {
#[doc = "Bits 0:3 - Current radio state"]
#[inline(always)]
pub fn state(&self) -> STATE_R {
STATE_R::new((self.bits & 0x0f) as u8)
}
}
#[doc = "Current radio state\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 [state](index.html) module"]
pub struct STATE_SPEC;
impl crate::RegisterSpec for STATE_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [state::R](R) reader structure"]
impl crate::Readable for STATE_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets STATE to value 0"]
impl crate::Resettable for STATE_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+45
View File
@@ -0,0 +1,45 @@
#[doc = "Register `TASKS_BCSTART` writer"]
pub struct W(crate::W<TASKS_BCSTART_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<TASKS_BCSTART_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_BCSTART_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<TASKS_BCSTART_SPEC>) -> Self {
W(writer)
}
}
impl W {
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Start the bit counter\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_bcstart](index.html) module"]
pub struct TASKS_BCSTART_SPEC;
impl crate::RegisterSpec for TASKS_BCSTART_SPEC {
type Ux = u32;
}
#[doc = "`write(|w| ..)` method takes [tasks_bcstart::W](W) writer structure"]
impl crate::Writable for TASKS_BCSTART_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets TASKS_BCSTART to value 0"]
impl crate::Resettable for TASKS_BCSTART_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+45
View File
@@ -0,0 +1,45 @@
#[doc = "Register `TASKS_BCSTOP` writer"]
pub struct W(crate::W<TASKS_BCSTOP_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<TASKS_BCSTOP_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_BCSTOP_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<TASKS_BCSTOP_SPEC>) -> Self {
W(writer)
}
}
impl W {
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Stop the bit counter\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_bcstop](index.html) module"]
pub struct TASKS_BCSTOP_SPEC;
impl crate::RegisterSpec for TASKS_BCSTOP_SPEC {
type Ux = u32;
}
#[doc = "`write(|w| ..)` method takes [tasks_bcstop::W](W) writer structure"]
impl crate::Writable for TASKS_BCSTOP_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets TASKS_BCSTOP to value 0"]
impl crate::Resettable for TASKS_BCSTOP_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+45
View File
@@ -0,0 +1,45 @@
#[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)
}
}
impl W {
#[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 RADIO\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
}
}
+45
View File
@@ -0,0 +1,45 @@
#[doc = "Register `TASKS_RSSISTART` writer"]
pub struct W(crate::W<TASKS_RSSISTART_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<TASKS_RSSISTART_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_RSSISTART_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<TASKS_RSSISTART_SPEC>) -> Self {
W(writer)
}
}
impl W {
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Start the RSSI and take one single sample of the receive signal strength.\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_rssistart](index.html) module"]
pub struct TASKS_RSSISTART_SPEC;
impl crate::RegisterSpec for TASKS_RSSISTART_SPEC {
type Ux = u32;
}
#[doc = "`write(|w| ..)` method takes [tasks_rssistart::W](W) writer structure"]
impl crate::Writable for TASKS_RSSISTART_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets TASKS_RSSISTART to value 0"]
impl crate::Resettable for TASKS_RSSISTART_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+45
View File
@@ -0,0 +1,45 @@
#[doc = "Register `TASKS_RSSISTOP` writer"]
pub struct W(crate::W<TASKS_RSSISTOP_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<TASKS_RSSISTOP_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_RSSISTOP_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<TASKS_RSSISTOP_SPEC>) -> Self {
W(writer)
}
}
impl W {
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Stop the RSSI measurement\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_rssistop](index.html) module"]
pub struct TASKS_RSSISTOP_SPEC;
impl crate::RegisterSpec for TASKS_RSSISTOP_SPEC {
type Ux = u32;
}
#[doc = "`write(|w| ..)` method takes [tasks_rssistop::W](W) writer structure"]
impl crate::Writable for TASKS_RSSISTOP_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets TASKS_RSSISTOP to value 0"]
impl crate::Resettable for TASKS_RSSISTOP_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+45
View File
@@ -0,0 +1,45 @@
#[doc = "Register `TASKS_RXEN` writer"]
pub struct W(crate::W<TASKS_RXEN_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<TASKS_RXEN_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_RXEN_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<TASKS_RXEN_SPEC>) -> Self {
W(writer)
}
}
impl W {
#[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 RADIO in RX 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_rxen](index.html) module"]
pub struct TASKS_RXEN_SPEC;
impl crate::RegisterSpec for TASKS_RXEN_SPEC {
type Ux = u32;
}
#[doc = "`write(|w| ..)` method takes [tasks_rxen::W](W) writer structure"]
impl crate::Writable for TASKS_RXEN_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets TASKS_RXEN to value 0"]
impl crate::Resettable for TASKS_RXEN_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+45
View File
@@ -0,0 +1,45 @@
#[doc = "Register `TASKS_START` writer"]
pub struct W(crate::W<TASKS_START_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<TASKS_START_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<TASKS_START_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<TASKS_START_SPEC>) -> Self {
W(writer)
}
}
impl W {
#[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 RADIO\n\nThis register you can [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [tasks_start](index.html) module"]
pub struct TASKS_START_SPEC;
impl crate::RegisterSpec for TASKS_START_SPEC {
type Ux = u32;
}
#[doc = "`write(|w| ..)` method takes [tasks_start::W](W) writer structure"]
impl crate::Writable for TASKS_START_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets TASKS_START to value 0"]
impl crate::Resettable for TASKS_START_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+45
View File
@@ -0,0 +1,45 @@
#[doc = "Register `TASKS_STOP` writer"]
pub struct W(crate::W<TASKS_STOP_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<TASKS_STOP_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<TASKS_STOP_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<TASKS_STOP_SPEC>) -> Self {
W(writer)
}
}
impl W {
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Stop RADIO\n\nThis register you can [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [tasks_stop](index.html) module"]
pub struct TASKS_STOP_SPEC;
impl crate::RegisterSpec for TASKS_STOP_SPEC {
type Ux = u32;
}
#[doc = "`write(|w| ..)` method takes [tasks_stop::W](W) writer structure"]
impl crate::Writable for TASKS_STOP_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets TASKS_STOP to value 0"]
impl crate::Resettable for TASKS_STOP_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+45
View File
@@ -0,0 +1,45 @@
#[doc = "Register `TASKS_TXEN` writer"]
pub struct W(crate::W<TASKS_TXEN_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<TASKS_TXEN_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_TXEN_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<TASKS_TXEN_SPEC>) -> Self {
W(writer)
}
}
impl W {
#[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 RADIO in TX 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_txen](index.html) module"]
pub struct TASKS_TXEN_SPEC;
impl crate::RegisterSpec for TASKS_TXEN_SPEC {
type Ux = u32;
}
#[doc = "`write(|w| ..)` method takes [tasks_txen::W](W) writer structure"]
impl crate::Writable for TASKS_TXEN_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets TASKS_TXEN to value 0"]
impl crate::Resettable for TASKS_TXEN_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+80
View File
@@ -0,0 +1,80 @@
#[doc = "Register `TIFS` reader"]
pub struct R(crate::R<TIFS_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<TIFS_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<TIFS_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<TIFS_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `TIFS` writer"]
pub struct W(crate::W<TIFS_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<TIFS_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<TIFS_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<TIFS_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `TIFS` reader - Inter Frame Spacing in us"]
pub type TIFS_R = crate::FieldReader<u8, u8>;
#[doc = "Field `TIFS` writer - Inter Frame Spacing in us"]
pub type TIFS_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TIFS_SPEC, u8, u8, 8, O>;
impl R {
#[doc = "Bits 0:7 - Inter Frame Spacing in us"]
#[inline(always)]
pub fn tifs(&self) -> TIFS_R {
TIFS_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 0:7 - Inter Frame Spacing in us"]
#[inline(always)]
pub fn tifs(&mut self) -> TIFS_W<0> {
TIFS_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 = "Inter Frame Spacing in us\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 [tifs](index.html) module"]
pub struct TIFS_SPEC;
impl crate::RegisterSpec for TIFS_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [tifs::R](R) reader structure"]
impl crate::Readable for TIFS_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [tifs::W](W) writer structure"]
impl crate::Writable for TIFS_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets TIFS to value 0"]
impl crate::Resettable for TIFS_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+80
View File
@@ -0,0 +1,80 @@
#[doc = "Register `TXADDRESS` reader"]
pub struct R(crate::R<TXADDRESS_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<TXADDRESS_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<TXADDRESS_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<TXADDRESS_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `TXADDRESS` writer"]
pub struct W(crate::W<TXADDRESS_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<TXADDRESS_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<TXADDRESS_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<TXADDRESS_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `TXADDRESS` reader - Transmit address select"]
pub type TXADDRESS_R = crate::FieldReader<u8, u8>;
#[doc = "Field `TXADDRESS` writer - Transmit address select"]
pub type TXADDRESS_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TXADDRESS_SPEC, u8, u8, 3, O>;
impl R {
#[doc = "Bits 0:2 - Transmit address select"]
#[inline(always)]
pub fn txaddress(&self) -> TXADDRESS_R {
TXADDRESS_R::new((self.bits & 7) as u8)
}
}
impl W {
#[doc = "Bits 0:2 - Transmit address select"]
#[inline(always)]
pub fn txaddress(&mut self) -> TXADDRESS_W<0> {
TXADDRESS_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 = "Transmit address select\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 [txaddress](index.html) module"]
pub struct TXADDRESS_SPEC;
impl crate::RegisterSpec for TXADDRESS_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [txaddress::R](R) reader structure"]
impl crate::Readable for TXADDRESS_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [txaddress::W](W) writer structure"]
impl crate::Writable for TXADDRESS_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets TXADDRESS to value 0"]
impl crate::Resettable for TXADDRESS_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+220
View File
@@ -0,0 +1,220 @@
#[doc = "Register `TXPOWER` reader"]
pub struct R(crate::R<TXPOWER_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<TXPOWER_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<TXPOWER_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<TXPOWER_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `TXPOWER` writer"]
pub struct W(crate::W<TXPOWER_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<TXPOWER_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<TXPOWER_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<TXPOWER_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `TXPOWER` reader - RADIO output power."]
pub type TXPOWER_R = crate::FieldReader<u8, TXPOWER_A>;
#[doc = "RADIO output power.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum TXPOWER_A {
#[doc = "4: +4 dBm"]
POS4D_BM = 4,
#[doc = "3: +3 dBm"]
POS3D_BM = 3,
#[doc = "0: 0 dBm"]
_0D_BM = 0,
#[doc = "252: -4 dBm"]
NEG4D_BM = 252,
#[doc = "248: -8 dBm"]
NEG8D_BM = 248,
#[doc = "244: -12 dBm"]
NEG12D_BM = 244,
#[doc = "240: -16 dBm"]
NEG16D_BM = 240,
#[doc = "236: -20 dBm"]
NEG20D_BM = 236,
#[doc = "216: -40 dBm"]
NEG40D_BM = 216,
}
impl From<TXPOWER_A> for u8 {
#[inline(always)]
fn from(variant: TXPOWER_A) -> Self {
variant as _
}
}
impl TXPOWER_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> Option<TXPOWER_A> {
match self.bits {
4 => Some(TXPOWER_A::POS4D_BM),
3 => Some(TXPOWER_A::POS3D_BM),
0 => Some(TXPOWER_A::_0D_BM),
252 => Some(TXPOWER_A::NEG4D_BM),
248 => Some(TXPOWER_A::NEG8D_BM),
244 => Some(TXPOWER_A::NEG12D_BM),
240 => Some(TXPOWER_A::NEG16D_BM),
236 => Some(TXPOWER_A::NEG20D_BM),
216 => Some(TXPOWER_A::NEG40D_BM),
_ => None,
}
}
#[doc = "Checks if the value of the field is `POS4D_BM`"]
#[inline(always)]
pub fn is_pos4d_bm(&self) -> bool {
*self == TXPOWER_A::POS4D_BM
}
#[doc = "Checks if the value of the field is `POS3D_BM`"]
#[inline(always)]
pub fn is_pos3d_bm(&self) -> bool {
*self == TXPOWER_A::POS3D_BM
}
#[doc = "Checks if the value of the field is `_0D_BM`"]
#[inline(always)]
pub fn is_0d_bm(&self) -> bool {
*self == TXPOWER_A::_0D_BM
}
#[doc = "Checks if the value of the field is `NEG4D_BM`"]
#[inline(always)]
pub fn is_neg4d_bm(&self) -> bool {
*self == TXPOWER_A::NEG4D_BM
}
#[doc = "Checks if the value of the field is `NEG8D_BM`"]
#[inline(always)]
pub fn is_neg8d_bm(&self) -> bool {
*self == TXPOWER_A::NEG8D_BM
}
#[doc = "Checks if the value of the field is `NEG12D_BM`"]
#[inline(always)]
pub fn is_neg12d_bm(&self) -> bool {
*self == TXPOWER_A::NEG12D_BM
}
#[doc = "Checks if the value of the field is `NEG16D_BM`"]
#[inline(always)]
pub fn is_neg16d_bm(&self) -> bool {
*self == TXPOWER_A::NEG16D_BM
}
#[doc = "Checks if the value of the field is `NEG20D_BM`"]
#[inline(always)]
pub fn is_neg20d_bm(&self) -> bool {
*self == TXPOWER_A::NEG20D_BM
}
#[doc = "Checks if the value of the field is `NEG40D_BM`"]
#[inline(always)]
pub fn is_neg40d_bm(&self) -> bool {
*self == TXPOWER_A::NEG40D_BM
}
}
#[doc = "Field `TXPOWER` writer - RADIO output power."]
pub type TXPOWER_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, TXPOWER_SPEC, u8, TXPOWER_A, 8, O>;
impl<'a, const O: u8> TXPOWER_W<'a, O> {
#[doc = "+4 dBm"]
#[inline(always)]
pub fn pos4d_bm(self) -> &'a mut W {
self.variant(TXPOWER_A::POS4D_BM)
}
#[doc = "+3 dBm"]
#[inline(always)]
pub fn pos3d_bm(self) -> &'a mut W {
self.variant(TXPOWER_A::POS3D_BM)
}
#[doc = "0 dBm"]
#[inline(always)]
pub fn _0d_bm(self) -> &'a mut W {
self.variant(TXPOWER_A::_0D_BM)
}
#[doc = "-4 dBm"]
#[inline(always)]
pub fn neg4d_bm(self) -> &'a mut W {
self.variant(TXPOWER_A::NEG4D_BM)
}
#[doc = "-8 dBm"]
#[inline(always)]
pub fn neg8d_bm(self) -> &'a mut W {
self.variant(TXPOWER_A::NEG8D_BM)
}
#[doc = "-12 dBm"]
#[inline(always)]
pub fn neg12d_bm(self) -> &'a mut W {
self.variant(TXPOWER_A::NEG12D_BM)
}
#[doc = "-16 dBm"]
#[inline(always)]
pub fn neg16d_bm(self) -> &'a mut W {
self.variant(TXPOWER_A::NEG16D_BM)
}
#[doc = "-20 dBm"]
#[inline(always)]
pub fn neg20d_bm(self) -> &'a mut W {
self.variant(TXPOWER_A::NEG20D_BM)
}
#[doc = "-40 dBm"]
#[inline(always)]
pub fn neg40d_bm(self) -> &'a mut W {
self.variant(TXPOWER_A::NEG40D_BM)
}
}
impl R {
#[doc = "Bits 0:7 - RADIO output power."]
#[inline(always)]
pub fn txpower(&self) -> TXPOWER_R {
TXPOWER_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 0:7 - RADIO output power."]
#[inline(always)]
pub fn txpower(&mut self) -> TXPOWER_W<0> {
TXPOWER_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 = "Output power\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 [txpower](index.html) module"]
pub struct TXPOWER_SPEC;
impl crate::RegisterSpec for TXPOWER_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [txpower::R](R) reader structure"]
impl crate::Readable for TXPOWER_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [txpower::W](W) writer structure"]
impl crate::Writable for TXPOWER_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets TXPOWER to value 0"]
impl crate::Resettable for TXPOWER_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+64
View File
@@ -0,0 +1,64 @@
#[doc = "Register `UNUSED0` reader"]
pub struct R(crate::R<UNUSED0_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<UNUSED0_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<UNUSED0_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<UNUSED0_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `UNUSED0` writer"]
pub struct W(crate::W<UNUSED0_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<UNUSED0_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<UNUSED0_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<UNUSED0_SPEC>) -> Self {
W(writer)
}
}
impl W {
#[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 = "Unspecified\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 [unused0](index.html) module"]
pub struct UNUSED0_SPEC;
impl crate::RegisterSpec for UNUSED0_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [unused0::R](R) reader structure"]
impl crate::Readable for UNUSED0_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [unused0::W](W) writer structure"]
impl crate::Writable for UNUSED0_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets UNUSED0 to value 0"]
impl crate::Resettable for UNUSED0_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}