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

+64
View File
@@ -0,0 +1,64 @@
#[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)
}
}
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 base address 0. Decision point: START task.\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
}
}
+64
View File
@@ -0,0 +1,64 @@
#[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)
}
}
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 base address 1. Decision point: START task.\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
}
}
+64
View File
@@ -0,0 +1,64 @@
#[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)
}
}
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 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. Decision point: START task."]
pub type LEN_R = crate::FieldReader<u8, LEN_A>;
#[doc = "CRC length. Decision point: START task.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum LEN_A {
#[doc = "0: CRC calculation disabled."]
DISABLED = 0,
#[doc = "1: One byte long CRC."]
ONE = 1,
#[doc = "2: Two bytes long CRC."]
TWO = 2,
#[doc = "3: Three bytes long CRC."]
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. Decision point: START task."]
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 calculation disabled."]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(LEN_A::DISABLED)
}
#[doc = "One byte long CRC."]
#[inline(always)]
pub fn one(self) -> &'a mut W {
self.variant(LEN_A::ONE)
}
#[doc = "Two bytes long CRC."]
#[inline(always)]
pub fn two(self) -> &'a mut W {
self.variant(LEN_A::TWO)
}
#[doc = "Three bytes long CRC."]
#[inline(always)]
pub fn three(self) -> &'a mut W {
self.variant(LEN_A::THREE)
}
}
#[doc = "Field `SKIPADDR` reader - Leave packet address field out of the CRC calculation. Decision point: START task."]
pub type SKIPADDR_R = crate::BitReader<SKIPADDR_A>;
#[doc = "Leave packet address field out of the CRC calculation. Decision point: START task.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SKIPADDR_A {
#[doc = "0: Include packet address in CRC calculation."]
INCLUDE = 0,
#[doc = "1: Packet address is skipped in CRC calculation. 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 - Leave packet address field out of the CRC calculation. Decision point: START task."]
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 = "Include packet address in CRC calculation."]
#[inline(always)]
pub fn include(self) -> &'a mut W {
self.variant(SKIPADDR_A::INCLUDE)
}
#[doc = "Packet address is skipped in CRC calculation. 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. Decision point: START task."]
#[inline(always)]
pub fn len(&self) -> LEN_R {
LEN_R::new((self.bits & 3) as u8)
}
#[doc = "Bit 8 - Leave packet address field out of the CRC calculation. Decision point: START task."]
#[inline(always)]
pub fn skipaddr(&self) -> SKIPADDR_R {
SKIPADDR_R::new(((self.bits >> 8) & 1) != 0)
}
}
impl W {
#[doc = "Bits 0:1 - CRC length. Decision point: START task."]
#[inline(always)]
pub fn len(&mut self) -> LEN_W<0> {
LEN_W::new(self)
}
#[doc = "Bit 8 - Leave packet address field out of the CRC calculation. Decision point: START task."]
#[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 - Initial value for CRC calculation. Decision point: START task."]
pub type CRCINIT_R = crate::FieldReader<u32, u32>;
#[doc = "Field `CRCINIT` writer - Initial value for CRC calculation. Decision point: START task."]
pub type CRCINIT_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CRCINIT_SPEC, u32, u32, 24, O>;
impl R {
#[doc = "Bits 0:23 - Initial value for CRC calculation. Decision point: START task."]
#[inline(always)]
pub fn crcinit(&self) -> CRCINIT_R {
CRCINIT_R::new((self.bits & 0x00ff_ffff) as u32)
}
}
impl W {
#[doc = "Bits 0:23 - Initial value for CRC calculation. Decision point: START task."]
#[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. Decision point: START task."]
pub type CRCPOLY_R = crate::FieldReader<u32, u32>;
#[doc = "Field `CRCPOLY` writer - CRC polynomial. Decision point: START task."]
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. Decision point: START task."]
#[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. Decision point: START task."]
#[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 received packet."]
pub type CRCSTATUS_R = crate::BitReader<CRCSTATUS_A>;
#[doc = "CRC status of received packet.\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 received packet."]
#[inline(always)]
pub fn crcstatus(&self) -> CRCSTATUS_R {
CRCSTATUS_R::new((self.bits & 1) != 0)
}
}
#[doc = "CRC status of 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 [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
}
}
+65
View File
@@ -0,0 +1,65 @@
#[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)
}
}
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 = "Device address base segment.\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
}
}
+42
View File
@@ -0,0 +1,42 @@
#[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 - Index (n) of device address (see DAB\\[n\\]
and DAP\\[n\\]) that obtained an address match."]
pub type DAI_R = crate::FieldReader<u8, u8>;
impl R {
#[doc = "Bits 0:2 - Index (n) of device address (see DAB\\[n\\]
and DAP\\[n\\]) that obtained an address match."]
#[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."]
pub type DAP_R = crate::FieldReader<u16, u16>;
#[doc = "Field `DAP` writer - Device address prefix."]
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."]
#[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."]
#[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 = "Device address prefix.\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 0 corresponds to Position 0 of the LSFR, Bit 1 to position 5... Decision point: TXEN or RXEN task."]
pub type DATAWHITEIV_R = crate::FieldReader<u8, u8>;
#[doc = "Field `DATAWHITEIV` writer - Data whitening initial value. Bit 0 corresponds to Position 0 of the LSFR, Bit 1 to position 5... Decision point: TXEN or RXEN task."]
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 0 corresponds to Position 0 of the LSFR, Bit 1 to position 5... Decision point: TXEN or RXEN task."]
#[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 0 corresponds to Position 0 of the LSFR, Bit 1 to position 5... Decision point: TXEN or RXEN task."]
#[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 event.\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 specified in BCC register.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [events_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_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 = "Disable event.\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 = "End event.\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 = "Payload event.\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 = "Ready event.\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 the receive signal strength complete. A new RSSI sample is ready for readout at the RSSISAMPLE register.\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [events_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
}
}
+80
View File
@@ -0,0 +1,80 @@
#[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 offset in MHz: RF Frequency = 2400 + FREQUENCY (MHz). Decision point: TXEN or RXEN task."]
pub type FREQUENCY_R = crate::FieldReader<u8, u8>;
#[doc = "Field `FREQUENCY` writer - Radio channel frequency offset in MHz: RF Frequency = 2400 + FREQUENCY (MHz). Decision point: TXEN or RXEN task."]
pub type FREQUENCY_W<'a, const O: u8> = crate::FieldWriter<'a, u32, FREQUENCY_SPEC, u8, u8, 7, O>;
impl R {
#[doc = "Bits 0:6 - Radio channel frequency offset in MHz: RF Frequency = 2400 + FREQUENCY (MHz). Decision point: TXEN or RXEN task."]
#[inline(always)]
pub fn frequency(&self) -> FREQUENCY_R {
FREQUENCY_R::new((self.bits & 0x7f) as u8)
}
}
impl W {
#[doc = "Bits 0:6 - Radio channel frequency offset in MHz: RF Frequency = 2400 + FREQUENCY (MHz). Decision point: TXEN or RXEN task."]
#[inline(always)]
pub fn frequency(&mut self) -> FREQUENCY_W<0> {
FREQUENCY_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
}
}
+669
View File
@@ -0,0 +1,669 @@
#[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 - Disable interrupt on READY event."]
pub type READY_R = crate::BitReader<READY_A>;
#[doc = "Disable interrupt on READY event.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum READY_A {
#[doc = "0: Interrupt disabled."]
DISABLED = 0,
#[doc = "1: Interrupt 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 = "Disable interrupt on READY event.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum READY_AW {
#[doc = "1: Disable interrupt on write."]
CLEAR = 1,
}
impl From<READY_AW> for bool {
#[inline(always)]
fn from(variant: READY_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `READY` writer - Disable interrupt on 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 interrupt on write."]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(READY_AW::CLEAR)
}
}
#[doc = "Field `ADDRESS` reader - Disable interrupt on ADDRESS event."]
pub type ADDRESS_R = crate::BitReader<ADDRESS_A>;
#[doc = "Disable interrupt on ADDRESS event.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ADDRESS_A {
#[doc = "0: Interrupt disabled."]
DISABLED = 0,
#[doc = "1: Interrupt 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 = "Disable interrupt on ADDRESS event.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ADDRESS_AW {
#[doc = "1: Disable interrupt on write."]
CLEAR = 1,
}
impl From<ADDRESS_AW> for bool {
#[inline(always)]
fn from(variant: ADDRESS_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `ADDRESS` writer - Disable interrupt on 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 interrupt on write."]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(ADDRESS_AW::CLEAR)
}
}
#[doc = "Field `PAYLOAD` reader - Disable interrupt on PAYLOAD event."]
pub type PAYLOAD_R = crate::BitReader<PAYLOAD_A>;
#[doc = "Disable interrupt on PAYLOAD event.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum PAYLOAD_A {
#[doc = "0: Interrupt disabled."]
DISABLED = 0,
#[doc = "1: Interrupt 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 = "Disable interrupt on PAYLOAD event.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum PAYLOAD_AW {
#[doc = "1: Disable interrupt on write."]
CLEAR = 1,
}
impl From<PAYLOAD_AW> for bool {
#[inline(always)]
fn from(variant: PAYLOAD_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `PAYLOAD` writer - Disable interrupt on 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 interrupt on write."]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(PAYLOAD_AW::CLEAR)
}
}
#[doc = "Field `END` reader - Disable interrupt on END event."]
pub type END_R = crate::BitReader<END_A>;
#[doc = "Disable interrupt on END event.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum END_A {
#[doc = "0: Interrupt disabled."]
DISABLED = 0,
#[doc = "1: Interrupt 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 = "Disable interrupt on END event.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum END_AW {
#[doc = "1: Disable interrupt on write."]
CLEAR = 1,
}
impl From<END_AW> for bool {
#[inline(always)]
fn from(variant: END_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `END` writer - Disable interrupt on 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 interrupt on write."]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(END_AW::CLEAR)
}
}
#[doc = "Field `DISABLED` reader - Disable interrupt on DISABLED event."]
pub type DISABLED_R = crate::BitReader<DISABLED_A>;
#[doc = "Disable interrupt on DISABLED event.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DISABLED_A {
#[doc = "0: Interrupt disabled."]
DISABLED = 0,
#[doc = "1: Interrupt 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 = "Disable interrupt on DISABLED event.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DISABLED_AW {
#[doc = "1: Disable interrupt on write."]
CLEAR = 1,
}
impl From<DISABLED_AW> for bool {
#[inline(always)]
fn from(variant: DISABLED_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `DISABLED` writer - Disable interrupt on 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 interrupt on write."]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(DISABLED_AW::CLEAR)
}
}
#[doc = "Field `DEVMATCH` reader - Disable interrupt on DEVMATCH event."]
pub type DEVMATCH_R = crate::BitReader<DEVMATCH_A>;
#[doc = "Disable interrupt on DEVMATCH event.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DEVMATCH_A {
#[doc = "0: Interrupt disabled."]
DISABLED = 0,
#[doc = "1: Interrupt 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 = "Disable interrupt on DEVMATCH event.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DEVMATCH_AW {
#[doc = "1: Disable interrupt on write."]
CLEAR = 1,
}
impl From<DEVMATCH_AW> for bool {
#[inline(always)]
fn from(variant: DEVMATCH_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `DEVMATCH` writer - Disable interrupt on 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 interrupt on write."]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(DEVMATCH_AW::CLEAR)
}
}
#[doc = "Field `DEVMISS` reader - Disable interrupt on DEVMISS event."]
pub type DEVMISS_R = crate::BitReader<DEVMISS_A>;
#[doc = "Disable interrupt on DEVMISS event.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DEVMISS_A {
#[doc = "0: Interrupt disabled."]
DISABLED = 0,
#[doc = "1: Interrupt 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 = "Disable interrupt on DEVMISS event.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DEVMISS_AW {
#[doc = "1: Disable interrupt on write."]
CLEAR = 1,
}
impl From<DEVMISS_AW> for bool {
#[inline(always)]
fn from(variant: DEVMISS_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `DEVMISS` writer - Disable interrupt on 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 interrupt on write."]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(DEVMISS_AW::CLEAR)
}
}
#[doc = "Field `RSSIEND` reader - Disable interrupt on RSSIEND event."]
pub type RSSIEND_R = crate::BitReader<RSSIEND_A>;
#[doc = "Disable interrupt on RSSIEND event.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RSSIEND_A {
#[doc = "0: Interrupt disabled."]
DISABLED = 0,
#[doc = "1: Interrupt 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 = "Disable interrupt on RSSIEND event.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RSSIEND_AW {
#[doc = "1: Disable interrupt on write."]
CLEAR = 1,
}
impl From<RSSIEND_AW> for bool {
#[inline(always)]
fn from(variant: RSSIEND_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `RSSIEND` writer - Disable interrupt on 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 interrupt on write."]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(RSSIEND_AW::CLEAR)
}
}
#[doc = "Field `BCMATCH` reader - Disable interrupt on BCMATCH event."]
pub type BCMATCH_R = crate::BitReader<BCMATCH_A>;
#[doc = "Disable interrupt on BCMATCH event.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum BCMATCH_A {
#[doc = "0: Interrupt disabled."]
DISABLED = 0,
#[doc = "1: Interrupt 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 = "Disable interrupt on BCMATCH event.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum BCMATCH_AW {
#[doc = "1: Disable interrupt on write."]
CLEAR = 1,
}
impl From<BCMATCH_AW> for bool {
#[inline(always)]
fn from(variant: BCMATCH_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `BCMATCH` writer - Disable interrupt on 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 interrupt on write."]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(BCMATCH_AW::CLEAR)
}
}
impl R {
#[doc = "Bit 0 - Disable interrupt on READY event."]
#[inline(always)]
pub fn ready(&self) -> READY_R {
READY_R::new((self.bits & 1) != 0)
}
#[doc = "Bit 1 - Disable interrupt on ADDRESS event."]
#[inline(always)]
pub fn address(&self) -> ADDRESS_R {
ADDRESS_R::new(((self.bits >> 1) & 1) != 0)
}
#[doc = "Bit 2 - Disable interrupt on PAYLOAD event."]
#[inline(always)]
pub fn payload(&self) -> PAYLOAD_R {
PAYLOAD_R::new(((self.bits >> 2) & 1) != 0)
}
#[doc = "Bit 3 - Disable interrupt on END event."]
#[inline(always)]
pub fn end(&self) -> END_R {
END_R::new(((self.bits >> 3) & 1) != 0)
}
#[doc = "Bit 4 - Disable interrupt on DISABLED event."]
#[inline(always)]
pub fn disabled(&self) -> DISABLED_R {
DISABLED_R::new(((self.bits >> 4) & 1) != 0)
}
#[doc = "Bit 5 - Disable interrupt on DEVMATCH event."]
#[inline(always)]
pub fn devmatch(&self) -> DEVMATCH_R {
DEVMATCH_R::new(((self.bits >> 5) & 1) != 0)
}
#[doc = "Bit 6 - Disable interrupt on DEVMISS event."]
#[inline(always)]
pub fn devmiss(&self) -> DEVMISS_R {
DEVMISS_R::new(((self.bits >> 6) & 1) != 0)
}
#[doc = "Bit 7 - Disable interrupt on RSSIEND event."]
#[inline(always)]
pub fn rssiend(&self) -> RSSIEND_R {
RSSIEND_R::new(((self.bits >> 7) & 1) != 0)
}
#[doc = "Bit 10 - Disable interrupt on BCMATCH event."]
#[inline(always)]
pub fn bcmatch(&self) -> BCMATCH_R {
BCMATCH_R::new(((self.bits >> 10) & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Disable interrupt on READY event."]
#[inline(always)]
pub fn ready(&mut self) -> READY_W<0> {
READY_W::new(self)
}
#[doc = "Bit 1 - Disable interrupt on ADDRESS event."]
#[inline(always)]
pub fn address(&mut self) -> ADDRESS_W<1> {
ADDRESS_W::new(self)
}
#[doc = "Bit 2 - Disable interrupt on PAYLOAD event."]
#[inline(always)]
pub fn payload(&mut self) -> PAYLOAD_W<2> {
PAYLOAD_W::new(self)
}
#[doc = "Bit 3 - Disable interrupt on END event."]
#[inline(always)]
pub fn end(&mut self) -> END_W<3> {
END_W::new(self)
}
#[doc = "Bit 4 - Disable interrupt on DISABLED event."]
#[inline(always)]
pub fn disabled(&mut self) -> DISABLED_W<4> {
DISABLED_W::new(self)
}
#[doc = "Bit 5 - Disable interrupt on DEVMATCH event."]
#[inline(always)]
pub fn devmatch(&mut self) -> DEVMATCH_W<5> {
DEVMATCH_W::new(self)
}
#[doc = "Bit 6 - Disable interrupt on DEVMISS event."]
#[inline(always)]
pub fn devmiss(&mut self) -> DEVMISS_W<6> {
DEVMISS_W::new(self)
}
#[doc = "Bit 7 - Disable interrupt on RSSIEND event."]
#[inline(always)]
pub fn rssiend(&mut self) -> RSSIEND_W<7> {
RSSIEND_W::new(self)
}
#[doc = "Bit 10 - Disable interrupt on BCMATCH event."]
#[inline(always)]
pub fn bcmatch(&mut self) -> BCMATCH_W<10> {
BCMATCH_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 = "Interrupt enable clear 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 [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
}
}
+669
View File
@@ -0,0 +1,669 @@
#[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 - Enable interrupt on READY event."]
pub type READY_R = crate::BitReader<READY_A>;
#[doc = "Enable interrupt on READY event.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum READY_A {
#[doc = "0: Interrupt disabled."]
DISABLED = 0,
#[doc = "1: Interrupt 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 = "Enable interrupt on READY event.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum READY_AW {
#[doc = "1: Enable interrupt on write."]
SET = 1,
}
impl From<READY_AW> for bool {
#[inline(always)]
fn from(variant: READY_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `READY` writer - Enable interrupt on 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 interrupt on write."]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(READY_AW::SET)
}
}
#[doc = "Field `ADDRESS` reader - Enable interrupt on ADDRESS event."]
pub type ADDRESS_R = crate::BitReader<ADDRESS_A>;
#[doc = "Enable interrupt on ADDRESS event.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ADDRESS_A {
#[doc = "0: Interrupt disabled."]
DISABLED = 0,
#[doc = "1: Interrupt 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 = "Enable interrupt on ADDRESS event.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ADDRESS_AW {
#[doc = "1: Enable interrupt on write."]
SET = 1,
}
impl From<ADDRESS_AW> for bool {
#[inline(always)]
fn from(variant: ADDRESS_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `ADDRESS` writer - Enable interrupt on 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 interrupt on write."]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(ADDRESS_AW::SET)
}
}
#[doc = "Field `PAYLOAD` reader - Enable interrupt on PAYLOAD event."]
pub type PAYLOAD_R = crate::BitReader<PAYLOAD_A>;
#[doc = "Enable interrupt on PAYLOAD event.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum PAYLOAD_A {
#[doc = "0: Interrupt disabled."]
DISABLED = 0,
#[doc = "1: Interrupt 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 = "Enable interrupt on PAYLOAD event.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum PAYLOAD_AW {
#[doc = "1: Enable interrupt on write."]
SET = 1,
}
impl From<PAYLOAD_AW> for bool {
#[inline(always)]
fn from(variant: PAYLOAD_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `PAYLOAD` writer - Enable interrupt on 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 interrupt on write."]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(PAYLOAD_AW::SET)
}
}
#[doc = "Field `END` reader - Enable interrupt on END event."]
pub type END_R = crate::BitReader<END_A>;
#[doc = "Enable interrupt on END event.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum END_A {
#[doc = "0: Interrupt disabled."]
DISABLED = 0,
#[doc = "1: Interrupt 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 = "Enable interrupt on END event.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum END_AW {
#[doc = "1: Enable interrupt on write."]
SET = 1,
}
impl From<END_AW> for bool {
#[inline(always)]
fn from(variant: END_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `END` writer - Enable interrupt on 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 interrupt on write."]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(END_AW::SET)
}
}
#[doc = "Field `DISABLED` reader - Enable interrupt on DISABLED event."]
pub type DISABLED_R = crate::BitReader<DISABLED_A>;
#[doc = "Enable interrupt on DISABLED event.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DISABLED_A {
#[doc = "0: Interrupt disabled."]
DISABLED = 0,
#[doc = "1: Interrupt 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 = "Enable interrupt on DISABLED event.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DISABLED_AW {
#[doc = "1: Enable interrupt on write."]
SET = 1,
}
impl From<DISABLED_AW> for bool {
#[inline(always)]
fn from(variant: DISABLED_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `DISABLED` writer - Enable interrupt on 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 interrupt on write."]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(DISABLED_AW::SET)
}
}
#[doc = "Field `DEVMATCH` reader - Enable interrupt on DEVMATCH event."]
pub type DEVMATCH_R = crate::BitReader<DEVMATCH_A>;
#[doc = "Enable interrupt on DEVMATCH event.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DEVMATCH_A {
#[doc = "0: Interrupt disabled."]
DISABLED = 0,
#[doc = "1: Interrupt 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 = "Enable interrupt on DEVMATCH event.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DEVMATCH_AW {
#[doc = "1: Enable interrupt on write."]
SET = 1,
}
impl From<DEVMATCH_AW> for bool {
#[inline(always)]
fn from(variant: DEVMATCH_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `DEVMATCH` writer - Enable interrupt on 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 interrupt on write."]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(DEVMATCH_AW::SET)
}
}
#[doc = "Field `DEVMISS` reader - Enable interrupt on DEVMISS event."]
pub type DEVMISS_R = crate::BitReader<DEVMISS_A>;
#[doc = "Enable interrupt on DEVMISS event.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DEVMISS_A {
#[doc = "0: Interrupt disabled."]
DISABLED = 0,
#[doc = "1: Interrupt 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 = "Enable interrupt on DEVMISS event.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DEVMISS_AW {
#[doc = "1: Enable interrupt on write."]
SET = 1,
}
impl From<DEVMISS_AW> for bool {
#[inline(always)]
fn from(variant: DEVMISS_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `DEVMISS` writer - Enable interrupt on 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 interrupt on write."]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(DEVMISS_AW::SET)
}
}
#[doc = "Field `RSSIEND` reader - Enable interrupt on RSSIEND event."]
pub type RSSIEND_R = crate::BitReader<RSSIEND_A>;
#[doc = "Enable interrupt on RSSIEND event.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RSSIEND_A {
#[doc = "0: Interrupt disabled."]
DISABLED = 0,
#[doc = "1: Interrupt 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 = "Enable interrupt on RSSIEND event.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RSSIEND_AW {
#[doc = "1: Enable interrupt on write."]
SET = 1,
}
impl From<RSSIEND_AW> for bool {
#[inline(always)]
fn from(variant: RSSIEND_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `RSSIEND` writer - Enable interrupt on 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 interrupt on write."]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(RSSIEND_AW::SET)
}
}
#[doc = "Field `BCMATCH` reader - Enable interrupt on BCMATCH event."]
pub type BCMATCH_R = crate::BitReader<BCMATCH_A>;
#[doc = "Enable interrupt on BCMATCH event.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum BCMATCH_A {
#[doc = "0: Interrupt disabled."]
DISABLED = 0,
#[doc = "1: Interrupt 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 = "Enable interrupt on BCMATCH event.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum BCMATCH_AW {
#[doc = "1: Enable interrupt on write."]
SET = 1,
}
impl From<BCMATCH_AW> for bool {
#[inline(always)]
fn from(variant: BCMATCH_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `BCMATCH` writer - Enable interrupt on 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 interrupt on write."]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(BCMATCH_AW::SET)
}
}
impl R {
#[doc = "Bit 0 - Enable interrupt on READY event."]
#[inline(always)]
pub fn ready(&self) -> READY_R {
READY_R::new((self.bits & 1) != 0)
}
#[doc = "Bit 1 - Enable interrupt on ADDRESS event."]
#[inline(always)]
pub fn address(&self) -> ADDRESS_R {
ADDRESS_R::new(((self.bits >> 1) & 1) != 0)
}
#[doc = "Bit 2 - Enable interrupt on PAYLOAD event."]
#[inline(always)]
pub fn payload(&self) -> PAYLOAD_R {
PAYLOAD_R::new(((self.bits >> 2) & 1) != 0)
}
#[doc = "Bit 3 - Enable interrupt on END event."]
#[inline(always)]
pub fn end(&self) -> END_R {
END_R::new(((self.bits >> 3) & 1) != 0)
}
#[doc = "Bit 4 - Enable interrupt on DISABLED event."]
#[inline(always)]
pub fn disabled(&self) -> DISABLED_R {
DISABLED_R::new(((self.bits >> 4) & 1) != 0)
}
#[doc = "Bit 5 - Enable interrupt on DEVMATCH event."]
#[inline(always)]
pub fn devmatch(&self) -> DEVMATCH_R {
DEVMATCH_R::new(((self.bits >> 5) & 1) != 0)
}
#[doc = "Bit 6 - Enable interrupt on DEVMISS event."]
#[inline(always)]
pub fn devmiss(&self) -> DEVMISS_R {
DEVMISS_R::new(((self.bits >> 6) & 1) != 0)
}
#[doc = "Bit 7 - Enable interrupt on RSSIEND event."]
#[inline(always)]
pub fn rssiend(&self) -> RSSIEND_R {
RSSIEND_R::new(((self.bits >> 7) & 1) != 0)
}
#[doc = "Bit 10 - Enable interrupt on BCMATCH event."]
#[inline(always)]
pub fn bcmatch(&self) -> BCMATCH_R {
BCMATCH_R::new(((self.bits >> 10) & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Enable interrupt on READY event."]
#[inline(always)]
pub fn ready(&mut self) -> READY_W<0> {
READY_W::new(self)
}
#[doc = "Bit 1 - Enable interrupt on ADDRESS event."]
#[inline(always)]
pub fn address(&mut self) -> ADDRESS_W<1> {
ADDRESS_W::new(self)
}
#[doc = "Bit 2 - Enable interrupt on PAYLOAD event."]
#[inline(always)]
pub fn payload(&mut self) -> PAYLOAD_W<2> {
PAYLOAD_W::new(self)
}
#[doc = "Bit 3 - Enable interrupt on END event."]
#[inline(always)]
pub fn end(&mut self) -> END_W<3> {
END_W::new(self)
}
#[doc = "Bit 4 - Enable interrupt on DISABLED event."]
#[inline(always)]
pub fn disabled(&mut self) -> DISABLED_W<4> {
DISABLED_W::new(self)
}
#[doc = "Bit 5 - Enable interrupt on DEVMATCH event."]
#[inline(always)]
pub fn devmatch(&mut self) -> DEVMATCH_W<5> {
DEVMATCH_W::new(self)
}
#[doc = "Bit 6 - Enable interrupt on DEVMISS event."]
#[inline(always)]
pub fn devmiss(&mut self) -> DEVMISS_W<6> {
DEVMISS_W::new(self)
}
#[doc = "Bit 7 - Enable interrupt on RSSIEND event."]
#[inline(always)]
pub fn rssiend(&mut self) -> RSSIEND_W<7> {
RSSIEND_W::new(self)
}
#[doc = "Bit 10 - Enable interrupt on BCMATCH event."]
#[inline(always)]
pub fn bcmatch(&mut self) -> BCMATCH_W<10> {
BCMATCH_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 = "Interrupt enable set 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 [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
}
}
+154
View File
@@ -0,0 +1,154 @@
#[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. Decision point: TXEN or RXEN task."]
pub type MODE_R = crate::FieldReader<u8, MODE_A>;
#[doc = "Radio data rate and modulation setting. Decision point: TXEN or RXEN task.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum MODE_A {
#[doc = "0: 1Mbit/s Nordic propietary radio mode."]
NRF_1MBIT = 0,
#[doc = "1: 2Mbit/s Nordic propietary radio mode."]
NRF_2MBIT = 1,
#[doc = "2: 250kbit/s Nordic propietary radio mode."]
NRF_250KBIT = 2,
#[doc = "3: 1Mbit/s Bluetooth Low Energy"]
BLE_1MBIT = 3,
}
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) -> MODE_A {
match self.bits {
0 => MODE_A::NRF_1MBIT,
1 => MODE_A::NRF_2MBIT,
2 => MODE_A::NRF_250KBIT,
3 => MODE_A::BLE_1MBIT,
_ => unreachable!(),
}
}
#[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 = "Field `MODE` writer - Radio data rate and modulation setting. Decision point: TXEN or RXEN task."]
pub type MODE_W<'a, const O: u8> = crate::FieldWriterSafe<'a, u32, MODE_SPEC, u8, MODE_A, 2, O>;
impl<'a, const O: u8> MODE_W<'a, O> {
#[doc = "1Mbit/s Nordic propietary radio mode."]
#[inline(always)]
pub fn nrf_1mbit(self) -> &'a mut W {
self.variant(MODE_A::NRF_1MBIT)
}
#[doc = "2Mbit/s Nordic propietary radio mode."]
#[inline(always)]
pub fn nrf_2mbit(self) -> &'a mut W {
self.variant(MODE_A::NRF_2MBIT)
}
#[doc = "250kbit/s Nordic propietary radio mode."]
#[inline(always)]
pub fn nrf_250kbit(self) -> &'a mut W {
self.variant(MODE_A::NRF_250KBIT)
}
#[doc = "1Mbit/s Bluetooth Low Energy"]
#[inline(always)]
pub fn ble_1mbit(self) -> &'a mut W {
self.variant(MODE_A::BLE_1MBIT)
}
}
impl R {
#[doc = "Bits 0:1 - Radio data rate and modulation setting. Decision point: TXEN or RXEN task."]
#[inline(always)]
pub fn mode(&self) -> MODE_R {
MODE_R::new((self.bits & 3) as u8)
}
}
impl W {
#[doc = "Bits 0:1 - Radio data rate and modulation setting. Decision point: TXEN or RXEN task."]
#[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
}
}
+81
View File
@@ -0,0 +1,81 @@
#[doc = "Register `OVERRIDE0` reader"]
pub struct R(crate::R<OVERRIDE0_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<OVERRIDE0_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<OVERRIDE0_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<OVERRIDE0_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `OVERRIDE0` writer"]
pub struct W(crate::W<OVERRIDE0_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<OVERRIDE0_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<OVERRIDE0_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<OVERRIDE0_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `OVERRIDE0` reader - Trim value override 0."]
pub type OVERRIDE0_R = crate::FieldReader<u32, u32>;
#[doc = "Field `OVERRIDE0` writer - Trim value override 0."]
pub type OVERRIDE0_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, OVERRIDE0_SPEC, u32, u32, 32, O>;
impl R {
#[doc = "Bits 0:31 - Trim value override 0."]
#[inline(always)]
pub fn override0(&self) -> OVERRIDE0_R {
OVERRIDE0_R::new(self.bits)
}
}
impl W {
#[doc = "Bits 0:31 - Trim value override 0."]
#[inline(always)]
pub fn override0(&mut self) -> OVERRIDE0_W<0> {
OVERRIDE0_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 = "Trim value override 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 [override0](index.html) module"]
pub struct OVERRIDE0_SPEC;
impl crate::RegisterSpec for OVERRIDE0_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [override0::R](R) reader structure"]
impl crate::Readable for OVERRIDE0_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [override0::W](W) writer structure"]
impl crate::Writable for OVERRIDE0_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets OVERRIDE0 to value 0"]
impl crate::Resettable for OVERRIDE0_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+81
View File
@@ -0,0 +1,81 @@
#[doc = "Register `OVERRIDE1` reader"]
pub struct R(crate::R<OVERRIDE1_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<OVERRIDE1_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<OVERRIDE1_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<OVERRIDE1_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `OVERRIDE1` writer"]
pub struct W(crate::W<OVERRIDE1_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<OVERRIDE1_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<OVERRIDE1_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<OVERRIDE1_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `OVERRIDE1` reader - Trim value override 1."]
pub type OVERRIDE1_R = crate::FieldReader<u32, u32>;
#[doc = "Field `OVERRIDE1` writer - Trim value override 1."]
pub type OVERRIDE1_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, OVERRIDE1_SPEC, u32, u32, 32, O>;
impl R {
#[doc = "Bits 0:31 - Trim value override 1."]
#[inline(always)]
pub fn override1(&self) -> OVERRIDE1_R {
OVERRIDE1_R::new(self.bits)
}
}
impl W {
#[doc = "Bits 0:31 - Trim value override 1."]
#[inline(always)]
pub fn override1(&mut self) -> OVERRIDE1_W<0> {
OVERRIDE1_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 = "Trim value override 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 [override1](index.html) module"]
pub struct OVERRIDE1_SPEC;
impl crate::RegisterSpec for OVERRIDE1_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [override1::R](R) reader structure"]
impl crate::Readable for OVERRIDE1_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [override1::W](W) writer structure"]
impl crate::Writable for OVERRIDE1_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets OVERRIDE1 to value 0"]
impl crate::Resettable for OVERRIDE1_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+81
View File
@@ -0,0 +1,81 @@
#[doc = "Register `OVERRIDE2` reader"]
pub struct R(crate::R<OVERRIDE2_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<OVERRIDE2_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<OVERRIDE2_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<OVERRIDE2_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `OVERRIDE2` writer"]
pub struct W(crate::W<OVERRIDE2_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<OVERRIDE2_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<OVERRIDE2_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<OVERRIDE2_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `OVERRIDE2` reader - Trim value override 2."]
pub type OVERRIDE2_R = crate::FieldReader<u32, u32>;
#[doc = "Field `OVERRIDE2` writer - Trim value override 2."]
pub type OVERRIDE2_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, OVERRIDE2_SPEC, u32, u32, 32, O>;
impl R {
#[doc = "Bits 0:31 - Trim value override 2."]
#[inline(always)]
pub fn override2(&self) -> OVERRIDE2_R {
OVERRIDE2_R::new(self.bits)
}
}
impl W {
#[doc = "Bits 0:31 - Trim value override 2."]
#[inline(always)]
pub fn override2(&mut self) -> OVERRIDE2_W<0> {
OVERRIDE2_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 = "Trim value override register 2.\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 [override2](index.html) module"]
pub struct OVERRIDE2_SPEC;
impl crate::RegisterSpec for OVERRIDE2_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [override2::R](R) reader structure"]
impl crate::Readable for OVERRIDE2_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [override2::W](W) writer structure"]
impl crate::Writable for OVERRIDE2_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets OVERRIDE2 to value 0"]
impl crate::Resettable for OVERRIDE2_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+81
View File
@@ -0,0 +1,81 @@
#[doc = "Register `OVERRIDE3` reader"]
pub struct R(crate::R<OVERRIDE3_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<OVERRIDE3_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<OVERRIDE3_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<OVERRIDE3_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `OVERRIDE3` writer"]
pub struct W(crate::W<OVERRIDE3_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<OVERRIDE3_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<OVERRIDE3_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<OVERRIDE3_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `OVERRIDE3` reader - Trim value override 3."]
pub type OVERRIDE3_R = crate::FieldReader<u32, u32>;
#[doc = "Field `OVERRIDE3` writer - Trim value override 3."]
pub type OVERRIDE3_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, OVERRIDE3_SPEC, u32, u32, 32, O>;
impl R {
#[doc = "Bits 0:31 - Trim value override 3."]
#[inline(always)]
pub fn override3(&self) -> OVERRIDE3_R {
OVERRIDE3_R::new(self.bits)
}
}
impl W {
#[doc = "Bits 0:31 - Trim value override 3."]
#[inline(always)]
pub fn override3(&mut self) -> OVERRIDE3_W<0> {
OVERRIDE3_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 = "Trim value override register 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 [override3](index.html) module"]
pub struct OVERRIDE3_SPEC;
impl crate::RegisterSpec for OVERRIDE3_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [override3::R](R) reader structure"]
impl crate::Readable for OVERRIDE3_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [override3::W](W) writer structure"]
impl crate::Writable for OVERRIDE3_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets OVERRIDE3 to value 0"]
impl crate::Resettable for OVERRIDE3_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+141
View File
@@ -0,0 +1,141 @@
#[doc = "Register `OVERRIDE4` reader"]
pub struct R(crate::R<OVERRIDE4_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<OVERRIDE4_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<OVERRIDE4_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<OVERRIDE4_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `OVERRIDE4` writer"]
pub struct W(crate::W<OVERRIDE4_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<OVERRIDE4_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<OVERRIDE4_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<OVERRIDE4_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `OVERRIDE4` reader - Trim value override 4."]
pub type OVERRIDE4_R = crate::FieldReader<u32, u32>;
#[doc = "Field `OVERRIDE4` writer - Trim value override 4."]
pub type OVERRIDE4_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, OVERRIDE4_SPEC, u32, u32, 28, O>;
#[doc = "Field `ENABLE` reader - Enable or disable override of default trim values."]
pub type ENABLE_R = crate::BitReader<ENABLE_A>;
#[doc = "Enable or disable override of default trim values.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ENABLE_A {
#[doc = "0: Override trim values disabled."]
DISABLED = 0,
#[doc = "1: Override trim values enabled."]
ENABLED = 1,
}
impl From<ENABLE_A> for bool {
#[inline(always)]
fn from(variant: ENABLE_A) -> Self {
variant as u8 != 0
}
}
impl ENABLE_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ENABLE_A {
match self.bits {
false => ENABLE_A::DISABLED,
true => ENABLE_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ENABLE_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ENABLE_A::ENABLED
}
}
#[doc = "Field `ENABLE` writer - Enable or disable override of default trim values."]
pub type ENABLE_W<'a, const O: u8> = crate::BitWriter<'a, u32, OVERRIDE4_SPEC, ENABLE_A, O>;
impl<'a, const O: u8> ENABLE_W<'a, O> {
#[doc = "Override trim values disabled."]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ENABLE_A::DISABLED)
}
#[doc = "Override trim values enabled."]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ENABLE_A::ENABLED)
}
}
impl R {
#[doc = "Bits 0:27 - Trim value override 4."]
#[inline(always)]
pub fn override4(&self) -> OVERRIDE4_R {
OVERRIDE4_R::new((self.bits & 0x0fff_ffff) as u32)
}
#[doc = "Bit 31 - Enable or disable override of default trim values."]
#[inline(always)]
pub fn enable(&self) -> ENABLE_R {
ENABLE_R::new(((self.bits >> 31) & 1) != 0)
}
}
impl W {
#[doc = "Bits 0:27 - Trim value override 4."]
#[inline(always)]
pub fn override4(&mut self) -> OVERRIDE4_W<0> {
OVERRIDE4_W::new(self)
}
#[doc = "Bit 31 - Enable or disable override of default trim values."]
#[inline(always)]
pub fn enable(&mut self) -> ENABLE_W<31> {
ENABLE_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Trim value override register 4.\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 [override4](index.html) module"]
pub struct OVERRIDE4_SPEC;
impl crate::RegisterSpec for OVERRIDE4_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [override4::R](R) reader structure"]
impl crate::Readable for OVERRIDE4_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [override4::W](W) writer structure"]
impl crate::Writable for OVERRIDE4_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets OVERRIDE4 to value 0"]
impl crate::Resettable for OVERRIDE4_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+64
View File
@@ -0,0 +1,64 @@
#[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)
}
}
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 pointer. Decision point: START task.\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
}
}
+108
View File
@@ -0,0 +1,108 @@
#[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 of length field in number of bits. Decision point: START task."]
pub type LFLEN_R = crate::FieldReader<u8, u8>;
#[doc = "Field `LFLEN` writer - Length of length field in number of bits. Decision point: START task."]
pub type LFLEN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PCNF0_SPEC, u8, u8, 4, O>;
#[doc = "Field `S0LEN` reader - Length of S0 field in number of bytes. Decision point: START task."]
pub type S0LEN_R = crate::BitReader<bool>;
#[doc = "Field `S0LEN` writer - Length of S0 field in number of bytes. Decision point: START task."]
pub type S0LEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PCNF0_SPEC, bool, O>;
#[doc = "Field `S1LEN` reader - Length of S1 field in number of bits. Decision point: START task."]
pub type S1LEN_R = crate::FieldReader<u8, u8>;
#[doc = "Field `S1LEN` writer - Length of S1 field in number of bits. Decision point: START task."]
pub type S1LEN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PCNF0_SPEC, u8, u8, 4, O>;
impl R {
#[doc = "Bits 0:3 - Length of length field in number of bits. Decision point: START task."]
#[inline(always)]
pub fn lflen(&self) -> LFLEN_R {
LFLEN_R::new((self.bits & 0x0f) as u8)
}
#[doc = "Bit 8 - Length of S0 field in number of bytes. Decision point: START task."]
#[inline(always)]
pub fn s0len(&self) -> S0LEN_R {
S0LEN_R::new(((self.bits >> 8) & 1) != 0)
}
#[doc = "Bits 16:19 - Length of S1 field in number of bits. Decision point: START task."]
#[inline(always)]
pub fn s1len(&self) -> S1LEN_R {
S1LEN_R::new(((self.bits >> 16) & 0x0f) as u8)
}
}
impl W {
#[doc = "Bits 0:3 - Length of length field in number of bits. Decision point: START task."]
#[inline(always)]
pub fn lflen(&mut self) -> LFLEN_W<0> {
LFLEN_W::new(self)
}
#[doc = "Bit 8 - Length of S0 field in number of bytes. Decision point: START task."]
#[inline(always)]
pub fn s0len(&mut self) -> S0LEN_W<8> {
S0LEN_W::new(self)
}
#[doc = "Bits 16:19 - Length of S1 field in number of bits. Decision point: START task."]
#[inline(always)]
pub fn s1len(&mut self) -> S1LEN_W<16> {
S1LEN_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 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 in number of bytes."]
pub type MAXLEN_R = crate::FieldReader<u8, u8>;
#[doc = "Field `MAXLEN` writer - Maximum length of packet payload in number of bytes."]
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. Decision point: START task."]
pub type STATLEN_R = crate::FieldReader<u8, u8>;
#[doc = "Field `STATLEN` writer - Static length in number of bytes. Decision point: START task."]
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. Decision point: START task."]
pub type BALEN_R = crate::FieldReader<u8, u8>;
#[doc = "Field `BALEN` writer - Base address length in number of bytes. Decision point: START task."]
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 length field. Decision point: START task."]
pub type ENDIAN_R = crate::BitReader<ENDIAN_A>;
#[doc = "On air endianness of packet length field. Decision point: START task.\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 length field. Decision point: START task."]
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 - Packet whitening enable."]
pub type WHITEEN_R = crate::BitReader<WHITEEN_A>;
#[doc = "Packet whitening enable.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum WHITEEN_A {
#[doc = "0: Whitening disabled."]
DISABLED = 0,
#[doc = "1: Whitening enabled."]
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 - Packet whitening enable."]
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 = "Whitening disabled."]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(WHITEEN_A::DISABLED)
}
#[doc = "Whitening enabled."]
#[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 in number of bytes."]
#[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. Decision point: START task."]
#[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. Decision point: START task."]
#[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 length field. Decision point: START task."]
#[inline(always)]
pub fn endian(&self) -> ENDIAN_R {
ENDIAN_R::new(((self.bits >> 24) & 1) != 0)
}
#[doc = "Bit 25 - Packet whitening enable."]
#[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 in number of bytes."]
#[inline(always)]
pub fn maxlen(&mut self) -> MAXLEN_W<0> {
MAXLEN_W::new(self)
}
#[doc = "Bits 8:15 - Static length in number of bytes. Decision point: START task."]
#[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. Decision point: START task."]
#[inline(always)]
pub fn balen(&mut self) -> BALEN_W<16> {
BALEN_W::new(self)
}
#[doc = "Bit 24 - On air endianness of packet length field. Decision point: START task."]
#[inline(always)]
pub fn endian(&mut self) -> ENDIAN_W<24> {
ENDIAN_W::new(self)
}
#[doc = "Bit 25 - Packet whitening enable."]
#[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 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."]
pub type POWER_R = crate::BitReader<POWER_A>;
#[doc = "Peripheral power control.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum POWER_A {
#[doc = "0: Module power disabled."]
DISABLED = 0,
#[doc = "1: Module power enabled."]
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."]
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 = "Module power disabled."]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(POWER_A::DISABLED)
}
#[doc = "Module power enabled."]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(POWER_A::ENABLED)
}
}
impl R {
#[doc = "Bit 0 - Peripheral power control."]
#[inline(always)]
pub fn power(&self) -> POWER_R {
POWER_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Peripheral power control."]
#[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 0"]
impl crate::Resettable for POWER_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+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. Decision point: START task."]
pub type AP0_R = crate::FieldReader<u8, u8>;
#[doc = "Field `AP0` writer - Address prefix 0. Decision point: START task."]
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. Decision point: START task."]
pub type AP1_R = crate::FieldReader<u8, u8>;
#[doc = "Field `AP1` writer - Address prefix 1. Decision point: START task."]
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. Decision point: START task."]
pub type AP2_R = crate::FieldReader<u8, u8>;
#[doc = "Field `AP2` writer - Address prefix 2. Decision point: START task."]
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. Decision point: START task."]
pub type AP3_R = crate::FieldReader<u8, u8>;
#[doc = "Field `AP3` writer - Address prefix 3. Decision point: START task."]
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. Decision point: START task."]
#[inline(always)]
pub fn ap0(&self) -> AP0_R {
AP0_R::new((self.bits & 0xff) as u8)
}
#[doc = "Bits 8:15 - Address prefix 1. Decision point: START task."]
#[inline(always)]
pub fn ap1(&self) -> AP1_R {
AP1_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 16:23 - Address prefix 2. Decision point: START task."]
#[inline(always)]
pub fn ap2(&self) -> AP2_R {
AP2_R::new(((self.bits >> 16) & 0xff) as u8)
}
#[doc = "Bits 24:31 - Address prefix 3. Decision point: START task."]
#[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. Decision point: START task."]
#[inline(always)]
pub fn ap0(&mut self) -> AP0_W<0> {
AP0_W::new(self)
}
#[doc = "Bits 8:15 - Address prefix 1. Decision point: START task."]
#[inline(always)]
pub fn ap1(&mut self) -> AP1_W<8> {
AP1_W::new(self)
}
#[doc = "Bits 16:23 - Address prefix 2. Decision point: START task."]
#[inline(always)]
pub fn ap2(&mut self) -> AP2_W<16> {
AP2_W::new(self)
}
#[doc = "Bits 24:31 - Address prefix 3. Decision point: START task."]
#[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 to 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. Decision point: START task."]
pub type AP4_R = crate::FieldReader<u8, u8>;
#[doc = "Field `AP4` writer - Address prefix 4. Decision point: START task."]
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. Decision point: START task."]
pub type AP5_R = crate::FieldReader<u8, u8>;
#[doc = "Field `AP5` writer - Address prefix 5. Decision point: START task."]
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. Decision point: START task."]
pub type AP6_R = crate::FieldReader<u8, u8>;
#[doc = "Field `AP6` writer - Address prefix 6. Decision point: START task."]
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. Decision point: START task."]
pub type AP7_R = crate::FieldReader<u8, u8>;
#[doc = "Field `AP7` writer - Address prefix 7. Decision point: START task."]
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. Decision point: START task."]
#[inline(always)]
pub fn ap4(&self) -> AP4_R {
AP4_R::new((self.bits & 0xff) as u8)
}
#[doc = "Bits 8:15 - Address prefix 5. Decision point: START task."]
#[inline(always)]
pub fn ap5(&self) -> AP5_R {
AP5_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 16:23 - Address prefix 6. Decision point: START task."]
#[inline(always)]
pub fn ap6(&self) -> AP6_R {
AP6_R::new(((self.bits >> 16) & 0xff) as u8)
}
#[doc = "Bits 24:31 - Address prefix 7. Decision point: START task."]
#[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. Decision point: START task."]
#[inline(always)]
pub fn ap4(&mut self) -> AP4_W<0> {
AP4_W::new(self)
}
#[doc = "Bits 8:15 - Address prefix 5. Decision point: START task."]
#[inline(always)]
pub fn ap5(&mut self) -> AP5_W<8> {
AP5_W::new(self)
}
#[doc = "Bits 16:23 - Address prefix 6. Decision point: START task."]
#[inline(always)]
pub fn ap6(&mut self) -> AP6_W<16> {
AP6_W::new(self)
}
#[doc = "Bits 24:31 - Address prefix 7. Decision point: START task."]
#[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 to 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 result. The result is read as a positive value so that ReceivedSignalStrength = -RSSISAMPLE dBm"]
pub type RSSISAMPLE_R = crate::FieldReader<u8, u8>;
impl R {
#[doc = "Bits 0:6 - RSSI sample result. The result is read as a positive value so that ReceivedSignalStrength = -RSSISAMPLE dBm"]
#[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 reception on logical address 0. Decision point: START task."]
pub type ADDR0_R = crate::BitReader<ADDR0_A>;
#[doc = "Enable reception on logical address 0. Decision point: START task.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ADDR0_A {
#[doc = "0: Reception disabled."]
DISABLED = 0,
#[doc = "1: Reception enabled."]
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 reception on logical address 0. Decision point: START task."]
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 = "Reception disabled."]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ADDR0_A::DISABLED)
}
#[doc = "Reception enabled."]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ADDR0_A::ENABLED)
}
}
#[doc = "Field `ADDR1` reader - Enable reception on logical address 1. Decision point: START task."]
pub type ADDR1_R = crate::BitReader<ADDR1_A>;
#[doc = "Enable reception on logical address 1. Decision point: START task.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ADDR1_A {
#[doc = "0: Reception disabled."]
DISABLED = 0,
#[doc = "1: Reception enabled."]
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 reception on logical address 1. Decision point: START task."]
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 = "Reception disabled."]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ADDR1_A::DISABLED)
}
#[doc = "Reception enabled."]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ADDR1_A::ENABLED)
}
}
#[doc = "Field `ADDR2` reader - Enable reception on logical address 2. Decision point: START task."]
pub type ADDR2_R = crate::BitReader<ADDR2_A>;
#[doc = "Enable reception on logical address 2. Decision point: START task.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ADDR2_A {
#[doc = "0: Reception disabled."]
DISABLED = 0,
#[doc = "1: Reception enabled."]
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 reception on logical address 2. Decision point: START task."]
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 = "Reception disabled."]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ADDR2_A::DISABLED)
}
#[doc = "Reception enabled."]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ADDR2_A::ENABLED)
}
}
#[doc = "Field `ADDR3` reader - Enable reception on logical address 3. Decision point: START task."]
pub type ADDR3_R = crate::BitReader<ADDR3_A>;
#[doc = "Enable reception on logical address 3. Decision point: START task.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ADDR3_A {
#[doc = "0: Reception disabled."]
DISABLED = 0,
#[doc = "1: Reception enabled."]
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 reception on logical address 3. Decision point: START task."]
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 = "Reception disabled."]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ADDR3_A::DISABLED)
}
#[doc = "Reception enabled."]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ADDR3_A::ENABLED)
}
}
#[doc = "Field `ADDR4` reader - Enable reception on logical address 4. Decision point: START task."]
pub type ADDR4_R = crate::BitReader<ADDR4_A>;
#[doc = "Enable reception on logical address 4. Decision point: START task.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ADDR4_A {
#[doc = "0: Reception disabled."]
DISABLED = 0,
#[doc = "1: Reception enabled."]
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 reception on logical address 4. Decision point: START task."]
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 = "Reception disabled."]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ADDR4_A::DISABLED)
}
#[doc = "Reception enabled."]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ADDR4_A::ENABLED)
}
}
#[doc = "Field `ADDR5` reader - Enable reception on logical address 5. Decision point: START task."]
pub type ADDR5_R = crate::BitReader<ADDR5_A>;
#[doc = "Enable reception on logical address 5. Decision point: START task.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ADDR5_A {
#[doc = "0: Reception disabled."]
DISABLED = 0,
#[doc = "1: Reception enabled."]
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 reception on logical address 5. Decision point: START task."]
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 = "Reception disabled."]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ADDR5_A::DISABLED)
}
#[doc = "Reception enabled."]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ADDR5_A::ENABLED)
}
}
#[doc = "Field `ADDR6` reader - Enable reception on logical address 6. Decision point: START task."]
pub type ADDR6_R = crate::BitReader<ADDR6_A>;
#[doc = "Enable reception on logical address 6. Decision point: START task.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ADDR6_A {
#[doc = "0: Reception disabled."]
DISABLED = 0,
#[doc = "1: Reception enabled."]
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 reception on logical address 6. Decision point: START task."]
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 = "Reception disabled."]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ADDR6_A::DISABLED)
}
#[doc = "Reception enabled."]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ADDR6_A::ENABLED)
}
}
#[doc = "Field `ADDR7` reader - Enable reception on logical address 7. Decision point: START task."]
pub type ADDR7_R = crate::BitReader<ADDR7_A>;
#[doc = "Enable reception on logical address 7. Decision point: START task.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ADDR7_A {
#[doc = "0: Reception disabled."]
DISABLED = 0,
#[doc = "1: Reception enabled."]
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 reception on logical address 7. Decision point: START task."]
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 = "Reception disabled."]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ADDR7_A::DISABLED)
}
#[doc = "Reception enabled."]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ADDR7_A::ENABLED)
}
}
impl R {
#[doc = "Bit 0 - Enable reception on logical address 0. Decision point: START task."]
#[inline(always)]
pub fn addr0(&self) -> ADDR0_R {
ADDR0_R::new((self.bits & 1) != 0)
}
#[doc = "Bit 1 - Enable reception on logical address 1. Decision point: START task."]
#[inline(always)]
pub fn addr1(&self) -> ADDR1_R {
ADDR1_R::new(((self.bits >> 1) & 1) != 0)
}
#[doc = "Bit 2 - Enable reception on logical address 2. Decision point: START task."]
#[inline(always)]
pub fn addr2(&self) -> ADDR2_R {
ADDR2_R::new(((self.bits >> 2) & 1) != 0)
}
#[doc = "Bit 3 - Enable reception on logical address 3. Decision point: START task."]
#[inline(always)]
pub fn addr3(&self) -> ADDR3_R {
ADDR3_R::new(((self.bits >> 3) & 1) != 0)
}
#[doc = "Bit 4 - Enable reception on logical address 4. Decision point: START task."]
#[inline(always)]
pub fn addr4(&self) -> ADDR4_R {
ADDR4_R::new(((self.bits >> 4) & 1) != 0)
}
#[doc = "Bit 5 - Enable reception on logical address 5. Decision point: START task."]
#[inline(always)]
pub fn addr5(&self) -> ADDR5_R {
ADDR5_R::new(((self.bits >> 5) & 1) != 0)
}
#[doc = "Bit 6 - Enable reception on logical address 6. Decision point: START task."]
#[inline(always)]
pub fn addr6(&self) -> ADDR6_R {
ADDR6_R::new(((self.bits >> 6) & 1) != 0)
}
#[doc = "Bit 7 - Enable reception on logical address 7. Decision point: START task."]
#[inline(always)]
pub fn addr7(&self) -> ADDR7_R {
ADDR7_R::new(((self.bits >> 7) & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Enable reception on logical address 0. Decision point: START task."]
#[inline(always)]
pub fn addr0(&mut self) -> ADDR0_W<0> {
ADDR0_W::new(self)
}
#[doc = "Bit 1 - Enable reception on logical address 1. Decision point: START task."]
#[inline(always)]
pub fn addr1(&mut self) -> ADDR1_W<1> {
ADDR1_W::new(self)
}
#[doc = "Bit 2 - Enable reception on logical address 2. Decision point: START task."]
#[inline(always)]
pub fn addr2(&mut self) -> ADDR2_W<2> {
ADDR2_W::new(self)
}
#[doc = "Bit 3 - Enable reception on logical address 3. Decision point: START task."]
#[inline(always)]
pub fn addr3(&mut self) -> ADDR3_W<3> {
ADDR3_W::new(self)
}
#[doc = "Bit 4 - Enable reception on logical address 4. Decision point: START task."]
#[inline(always)]
pub fn addr4(&mut self) -> ADDR4_W<4> {
ADDR4_W::new(self)
}
#[doc = "Bit 5 - Enable reception on logical address 5. Decision point: START task."]
#[inline(always)]
pub fn addr5(&mut self) -> ADDR5_W<5> {
ADDR5_W::new(self)
}
#[doc = "Bit 6 - Enable reception on logical address 6. Decision point: START task."]
#[inline(always)]
pub fn addr6(&mut self) -> ADDR6_W<6> {
ADDR6_W::new(self)
}
#[doc = "Bit 7 - Enable reception on logical address 7. Decision point: START task."]
#[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 = "Received CRC.\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 - Logical address in which previous packet was received."]
pub type RXMATCH_R = crate::FieldReader<u8, u8>;
impl R {
#[doc = "Bits 0:2 - Logical address in which previous packet was received."]
#[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: Shortcut disabled."]
DISABLED = 0,
#[doc = "1: Shortcut enabled."]
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 = "Shortcut disabled."]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(READY_START_A::DISABLED)
}
#[doc = "Shortcut enabled."]
#[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: Shortcut disabled."]
DISABLED = 0,
#[doc = "1: Shortcut enabled."]
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 = "Shortcut disabled."]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(END_DISABLE_A::DISABLED)
}
#[doc = "Shortcut enabled."]
#[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: Shortcut disabled."]
DISABLED = 0,
#[doc = "1: Shortcut enabled."]
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 = "Shortcut disabled."]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(DISABLED_TXEN_A::DISABLED)
}
#[doc = "Shortcut enabled."]
#[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: Shortcut disabled."]
DISABLED = 0,
#[doc = "1: Shortcut enabled."]
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 = "Shortcut disabled."]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(DISABLED_RXEN_A::DISABLED)
}
#[doc = "Shortcut enabled."]
#[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: Shortcut disabled."]
DISABLED = 0,
#[doc = "1: Shortcut enabled."]
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 = "Shortcut disabled."]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ADDRESS_RSSISTART_A::DISABLED)
}
#[doc = "Shortcut enabled."]
#[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: Shortcut disabled."]
DISABLED = 0,
#[doc = "1: Shortcut enabled."]
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 = "Shortcut disabled."]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(END_START_A::DISABLED)
}
#[doc = "Shortcut enabled."]
#[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: Shortcut disabled."]
DISABLED = 0,
#[doc = "1: Shortcut enabled."]
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 = "Shortcut disabled."]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ADDRESS_BCSTART_A::DISABLED)
}
#[doc = "Shortcut enabled."]
#[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: Shortcut disabled."]
DISABLED = 0,
#[doc = "1: Shortcut enabled."]
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 = "Shortcut disabled."]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(DISABLED_RSSISTOP_A::DISABLED)
}
#[doc = "Shortcut enabled."]
#[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 = "Shortcuts for the radio.\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 Rx Ramp Up state."]
RX_RU = 1,
#[doc = "2: Radio is in the Rx Idle state."]
RX_IDLE = 2,
#[doc = "3: Radio is in the Rx state."]
RX = 3,
#[doc = "4: Radio is in the Rx Disable state."]
RX_DISABLE = 4,
#[doc = "9: Radio is in the Tx Ramp Up state."]
TX_RU = 9,
#[doc = "10: Radio is in the Tx Idle state."]
TX_IDLE = 10,
#[doc = "11: Radio is in the Tx state."]
TX = 11,
#[doc = "12: Radio is in the Tx Disable 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 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
}
}
+186
View File
@@ -0,0 +1,186 @@
#[doc = "Register `TEST` reader"]
pub struct R(crate::R<TEST_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<TEST_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<TEST_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<TEST_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `TEST` writer"]
pub struct W(crate::W<TEST_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<TEST_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<TEST_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<TEST_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `CONSTCARRIER` reader - Constant carrier. Decision point: TXEN task."]
pub type CONSTCARRIER_R = crate::BitReader<CONSTCARRIER_A>;
#[doc = "Constant carrier. Decision point: TXEN task.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CONSTCARRIER_A {
#[doc = "0: Constant carrier disabled."]
DISABLED = 0,
#[doc = "1: Constant carrier enabled."]
ENABLED = 1,
}
impl From<CONSTCARRIER_A> for bool {
#[inline(always)]
fn from(variant: CONSTCARRIER_A) -> Self {
variant as u8 != 0
}
}
impl CONSTCARRIER_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> CONSTCARRIER_A {
match self.bits {
false => CONSTCARRIER_A::DISABLED,
true => CONSTCARRIER_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == CONSTCARRIER_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == CONSTCARRIER_A::ENABLED
}
}
#[doc = "Field `CONSTCARRIER` writer - Constant carrier. Decision point: TXEN task."]
pub type CONSTCARRIER_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEST_SPEC, CONSTCARRIER_A, O>;
impl<'a, const O: u8> CONSTCARRIER_W<'a, O> {
#[doc = "Constant carrier disabled."]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(CONSTCARRIER_A::DISABLED)
}
#[doc = "Constant carrier enabled."]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(CONSTCARRIER_A::ENABLED)
}
}
#[doc = "Field `PLLLOCK` reader - PLL lock. Decision point: TXEN or RXEN task."]
pub type PLLLOCK_R = crate::BitReader<PLLLOCK_A>;
#[doc = "PLL lock. Decision point: TXEN or RXEN task.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum PLLLOCK_A {
#[doc = "0: PLL lock disabled."]
DISABLED = 0,
#[doc = "1: PLL lock enabled."]
ENABLED = 1,
}
impl From<PLLLOCK_A> for bool {
#[inline(always)]
fn from(variant: PLLLOCK_A) -> Self {
variant as u8 != 0
}
}
impl PLLLOCK_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> PLLLOCK_A {
match self.bits {
false => PLLLOCK_A::DISABLED,
true => PLLLOCK_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == PLLLOCK_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == PLLLOCK_A::ENABLED
}
}
#[doc = "Field `PLLLOCK` writer - PLL lock. Decision point: TXEN or RXEN task."]
pub type PLLLOCK_W<'a, const O: u8> = crate::BitWriter<'a, u32, TEST_SPEC, PLLLOCK_A, O>;
impl<'a, const O: u8> PLLLOCK_W<'a, O> {
#[doc = "PLL lock disabled."]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(PLLLOCK_A::DISABLED)
}
#[doc = "PLL lock enabled."]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(PLLLOCK_A::ENABLED)
}
}
impl R {
#[doc = "Bit 0 - Constant carrier. Decision point: TXEN task."]
#[inline(always)]
pub fn constcarrier(&self) -> CONSTCARRIER_R {
CONSTCARRIER_R::new((self.bits & 1) != 0)
}
#[doc = "Bit 1 - PLL lock. Decision point: TXEN or RXEN task."]
#[inline(always)]
pub fn plllock(&self) -> PLLLOCK_R {
PLLLOCK_R::new(((self.bits >> 1) & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Constant carrier. Decision point: TXEN task."]
#[inline(always)]
pub fn constcarrier(&mut self) -> CONSTCARRIER_W<0> {
CONSTCARRIER_W::new(self)
}
#[doc = "Bit 1 - PLL lock. Decision point: TXEN or RXEN task."]
#[inline(always)]
pub fn plllock(&mut self) -> PLLLOCK_W<1> {
PLLLOCK_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 = "Test features enable 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 [test](index.html) module"]
pub struct TEST_SPEC;
impl crate::RegisterSpec for TEST_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [test::R](R) reader structure"]
impl crate::Readable for TEST_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [test::W](W) writer structure"]
impl crate::Writable for TEST_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets TEST to value 0"]
impl crate::Resettable for TEST_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 microseconds. Decision point: START rask"]
pub type TIFS_R = crate::FieldReader<u8, u8>;
#[doc = "Field `TIFS` writer - Inter frame spacing in microseconds. Decision point: START rask"]
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 microseconds. Decision point: START rask"]
#[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 microseconds. Decision point: START rask"]
#[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 microseconds.\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 - Logical address to be used when transmitting a packet. Decision point: START task."]
pub type TXADDRESS_R = crate::FieldReader<u8, u8>;
#[doc = "Field `TXADDRESS` writer - Logical address to be used when transmitting a packet. Decision point: START task."]
pub type TXADDRESS_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TXADDRESS_SPEC, u8, u8, 3, O>;
impl R {
#[doc = "Bits 0:2 - Logical address to be used when transmitting a packet. Decision point: START task."]
#[inline(always)]
pub fn txaddress(&self) -> TXADDRESS_R {
TXADDRESS_R::new((self.bits & 7) as u8)
}
}
impl W {
#[doc = "Bits 0:2 - Logical address to be used when transmitting a packet. Decision point: START task."]
#[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
}
}
+207
View File
@@ -0,0 +1,207 @@
#[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. Decision point: TXEN task."]
pub type TXPOWER_R = crate::FieldReader<u8, TXPOWER_A>;
#[doc = "Radio output power. Decision point: TXEN task.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum TXPOWER_A {
#[doc = "4: +4dBm."]
POS4D_BM = 4,
#[doc = "0: 0dBm."]
_0D_BM = 0,
#[doc = "252: -4dBm."]
NEG4D_BM = 252,
#[doc = "248: -8dBm."]
NEG8D_BM = 248,
#[doc = "244: -12dBm."]
NEG12D_BM = 244,
#[doc = "240: -16dBm."]
NEG16D_BM = 240,
#[doc = "236: -20dBm."]
NEG20D_BM = 236,
#[doc = "216: -30dBm."]
NEG30D_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),
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::NEG30D_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 `_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 `NEG30D_BM`"]
#[inline(always)]
pub fn is_neg30d_bm(&self) -> bool {
*self == TXPOWER_A::NEG30D_BM
}
}
#[doc = "Field `TXPOWER` writer - Radio output power. Decision point: TXEN task."]
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 = "+4dBm."]
#[inline(always)]
pub fn pos4d_bm(self) -> &'a mut W {
self.variant(TXPOWER_A::POS4D_BM)
}
#[doc = "0dBm."]
#[inline(always)]
pub fn _0d_bm(self) -> &'a mut W {
self.variant(TXPOWER_A::_0D_BM)
}
#[doc = "-4dBm."]
#[inline(always)]
pub fn neg4d_bm(self) -> &'a mut W {
self.variant(TXPOWER_A::NEG4D_BM)
}
#[doc = "-8dBm."]
#[inline(always)]
pub fn neg8d_bm(self) -> &'a mut W {
self.variant(TXPOWER_A::NEG8D_BM)
}
#[doc = "-12dBm."]
#[inline(always)]
pub fn neg12d_bm(self) -> &'a mut W {
self.variant(TXPOWER_A::NEG12D_BM)
}
#[doc = "-16dBm."]
#[inline(always)]
pub fn neg16d_bm(self) -> &'a mut W {
self.variant(TXPOWER_A::NEG16D_BM)
}
#[doc = "-20dBm."]
#[inline(always)]
pub fn neg20d_bm(self) -> &'a mut W {
self.variant(TXPOWER_A::NEG20D_BM)
}
#[doc = "-30dBm."]
#[inline(always)]
pub fn neg30d_bm(self) -> &'a mut W {
self.variant(TXPOWER_A::NEG30D_BM)
}
}
impl R {
#[doc = "Bits 0:7 - Radio output power. Decision point: TXEN task."]
#[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. Decision point: TXEN task."]
#[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
}
}