feat: add display UI with splash screen, dashboard, and RSSI sparkline

Implement full SSD1306 OLED display support:
- Splash screen on boot (1.5s) with project name, version, board
- Dashboard showing radio state, config, counters, RSSI/SNR
- RSSI history sparkline (64-sample ring buffer, 2px-wide bars)
- DisplayOn/DisplayOff host commands routed via dedicated channel
- Pure render functions against generic DrawTarget (no hardware coupling)
- Display on/off control bypasses radio task entirely

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
swaitsandClaude Opus 4.6 committed 2026-03-29 20:42:54 -06:00
1 parent 7064110293
commit 3102fc747a
17624 files changed
+4564928 -38

No files matched your search

+80
View File
@@ -0,0 +1,80 @@
#[doc = "Register `BASE0` reader"]
pub struct R(crate::R<BASE0_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<BASE0_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<BASE0_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<BASE0_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `BASE0` writer"]
pub struct W(crate::W<BASE0_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<BASE0_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<BASE0_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<BASE0_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BASE0` reader - Base address 0"]
pub type BASE0_R = crate::FieldReader<u32, u32>;
#[doc = "Field `BASE0` writer - Base address 0"]
pub type BASE0_W<'a, const O: u8> = crate::FieldWriter<'a, u32, BASE0_SPEC, u32, u32, 32, O>;
impl R {
#[doc = "Bits 0:31 - Base address 0"]
#[inline(always)]
pub fn base0(&self) -> BASE0_R {
BASE0_R::new(self.bits)
}
}
impl W {
#[doc = "Bits 0:31 - Base address 0"]
#[inline(always)]
pub fn base0(&mut self) -> BASE0_W<0> {
BASE0_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Base address 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [base0](index.html) module"]
pub struct BASE0_SPEC;
impl crate::RegisterSpec for BASE0_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [base0::R](R) reader structure"]
impl crate::Readable for BASE0_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [base0::W](W) writer structure"]
impl crate::Writable for BASE0_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets BASE0 to value 0"]
impl crate::Resettable for BASE0_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+80
View File
@@ -0,0 +1,80 @@
#[doc = "Register `BASE1` reader"]
pub struct R(crate::R<BASE1_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<BASE1_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<BASE1_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<BASE1_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `BASE1` writer"]
pub struct W(crate::W<BASE1_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<BASE1_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<BASE1_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<BASE1_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BASE1` reader - Base address 1"]
pub type BASE1_R = crate::FieldReader<u32, u32>;
#[doc = "Field `BASE1` writer - Base address 1"]
pub type BASE1_W<'a, const O: u8> = crate::FieldWriter<'a, u32, BASE1_SPEC, u32, u32, 32, O>;
impl R {
#[doc = "Bits 0:31 - Base address 1"]
#[inline(always)]
pub fn base1(&self) -> BASE1_R {
BASE1_R::new(self.bits)
}
}
impl W {
#[doc = "Bits 0:31 - Base address 1"]
#[inline(always)]
pub fn base1(&mut self) -> BASE1_W<0> {
BASE1_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Base address 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [base1](index.html) module"]
pub struct BASE1_SPEC;
impl crate::RegisterSpec for BASE1_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [base1::R](R) reader structure"]
impl crate::Readable for BASE1_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [base1::W](W) writer structure"]
impl crate::Writable for BASE1_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets BASE1 to value 0"]
impl crate::Resettable for BASE1_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+80
View File
@@ -0,0 +1,80 @@
#[doc = "Register `BCC` reader"]
pub struct R(crate::R<BCC_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<BCC_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<BCC_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<BCC_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `BCC` writer"]
pub struct W(crate::W<BCC_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<BCC_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<BCC_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<BCC_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BCC` reader - Bit counter compare"]
pub type BCC_R = crate::FieldReader<u32, u32>;
#[doc = "Field `BCC` writer - Bit counter compare"]
pub type BCC_W<'a, const O: u8> = crate::FieldWriter<'a, u32, BCC_SPEC, u32, u32, 32, O>;
impl R {
#[doc = "Bits 0:31 - Bit counter compare"]
#[inline(always)]
pub fn bcc(&self) -> BCC_R {
BCC_R::new(self.bits)
}
}
impl W {
#[doc = "Bits 0:31 - Bit counter compare"]
#[inline(always)]
pub fn bcc(&mut self) -> BCC_W<0> {
BCC_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Bit counter compare\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [bcc](index.html) module"]
pub struct BCC_SPEC;
impl crate::RegisterSpec for BCC_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [bcc::R](R) reader structure"]
impl crate::Readable for BCC_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [bcc::W](W) writer structure"]
impl crate::Writable for BCC_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets BCC to value 0"]
impl crate::Resettable for BCC_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+210
View File
@@ -0,0 +1,210 @@
#[doc = "Register `CCACTRL` reader"]
pub struct R(crate::R<CCACTRL_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CCACTRL_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CCACTRL_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CCACTRL_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `CCACTRL` writer"]
pub struct W(crate::W<CCACTRL_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<CCACTRL_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<CCACTRL_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<CCACTRL_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `CCAMODE` reader - CCA mode of operation"]
pub type CCAMODE_R = crate::FieldReader<u8, CCAMODE_A>;
#[doc = "CCA mode of operation\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum CCAMODE_A {
#[doc = "0: Energy above threshold"]
ED_MODE = 0,
#[doc = "1: Carrier seen"]
CARRIER_MODE = 1,
#[doc = "2: Energy above threshold AND carrier seen"]
CARRIER_AND_ED_MODE = 2,
#[doc = "3: Energy above threshold OR carrier seen"]
CARRIER_OR_ED_MODE = 3,
#[doc = "4: Energy above threshold test mode that will abort when first ED measurement over threshold is seen. No averaging."]
ED_MODE_TEST1 = 4,
}
impl From<CCAMODE_A> for u8 {
#[inline(always)]
fn from(variant: CCAMODE_A) -> Self {
variant as _
}
}
impl CCAMODE_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> Option<CCAMODE_A> {
match self.bits {
0 => Some(CCAMODE_A::ED_MODE),
1 => Some(CCAMODE_A::CARRIER_MODE),
2 => Some(CCAMODE_A::CARRIER_AND_ED_MODE),
3 => Some(CCAMODE_A::CARRIER_OR_ED_MODE),
4 => Some(CCAMODE_A::ED_MODE_TEST1),
_ => None,
}
}
#[doc = "Checks if the value of the field is `ED_MODE`"]
#[inline(always)]
pub fn is_ed_mode(&self) -> bool {
*self == CCAMODE_A::ED_MODE
}
#[doc = "Checks if the value of the field is `CARRIER_MODE`"]
#[inline(always)]
pub fn is_carrier_mode(&self) -> bool {
*self == CCAMODE_A::CARRIER_MODE
}
#[doc = "Checks if the value of the field is `CARRIER_AND_ED_MODE`"]
#[inline(always)]
pub fn is_carrier_and_ed_mode(&self) -> bool {
*self == CCAMODE_A::CARRIER_AND_ED_MODE
}
#[doc = "Checks if the value of the field is `CARRIER_OR_ED_MODE`"]
#[inline(always)]
pub fn is_carrier_or_ed_mode(&self) -> bool {
*self == CCAMODE_A::CARRIER_OR_ED_MODE
}
#[doc = "Checks if the value of the field is `ED_MODE_TEST1`"]
#[inline(always)]
pub fn is_ed_mode_test1(&self) -> bool {
*self == CCAMODE_A::ED_MODE_TEST1
}
}
#[doc = "Field `CCAMODE` writer - CCA mode of operation"]
pub type CCAMODE_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, CCACTRL_SPEC, u8, CCAMODE_A, 3, O>;
impl<'a, const O: u8> CCAMODE_W<'a, O> {
#[doc = "Energy above threshold"]
#[inline(always)]
pub fn ed_mode(self) -> &'a mut W {
self.variant(CCAMODE_A::ED_MODE)
}
#[doc = "Carrier seen"]
#[inline(always)]
pub fn carrier_mode(self) -> &'a mut W {
self.variant(CCAMODE_A::CARRIER_MODE)
}
#[doc = "Energy above threshold AND carrier seen"]
#[inline(always)]
pub fn carrier_and_ed_mode(self) -> &'a mut W {
self.variant(CCAMODE_A::CARRIER_AND_ED_MODE)
}
#[doc = "Energy above threshold OR carrier seen"]
#[inline(always)]
pub fn carrier_or_ed_mode(self) -> &'a mut W {
self.variant(CCAMODE_A::CARRIER_OR_ED_MODE)
}
#[doc = "Energy above threshold test mode that will abort when first ED measurement over threshold is seen. No averaging."]
#[inline(always)]
pub fn ed_mode_test1(self) -> &'a mut W {
self.variant(CCAMODE_A::ED_MODE_TEST1)
}
}
#[doc = "Field `CCAEDTHRES` reader - CCA energy busy threshold. Used in all the CCA modes except CarrierMode."]
pub type CCAEDTHRES_R = crate::FieldReader<u8, u8>;
#[doc = "Field `CCAEDTHRES` writer - CCA energy busy threshold. Used in all the CCA modes except CarrierMode."]
pub type CCAEDTHRES_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CCACTRL_SPEC, u8, u8, 8, O>;
#[doc = "Field `CCACORRTHRES` reader - CCA correlator busy threshold. Only relevant to CarrierMode, CarrierAndEdMode, and CarrierOrEdMode."]
pub type CCACORRTHRES_R = crate::FieldReader<u8, u8>;
#[doc = "Field `CCACORRTHRES` writer - CCA correlator busy threshold. Only relevant to CarrierMode, CarrierAndEdMode, and CarrierOrEdMode."]
pub type CCACORRTHRES_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CCACTRL_SPEC, u8, u8, 8, O>;
#[doc = "Field `CCACORRCNT` reader - Limit for occurances above CCACORRTHRES. When not equal to zero the corrolator based signal detect is enabled."]
pub type CCACORRCNT_R = crate::FieldReader<u8, u8>;
#[doc = "Field `CCACORRCNT` writer - Limit for occurances above CCACORRTHRES. When not equal to zero the corrolator based signal detect is enabled."]
pub type CCACORRCNT_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CCACTRL_SPEC, u8, u8, 8, O>;
impl R {
#[doc = "Bits 0:2 - CCA mode of operation"]
#[inline(always)]
pub fn ccamode(&self) -> CCAMODE_R {
CCAMODE_R::new((self.bits & 7) as u8)
}
#[doc = "Bits 8:15 - CCA energy busy threshold. Used in all the CCA modes except CarrierMode."]
#[inline(always)]
pub fn ccaedthres(&self) -> CCAEDTHRES_R {
CCAEDTHRES_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 16:23 - CCA correlator busy threshold. Only relevant to CarrierMode, CarrierAndEdMode, and CarrierOrEdMode."]
#[inline(always)]
pub fn ccacorrthres(&self) -> CCACORRTHRES_R {
CCACORRTHRES_R::new(((self.bits >> 16) & 0xff) as u8)
}
#[doc = "Bits 24:31 - Limit for occurances above CCACORRTHRES. When not equal to zero the corrolator based signal detect is enabled."]
#[inline(always)]
pub fn ccacorrcnt(&self) -> CCACORRCNT_R {
CCACORRCNT_R::new(((self.bits >> 24) & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 0:2 - CCA mode of operation"]
#[inline(always)]
pub fn ccamode(&mut self) -> CCAMODE_W<0> {
CCAMODE_W::new(self)
}
#[doc = "Bits 8:15 - CCA energy busy threshold. Used in all the CCA modes except CarrierMode."]
#[inline(always)]
pub fn ccaedthres(&mut self) -> CCAEDTHRES_W<8> {
CCAEDTHRES_W::new(self)
}
#[doc = "Bits 16:23 - CCA correlator busy threshold. Only relevant to CarrierMode, CarrierAndEdMode, and CarrierOrEdMode."]
#[inline(always)]
pub fn ccacorrthres(&mut self) -> CCACORRTHRES_W<16> {
CCACORRTHRES_W::new(self)
}
#[doc = "Bits 24:31 - Limit for occurances above CCACORRTHRES. When not equal to zero the corrolator based signal detect is enabled."]
#[inline(always)]
pub fn ccacorrcnt(&mut self) -> CCACORRCNT_W<24> {
CCACORRCNT_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 = "IEEE 802.15.4 clear channel assessment 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 [ccactrl](index.html) module"]
pub struct CCACTRL_SPEC;
impl crate::RegisterSpec for CCACTRL_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [ccactrl::R](R) reader structure"]
impl crate::Readable for CCACTRL_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [ccactrl::W](W) writer structure"]
impl crate::Writable for CCACTRL_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets CCACTRL to value 0x052d_0000"]
impl crate::Resettable for CCACTRL_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0x052d_0000
}
}
+115
View File
@@ -0,0 +1,115 @@
#[doc = "Register `CLEARPATTERN` reader"]
pub struct R(crate::R<CLEARPATTERN_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CLEARPATTERN_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CLEARPATTERN_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CLEARPATTERN_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `CLEARPATTERN` writer"]
pub struct W(crate::W<CLEARPATTERN_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<CLEARPATTERN_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<CLEARPATTERN_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<CLEARPATTERN_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `CLEARPATTERN` reader - Clears GPIO pattern array for antenna control"]
pub type CLEARPATTERN_R = crate::BitReader<CLEARPATTERN_A>;
#[doc = "Clears GPIO pattern array for antenna control\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CLEARPATTERN_A {
#[doc = "1: Clear the GPIO pattern"]
CLEAR = 1,
}
impl From<CLEARPATTERN_A> for bool {
#[inline(always)]
fn from(variant: CLEARPATTERN_A) -> Self {
variant as u8 != 0
}
}
impl CLEARPATTERN_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> Option<CLEARPATTERN_A> {
match self.bits {
true => Some(CLEARPATTERN_A::CLEAR),
_ => None,
}
}
#[doc = "Checks if the value of the field is `CLEAR`"]
#[inline(always)]
pub fn is_clear(&self) -> bool {
*self == CLEARPATTERN_A::CLEAR
}
}
#[doc = "Field `CLEARPATTERN` writer - Clears GPIO pattern array for antenna control"]
pub type CLEARPATTERN_W<'a, const O: u8> =
crate::BitWriter1C<'a, u32, CLEARPATTERN_SPEC, CLEARPATTERN_A, O>;
impl<'a, const O: u8> CLEARPATTERN_W<'a, O> {
#[doc = "Clear the GPIO pattern"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(CLEARPATTERN_A::CLEAR)
}
}
impl R {
#[doc = "Bit 0 - Clears GPIO pattern array for antenna control"]
#[inline(always)]
pub fn clearpattern(&self) -> CLEARPATTERN_R {
CLEARPATTERN_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Clears GPIO pattern array for antenna control"]
#[inline(always)]
pub fn clearpattern(&mut self) -> CLEARPATTERN_W<0> {
CLEARPATTERN_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Clear the GPIO pattern array for antenna 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 [clearpattern](index.html) module"]
pub struct CLEARPATTERN_SPEC;
impl crate::RegisterSpec for CLEARPATTERN_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [clearpattern::R](R) reader structure"]
impl crate::Readable for CLEARPATTERN_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [clearpattern::W](W) writer structure"]
impl crate::Writable for CLEARPATTERN_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets CLEARPATTERN to value 0"]
impl crate::Resettable for CLEARPATTERN_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+230
View File
@@ -0,0 +1,230 @@
#[doc = "Register `CRCCNF` reader"]
pub struct R(crate::R<CRCCNF_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CRCCNF_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CRCCNF_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CRCCNF_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `CRCCNF` writer"]
pub struct W(crate::W<CRCCNF_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<CRCCNF_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<CRCCNF_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<CRCCNF_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `LEN` reader - CRC length in number of bytes For MODE Ble_LR125Kbit and Ble_LR500Kbit, only LEN set to 3 is supported"]
pub type LEN_R = crate::FieldReader<u8, LEN_A>;
#[doc = "CRC length in number of bytes For MODE Ble_LR125Kbit and Ble_LR500Kbit, only LEN set to 3 is supported\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum LEN_A {
#[doc = "0: CRC length is zero and CRC calculation is disabled"]
DISABLED = 0,
#[doc = "1: CRC length is one byte and CRC calculation is enabled"]
ONE = 1,
#[doc = "2: CRC length is two bytes and CRC calculation is enabled"]
TWO = 2,
#[doc = "3: CRC length is three bytes and CRC calculation is enabled"]
THREE = 3,
}
impl From<LEN_A> for u8 {
#[inline(always)]
fn from(variant: LEN_A) -> Self {
variant as _
}
}
impl LEN_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> LEN_A {
match self.bits {
0 => LEN_A::DISABLED,
1 => LEN_A::ONE,
2 => LEN_A::TWO,
3 => LEN_A::THREE,
_ => unreachable!(),
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == LEN_A::DISABLED
}
#[doc = "Checks if the value of the field is `ONE`"]
#[inline(always)]
pub fn is_one(&self) -> bool {
*self == LEN_A::ONE
}
#[doc = "Checks if the value of the field is `TWO`"]
#[inline(always)]
pub fn is_two(&self) -> bool {
*self == LEN_A::TWO
}
#[doc = "Checks if the value of the field is `THREE`"]
#[inline(always)]
pub fn is_three(&self) -> bool {
*self == LEN_A::THREE
}
}
#[doc = "Field `LEN` writer - CRC length in number of bytes For MODE Ble_LR125Kbit and Ble_LR500Kbit, only LEN set to 3 is supported"]
pub type LEN_W<'a, const O: u8> = crate::FieldWriterSafe<'a, u32, CRCCNF_SPEC, u8, LEN_A, 2, O>;
impl<'a, const O: u8> LEN_W<'a, O> {
#[doc = "CRC length is zero and CRC calculation is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(LEN_A::DISABLED)
}
#[doc = "CRC length is one byte and CRC calculation is enabled"]
#[inline(always)]
pub fn one(self) -> &'a mut W {
self.variant(LEN_A::ONE)
}
#[doc = "CRC length is two bytes and CRC calculation is enabled"]
#[inline(always)]
pub fn two(self) -> &'a mut W {
self.variant(LEN_A::TWO)
}
#[doc = "CRC length is three bytes and CRC calculation is enabled"]
#[inline(always)]
pub fn three(self) -> &'a mut W {
self.variant(LEN_A::THREE)
}
}
#[doc = "Field `SKIPADDR` reader - Include or exclude packet address field out of CRC calculation."]
pub type SKIPADDR_R = crate::FieldReader<u8, SKIPADDR_A>;
#[doc = "Include or exclude packet address field out of CRC calculation.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum SKIPADDR_A {
#[doc = "0: CRC calculation includes address field"]
INCLUDE = 0,
#[doc = "1: CRC calculation does not include address field. The CRC calculation will start at the first byte after the address."]
SKIP = 1,
#[doc = "2: CRC calculation as per 802.15.4 standard. Starting at first byte after length field."]
IEEE802154 = 2,
}
impl From<SKIPADDR_A> for u8 {
#[inline(always)]
fn from(variant: SKIPADDR_A) -> Self {
variant as _
}
}
impl SKIPADDR_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> Option<SKIPADDR_A> {
match self.bits {
0 => Some(SKIPADDR_A::INCLUDE),
1 => Some(SKIPADDR_A::SKIP),
2 => Some(SKIPADDR_A::IEEE802154),
_ => None,
}
}
#[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 = "Checks if the value of the field is `IEEE802154`"]
#[inline(always)]
pub fn is_ieee802154(&self) -> bool {
*self == SKIPADDR_A::IEEE802154
}
}
#[doc = "Field `SKIPADDR` writer - Include or exclude packet address field out of CRC calculation."]
pub type SKIPADDR_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, CRCCNF_SPEC, u8, SKIPADDR_A, 2, O>;
impl<'a, const O: u8> SKIPADDR_W<'a, O> {
#[doc = "CRC calculation includes address field"]
#[inline(always)]
pub fn include(self) -> &'a mut W {
self.variant(SKIPADDR_A::INCLUDE)
}
#[doc = "CRC calculation does not include address field. The CRC calculation will start at the first byte after the address."]
#[inline(always)]
pub fn skip(self) -> &'a mut W {
self.variant(SKIPADDR_A::SKIP)
}
#[doc = "CRC calculation as per 802.15.4 standard. Starting at first byte after length field."]
#[inline(always)]
pub fn ieee802154(self) -> &'a mut W {
self.variant(SKIPADDR_A::IEEE802154)
}
}
impl R {
#[doc = "Bits 0:1 - CRC length in number of bytes For MODE Ble_LR125Kbit and Ble_LR500Kbit, only LEN set to 3 is supported"]
#[inline(always)]
pub fn len(&self) -> LEN_R {
LEN_R::new((self.bits & 3) as u8)
}
#[doc = "Bits 8:9 - Include or exclude packet address field out of CRC calculation."]
#[inline(always)]
pub fn skipaddr(&self) -> SKIPADDR_R {
SKIPADDR_R::new(((self.bits >> 8) & 3) as u8)
}
}
impl W {
#[doc = "Bits 0:1 - CRC length in number of bytes For MODE Ble_LR125Kbit and Ble_LR500Kbit, only LEN set to 3 is supported"]
#[inline(always)]
pub fn len(&mut self) -> LEN_W<0> {
LEN_W::new(self)
}
#[doc = "Bits 8:9 - Include or exclude packet address field out of CRC calculation."]
#[inline(always)]
pub fn skipaddr(&mut self) -> SKIPADDR_W<8> {
SKIPADDR_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CRC configuration\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [crccnf](index.html) module"]
pub struct CRCCNF_SPEC;
impl crate::RegisterSpec for CRCCNF_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [crccnf::R](R) reader structure"]
impl crate::Readable for CRCCNF_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [crccnf::W](W) writer structure"]
impl crate::Writable for CRCCNF_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets CRCCNF to value 0"]
impl crate::Resettable for CRCCNF_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+80
View File
@@ -0,0 +1,80 @@
#[doc = "Register `CRCINIT` reader"]
pub struct R(crate::R<CRCINIT_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CRCINIT_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CRCINIT_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CRCINIT_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `CRCINIT` writer"]
pub struct W(crate::W<CRCINIT_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<CRCINIT_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<CRCINIT_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<CRCINIT_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `CRCINIT` reader - CRC initial value"]
pub type CRCINIT_R = crate::FieldReader<u32, u32>;
#[doc = "Field `CRCINIT` writer - CRC initial value"]
pub type CRCINIT_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CRCINIT_SPEC, u32, u32, 24, O>;
impl R {
#[doc = "Bits 0:23 - CRC initial value"]
#[inline(always)]
pub fn crcinit(&self) -> CRCINIT_R {
CRCINIT_R::new((self.bits & 0x00ff_ffff) as u32)
}
}
impl W {
#[doc = "Bits 0:23 - CRC initial value"]
#[inline(always)]
pub fn crcinit(&mut self) -> CRCINIT_W<0> {
CRCINIT_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CRC initial value\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [crcinit](index.html) module"]
pub struct CRCINIT_SPEC;
impl crate::RegisterSpec for CRCINIT_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [crcinit::R](R) reader structure"]
impl crate::Readable for CRCINIT_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [crcinit::W](W) writer structure"]
impl crate::Writable for CRCINIT_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets CRCINIT to value 0"]
impl crate::Resettable for CRCINIT_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+80
View File
@@ -0,0 +1,80 @@
#[doc = "Register `CRCPOLY` reader"]
pub struct R(crate::R<CRCPOLY_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CRCPOLY_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CRCPOLY_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CRCPOLY_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `CRCPOLY` writer"]
pub struct W(crate::W<CRCPOLY_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<CRCPOLY_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<CRCPOLY_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<CRCPOLY_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `CRCPOLY` reader - CRC polynomial"]
pub type CRCPOLY_R = crate::FieldReader<u32, u32>;
#[doc = "Field `CRCPOLY` writer - CRC polynomial"]
pub type CRCPOLY_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CRCPOLY_SPEC, u32, u32, 24, O>;
impl R {
#[doc = "Bits 0:23 - CRC polynomial"]
#[inline(always)]
pub fn crcpoly(&self) -> CRCPOLY_R {
CRCPOLY_R::new((self.bits & 0x00ff_ffff) as u32)
}
}
impl W {
#[doc = "Bits 0:23 - CRC polynomial"]
#[inline(always)]
pub fn crcpoly(&mut self) -> CRCPOLY_W<0> {
CRCPOLY_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CRC polynomial\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [crcpoly](index.html) module"]
pub struct CRCPOLY_SPEC;
impl crate::RegisterSpec for CRCPOLY_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [crcpoly::R](R) reader structure"]
impl crate::Readable for CRCPOLY_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [crcpoly::W](W) writer structure"]
impl crate::Writable for CRCPOLY_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets CRCPOLY to value 0"]
impl crate::Resettable for CRCPOLY_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+74
View File
@@ -0,0 +1,74 @@
#[doc = "Register `CRCSTATUS` reader"]
pub struct R(crate::R<CRCSTATUS_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CRCSTATUS_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CRCSTATUS_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CRCSTATUS_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `CRCSTATUS` reader - CRC status of packet received"]
pub type CRCSTATUS_R = crate::BitReader<CRCSTATUS_A>;
#[doc = "CRC status of packet received\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CRCSTATUS_A {
#[doc = "0: Packet received with CRC error"]
CRCERROR = 0,
#[doc = "1: Packet received with CRC ok"]
CRCOK = 1,
}
impl From<CRCSTATUS_A> for bool {
#[inline(always)]
fn from(variant: CRCSTATUS_A) -> Self {
variant as u8 != 0
}
}
impl CRCSTATUS_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> CRCSTATUS_A {
match self.bits {
false => CRCSTATUS_A::CRCERROR,
true => CRCSTATUS_A::CRCOK,
}
}
#[doc = "Checks if the value of the field is `CRCERROR`"]
#[inline(always)]
pub fn is_crcerror(&self) -> bool {
*self == CRCSTATUS_A::CRCERROR
}
#[doc = "Checks if the value of the field is `CRCOK`"]
#[inline(always)]
pub fn is_crcok(&self) -> bool {
*self == CRCSTATUS_A::CRCOK
}
}
impl R {
#[doc = "Bit 0 - CRC status of packet received"]
#[inline(always)]
pub fn crcstatus(&self) -> CRCSTATUS_R {
CRCSTATUS_R::new((self.bits & 1) != 0)
}
}
#[doc = "CRC status\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [crcstatus](index.html) module"]
pub struct CRCSTATUS_SPEC;
impl crate::RegisterSpec for CRCSTATUS_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [crcstatus::R](R) reader structure"]
impl crate::Readable for CRCSTATUS_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets CRCSTATUS to value 0"]
impl crate::Resettable for CRCSTATUS_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+583
View File
@@ -0,0 +1,583 @@
#[doc = "Register `CTEINLINECONF` reader"]
pub struct R(crate::R<CTEINLINECONF_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CTEINLINECONF_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CTEINLINECONF_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CTEINLINECONF_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `CTEINLINECONF` writer"]
pub struct W(crate::W<CTEINLINECONF_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<CTEINLINECONF_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<CTEINLINECONF_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<CTEINLINECONF_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `CTEINLINECTRLEN` reader - Enable parsing of CTEInfo from received packet in BLE modes"]
pub type CTEINLINECTRLEN_R = crate::BitReader<CTEINLINECTRLEN_A>;
#[doc = "Enable parsing of CTEInfo from received packet in BLE modes\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CTEINLINECTRLEN_A {
#[doc = "1: Parsing of CTEInfo is enabled"]
ENABLED = 1,
#[doc = "0: Parsing of CTEInfo is disabled"]
DISABLED = 0,
}
impl From<CTEINLINECTRLEN_A> for bool {
#[inline(always)]
fn from(variant: CTEINLINECTRLEN_A) -> Self {
variant as u8 != 0
}
}
impl CTEINLINECTRLEN_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> CTEINLINECTRLEN_A {
match self.bits {
true => CTEINLINECTRLEN_A::ENABLED,
false => CTEINLINECTRLEN_A::DISABLED,
}
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == CTEINLINECTRLEN_A::ENABLED
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == CTEINLINECTRLEN_A::DISABLED
}
}
#[doc = "Field `CTEINLINECTRLEN` writer - Enable parsing of CTEInfo from received packet in BLE modes"]
pub type CTEINLINECTRLEN_W<'a, const O: u8> =
crate::BitWriter<'a, u32, CTEINLINECONF_SPEC, CTEINLINECTRLEN_A, O>;
impl<'a, const O: u8> CTEINLINECTRLEN_W<'a, O> {
#[doc = "Parsing of CTEInfo is enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(CTEINLINECTRLEN_A::ENABLED)
}
#[doc = "Parsing of CTEInfo is disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(CTEINLINECTRLEN_A::DISABLED)
}
}
#[doc = "Field `CTEINFOINS1` reader - CTEInfo is S1 byte or not"]
pub type CTEINFOINS1_R = crate::BitReader<CTEINFOINS1_A>;
#[doc = "CTEInfo is S1 byte or not\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CTEINFOINS1_A {
#[doc = "1: CTEInfo is in S1 byte (data PDU)"]
IN_S1 = 1,
#[doc = "0: CTEInfo is NOT in S1 byte (advertising PDU)"]
NOT_IN_S1 = 0,
}
impl From<CTEINFOINS1_A> for bool {
#[inline(always)]
fn from(variant: CTEINFOINS1_A) -> Self {
variant as u8 != 0
}
}
impl CTEINFOINS1_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> CTEINFOINS1_A {
match self.bits {
true => CTEINFOINS1_A::IN_S1,
false => CTEINFOINS1_A::NOT_IN_S1,
}
}
#[doc = "Checks if the value of the field is `IN_S1`"]
#[inline(always)]
pub fn is_in_s1(&self) -> bool {
*self == CTEINFOINS1_A::IN_S1
}
#[doc = "Checks if the value of the field is `NOT_IN_S1`"]
#[inline(always)]
pub fn is_not_in_s1(&self) -> bool {
*self == CTEINFOINS1_A::NOT_IN_S1
}
}
#[doc = "Field `CTEINFOINS1` writer - CTEInfo is S1 byte or not"]
pub type CTEINFOINS1_W<'a, const O: u8> =
crate::BitWriter<'a, u32, CTEINLINECONF_SPEC, CTEINFOINS1_A, O>;
impl<'a, const O: u8> CTEINFOINS1_W<'a, O> {
#[doc = "CTEInfo is in S1 byte (data PDU)"]
#[inline(always)]
pub fn in_s1(self) -> &'a mut W {
self.variant(CTEINFOINS1_A::IN_S1)
}
#[doc = "CTEInfo is NOT in S1 byte (advertising PDU)"]
#[inline(always)]
pub fn not_in_s1(self) -> &'a mut W {
self.variant(CTEINFOINS1_A::NOT_IN_S1)
}
}
#[doc = "Field `CTEERRORHANDLING` reader - Sampling/switching if CRC is not OK"]
pub type CTEERRORHANDLING_R = crate::BitReader<CTEERRORHANDLING_A>;
#[doc = "Sampling/switching if CRC is not OK\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CTEERRORHANDLING_A {
#[doc = "1: Sampling and antenna switching also when CRC is not OK"]
YES = 1,
#[doc = "0: No sampling and antenna switching when CRC is not OK"]
NO = 0,
}
impl From<CTEERRORHANDLING_A> for bool {
#[inline(always)]
fn from(variant: CTEERRORHANDLING_A) -> Self {
variant as u8 != 0
}
}
impl CTEERRORHANDLING_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> CTEERRORHANDLING_A {
match self.bits {
true => CTEERRORHANDLING_A::YES,
false => CTEERRORHANDLING_A::NO,
}
}
#[doc = "Checks if the value of the field is `YES`"]
#[inline(always)]
pub fn is_yes(&self) -> bool {
*self == CTEERRORHANDLING_A::YES
}
#[doc = "Checks if the value of the field is `NO`"]
#[inline(always)]
pub fn is_no(&self) -> bool {
*self == CTEERRORHANDLING_A::NO
}
}
#[doc = "Field `CTEERRORHANDLING` writer - Sampling/switching if CRC is not OK"]
pub type CTEERRORHANDLING_W<'a, const O: u8> =
crate::BitWriter<'a, u32, CTEINLINECONF_SPEC, CTEERRORHANDLING_A, O>;
impl<'a, const O: u8> CTEERRORHANDLING_W<'a, O> {
#[doc = "Sampling and antenna switching also when CRC is not OK"]
#[inline(always)]
pub fn yes(self) -> &'a mut W {
self.variant(CTEERRORHANDLING_A::YES)
}
#[doc = "No sampling and antenna switching when CRC is not OK"]
#[inline(always)]
pub fn no(self) -> &'a mut W {
self.variant(CTEERRORHANDLING_A::NO)
}
}
#[doc = "Field `CTETIMEVALIDRANGE` reader - Max range of CTETime"]
pub type CTETIMEVALIDRANGE_R = crate::FieldReader<u8, CTETIMEVALIDRANGE_A>;
#[doc = "Max range of CTETime\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum CTETIMEVALIDRANGE_A {
#[doc = "0: 20 in 8 us unit (default) Set to 20 if parsed CTETime is larger than 20"]
_20 = 0,
#[doc = "1: 31 in 8 us unit"]
_31 = 1,
#[doc = "2: 63 in 8 us unit"]
_63 = 2,
}
impl From<CTETIMEVALIDRANGE_A> for u8 {
#[inline(always)]
fn from(variant: CTETIMEVALIDRANGE_A) -> Self {
variant as _
}
}
impl CTETIMEVALIDRANGE_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> Option<CTETIMEVALIDRANGE_A> {
match self.bits {
0 => Some(CTETIMEVALIDRANGE_A::_20),
1 => Some(CTETIMEVALIDRANGE_A::_31),
2 => Some(CTETIMEVALIDRANGE_A::_63),
_ => None,
}
}
#[doc = "Checks if the value of the field is `_20`"]
#[inline(always)]
pub fn is_20(&self) -> bool {
*self == CTETIMEVALIDRANGE_A::_20
}
#[doc = "Checks if the value of the field is `_31`"]
#[inline(always)]
pub fn is_31(&self) -> bool {
*self == CTETIMEVALIDRANGE_A::_31
}
#[doc = "Checks if the value of the field is `_63`"]
#[inline(always)]
pub fn is_63(&self) -> bool {
*self == CTETIMEVALIDRANGE_A::_63
}
}
#[doc = "Field `CTETIMEVALIDRANGE` writer - Max range of CTETime"]
pub type CTETIMEVALIDRANGE_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, CTEINLINECONF_SPEC, u8, CTETIMEVALIDRANGE_A, 2, O>;
impl<'a, const O: u8> CTETIMEVALIDRANGE_W<'a, O> {
#[doc = "20 in 8 us unit (default) Set to 20 if parsed CTETime is larger than 20"]
#[inline(always)]
pub fn _20(self) -> &'a mut W {
self.variant(CTETIMEVALIDRANGE_A::_20)
}
#[doc = "31 in 8 us unit"]
#[inline(always)]
pub fn _31(self) -> &'a mut W {
self.variant(CTETIMEVALIDRANGE_A::_31)
}
#[doc = "63 in 8 us unit"]
#[inline(always)]
pub fn _63(self) -> &'a mut W {
self.variant(CTETIMEVALIDRANGE_A::_63)
}
}
#[doc = "Field `CTEINLINERXMODE1US` reader - Spacing between samples for the samples in the SWITCHING period when CTEINLINEMODE is set."]
pub type CTEINLINERXMODE1US_R = crate::FieldReader<u8, CTEINLINERXMODE1US_A>;
#[doc = "Spacing between samples for the samples in the SWITCHING period when CTEINLINEMODE is set.\n\nValue on reset: 2"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum CTEINLINERXMODE1US_A {
#[doc = "1: 4 us"]
_4US = 1,
#[doc = "2: 2 us"]
_2US = 2,
#[doc = "3: 1 us"]
_1US = 3,
#[doc = "4: 0.5 us"]
_500NS = 4,
#[doc = "5: 0.25 us"]
_250NS = 5,
#[doc = "6: 0.125 us"]
_125NS = 6,
}
impl From<CTEINLINERXMODE1US_A> for u8 {
#[inline(always)]
fn from(variant: CTEINLINERXMODE1US_A) -> Self {
variant as _
}
}
impl CTEINLINERXMODE1US_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> Option<CTEINLINERXMODE1US_A> {
match self.bits {
1 => Some(CTEINLINERXMODE1US_A::_4US),
2 => Some(CTEINLINERXMODE1US_A::_2US),
3 => Some(CTEINLINERXMODE1US_A::_1US),
4 => Some(CTEINLINERXMODE1US_A::_500NS),
5 => Some(CTEINLINERXMODE1US_A::_250NS),
6 => Some(CTEINLINERXMODE1US_A::_125NS),
_ => None,
}
}
#[doc = "Checks if the value of the field is `_4US`"]
#[inline(always)]
pub fn is_4us(&self) -> bool {
*self == CTEINLINERXMODE1US_A::_4US
}
#[doc = "Checks if the value of the field is `_2US`"]
#[inline(always)]
pub fn is_2us(&self) -> bool {
*self == CTEINLINERXMODE1US_A::_2US
}
#[doc = "Checks if the value of the field is `_1US`"]
#[inline(always)]
pub fn is_1us(&self) -> bool {
*self == CTEINLINERXMODE1US_A::_1US
}
#[doc = "Checks if the value of the field is `_500NS`"]
#[inline(always)]
pub fn is_500ns(&self) -> bool {
*self == CTEINLINERXMODE1US_A::_500NS
}
#[doc = "Checks if the value of the field is `_250NS`"]
#[inline(always)]
pub fn is_250ns(&self) -> bool {
*self == CTEINLINERXMODE1US_A::_250NS
}
#[doc = "Checks if the value of the field is `_125NS`"]
#[inline(always)]
pub fn is_125ns(&self) -> bool {
*self == CTEINLINERXMODE1US_A::_125NS
}
}
#[doc = "Field `CTEINLINERXMODE1US` writer - Spacing between samples for the samples in the SWITCHING period when CTEINLINEMODE is set."]
pub type CTEINLINERXMODE1US_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, CTEINLINECONF_SPEC, u8, CTEINLINERXMODE1US_A, 3, O>;
impl<'a, const O: u8> CTEINLINERXMODE1US_W<'a, O> {
#[doc = "4 us"]
#[inline(always)]
pub fn _4us(self) -> &'a mut W {
self.variant(CTEINLINERXMODE1US_A::_4US)
}
#[doc = "2 us"]
#[inline(always)]
pub fn _2us(self) -> &'a mut W {
self.variant(CTEINLINERXMODE1US_A::_2US)
}
#[doc = "1 us"]
#[inline(always)]
pub fn _1us(self) -> &'a mut W {
self.variant(CTEINLINERXMODE1US_A::_1US)
}
#[doc = "0.5 us"]
#[inline(always)]
pub fn _500ns(self) -> &'a mut W {
self.variant(CTEINLINERXMODE1US_A::_500NS)
}
#[doc = "0.25 us"]
#[inline(always)]
pub fn _250ns(self) -> &'a mut W {
self.variant(CTEINLINERXMODE1US_A::_250NS)
}
#[doc = "0.125 us"]
#[inline(always)]
pub fn _125ns(self) -> &'a mut W {
self.variant(CTEINLINERXMODE1US_A::_125NS)
}
}
#[doc = "Field `CTEINLINERXMODE2US` reader - Spacing between samples for the samples in the SWITCHING period when CTEINLINEMODE is set."]
pub type CTEINLINERXMODE2US_R = crate::FieldReader<u8, CTEINLINERXMODE2US_A>;
#[doc = "Spacing between samples for the samples in the SWITCHING period when CTEINLINEMODE is set.\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum CTEINLINERXMODE2US_A {
#[doc = "1: 4 us"]
_4US = 1,
#[doc = "2: 2 us"]
_2US = 2,
#[doc = "3: 1 us"]
_1US = 3,
#[doc = "4: 0.5 us"]
_500NS = 4,
#[doc = "5: 0.25 us"]
_250NS = 5,
#[doc = "6: 0.125 us"]
_125NS = 6,
}
impl From<CTEINLINERXMODE2US_A> for u8 {
#[inline(always)]
fn from(variant: CTEINLINERXMODE2US_A) -> Self {
variant as _
}
}
impl CTEINLINERXMODE2US_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> Option<CTEINLINERXMODE2US_A> {
match self.bits {
1 => Some(CTEINLINERXMODE2US_A::_4US),
2 => Some(CTEINLINERXMODE2US_A::_2US),
3 => Some(CTEINLINERXMODE2US_A::_1US),
4 => Some(CTEINLINERXMODE2US_A::_500NS),
5 => Some(CTEINLINERXMODE2US_A::_250NS),
6 => Some(CTEINLINERXMODE2US_A::_125NS),
_ => None,
}
}
#[doc = "Checks if the value of the field is `_4US`"]
#[inline(always)]
pub fn is_4us(&self) -> bool {
*self == CTEINLINERXMODE2US_A::_4US
}
#[doc = "Checks if the value of the field is `_2US`"]
#[inline(always)]
pub fn is_2us(&self) -> bool {
*self == CTEINLINERXMODE2US_A::_2US
}
#[doc = "Checks if the value of the field is `_1US`"]
#[inline(always)]
pub fn is_1us(&self) -> bool {
*self == CTEINLINERXMODE2US_A::_1US
}
#[doc = "Checks if the value of the field is `_500NS`"]
#[inline(always)]
pub fn is_500ns(&self) -> bool {
*self == CTEINLINERXMODE2US_A::_500NS
}
#[doc = "Checks if the value of the field is `_250NS`"]
#[inline(always)]
pub fn is_250ns(&self) -> bool {
*self == CTEINLINERXMODE2US_A::_250NS
}
#[doc = "Checks if the value of the field is `_125NS`"]
#[inline(always)]
pub fn is_125ns(&self) -> bool {
*self == CTEINLINERXMODE2US_A::_125NS
}
}
#[doc = "Field `CTEINLINERXMODE2US` writer - Spacing between samples for the samples in the SWITCHING period when CTEINLINEMODE is set."]
pub type CTEINLINERXMODE2US_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, CTEINLINECONF_SPEC, u8, CTEINLINERXMODE2US_A, 3, O>;
impl<'a, const O: u8> CTEINLINERXMODE2US_W<'a, O> {
#[doc = "4 us"]
#[inline(always)]
pub fn _4us(self) -> &'a mut W {
self.variant(CTEINLINERXMODE2US_A::_4US)
}
#[doc = "2 us"]
#[inline(always)]
pub fn _2us(self) -> &'a mut W {
self.variant(CTEINLINERXMODE2US_A::_2US)
}
#[doc = "1 us"]
#[inline(always)]
pub fn _1us(self) -> &'a mut W {
self.variant(CTEINLINERXMODE2US_A::_1US)
}
#[doc = "0.5 us"]
#[inline(always)]
pub fn _500ns(self) -> &'a mut W {
self.variant(CTEINLINERXMODE2US_A::_500NS)
}
#[doc = "0.25 us"]
#[inline(always)]
pub fn _250ns(self) -> &'a mut W {
self.variant(CTEINLINERXMODE2US_A::_250NS)
}
#[doc = "0.125 us"]
#[inline(always)]
pub fn _125ns(self) -> &'a mut W {
self.variant(CTEINLINERXMODE2US_A::_125NS)
}
}
#[doc = "Field `S0CONF` reader - S0 bit pattern to match"]
pub type S0CONF_R = crate::FieldReader<u8, u8>;
#[doc = "Field `S0CONF` writer - S0 bit pattern to match"]
pub type S0CONF_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CTEINLINECONF_SPEC, u8, u8, 8, O>;
#[doc = "Field `S0MASK` reader - S0 bit mask to set which bit to match"]
pub type S0MASK_R = crate::FieldReader<u8, u8>;
#[doc = "Field `S0MASK` writer - S0 bit mask to set which bit to match"]
pub type S0MASK_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CTEINLINECONF_SPEC, u8, u8, 8, O>;
impl R {
#[doc = "Bit 0 - Enable parsing of CTEInfo from received packet in BLE modes"]
#[inline(always)]
pub fn cteinlinectrlen(&self) -> CTEINLINECTRLEN_R {
CTEINLINECTRLEN_R::new((self.bits & 1) != 0)
}
#[doc = "Bit 3 - CTEInfo is S1 byte or not"]
#[inline(always)]
pub fn cteinfoins1(&self) -> CTEINFOINS1_R {
CTEINFOINS1_R::new(((self.bits >> 3) & 1) != 0)
}
#[doc = "Bit 4 - Sampling/switching if CRC is not OK"]
#[inline(always)]
pub fn cteerrorhandling(&self) -> CTEERRORHANDLING_R {
CTEERRORHANDLING_R::new(((self.bits >> 4) & 1) != 0)
}
#[doc = "Bits 6:7 - Max range of CTETime"]
#[inline(always)]
pub fn ctetimevalidrange(&self) -> CTETIMEVALIDRANGE_R {
CTETIMEVALIDRANGE_R::new(((self.bits >> 6) & 3) as u8)
}
#[doc = "Bits 10:12 - Spacing between samples for the samples in the SWITCHING period when CTEINLINEMODE is set."]
#[inline(always)]
pub fn cteinlinerxmode1us(&self) -> CTEINLINERXMODE1US_R {
CTEINLINERXMODE1US_R::new(((self.bits >> 10) & 7) as u8)
}
#[doc = "Bits 13:15 - Spacing between samples for the samples in the SWITCHING period when CTEINLINEMODE is set."]
#[inline(always)]
pub fn cteinlinerxmode2us(&self) -> CTEINLINERXMODE2US_R {
CTEINLINERXMODE2US_R::new(((self.bits >> 13) & 7) as u8)
}
#[doc = "Bits 16:23 - S0 bit pattern to match"]
#[inline(always)]
pub fn s0conf(&self) -> S0CONF_R {
S0CONF_R::new(((self.bits >> 16) & 0xff) as u8)
}
#[doc = "Bits 24:31 - S0 bit mask to set which bit to match"]
#[inline(always)]
pub fn s0mask(&self) -> S0MASK_R {
S0MASK_R::new(((self.bits >> 24) & 0xff) as u8)
}
}
impl W {
#[doc = "Bit 0 - Enable parsing of CTEInfo from received packet in BLE modes"]
#[inline(always)]
pub fn cteinlinectrlen(&mut self) -> CTEINLINECTRLEN_W<0> {
CTEINLINECTRLEN_W::new(self)
}
#[doc = "Bit 3 - CTEInfo is S1 byte or not"]
#[inline(always)]
pub fn cteinfoins1(&mut self) -> CTEINFOINS1_W<3> {
CTEINFOINS1_W::new(self)
}
#[doc = "Bit 4 - Sampling/switching if CRC is not OK"]
#[inline(always)]
pub fn cteerrorhandling(&mut self) -> CTEERRORHANDLING_W<4> {
CTEERRORHANDLING_W::new(self)
}
#[doc = "Bits 6:7 - Max range of CTETime"]
#[inline(always)]
pub fn ctetimevalidrange(&mut self) -> CTETIMEVALIDRANGE_W<6> {
CTETIMEVALIDRANGE_W::new(self)
}
#[doc = "Bits 10:12 - Spacing between samples for the samples in the SWITCHING period when CTEINLINEMODE is set."]
#[inline(always)]
pub fn cteinlinerxmode1us(&mut self) -> CTEINLINERXMODE1US_W<10> {
CTEINLINERXMODE1US_W::new(self)
}
#[doc = "Bits 13:15 - Spacing between samples for the samples in the SWITCHING period when CTEINLINEMODE is set."]
#[inline(always)]
pub fn cteinlinerxmode2us(&mut self) -> CTEINLINERXMODE2US_W<13> {
CTEINLINERXMODE2US_W::new(self)
}
#[doc = "Bits 16:23 - S0 bit pattern to match"]
#[inline(always)]
pub fn s0conf(&mut self) -> S0CONF_W<16> {
S0CONF_W::new(self)
}
#[doc = "Bits 24:31 - S0 bit mask to set which bit to match"]
#[inline(always)]
pub fn s0mask(&mut self) -> S0MASK_W<24> {
S0MASK_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Configuration for CTE inline mode\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 [cteinlineconf](index.html) module"]
pub struct CTEINLINECONF_SPEC;
impl crate::RegisterSpec for CTEINLINECONF_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [cteinlineconf::R](R) reader structure"]
impl crate::Readable for CTEINLINECONF_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [cteinlineconf::W](W) writer structure"]
impl crate::Writable for CTEINLINECONF_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets CTEINLINECONF to value 0x2800"]
impl crate::Resettable for CTEINLINECONF_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0x2800
}
}
+54
View File
@@ -0,0 +1,54 @@
#[doc = "Register `CTESTATUS` reader"]
pub struct R(crate::R<CTESTATUS_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CTESTATUS_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CTESTATUS_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CTESTATUS_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `CTETIME` reader - CTETime parsed from packet"]
pub type CTETIME_R = crate::FieldReader<u8, u8>;
#[doc = "Field `RFU` reader - RFU parsed from packet"]
pub type RFU_R = crate::BitReader<bool>;
#[doc = "Field `CTETYPE` reader - CTEType parsed from packet"]
pub type CTETYPE_R = crate::FieldReader<u8, u8>;
impl R {
#[doc = "Bits 0:4 - CTETime parsed from packet"]
#[inline(always)]
pub fn ctetime(&self) -> CTETIME_R {
CTETIME_R::new((self.bits & 0x1f) as u8)
}
#[doc = "Bit 5 - RFU parsed from packet"]
#[inline(always)]
pub fn rfu(&self) -> RFU_R {
RFU_R::new(((self.bits >> 5) & 1) != 0)
}
#[doc = "Bits 6:7 - CTEType parsed from packet"]
#[inline(always)]
pub fn ctetype(&self) -> CTETYPE_R {
CTETYPE_R::new(((self.bits >> 6) & 3) as u8)
}
}
#[doc = "CTEInfo parsed from 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 [ctestatus](index.html) module"]
pub struct CTESTATUS_SPEC;
impl crate::RegisterSpec for CTESTATUS_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [ctestatus::R](R) reader structure"]
impl crate::Readable for CTESTATUS_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets CTESTATUS to value 0"]
impl crate::Resettable for CTESTATUS_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+81
View File
@@ -0,0 +1,81 @@
#[doc = "Register `DAB[%s]` reader"]
pub struct R(crate::R<DAB_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DAB_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DAB_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DAB_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DAB[%s]` writer"]
pub struct W(crate::W<DAB_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DAB_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DAB_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DAB_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `DAB` reader - Device address base segment n"]
pub type DAB_R = crate::FieldReader<u32, u32>;
#[doc = "Field `DAB` writer - Device address base segment n"]
pub type DAB_W<'a, const O: u8> = crate::FieldWriter<'a, u32, DAB_SPEC, u32, u32, 32, O>;
impl R {
#[doc = "Bits 0:31 - Device address base segment n"]
#[inline(always)]
pub fn dab(&self) -> DAB_R {
DAB_R::new(self.bits)
}
}
impl W {
#[doc = "Bits 0:31 - Device address base segment n"]
#[inline(always)]
pub fn dab(&mut self) -> DAB_W<0> {
DAB_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Description collection: Device address base segment n\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [dab](index.html) module"]
pub struct DAB_SPEC;
impl crate::RegisterSpec for DAB_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [dab::R](R) reader structure"]
impl crate::Readable for DAB_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [dab::W](W) writer structure"]
impl crate::Writable for DAB_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DAB[%s]
to value 0"]
impl crate::Resettable for DAB_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+658
View File
@@ -0,0 +1,658 @@
#[doc = "Register `DACNF` reader"]
pub struct R(crate::R<DACNF_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DACNF_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DACNF_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DACNF_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DACNF` writer"]
pub struct W(crate::W<DACNF_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DACNF_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DACNF_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DACNF_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `ENA0` reader - Enable or disable device address matching using device address 0"]
pub type ENA0_R = crate::BitReader<ENA0_A>;
#[doc = "Enable or disable device address matching using device address 0\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ENA0_A {
#[doc = "0: Disabled"]
DISABLED = 0,
#[doc = "1: Enabled"]
ENABLED = 1,
}
impl From<ENA0_A> for bool {
#[inline(always)]
fn from(variant: ENA0_A) -> Self {
variant as u8 != 0
}
}
impl ENA0_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ENA0_A {
match self.bits {
false => ENA0_A::DISABLED,
true => ENA0_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ENA0_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ENA0_A::ENABLED
}
}
#[doc = "Field `ENA0` writer - Enable or disable device address matching using device address 0"]
pub type ENA0_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, ENA0_A, O>;
impl<'a, const O: u8> ENA0_W<'a, O> {
#[doc = "Disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ENA0_A::DISABLED)
}
#[doc = "Enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ENA0_A::ENABLED)
}
}
#[doc = "Field `ENA1` reader - Enable or disable device address matching using device address 1"]
pub type ENA1_R = crate::BitReader<ENA1_A>;
#[doc = "Enable or disable device address matching using device address 1\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ENA1_A {
#[doc = "0: Disabled"]
DISABLED = 0,
#[doc = "1: Enabled"]
ENABLED = 1,
}
impl From<ENA1_A> for bool {
#[inline(always)]
fn from(variant: ENA1_A) -> Self {
variant as u8 != 0
}
}
impl ENA1_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ENA1_A {
match self.bits {
false => ENA1_A::DISABLED,
true => ENA1_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ENA1_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ENA1_A::ENABLED
}
}
#[doc = "Field `ENA1` writer - Enable or disable device address matching using device address 1"]
pub type ENA1_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, ENA1_A, O>;
impl<'a, const O: u8> ENA1_W<'a, O> {
#[doc = "Disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ENA1_A::DISABLED)
}
#[doc = "Enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ENA1_A::ENABLED)
}
}
#[doc = "Field `ENA2` reader - Enable or disable device address matching using device address 2"]
pub type ENA2_R = crate::BitReader<ENA2_A>;
#[doc = "Enable or disable device address matching using device address 2\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ENA2_A {
#[doc = "0: Disabled"]
DISABLED = 0,
#[doc = "1: Enabled"]
ENABLED = 1,
}
impl From<ENA2_A> for bool {
#[inline(always)]
fn from(variant: ENA2_A) -> Self {
variant as u8 != 0
}
}
impl ENA2_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ENA2_A {
match self.bits {
false => ENA2_A::DISABLED,
true => ENA2_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ENA2_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ENA2_A::ENABLED
}
}
#[doc = "Field `ENA2` writer - Enable or disable device address matching using device address 2"]
pub type ENA2_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, ENA2_A, O>;
impl<'a, const O: u8> ENA2_W<'a, O> {
#[doc = "Disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ENA2_A::DISABLED)
}
#[doc = "Enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ENA2_A::ENABLED)
}
}
#[doc = "Field `ENA3` reader - Enable or disable device address matching using device address 3"]
pub type ENA3_R = crate::BitReader<ENA3_A>;
#[doc = "Enable or disable device address matching using device address 3\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ENA3_A {
#[doc = "0: Disabled"]
DISABLED = 0,
#[doc = "1: Enabled"]
ENABLED = 1,
}
impl From<ENA3_A> for bool {
#[inline(always)]
fn from(variant: ENA3_A) -> Self {
variant as u8 != 0
}
}
impl ENA3_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ENA3_A {
match self.bits {
false => ENA3_A::DISABLED,
true => ENA3_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ENA3_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ENA3_A::ENABLED
}
}
#[doc = "Field `ENA3` writer - Enable or disable device address matching using device address 3"]
pub type ENA3_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, ENA3_A, O>;
impl<'a, const O: u8> ENA3_W<'a, O> {
#[doc = "Disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ENA3_A::DISABLED)
}
#[doc = "Enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ENA3_A::ENABLED)
}
}
#[doc = "Field `ENA4` reader - Enable or disable device address matching using device address 4"]
pub type ENA4_R = crate::BitReader<ENA4_A>;
#[doc = "Enable or disable device address matching using device address 4\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ENA4_A {
#[doc = "0: Disabled"]
DISABLED = 0,
#[doc = "1: Enabled"]
ENABLED = 1,
}
impl From<ENA4_A> for bool {
#[inline(always)]
fn from(variant: ENA4_A) -> Self {
variant as u8 != 0
}
}
impl ENA4_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ENA4_A {
match self.bits {
false => ENA4_A::DISABLED,
true => ENA4_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ENA4_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ENA4_A::ENABLED
}
}
#[doc = "Field `ENA4` writer - Enable or disable device address matching using device address 4"]
pub type ENA4_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, ENA4_A, O>;
impl<'a, const O: u8> ENA4_W<'a, O> {
#[doc = "Disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ENA4_A::DISABLED)
}
#[doc = "Enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ENA4_A::ENABLED)
}
}
#[doc = "Field `ENA5` reader - Enable or disable device address matching using device address 5"]
pub type ENA5_R = crate::BitReader<ENA5_A>;
#[doc = "Enable or disable device address matching using device address 5\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ENA5_A {
#[doc = "0: Disabled"]
DISABLED = 0,
#[doc = "1: Enabled"]
ENABLED = 1,
}
impl From<ENA5_A> for bool {
#[inline(always)]
fn from(variant: ENA5_A) -> Self {
variant as u8 != 0
}
}
impl ENA5_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ENA5_A {
match self.bits {
false => ENA5_A::DISABLED,
true => ENA5_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ENA5_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ENA5_A::ENABLED
}
}
#[doc = "Field `ENA5` writer - Enable or disable device address matching using device address 5"]
pub type ENA5_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, ENA5_A, O>;
impl<'a, const O: u8> ENA5_W<'a, O> {
#[doc = "Disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ENA5_A::DISABLED)
}
#[doc = "Enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ENA5_A::ENABLED)
}
}
#[doc = "Field `ENA6` reader - Enable or disable device address matching using device address 6"]
pub type ENA6_R = crate::BitReader<ENA6_A>;
#[doc = "Enable or disable device address matching using device address 6\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ENA6_A {
#[doc = "0: Disabled"]
DISABLED = 0,
#[doc = "1: Enabled"]
ENABLED = 1,
}
impl From<ENA6_A> for bool {
#[inline(always)]
fn from(variant: ENA6_A) -> Self {
variant as u8 != 0
}
}
impl ENA6_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ENA6_A {
match self.bits {
false => ENA6_A::DISABLED,
true => ENA6_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ENA6_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ENA6_A::ENABLED
}
}
#[doc = "Field `ENA6` writer - Enable or disable device address matching using device address 6"]
pub type ENA6_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, ENA6_A, O>;
impl<'a, const O: u8> ENA6_W<'a, O> {
#[doc = "Disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ENA6_A::DISABLED)
}
#[doc = "Enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ENA6_A::ENABLED)
}
}
#[doc = "Field `ENA7` reader - Enable or disable device address matching using device address 7"]
pub type ENA7_R = crate::BitReader<ENA7_A>;
#[doc = "Enable or disable device address matching using device address 7\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ENA7_A {
#[doc = "0: Disabled"]
DISABLED = 0,
#[doc = "1: Enabled"]
ENABLED = 1,
}
impl From<ENA7_A> for bool {
#[inline(always)]
fn from(variant: ENA7_A) -> Self {
variant as u8 != 0
}
}
impl ENA7_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ENA7_A {
match self.bits {
false => ENA7_A::DISABLED,
true => ENA7_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ENA7_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ENA7_A::ENABLED
}
}
#[doc = "Field `ENA7` writer - Enable or disable device address matching using device address 7"]
pub type ENA7_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, ENA7_A, O>;
impl<'a, const O: u8> ENA7_W<'a, O> {
#[doc = "Disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ENA7_A::DISABLED)
}
#[doc = "Enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ENA7_A::ENABLED)
}
}
#[doc = "Field `TXADD0` reader - TxAdd for device address 0"]
pub type TXADD0_R = crate::BitReader<bool>;
#[doc = "Field `TXADD0` writer - TxAdd for device address 0"]
pub type TXADD0_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, bool, O>;
#[doc = "Field `TXADD1` reader - TxAdd for device address 1"]
pub type TXADD1_R = crate::BitReader<bool>;
#[doc = "Field `TXADD1` writer - TxAdd for device address 1"]
pub type TXADD1_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, bool, O>;
#[doc = "Field `TXADD2` reader - TxAdd for device address 2"]
pub type TXADD2_R = crate::BitReader<bool>;
#[doc = "Field `TXADD2` writer - TxAdd for device address 2"]
pub type TXADD2_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, bool, O>;
#[doc = "Field `TXADD3` reader - TxAdd for device address 3"]
pub type TXADD3_R = crate::BitReader<bool>;
#[doc = "Field `TXADD3` writer - TxAdd for device address 3"]
pub type TXADD3_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, bool, O>;
#[doc = "Field `TXADD4` reader - TxAdd for device address 4"]
pub type TXADD4_R = crate::BitReader<bool>;
#[doc = "Field `TXADD4` writer - TxAdd for device address 4"]
pub type TXADD4_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, bool, O>;
#[doc = "Field `TXADD5` reader - TxAdd for device address 5"]
pub type TXADD5_R = crate::BitReader<bool>;
#[doc = "Field `TXADD5` writer - TxAdd for device address 5"]
pub type TXADD5_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, bool, O>;
#[doc = "Field `TXADD6` reader - TxAdd for device address 6"]
pub type TXADD6_R = crate::BitReader<bool>;
#[doc = "Field `TXADD6` writer - TxAdd for device address 6"]
pub type TXADD6_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, bool, O>;
#[doc = "Field `TXADD7` reader - TxAdd for device address 7"]
pub type TXADD7_R = crate::BitReader<bool>;
#[doc = "Field `TXADD7` writer - TxAdd for device address 7"]
pub type TXADD7_W<'a, const O: u8> = crate::BitWriter<'a, u32, DACNF_SPEC, bool, O>;
impl R {
#[doc = "Bit 0 - Enable or disable device address matching using device address 0"]
#[inline(always)]
pub fn ena0(&self) -> ENA0_R {
ENA0_R::new((self.bits & 1) != 0)
}
#[doc = "Bit 1 - Enable or disable device address matching using device address 1"]
#[inline(always)]
pub fn ena1(&self) -> ENA1_R {
ENA1_R::new(((self.bits >> 1) & 1) != 0)
}
#[doc = "Bit 2 - Enable or disable device address matching using device address 2"]
#[inline(always)]
pub fn ena2(&self) -> ENA2_R {
ENA2_R::new(((self.bits >> 2) & 1) != 0)
}
#[doc = "Bit 3 - Enable or disable device address matching using device address 3"]
#[inline(always)]
pub fn ena3(&self) -> ENA3_R {
ENA3_R::new(((self.bits >> 3) & 1) != 0)
}
#[doc = "Bit 4 - Enable or disable device address matching using device address 4"]
#[inline(always)]
pub fn ena4(&self) -> ENA4_R {
ENA4_R::new(((self.bits >> 4) & 1) != 0)
}
#[doc = "Bit 5 - Enable or disable device address matching using device address 5"]
#[inline(always)]
pub fn ena5(&self) -> ENA5_R {
ENA5_R::new(((self.bits >> 5) & 1) != 0)
}
#[doc = "Bit 6 - Enable or disable device address matching using device address 6"]
#[inline(always)]
pub fn ena6(&self) -> ENA6_R {
ENA6_R::new(((self.bits >> 6) & 1) != 0)
}
#[doc = "Bit 7 - Enable or disable device address matching using device address 7"]
#[inline(always)]
pub fn ena7(&self) -> ENA7_R {
ENA7_R::new(((self.bits >> 7) & 1) != 0)
}
#[doc = "Bit 8 - TxAdd for device address 0"]
#[inline(always)]
pub fn txadd0(&self) -> TXADD0_R {
TXADD0_R::new(((self.bits >> 8) & 1) != 0)
}
#[doc = "Bit 9 - TxAdd for device address 1"]
#[inline(always)]
pub fn txadd1(&self) -> TXADD1_R {
TXADD1_R::new(((self.bits >> 9) & 1) != 0)
}
#[doc = "Bit 10 - TxAdd for device address 2"]
#[inline(always)]
pub fn txadd2(&self) -> TXADD2_R {
TXADD2_R::new(((self.bits >> 10) & 1) != 0)
}
#[doc = "Bit 11 - TxAdd for device address 3"]
#[inline(always)]
pub fn txadd3(&self) -> TXADD3_R {
TXADD3_R::new(((self.bits >> 11) & 1) != 0)
}
#[doc = "Bit 12 - TxAdd for device address 4"]
#[inline(always)]
pub fn txadd4(&self) -> TXADD4_R {
TXADD4_R::new(((self.bits >> 12) & 1) != 0)
}
#[doc = "Bit 13 - TxAdd for device address 5"]
#[inline(always)]
pub fn txadd5(&self) -> TXADD5_R {
TXADD5_R::new(((self.bits >> 13) & 1) != 0)
}
#[doc = "Bit 14 - TxAdd for device address 6"]
#[inline(always)]
pub fn txadd6(&self) -> TXADD6_R {
TXADD6_R::new(((self.bits >> 14) & 1) != 0)
}
#[doc = "Bit 15 - TxAdd for device address 7"]
#[inline(always)]
pub fn txadd7(&self) -> TXADD7_R {
TXADD7_R::new(((self.bits >> 15) & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Enable or disable device address matching using device address 0"]
#[inline(always)]
pub fn ena0(&mut self) -> ENA0_W<0> {
ENA0_W::new(self)
}
#[doc = "Bit 1 - Enable or disable device address matching using device address 1"]
#[inline(always)]
pub fn ena1(&mut self) -> ENA1_W<1> {
ENA1_W::new(self)
}
#[doc = "Bit 2 - Enable or disable device address matching using device address 2"]
#[inline(always)]
pub fn ena2(&mut self) -> ENA2_W<2> {
ENA2_W::new(self)
}
#[doc = "Bit 3 - Enable or disable device address matching using device address 3"]
#[inline(always)]
pub fn ena3(&mut self) -> ENA3_W<3> {
ENA3_W::new(self)
}
#[doc = "Bit 4 - Enable or disable device address matching using device address 4"]
#[inline(always)]
pub fn ena4(&mut self) -> ENA4_W<4> {
ENA4_W::new(self)
}
#[doc = "Bit 5 - Enable or disable device address matching using device address 5"]
#[inline(always)]
pub fn ena5(&mut self) -> ENA5_W<5> {
ENA5_W::new(self)
}
#[doc = "Bit 6 - Enable or disable device address matching using device address 6"]
#[inline(always)]
pub fn ena6(&mut self) -> ENA6_W<6> {
ENA6_W::new(self)
}
#[doc = "Bit 7 - Enable or disable device address matching using device address 7"]
#[inline(always)]
pub fn ena7(&mut self) -> ENA7_W<7> {
ENA7_W::new(self)
}
#[doc = "Bit 8 - TxAdd for device address 0"]
#[inline(always)]
pub fn txadd0(&mut self) -> TXADD0_W<8> {
TXADD0_W::new(self)
}
#[doc = "Bit 9 - TxAdd for device address 1"]
#[inline(always)]
pub fn txadd1(&mut self) -> TXADD1_W<9> {
TXADD1_W::new(self)
}
#[doc = "Bit 10 - TxAdd for device address 2"]
#[inline(always)]
pub fn txadd2(&mut self) -> TXADD2_W<10> {
TXADD2_W::new(self)
}
#[doc = "Bit 11 - TxAdd for device address 3"]
#[inline(always)]
pub fn txadd3(&mut self) -> TXADD3_W<11> {
TXADD3_W::new(self)
}
#[doc = "Bit 12 - TxAdd for device address 4"]
#[inline(always)]
pub fn txadd4(&mut self) -> TXADD4_W<12> {
TXADD4_W::new(self)
}
#[doc = "Bit 13 - TxAdd for device address 5"]
#[inline(always)]
pub fn txadd5(&mut self) -> TXADD5_W<13> {
TXADD5_W::new(self)
}
#[doc = "Bit 14 - TxAdd for device address 6"]
#[inline(always)]
pub fn txadd6(&mut self) -> TXADD6_W<14> {
TXADD6_W::new(self)
}
#[doc = "Bit 15 - TxAdd for device address 7"]
#[inline(always)]
pub fn txadd7(&mut self) -> TXADD7_W<15> {
TXADD7_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Device address match configuration\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [dacnf](index.html) module"]
pub struct DACNF_SPEC;
impl crate::RegisterSpec for DACNF_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [dacnf::R](R) reader structure"]
impl crate::Readable for DACNF_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [dacnf::W](W) writer structure"]
impl crate::Writable for DACNF_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DACNF to value 0"]
impl crate::Resettable for DACNF_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+40
View File
@@ -0,0 +1,40 @@
#[doc = "Register `DAI` reader"]
pub struct R(crate::R<DAI_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DAI_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DAI_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DAI_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `DAI` reader - Device address match index"]
pub type DAI_R = crate::FieldReader<u8, u8>;
impl R {
#[doc = "Bits 0:2 - Device address match index"]
#[inline(always)]
pub fn dai(&self) -> DAI_R {
DAI_R::new((self.bits & 7) as u8)
}
}
#[doc = "Device address match index\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [dai](index.html) module"]
pub struct DAI_SPEC;
impl crate::RegisterSpec for DAI_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [dai::R](R) reader structure"]
impl crate::Readable for DAI_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets DAI to value 0"]
impl crate::Resettable for DAI_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+81
View File
@@ -0,0 +1,81 @@
#[doc = "Register `DAP[%s]` reader"]
pub struct R(crate::R<DAP_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DAP_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DAP_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DAP_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DAP[%s]` writer"]
pub struct W(crate::W<DAP_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DAP_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DAP_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DAP_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `DAP` reader - Device address prefix n"]
pub type DAP_R = crate::FieldReader<u16, u16>;
#[doc = "Field `DAP` writer - Device address prefix n"]
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 n"]
#[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 n"]
#[inline(always)]
pub fn dap(&mut self) -> DAP_W<0> {
DAP_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Description collection: Device address prefix n\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [dap](index.html) module"]
pub struct DAP_SPEC;
impl crate::RegisterSpec for DAP_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [dap::R](R) reader structure"]
impl crate::Readable for DAP_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [dap::W](W) writer structure"]
impl crate::Writable for DAP_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DAP[%s]
to value 0"]
impl crate::Resettable for DAP_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+81
View File
@@ -0,0 +1,81 @@
#[doc = "Register `DATAWHITEIV` reader"]
pub struct R(crate::R<DATAWHITEIV_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DATAWHITEIV_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DATAWHITEIV_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DATAWHITEIV_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DATAWHITEIV` writer"]
pub struct W(crate::W<DATAWHITEIV_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DATAWHITEIV_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<DATAWHITEIV_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DATAWHITEIV_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `DATAWHITEIV` reader - Data whitening initial value. Bit 6 is hardwired to '1', writing '0' to it has no effect, and it will always be read back and used by the device as '1'."]
pub type DATAWHITEIV_R = crate::FieldReader<u8, u8>;
#[doc = "Field `DATAWHITEIV` writer - Data whitening initial value. Bit 6 is hardwired to '1', writing '0' to it has no effect, and it will always be read back and used by the device as '1'."]
pub type DATAWHITEIV_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, DATAWHITEIV_SPEC, u8, u8, 7, O>;
impl R {
#[doc = "Bits 0:6 - Data whitening initial value. Bit 6 is hardwired to '1', writing '0' to it has no effect, and it will always be read back and used by the device as '1'."]
#[inline(always)]
pub fn datawhiteiv(&self) -> DATAWHITEIV_R {
DATAWHITEIV_R::new((self.bits & 0x7f) as u8)
}
}
impl W {
#[doc = "Bits 0:6 - Data whitening initial value. Bit 6 is hardwired to '1', writing '0' to it has no effect, and it will always be read back and used by the device as '1'."]
#[inline(always)]
pub fn datawhiteiv(&mut self) -> DATAWHITEIV_W<0> {
DATAWHITEIV_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Data whitening initial value\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [datawhiteiv](index.html) module"]
pub struct DATAWHITEIV_SPEC;
impl crate::RegisterSpec for DATAWHITEIV_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [datawhiteiv::R](R) reader structure"]
impl crate::Readable for DATAWHITEIV_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [datawhiteiv::W](W) writer structure"]
impl crate::Writable for DATAWHITEIV_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DATAWHITEIV to value 0x40"]
impl crate::Resettable for DATAWHITEIV_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0x40
}
}
+572
View File
@@ -0,0 +1,572 @@
#[doc = "Register `DFECTRL1` reader"]
pub struct R(crate::R<DFECTRL1_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DFECTRL1_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DFECTRL1_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DFECTRL1_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DFECTRL1` writer"]
pub struct W(crate::W<DFECTRL1_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DFECTRL1_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<DFECTRL1_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DFECTRL1_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `NUMBEROF8US` reader - Length of the AoA/AoD procedure in number of 8 us units"]
pub type NUMBEROF8US_R = crate::FieldReader<u8, u8>;
#[doc = "Field `NUMBEROF8US` writer - Length of the AoA/AoD procedure in number of 8 us units"]
pub type NUMBEROF8US_W<'a, const O: u8> = crate::FieldWriter<'a, u32, DFECTRL1_SPEC, u8, u8, 6, O>;
#[doc = "Field `DFEINEXTENSION` reader - Add CTE extension and do antenna switching/sampling in this extension"]
pub type DFEINEXTENSION_R = crate::BitReader<DFEINEXTENSION_A>;
#[doc = "Add CTE extension and do antenna switching/sampling in this extension\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DFEINEXTENSION_A {
#[doc = "1: AoA/AoD procedure triggered at end of CRC"]
CRC = 1,
#[doc = "0: Antenna switching/sampling is done in the packet payload"]
PAYLOAD = 0,
}
impl From<DFEINEXTENSION_A> for bool {
#[inline(always)]
fn from(variant: DFEINEXTENSION_A) -> Self {
variant as u8 != 0
}
}
impl DFEINEXTENSION_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> DFEINEXTENSION_A {
match self.bits {
true => DFEINEXTENSION_A::CRC,
false => DFEINEXTENSION_A::PAYLOAD,
}
}
#[doc = "Checks if the value of the field is `CRC`"]
#[inline(always)]
pub fn is_crc(&self) -> bool {
*self == DFEINEXTENSION_A::CRC
}
#[doc = "Checks if the value of the field is `PAYLOAD`"]
#[inline(always)]
pub fn is_payload(&self) -> bool {
*self == DFEINEXTENSION_A::PAYLOAD
}
}
#[doc = "Field `DFEINEXTENSION` writer - Add CTE extension and do antenna switching/sampling in this extension"]
pub type DFEINEXTENSION_W<'a, const O: u8> =
crate::BitWriter<'a, u32, DFECTRL1_SPEC, DFEINEXTENSION_A, O>;
impl<'a, const O: u8> DFEINEXTENSION_W<'a, O> {
#[doc = "AoA/AoD procedure triggered at end of CRC"]
#[inline(always)]
pub fn crc(self) -> &'a mut W {
self.variant(DFEINEXTENSION_A::CRC)
}
#[doc = "Antenna switching/sampling is done in the packet payload"]
#[inline(always)]
pub fn payload(self) -> &'a mut W {
self.variant(DFEINEXTENSION_A::PAYLOAD)
}
}
#[doc = "Field `TSWITCHSPACING` reader - Interval between every time the antenna is changed in the SWITCHING state"]
pub type TSWITCHSPACING_R = crate::FieldReader<u8, TSWITCHSPACING_A>;
#[doc = "Interval between every time the antenna is changed in the SWITCHING state\n\nValue on reset: 2"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum TSWITCHSPACING_A {
#[doc = "1: 4 us"]
_4US = 1,
#[doc = "2: 2 us"]
_2US = 2,
#[doc = "3: 1 us"]
_1US = 3,
}
impl From<TSWITCHSPACING_A> for u8 {
#[inline(always)]
fn from(variant: TSWITCHSPACING_A) -> Self {
variant as _
}
}
impl TSWITCHSPACING_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> Option<TSWITCHSPACING_A> {
match self.bits {
1 => Some(TSWITCHSPACING_A::_4US),
2 => Some(TSWITCHSPACING_A::_2US),
3 => Some(TSWITCHSPACING_A::_1US),
_ => None,
}
}
#[doc = "Checks if the value of the field is `_4US`"]
#[inline(always)]
pub fn is_4us(&self) -> bool {
*self == TSWITCHSPACING_A::_4US
}
#[doc = "Checks if the value of the field is `_2US`"]
#[inline(always)]
pub fn is_2us(&self) -> bool {
*self == TSWITCHSPACING_A::_2US
}
#[doc = "Checks if the value of the field is `_1US`"]
#[inline(always)]
pub fn is_1us(&self) -> bool {
*self == TSWITCHSPACING_A::_1US
}
}
#[doc = "Field `TSWITCHSPACING` writer - Interval between every time the antenna is changed in the SWITCHING state"]
pub type TSWITCHSPACING_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, DFECTRL1_SPEC, u8, TSWITCHSPACING_A, 3, O>;
impl<'a, const O: u8> TSWITCHSPACING_W<'a, O> {
#[doc = "4 us"]
#[inline(always)]
pub fn _4us(self) -> &'a mut W {
self.variant(TSWITCHSPACING_A::_4US)
}
#[doc = "2 us"]
#[inline(always)]
pub fn _2us(self) -> &'a mut W {
self.variant(TSWITCHSPACING_A::_2US)
}
#[doc = "1 us"]
#[inline(always)]
pub fn _1us(self) -> &'a mut W {
self.variant(TSWITCHSPACING_A::_1US)
}
}
#[doc = "Field `TSAMPLESPACINGREF` reader - Interval between samples in the REFERENCE period"]
pub type TSAMPLESPACINGREF_R = crate::FieldReader<u8, TSAMPLESPACINGREF_A>;
#[doc = "Interval between samples in the REFERENCE period\n\nValue on reset: 3"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum TSAMPLESPACINGREF_A {
#[doc = "1: 4 us"]
_4US = 1,
#[doc = "2: 2 us"]
_2US = 2,
#[doc = "3: 1 us"]
_1US = 3,
#[doc = "4: 0.5 us"]
_500NS = 4,
#[doc = "5: 0.25 us"]
_250NS = 5,
#[doc = "6: 0.125 us"]
_125NS = 6,
}
impl From<TSAMPLESPACINGREF_A> for u8 {
#[inline(always)]
fn from(variant: TSAMPLESPACINGREF_A) -> Self {
variant as _
}
}
impl TSAMPLESPACINGREF_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> Option<TSAMPLESPACINGREF_A> {
match self.bits {
1 => Some(TSAMPLESPACINGREF_A::_4US),
2 => Some(TSAMPLESPACINGREF_A::_2US),
3 => Some(TSAMPLESPACINGREF_A::_1US),
4 => Some(TSAMPLESPACINGREF_A::_500NS),
5 => Some(TSAMPLESPACINGREF_A::_250NS),
6 => Some(TSAMPLESPACINGREF_A::_125NS),
_ => None,
}
}
#[doc = "Checks if the value of the field is `_4US`"]
#[inline(always)]
pub fn is_4us(&self) -> bool {
*self == TSAMPLESPACINGREF_A::_4US
}
#[doc = "Checks if the value of the field is `_2US`"]
#[inline(always)]
pub fn is_2us(&self) -> bool {
*self == TSAMPLESPACINGREF_A::_2US
}
#[doc = "Checks if the value of the field is `_1US`"]
#[inline(always)]
pub fn is_1us(&self) -> bool {
*self == TSAMPLESPACINGREF_A::_1US
}
#[doc = "Checks if the value of the field is `_500NS`"]
#[inline(always)]
pub fn is_500ns(&self) -> bool {
*self == TSAMPLESPACINGREF_A::_500NS
}
#[doc = "Checks if the value of the field is `_250NS`"]
#[inline(always)]
pub fn is_250ns(&self) -> bool {
*self == TSAMPLESPACINGREF_A::_250NS
}
#[doc = "Checks if the value of the field is `_125NS`"]
#[inline(always)]
pub fn is_125ns(&self) -> bool {
*self == TSAMPLESPACINGREF_A::_125NS
}
}
#[doc = "Field `TSAMPLESPACINGREF` writer - Interval between samples in the REFERENCE period"]
pub type TSAMPLESPACINGREF_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, DFECTRL1_SPEC, u8, TSAMPLESPACINGREF_A, 3, O>;
impl<'a, const O: u8> TSAMPLESPACINGREF_W<'a, O> {
#[doc = "4 us"]
#[inline(always)]
pub fn _4us(self) -> &'a mut W {
self.variant(TSAMPLESPACINGREF_A::_4US)
}
#[doc = "2 us"]
#[inline(always)]
pub fn _2us(self) -> &'a mut W {
self.variant(TSAMPLESPACINGREF_A::_2US)
}
#[doc = "1 us"]
#[inline(always)]
pub fn _1us(self) -> &'a mut W {
self.variant(TSAMPLESPACINGREF_A::_1US)
}
#[doc = "0.5 us"]
#[inline(always)]
pub fn _500ns(self) -> &'a mut W {
self.variant(TSAMPLESPACINGREF_A::_500NS)
}
#[doc = "0.25 us"]
#[inline(always)]
pub fn _250ns(self) -> &'a mut W {
self.variant(TSAMPLESPACINGREF_A::_250NS)
}
#[doc = "0.125 us"]
#[inline(always)]
pub fn _125ns(self) -> &'a mut W {
self.variant(TSAMPLESPACINGREF_A::_125NS)
}
}
#[doc = "Field `SAMPLETYPE` reader - Whether to sample I/Q or magnitude/phase"]
pub type SAMPLETYPE_R = crate::BitReader<SAMPLETYPE_A>;
#[doc = "Whether to sample I/Q or magnitude/phase\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SAMPLETYPE_A {
#[doc = "0: Complex samples in I and Q"]
IQ = 0,
#[doc = "1: Complex samples as magnitude and phase"]
MAG_PHASE = 1,
}
impl From<SAMPLETYPE_A> for bool {
#[inline(always)]
fn from(variant: SAMPLETYPE_A) -> Self {
variant as u8 != 0
}
}
impl SAMPLETYPE_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> SAMPLETYPE_A {
match self.bits {
false => SAMPLETYPE_A::IQ,
true => SAMPLETYPE_A::MAG_PHASE,
}
}
#[doc = "Checks if the value of the field is `IQ`"]
#[inline(always)]
pub fn is_iq(&self) -> bool {
*self == SAMPLETYPE_A::IQ
}
#[doc = "Checks if the value of the field is `MAG_PHASE`"]
#[inline(always)]
pub fn is_mag_phase(&self) -> bool {
*self == SAMPLETYPE_A::MAG_PHASE
}
}
#[doc = "Field `SAMPLETYPE` writer - Whether to sample I/Q or magnitude/phase"]
pub type SAMPLETYPE_W<'a, const O: u8> = crate::BitWriter<'a, u32, DFECTRL1_SPEC, SAMPLETYPE_A, O>;
impl<'a, const O: u8> SAMPLETYPE_W<'a, O> {
#[doc = "Complex samples in I and Q"]
#[inline(always)]
pub fn iq(self) -> &'a mut W {
self.variant(SAMPLETYPE_A::IQ)
}
#[doc = "Complex samples as magnitude and phase"]
#[inline(always)]
pub fn mag_phase(self) -> &'a mut W {
self.variant(SAMPLETYPE_A::MAG_PHASE)
}
}
#[doc = "Field `TSAMPLESPACING` reader - Interval between samples in the SWITCHING period when CTEINLINECTRLEN is 0"]
pub type TSAMPLESPACING_R = crate::FieldReader<u8, TSAMPLESPACING_A>;
#[doc = "Interval between samples in the SWITCHING period when CTEINLINECTRLEN is 0\n\nValue on reset: 2"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum TSAMPLESPACING_A {
#[doc = "1: 4 us"]
_4US = 1,
#[doc = "2: 2 us"]
_2US = 2,
#[doc = "3: 1 us"]
_1US = 3,
#[doc = "4: 0.5 us"]
_500NS = 4,
#[doc = "5: 0.25 us"]
_250NS = 5,
#[doc = "6: 0.125 us"]
_125NS = 6,
}
impl From<TSAMPLESPACING_A> for u8 {
#[inline(always)]
fn from(variant: TSAMPLESPACING_A) -> Self {
variant as _
}
}
impl TSAMPLESPACING_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> Option<TSAMPLESPACING_A> {
match self.bits {
1 => Some(TSAMPLESPACING_A::_4US),
2 => Some(TSAMPLESPACING_A::_2US),
3 => Some(TSAMPLESPACING_A::_1US),
4 => Some(TSAMPLESPACING_A::_500NS),
5 => Some(TSAMPLESPACING_A::_250NS),
6 => Some(TSAMPLESPACING_A::_125NS),
_ => None,
}
}
#[doc = "Checks if the value of the field is `_4US`"]
#[inline(always)]
pub fn is_4us(&self) -> bool {
*self == TSAMPLESPACING_A::_4US
}
#[doc = "Checks if the value of the field is `_2US`"]
#[inline(always)]
pub fn is_2us(&self) -> bool {
*self == TSAMPLESPACING_A::_2US
}
#[doc = "Checks if the value of the field is `_1US`"]
#[inline(always)]
pub fn is_1us(&self) -> bool {
*self == TSAMPLESPACING_A::_1US
}
#[doc = "Checks if the value of the field is `_500NS`"]
#[inline(always)]
pub fn is_500ns(&self) -> bool {
*self == TSAMPLESPACING_A::_500NS
}
#[doc = "Checks if the value of the field is `_250NS`"]
#[inline(always)]
pub fn is_250ns(&self) -> bool {
*self == TSAMPLESPACING_A::_250NS
}
#[doc = "Checks if the value of the field is `_125NS`"]
#[inline(always)]
pub fn is_125ns(&self) -> bool {
*self == TSAMPLESPACING_A::_125NS
}
}
#[doc = "Field `TSAMPLESPACING` writer - Interval between samples in the SWITCHING period when CTEINLINECTRLEN is 0"]
pub type TSAMPLESPACING_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, DFECTRL1_SPEC, u8, TSAMPLESPACING_A, 3, O>;
impl<'a, const O: u8> TSAMPLESPACING_W<'a, O> {
#[doc = "4 us"]
#[inline(always)]
pub fn _4us(self) -> &'a mut W {
self.variant(TSAMPLESPACING_A::_4US)
}
#[doc = "2 us"]
#[inline(always)]
pub fn _2us(self) -> &'a mut W {
self.variant(TSAMPLESPACING_A::_2US)
}
#[doc = "1 us"]
#[inline(always)]
pub fn _1us(self) -> &'a mut W {
self.variant(TSAMPLESPACING_A::_1US)
}
#[doc = "0.5 us"]
#[inline(always)]
pub fn _500ns(self) -> &'a mut W {
self.variant(TSAMPLESPACING_A::_500NS)
}
#[doc = "0.25 us"]
#[inline(always)]
pub fn _250ns(self) -> &'a mut W {
self.variant(TSAMPLESPACING_A::_250NS)
}
#[doc = "0.125 us"]
#[inline(always)]
pub fn _125ns(self) -> &'a mut W {
self.variant(TSAMPLESPACING_A::_125NS)
}
}
#[doc = "Field `REPEATPATTERN` reader - Repeat each individual antenna pattern N times sequentially, i.e. P0, P0, P1, P1, P2, P2, P3, P3, etc."]
pub type REPEATPATTERN_R = crate::FieldReader<u8, REPEATPATTERN_A>;
#[doc = "Repeat each individual antenna pattern N times sequentially, i.e. P0, P0, P1, P1, P2, P2, P3, P3, etc.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum REPEATPATTERN_A {
#[doc = "0: Do not repeat (1 time in total)"]
NO_REPEAT = 0,
}
impl From<REPEATPATTERN_A> for u8 {
#[inline(always)]
fn from(variant: REPEATPATTERN_A) -> Self {
variant as _
}
}
impl REPEATPATTERN_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> Option<REPEATPATTERN_A> {
match self.bits {
0 => Some(REPEATPATTERN_A::NO_REPEAT),
_ => None,
}
}
#[doc = "Checks if the value of the field is `NO_REPEAT`"]
#[inline(always)]
pub fn is_no_repeat(&self) -> bool {
*self == REPEATPATTERN_A::NO_REPEAT
}
}
#[doc = "Field `REPEATPATTERN` writer - Repeat each individual antenna pattern N times sequentially, i.e. P0, P0, P1, P1, P2, P2, P3, P3, etc."]
pub type REPEATPATTERN_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, DFECTRL1_SPEC, u8, REPEATPATTERN_A, 4, O>;
impl<'a, const O: u8> REPEATPATTERN_W<'a, O> {
#[doc = "Do not repeat (1 time in total)"]
#[inline(always)]
pub fn no_repeat(self) -> &'a mut W {
self.variant(REPEATPATTERN_A::NO_REPEAT)
}
}
#[doc = "Field `AGCBACKOFFGAIN` reader - Gain will be lowered by the specified number of gain steps at the start of CTE"]
pub type AGCBACKOFFGAIN_R = crate::FieldReader<u8, u8>;
#[doc = "Field `AGCBACKOFFGAIN` writer - Gain will be lowered by the specified number of gain steps at the start of CTE"]
pub type AGCBACKOFFGAIN_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, DFECTRL1_SPEC, u8, u8, 4, O>;
impl R {
#[doc = "Bits 0:5 - Length of the AoA/AoD procedure in number of 8 us units"]
#[inline(always)]
pub fn numberof8us(&self) -> NUMBEROF8US_R {
NUMBEROF8US_R::new((self.bits & 0x3f) as u8)
}
#[doc = "Bit 7 - Add CTE extension and do antenna switching/sampling in this extension"]
#[inline(always)]
pub fn dfeinextension(&self) -> DFEINEXTENSION_R {
DFEINEXTENSION_R::new(((self.bits >> 7) & 1) != 0)
}
#[doc = "Bits 8:10 - Interval between every time the antenna is changed in the SWITCHING state"]
#[inline(always)]
pub fn tswitchspacing(&self) -> TSWITCHSPACING_R {
TSWITCHSPACING_R::new(((self.bits >> 8) & 7) as u8)
}
#[doc = "Bits 12:14 - Interval between samples in the REFERENCE period"]
#[inline(always)]
pub fn tsamplespacingref(&self) -> TSAMPLESPACINGREF_R {
TSAMPLESPACINGREF_R::new(((self.bits >> 12) & 7) as u8)
}
#[doc = "Bit 15 - Whether to sample I/Q or magnitude/phase"]
#[inline(always)]
pub fn sampletype(&self) -> SAMPLETYPE_R {
SAMPLETYPE_R::new(((self.bits >> 15) & 1) != 0)
}
#[doc = "Bits 16:18 - Interval between samples in the SWITCHING period when CTEINLINECTRLEN is 0"]
#[inline(always)]
pub fn tsamplespacing(&self) -> TSAMPLESPACING_R {
TSAMPLESPACING_R::new(((self.bits >> 16) & 7) as u8)
}
#[doc = "Bits 20:23 - Repeat each individual antenna pattern N times sequentially, i.e. P0, P0, P1, P1, P2, P2, P3, P3, etc."]
#[inline(always)]
pub fn repeatpattern(&self) -> REPEATPATTERN_R {
REPEATPATTERN_R::new(((self.bits >> 20) & 0x0f) as u8)
}
#[doc = "Bits 24:27 - Gain will be lowered by the specified number of gain steps at the start of CTE"]
#[inline(always)]
pub fn agcbackoffgain(&self) -> AGCBACKOFFGAIN_R {
AGCBACKOFFGAIN_R::new(((self.bits >> 24) & 0x0f) as u8)
}
}
impl W {
#[doc = "Bits 0:5 - Length of the AoA/AoD procedure in number of 8 us units"]
#[inline(always)]
pub fn numberof8us(&mut self) -> NUMBEROF8US_W<0> {
NUMBEROF8US_W::new(self)
}
#[doc = "Bit 7 - Add CTE extension and do antenna switching/sampling in this extension"]
#[inline(always)]
pub fn dfeinextension(&mut self) -> DFEINEXTENSION_W<7> {
DFEINEXTENSION_W::new(self)
}
#[doc = "Bits 8:10 - Interval between every time the antenna is changed in the SWITCHING state"]
#[inline(always)]
pub fn tswitchspacing(&mut self) -> TSWITCHSPACING_W<8> {
TSWITCHSPACING_W::new(self)
}
#[doc = "Bits 12:14 - Interval between samples in the REFERENCE period"]
#[inline(always)]
pub fn tsamplespacingref(&mut self) -> TSAMPLESPACINGREF_W<12> {
TSAMPLESPACINGREF_W::new(self)
}
#[doc = "Bit 15 - Whether to sample I/Q or magnitude/phase"]
#[inline(always)]
pub fn sampletype(&mut self) -> SAMPLETYPE_W<15> {
SAMPLETYPE_W::new(self)
}
#[doc = "Bits 16:18 - Interval between samples in the SWITCHING period when CTEINLINECTRLEN is 0"]
#[inline(always)]
pub fn tsamplespacing(&mut self) -> TSAMPLESPACING_W<16> {
TSAMPLESPACING_W::new(self)
}
#[doc = "Bits 20:23 - Repeat each individual antenna pattern N times sequentially, i.e. P0, P0, P1, P1, P2, P2, P3, P3, etc."]
#[inline(always)]
pub fn repeatpattern(&mut self) -> REPEATPATTERN_W<20> {
REPEATPATTERN_W::new(self)
}
#[doc = "Bits 24:27 - Gain will be lowered by the specified number of gain steps at the start of CTE"]
#[inline(always)]
pub fn agcbackoffgain(&mut self) -> AGCBACKOFFGAIN_W<24> {
AGCBACKOFFGAIN_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 = "Various configuration for Direction finding\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 [dfectrl1](index.html) module"]
pub struct DFECTRL1_SPEC;
impl crate::RegisterSpec for DFECTRL1_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [dfectrl1::R](R) reader structure"]
impl crate::Readable for DFECTRL1_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [dfectrl1::W](W) writer structure"]
impl crate::Writable for DFECTRL1_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DFECTRL1 to value 0x0002_3282"]
impl crate::Resettable for DFECTRL1_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0x0002_3282
}
}
+96
View File
@@ -0,0 +1,96 @@
#[doc = "Register `DFECTRL2` reader"]
pub struct R(crate::R<DFECTRL2_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DFECTRL2_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DFECTRL2_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DFECTRL2_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DFECTRL2` writer"]
pub struct W(crate::W<DFECTRL2_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DFECTRL2_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<DFECTRL2_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DFECTRL2_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `TSWITCHOFFSET` reader - Signed value offset after the end of the CRC before starting switching in number of 16 MHz clock cycles"]
pub type TSWITCHOFFSET_R = crate::FieldReader<u16, u16>;
#[doc = "Field `TSWITCHOFFSET` writer - Signed value offset after the end of the CRC before starting switching in number of 16 MHz clock cycles"]
pub type TSWITCHOFFSET_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, DFECTRL2_SPEC, u16, u16, 13, O>;
#[doc = "Field `TSAMPLEOFFSET` reader - Signed value offset in number of 16 MHz clock cycles for fine tuning of the sampling instant for all IQ samples. With TSAMPLEOFFSET=0 the first sample is taken immediately at the start of the reference period"]
pub type TSAMPLEOFFSET_R = crate::FieldReader<u16, u16>;
#[doc = "Field `TSAMPLEOFFSET` writer - Signed value offset in number of 16 MHz clock cycles for fine tuning of the sampling instant for all IQ samples. With TSAMPLEOFFSET=0 the first sample is taken immediately at the start of the reference period"]
pub type TSAMPLEOFFSET_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, DFECTRL2_SPEC, u16, u16, 12, O>;
impl R {
#[doc = "Bits 0:12 - Signed value offset after the end of the CRC before starting switching in number of 16 MHz clock cycles"]
#[inline(always)]
pub fn tswitchoffset(&self) -> TSWITCHOFFSET_R {
TSWITCHOFFSET_R::new((self.bits & 0x1fff) as u16)
}
#[doc = "Bits 16:27 - Signed value offset in number of 16 MHz clock cycles for fine tuning of the sampling instant for all IQ samples. With TSAMPLEOFFSET=0 the first sample is taken immediately at the start of the reference period"]
#[inline(always)]
pub fn tsampleoffset(&self) -> TSAMPLEOFFSET_R {
TSAMPLEOFFSET_R::new(((self.bits >> 16) & 0x0fff) as u16)
}
}
impl W {
#[doc = "Bits 0:12 - Signed value offset after the end of the CRC before starting switching in number of 16 MHz clock cycles"]
#[inline(always)]
pub fn tswitchoffset(&mut self) -> TSWITCHOFFSET_W<0> {
TSWITCHOFFSET_W::new(self)
}
#[doc = "Bits 16:27 - Signed value offset in number of 16 MHz clock cycles for fine tuning of the sampling instant for all IQ samples. With TSAMPLEOFFSET=0 the first sample is taken immediately at the start of the reference period"]
#[inline(always)]
pub fn tsampleoffset(&mut self) -> TSAMPLEOFFSET_W<16> {
TSAMPLEOFFSET_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Start offset for Direction finding\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 [dfectrl2](index.html) module"]
pub struct DFECTRL2_SPEC;
impl crate::RegisterSpec for DFECTRL2_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [dfectrl2::R](R) reader structure"]
impl crate::Readable for DFECTRL2_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [dfectrl2::W](W) writer structure"]
impl crate::Writable for DFECTRL2_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DFECTRL2 to value 0"]
impl crate::Resettable for DFECTRL2_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+142
View File
@@ -0,0 +1,142 @@
#[doc = "Register `DFEMODE` reader"]
pub struct R(crate::R<DFEMODE_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DFEMODE_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DFEMODE_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DFEMODE_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DFEMODE` writer"]
pub struct W(crate::W<DFEMODE_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DFEMODE_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<DFEMODE_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DFEMODE_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `DFEOPMODE` reader - Direction finding operation mode"]
pub type DFEOPMODE_R = crate::FieldReader<u8, DFEOPMODE_A>;
#[doc = "Direction finding operation mode\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum DFEOPMODE_A {
#[doc = "0: Direction finding mode disabled"]
DISABLED = 0,
#[doc = "2: Direction finding mode set to AoD"]
AO_D = 2,
#[doc = "3: Direction finding mode set to AoA"]
AO_A = 3,
}
impl From<DFEOPMODE_A> for u8 {
#[inline(always)]
fn from(variant: DFEOPMODE_A) -> Self {
variant as _
}
}
impl DFEOPMODE_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> Option<DFEOPMODE_A> {
match self.bits {
0 => Some(DFEOPMODE_A::DISABLED),
2 => Some(DFEOPMODE_A::AO_D),
3 => Some(DFEOPMODE_A::AO_A),
_ => None,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == DFEOPMODE_A::DISABLED
}
#[doc = "Checks if the value of the field is `AO_D`"]
#[inline(always)]
pub fn is_ao_d(&self) -> bool {
*self == DFEOPMODE_A::AO_D
}
#[doc = "Checks if the value of the field is `AO_A`"]
#[inline(always)]
pub fn is_ao_a(&self) -> bool {
*self == DFEOPMODE_A::AO_A
}
}
#[doc = "Field `DFEOPMODE` writer - Direction finding operation mode"]
pub type DFEOPMODE_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, DFEMODE_SPEC, u8, DFEOPMODE_A, 2, O>;
impl<'a, const O: u8> DFEOPMODE_W<'a, O> {
#[doc = "Direction finding mode disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(DFEOPMODE_A::DISABLED)
}
#[doc = "Direction finding mode set to AoD"]
#[inline(always)]
pub fn ao_d(self) -> &'a mut W {
self.variant(DFEOPMODE_A::AO_D)
}
#[doc = "Direction finding mode set to AoA"]
#[inline(always)]
pub fn ao_a(self) -> &'a mut W {
self.variant(DFEOPMODE_A::AO_A)
}
}
impl R {
#[doc = "Bits 0:1 - Direction finding operation mode"]
#[inline(always)]
pub fn dfeopmode(&self) -> DFEOPMODE_R {
DFEOPMODE_R::new((self.bits & 3) as u8)
}
}
impl W {
#[doc = "Bits 0:1 - Direction finding operation mode"]
#[inline(always)]
pub fn dfeopmode(&mut self) -> DFEOPMODE_W<0> {
DFEOPMODE_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 = "Whether to use Angle-of-Arrival (AOA) or Angle-of-Departure (AOD)\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 [dfemode](index.html) module"]
pub struct DFEMODE_SPEC;
impl crate::RegisterSpec for DFEMODE_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [dfemode::R](R) reader structure"]
impl crate::Readable for DFEMODE_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [dfemode::W](W) writer structure"]
impl crate::Writable for DFEMODE_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DFEMODE to value 0"]
impl crate::Resettable for DFEMODE_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+22
View File
@@ -0,0 +1,22 @@
#[doc = r"Register block"]
#[repr(C)]
pub struct DFEPACKET {
#[doc = "0x00 - Data pointer"]
pub ptr: PTR,
#[doc = "0x04 - Maximum number of buffer words to transfer"]
pub maxcnt: MAXCNT,
#[doc = "0x08 - Number of samples transferred in the last transaction"]
pub amount: AMOUNT,
}
#[doc = "PTR (rw) register accessor: an alias for `Reg<PTR_SPEC>`"]
pub type PTR = crate::Reg<ptr::PTR_SPEC>;
#[doc = "Data pointer"]
pub mod ptr;
#[doc = "MAXCNT (rw) register accessor: an alias for `Reg<MAXCNT_SPEC>`"]
pub type MAXCNT = crate::Reg<maxcnt::MAXCNT_SPEC>;
#[doc = "Maximum number of buffer words to transfer"]
pub mod maxcnt;
#[doc = "AMOUNT (r) register accessor: an alias for `Reg<AMOUNT_SPEC>`"]
pub type AMOUNT = crate::Reg<amount::AMOUNT_SPEC>;
#[doc = "Number of samples transferred in the last transaction"]
pub mod amount;
+40
View File
@@ -0,0 +1,40 @@
#[doc = "Register `AMOUNT` reader"]
pub struct R(crate::R<AMOUNT_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<AMOUNT_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<AMOUNT_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<AMOUNT_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `AMOUNT` reader - Number of samples transferred in the last transaction"]
pub type AMOUNT_R = crate::FieldReader<u16, u16>;
impl R {
#[doc = "Bits 0:15 - Number of samples transferred in the last transaction"]
#[inline(always)]
pub fn amount(&self) -> AMOUNT_R {
AMOUNT_R::new((self.bits & 0xffff) as u16)
}
}
#[doc = "Number of samples transferred in the last transaction\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [amount](index.html) module"]
pub struct AMOUNT_SPEC;
impl crate::RegisterSpec for AMOUNT_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [amount::R](R) reader structure"]
impl crate::Readable for AMOUNT_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets AMOUNT to value 0"]
impl crate::Resettable for AMOUNT_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+80
View File
@@ -0,0 +1,80 @@
#[doc = "Register `MAXCNT` reader"]
pub struct R(crate::R<MAXCNT_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<MAXCNT_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<MAXCNT_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<MAXCNT_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `MAXCNT` writer"]
pub struct W(crate::W<MAXCNT_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<MAXCNT_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<MAXCNT_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<MAXCNT_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `MAXCNT` reader - Maximum number of buffer words to transfer"]
pub type MAXCNT_R = crate::FieldReader<u16, u16>;
#[doc = "Field `MAXCNT` writer - Maximum number of buffer words to transfer"]
pub type MAXCNT_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MAXCNT_SPEC, u16, u16, 14, O>;
impl R {
#[doc = "Bits 0:13 - Maximum number of buffer words to transfer"]
#[inline(always)]
pub fn maxcnt(&self) -> MAXCNT_R {
MAXCNT_R::new((self.bits & 0x3fff) as u16)
}
}
impl W {
#[doc = "Bits 0:13 - Maximum number of buffer words to transfer"]
#[inline(always)]
pub fn maxcnt(&mut self) -> MAXCNT_W<0> {
MAXCNT_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Maximum number of buffer words to transfer\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 [maxcnt](index.html) module"]
pub struct MAXCNT_SPEC;
impl crate::RegisterSpec for MAXCNT_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [maxcnt::R](R) reader structure"]
impl crate::Readable for MAXCNT_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [maxcnt::W](W) writer structure"]
impl crate::Writable for MAXCNT_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets MAXCNT to value 0x1000"]
impl crate::Resettable for MAXCNT_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0x1000
}
}
+80
View File
@@ -0,0 +1,80 @@
#[doc = "Register `PTR` reader"]
pub struct R(crate::R<PTR_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<PTR_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<PTR_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<PTR_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `PTR` writer"]
pub struct W(crate::W<PTR_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<PTR_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<PTR_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<PTR_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `PTR` reader - Data pointer"]
pub type PTR_R = crate::FieldReader<u32, u32>;
#[doc = "Field `PTR` writer - Data pointer"]
pub type PTR_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PTR_SPEC, u32, u32, 32, O>;
impl R {
#[doc = "Bits 0:31 - Data pointer"]
#[inline(always)]
pub fn ptr(&self) -> PTR_R {
PTR_R::new(self.bits)
}
}
impl W {
#[doc = "Bits 0:31 - Data pointer"]
#[inline(always)]
pub fn ptr(&mut self) -> PTR_W<0> {
PTR_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Data pointer\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ptr](index.html) module"]
pub struct PTR_SPEC;
impl crate::RegisterSpec for PTR_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [ptr::R](R) reader structure"]
impl crate::Readable for PTR_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [ptr::W](W) writer structure"]
impl crate::Writable for PTR_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets PTR to value 0x0100_0000"]
impl crate::Resettable for PTR_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0x0100_0000
}
}
+149
View File
@@ -0,0 +1,149 @@
#[doc = "Register `DFESTATUS` reader"]
pub struct R(crate::R<DFESTATUS_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DFESTATUS_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DFESTATUS_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DFESTATUS_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `SWITCHINGSTATE` reader - Internal state of switching state machine"]
pub type SWITCHINGSTATE_R = crate::FieldReader<u8, SWITCHINGSTATE_A>;
#[doc = "Internal state of switching state machine\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum SWITCHINGSTATE_A {
#[doc = "0: Switching state Idle"]
IDLE = 0,
#[doc = "1: Switching state Offset"]
OFFSET = 1,
#[doc = "2: Switching state Guard"]
GUARD = 2,
#[doc = "3: Switching state Ref"]
REF = 3,
#[doc = "4: Switching state Switching"]
SWITCHING = 4,
#[doc = "5: Switching state Ending"]
ENDING = 5,
}
impl From<SWITCHINGSTATE_A> for u8 {
#[inline(always)]
fn from(variant: SWITCHINGSTATE_A) -> Self {
variant as _
}
}
impl SWITCHINGSTATE_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> Option<SWITCHINGSTATE_A> {
match self.bits {
0 => Some(SWITCHINGSTATE_A::IDLE),
1 => Some(SWITCHINGSTATE_A::OFFSET),
2 => Some(SWITCHINGSTATE_A::GUARD),
3 => Some(SWITCHINGSTATE_A::REF),
4 => Some(SWITCHINGSTATE_A::SWITCHING),
5 => Some(SWITCHINGSTATE_A::ENDING),
_ => None,
}
}
#[doc = "Checks if the value of the field is `IDLE`"]
#[inline(always)]
pub fn is_idle(&self) -> bool {
*self == SWITCHINGSTATE_A::IDLE
}
#[doc = "Checks if the value of the field is `OFFSET`"]
#[inline(always)]
pub fn is_offset(&self) -> bool {
*self == SWITCHINGSTATE_A::OFFSET
}
#[doc = "Checks if the value of the field is `GUARD`"]
#[inline(always)]
pub fn is_guard(&self) -> bool {
*self == SWITCHINGSTATE_A::GUARD
}
#[doc = "Checks if the value of the field is `REF`"]
#[inline(always)]
pub fn is_ref(&self) -> bool {
*self == SWITCHINGSTATE_A::REF
}
#[doc = "Checks if the value of the field is `SWITCHING`"]
#[inline(always)]
pub fn is_switching(&self) -> bool {
*self == SWITCHINGSTATE_A::SWITCHING
}
#[doc = "Checks if the value of the field is `ENDING`"]
#[inline(always)]
pub fn is_ending(&self) -> bool {
*self == SWITCHINGSTATE_A::ENDING
}
}
#[doc = "Field `SAMPLINGSTATE` reader - Internal state of sampling state machine"]
pub type SAMPLINGSTATE_R = crate::BitReader<SAMPLINGSTATE_A>;
#[doc = "Internal state of sampling state machine\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SAMPLINGSTATE_A {
#[doc = "0: Sampling state Idle"]
IDLE = 0,
#[doc = "1: Sampling state Sampling"]
SAMPLING = 1,
}
impl From<SAMPLINGSTATE_A> for bool {
#[inline(always)]
fn from(variant: SAMPLINGSTATE_A) -> Self {
variant as u8 != 0
}
}
impl SAMPLINGSTATE_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> SAMPLINGSTATE_A {
match self.bits {
false => SAMPLINGSTATE_A::IDLE,
true => SAMPLINGSTATE_A::SAMPLING,
}
}
#[doc = "Checks if the value of the field is `IDLE`"]
#[inline(always)]
pub fn is_idle(&self) -> bool {
*self == SAMPLINGSTATE_A::IDLE
}
#[doc = "Checks if the value of the field is `SAMPLING`"]
#[inline(always)]
pub fn is_sampling(&self) -> bool {
*self == SAMPLINGSTATE_A::SAMPLING
}
}
impl R {
#[doc = "Bits 0:2 - Internal state of switching state machine"]
#[inline(always)]
pub fn switchingstate(&self) -> SWITCHINGSTATE_R {
SWITCHINGSTATE_R::new((self.bits & 7) as u8)
}
#[doc = "Bit 4 - Internal state of sampling state machine"]
#[inline(always)]
pub fn samplingstate(&self) -> SAMPLINGSTATE_R {
SAMPLINGSTATE_R::new(((self.bits >> 4) & 1) != 0)
}
}
#[doc = "DFE status information\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 [dfestatus](index.html) module"]
pub struct DFESTATUS_SPEC;
impl crate::RegisterSpec for DFESTATUS_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [dfestatus::R](R) reader structure"]
impl crate::Readable for DFESTATUS_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets DFESTATUS to value 0"]
impl crate::Resettable for DFESTATUS_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+80
View File
@@ -0,0 +1,80 @@
#[doc = "Register `EDCNT` reader"]
pub struct R(crate::R<EDCNT_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EDCNT_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EDCNT_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EDCNT_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EDCNT` writer"]
pub struct W(crate::W<EDCNT_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EDCNT_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<EDCNT_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EDCNT_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `EDCNT` reader - IEEE 802.15.4 energy detect loop count"]
pub type EDCNT_R = crate::FieldReader<u32, u32>;
#[doc = "Field `EDCNT` writer - IEEE 802.15.4 energy detect loop count"]
pub type EDCNT_W<'a, const O: u8> = crate::FieldWriter<'a, u32, EDCNT_SPEC, u32, u32, 21, O>;
impl R {
#[doc = "Bits 0:20 - IEEE 802.15.4 energy detect loop count"]
#[inline(always)]
pub fn edcnt(&self) -> EDCNT_R {
EDCNT_R::new((self.bits & 0x001f_ffff) as u32)
}
}
impl W {
#[doc = "Bits 0:20 - IEEE 802.15.4 energy detect loop count"]
#[inline(always)]
pub fn edcnt(&mut self) -> EDCNT_W<0> {
EDCNT_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 = "IEEE 802.15.4 energy detect loop count\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 [edcnt](index.html) module"]
pub struct EDCNT_SPEC;
impl crate::RegisterSpec for EDCNT_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [edcnt::R](R) reader structure"]
impl crate::Readable for EDCNT_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [edcnt::W](W) writer structure"]
impl crate::Writable for EDCNT_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EDCNT to value 0"]
impl crate::Resettable for EDCNT_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+40
View File
@@ -0,0 +1,40 @@
#[doc = "Register `EDSAMPLE` reader"]
pub struct R(crate::R<EDSAMPLE_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EDSAMPLE_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EDSAMPLE_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EDSAMPLE_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `EDLVL` reader - IEEE 802.15.4 energy detect level"]
pub type EDLVL_R = crate::FieldReader<u8, u8>;
impl R {
#[doc = "Bits 0:7 - IEEE 802.15.4 energy detect level"]
#[inline(always)]
pub fn edlvl(&self) -> EDLVL_R {
EDLVL_R::new((self.bits & 0xff) as u8)
}
}
#[doc = "IEEE 802.15.4 energy detect level\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 [edsample](index.html) module"]
pub struct EDSAMPLE_SPEC;
impl crate::RegisterSpec for EDSAMPLE_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [edsample::R](R) reader structure"]
impl crate::Readable for EDSAMPLE_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets EDSAMPLE to value 0"]
impl crate::Resettable for EDSAMPLE_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+127
View File
@@ -0,0 +1,127 @@
#[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)
}
}
#[doc = "Field `EVENTS_ADDRESS` reader - Address sent or received"]
pub type EVENTS_ADDRESS_R = crate::BitReader<EVENTS_ADDRESS_A>;
#[doc = "Address sent or received\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EVENTS_ADDRESS_A {
#[doc = "0: Event not generated"]
NOT_GENERATED = 0,
#[doc = "1: Event generated"]
GENERATED = 1,
}
impl From<EVENTS_ADDRESS_A> for bool {
#[inline(always)]
fn from(variant: EVENTS_ADDRESS_A) -> Self {
variant as u8 != 0
}
}
impl EVENTS_ADDRESS_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EVENTS_ADDRESS_A {
match self.bits {
false => EVENTS_ADDRESS_A::NOT_GENERATED,
true => EVENTS_ADDRESS_A::GENERATED,
}
}
#[doc = "Checks if the value of the field is `NOT_GENERATED`"]
#[inline(always)]
pub fn is_not_generated(&self) -> bool {
*self == EVENTS_ADDRESS_A::NOT_GENERATED
}
#[doc = "Checks if the value of the field is `GENERATED`"]
#[inline(always)]
pub fn is_generated(&self) -> bool {
*self == EVENTS_ADDRESS_A::GENERATED
}
}
#[doc = "Field `EVENTS_ADDRESS` writer - Address sent or received"]
pub type EVENTS_ADDRESS_W<'a, const O: u8> =
crate::BitWriter<'a, u32, EVENTS_ADDRESS_SPEC, EVENTS_ADDRESS_A, O>;
impl<'a, const O: u8> EVENTS_ADDRESS_W<'a, O> {
#[doc = "Event not generated"]
#[inline(always)]
pub fn not_generated(self) -> &'a mut W {
self.variant(EVENTS_ADDRESS_A::NOT_GENERATED)
}
#[doc = "Event generated"]
#[inline(always)]
pub fn generated(self) -> &'a mut W {
self.variant(EVENTS_ADDRESS_A::GENERATED)
}
}
impl R {
#[doc = "Bit 0 - Address sent or received"]
#[inline(always)]
pub fn events_address(&self) -> EVENTS_ADDRESS_R {
EVENTS_ADDRESS_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Address sent or received"]
#[inline(always)]
pub fn events_address(&mut self) -> EVENTS_ADDRESS_W<0> {
EVENTS_ADDRESS_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 = "Address sent or received\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [events_address](index.html) module"]
pub struct EVENTS_ADDRESS_SPEC;
impl crate::RegisterSpec for EVENTS_ADDRESS_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_address::R](R) reader structure"]
impl crate::Readable for EVENTS_ADDRESS_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_address::W](W) writer structure"]
impl crate::Writable for EVENTS_ADDRESS_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_ADDRESS to value 0"]
impl crate::Resettable for EVENTS_ADDRESS_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+127
View File
@@ -0,0 +1,127 @@
#[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)
}
}
#[doc = "Field `EVENTS_BCMATCH` reader - Bit counter reached bit count value"]
pub type EVENTS_BCMATCH_R = crate::BitReader<EVENTS_BCMATCH_A>;
#[doc = "Bit counter reached bit count value\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EVENTS_BCMATCH_A {
#[doc = "0: Event not generated"]
NOT_GENERATED = 0,
#[doc = "1: Event generated"]
GENERATED = 1,
}
impl From<EVENTS_BCMATCH_A> for bool {
#[inline(always)]
fn from(variant: EVENTS_BCMATCH_A) -> Self {
variant as u8 != 0
}
}
impl EVENTS_BCMATCH_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EVENTS_BCMATCH_A {
match self.bits {
false => EVENTS_BCMATCH_A::NOT_GENERATED,
true => EVENTS_BCMATCH_A::GENERATED,
}
}
#[doc = "Checks if the value of the field is `NOT_GENERATED`"]
#[inline(always)]
pub fn is_not_generated(&self) -> bool {
*self == EVENTS_BCMATCH_A::NOT_GENERATED
}
#[doc = "Checks if the value of the field is `GENERATED`"]
#[inline(always)]
pub fn is_generated(&self) -> bool {
*self == EVENTS_BCMATCH_A::GENERATED
}
}
#[doc = "Field `EVENTS_BCMATCH` writer - Bit counter reached bit count value"]
pub type EVENTS_BCMATCH_W<'a, const O: u8> =
crate::BitWriter<'a, u32, EVENTS_BCMATCH_SPEC, EVENTS_BCMATCH_A, O>;
impl<'a, const O: u8> EVENTS_BCMATCH_W<'a, O> {
#[doc = "Event not generated"]
#[inline(always)]
pub fn not_generated(self) -> &'a mut W {
self.variant(EVENTS_BCMATCH_A::NOT_GENERATED)
}
#[doc = "Event generated"]
#[inline(always)]
pub fn generated(self) -> &'a mut W {
self.variant(EVENTS_BCMATCH_A::GENERATED)
}
}
impl R {
#[doc = "Bit 0 - Bit counter reached bit count value"]
#[inline(always)]
pub fn events_bcmatch(&self) -> EVENTS_BCMATCH_R {
EVENTS_BCMATCH_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Bit counter reached bit count value"]
#[inline(always)]
pub fn events_bcmatch(&mut self) -> EVENTS_BCMATCH_W<0> {
EVENTS_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 = "Bit counter reached bit count value\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [events_bcmatch](index.html) module"]
pub struct EVENTS_BCMATCH_SPEC;
impl crate::RegisterSpec for EVENTS_BCMATCH_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_bcmatch::R](R) reader structure"]
impl crate::Readable for EVENTS_BCMATCH_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_bcmatch::W](W) writer structure"]
impl crate::Writable for EVENTS_BCMATCH_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_BCMATCH to value 0"]
impl crate::Resettable for EVENTS_BCMATCH_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+127
View File
@@ -0,0 +1,127 @@
#[doc = "Register `EVENTS_CCABUSY` reader"]
pub struct R(crate::R<EVENTS_CCABUSY_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_CCABUSY_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_CCABUSY_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_CCABUSY_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_CCABUSY` writer"]
pub struct W(crate::W<EVENTS_CCABUSY_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_CCABUSY_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_CCABUSY_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_CCABUSY_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `EVENTS_CCABUSY` reader - Wireless medium busy - do not send"]
pub type EVENTS_CCABUSY_R = crate::BitReader<EVENTS_CCABUSY_A>;
#[doc = "Wireless medium busy - do not send\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EVENTS_CCABUSY_A {
#[doc = "0: Event not generated"]
NOT_GENERATED = 0,
#[doc = "1: Event generated"]
GENERATED = 1,
}
impl From<EVENTS_CCABUSY_A> for bool {
#[inline(always)]
fn from(variant: EVENTS_CCABUSY_A) -> Self {
variant as u8 != 0
}
}
impl EVENTS_CCABUSY_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EVENTS_CCABUSY_A {
match self.bits {
false => EVENTS_CCABUSY_A::NOT_GENERATED,
true => EVENTS_CCABUSY_A::GENERATED,
}
}
#[doc = "Checks if the value of the field is `NOT_GENERATED`"]
#[inline(always)]
pub fn is_not_generated(&self) -> bool {
*self == EVENTS_CCABUSY_A::NOT_GENERATED
}
#[doc = "Checks if the value of the field is `GENERATED`"]
#[inline(always)]
pub fn is_generated(&self) -> bool {
*self == EVENTS_CCABUSY_A::GENERATED
}
}
#[doc = "Field `EVENTS_CCABUSY` writer - Wireless medium busy - do not send"]
pub type EVENTS_CCABUSY_W<'a, const O: u8> =
crate::BitWriter<'a, u32, EVENTS_CCABUSY_SPEC, EVENTS_CCABUSY_A, O>;
impl<'a, const O: u8> EVENTS_CCABUSY_W<'a, O> {
#[doc = "Event not generated"]
#[inline(always)]
pub fn not_generated(self) -> &'a mut W {
self.variant(EVENTS_CCABUSY_A::NOT_GENERATED)
}
#[doc = "Event generated"]
#[inline(always)]
pub fn generated(self) -> &'a mut W {
self.variant(EVENTS_CCABUSY_A::GENERATED)
}
}
impl R {
#[doc = "Bit 0 - Wireless medium busy - do not send"]
#[inline(always)]
pub fn events_ccabusy(&self) -> EVENTS_CCABUSY_R {
EVENTS_CCABUSY_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Wireless medium busy - do not send"]
#[inline(always)]
pub fn events_ccabusy(&mut self) -> EVENTS_CCABUSY_W<0> {
EVENTS_CCABUSY_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 = "Wireless medium busy - do not send\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_ccabusy](index.html) module"]
pub struct EVENTS_CCABUSY_SPEC;
impl crate::RegisterSpec for EVENTS_CCABUSY_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_ccabusy::R](R) reader structure"]
impl crate::Readable for EVENTS_CCABUSY_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_ccabusy::W](W) writer structure"]
impl crate::Writable for EVENTS_CCABUSY_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_CCABUSY to value 0"]
impl crate::Resettable for EVENTS_CCABUSY_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+127
View File
@@ -0,0 +1,127 @@
#[doc = "Register `EVENTS_CCAIDLE` reader"]
pub struct R(crate::R<EVENTS_CCAIDLE_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_CCAIDLE_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_CCAIDLE_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_CCAIDLE_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_CCAIDLE` writer"]
pub struct W(crate::W<EVENTS_CCAIDLE_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_CCAIDLE_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_CCAIDLE_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_CCAIDLE_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `EVENTS_CCAIDLE` reader - Wireless medium in idle - clear to send"]
pub type EVENTS_CCAIDLE_R = crate::BitReader<EVENTS_CCAIDLE_A>;
#[doc = "Wireless medium in idle - clear to send\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EVENTS_CCAIDLE_A {
#[doc = "0: Event not generated"]
NOT_GENERATED = 0,
#[doc = "1: Event generated"]
GENERATED = 1,
}
impl From<EVENTS_CCAIDLE_A> for bool {
#[inline(always)]
fn from(variant: EVENTS_CCAIDLE_A) -> Self {
variant as u8 != 0
}
}
impl EVENTS_CCAIDLE_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EVENTS_CCAIDLE_A {
match self.bits {
false => EVENTS_CCAIDLE_A::NOT_GENERATED,
true => EVENTS_CCAIDLE_A::GENERATED,
}
}
#[doc = "Checks if the value of the field is `NOT_GENERATED`"]
#[inline(always)]
pub fn is_not_generated(&self) -> bool {
*self == EVENTS_CCAIDLE_A::NOT_GENERATED
}
#[doc = "Checks if the value of the field is `GENERATED`"]
#[inline(always)]
pub fn is_generated(&self) -> bool {
*self == EVENTS_CCAIDLE_A::GENERATED
}
}
#[doc = "Field `EVENTS_CCAIDLE` writer - Wireless medium in idle - clear to send"]
pub type EVENTS_CCAIDLE_W<'a, const O: u8> =
crate::BitWriter<'a, u32, EVENTS_CCAIDLE_SPEC, EVENTS_CCAIDLE_A, O>;
impl<'a, const O: u8> EVENTS_CCAIDLE_W<'a, O> {
#[doc = "Event not generated"]
#[inline(always)]
pub fn not_generated(self) -> &'a mut W {
self.variant(EVENTS_CCAIDLE_A::NOT_GENERATED)
}
#[doc = "Event generated"]
#[inline(always)]
pub fn generated(self) -> &'a mut W {
self.variant(EVENTS_CCAIDLE_A::GENERATED)
}
}
impl R {
#[doc = "Bit 0 - Wireless medium in idle - clear to send"]
#[inline(always)]
pub fn events_ccaidle(&self) -> EVENTS_CCAIDLE_R {
EVENTS_CCAIDLE_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Wireless medium in idle - clear to send"]
#[inline(always)]
pub fn events_ccaidle(&mut self) -> EVENTS_CCAIDLE_W<0> {
EVENTS_CCAIDLE_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 = "Wireless medium in idle - clear to send\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_ccaidle](index.html) module"]
pub struct EVENTS_CCAIDLE_SPEC;
impl crate::RegisterSpec for EVENTS_CCAIDLE_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_ccaidle::R](R) reader structure"]
impl crate::Readable for EVENTS_CCAIDLE_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_ccaidle::W](W) writer structure"]
impl crate::Writable for EVENTS_CCAIDLE_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_CCAIDLE to value 0"]
impl crate::Resettable for EVENTS_CCAIDLE_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+127
View File
@@ -0,0 +1,127 @@
#[doc = "Register `EVENTS_CCASTOPPED` reader"]
pub struct R(crate::R<EVENTS_CCASTOPPED_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_CCASTOPPED_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_CCASTOPPED_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_CCASTOPPED_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_CCASTOPPED` writer"]
pub struct W(crate::W<EVENTS_CCASTOPPED_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_CCASTOPPED_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_CCASTOPPED_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_CCASTOPPED_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `EVENTS_CCASTOPPED` reader - The CCA has stopped"]
pub type EVENTS_CCASTOPPED_R = crate::BitReader<EVENTS_CCASTOPPED_A>;
#[doc = "The CCA has stopped\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EVENTS_CCASTOPPED_A {
#[doc = "0: Event not generated"]
NOT_GENERATED = 0,
#[doc = "1: Event generated"]
GENERATED = 1,
}
impl From<EVENTS_CCASTOPPED_A> for bool {
#[inline(always)]
fn from(variant: EVENTS_CCASTOPPED_A) -> Self {
variant as u8 != 0
}
}
impl EVENTS_CCASTOPPED_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EVENTS_CCASTOPPED_A {
match self.bits {
false => EVENTS_CCASTOPPED_A::NOT_GENERATED,
true => EVENTS_CCASTOPPED_A::GENERATED,
}
}
#[doc = "Checks if the value of the field is `NOT_GENERATED`"]
#[inline(always)]
pub fn is_not_generated(&self) -> bool {
*self == EVENTS_CCASTOPPED_A::NOT_GENERATED
}
#[doc = "Checks if the value of the field is `GENERATED`"]
#[inline(always)]
pub fn is_generated(&self) -> bool {
*self == EVENTS_CCASTOPPED_A::GENERATED
}
}
#[doc = "Field `EVENTS_CCASTOPPED` writer - The CCA has stopped"]
pub type EVENTS_CCASTOPPED_W<'a, const O: u8> =
crate::BitWriter<'a, u32, EVENTS_CCASTOPPED_SPEC, EVENTS_CCASTOPPED_A, O>;
impl<'a, const O: u8> EVENTS_CCASTOPPED_W<'a, O> {
#[doc = "Event not generated"]
#[inline(always)]
pub fn not_generated(self) -> &'a mut W {
self.variant(EVENTS_CCASTOPPED_A::NOT_GENERATED)
}
#[doc = "Event generated"]
#[inline(always)]
pub fn generated(self) -> &'a mut W {
self.variant(EVENTS_CCASTOPPED_A::GENERATED)
}
}
impl R {
#[doc = "Bit 0 - The CCA has stopped"]
#[inline(always)]
pub fn events_ccastopped(&self) -> EVENTS_CCASTOPPED_R {
EVENTS_CCASTOPPED_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - The CCA has stopped"]
#[inline(always)]
pub fn events_ccastopped(&mut self) -> EVENTS_CCASTOPPED_W<0> {
EVENTS_CCASTOPPED_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "The CCA has stopped\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [events_ccastopped](index.html) module"]
pub struct EVENTS_CCASTOPPED_SPEC;
impl crate::RegisterSpec for EVENTS_CCASTOPPED_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_ccastopped::R](R) reader structure"]
impl crate::Readable for EVENTS_CCASTOPPED_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_ccastopped::W](W) writer structure"]
impl crate::Writable for EVENTS_CCASTOPPED_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_CCASTOPPED to value 0"]
impl crate::Resettable for EVENTS_CCASTOPPED_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+127
View File
@@ -0,0 +1,127 @@
#[doc = "Register `EVENTS_CRCERROR` reader"]
pub struct R(crate::R<EVENTS_CRCERROR_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_CRCERROR_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_CRCERROR_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_CRCERROR_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_CRCERROR` writer"]
pub struct W(crate::W<EVENTS_CRCERROR_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_CRCERROR_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<EVENTS_CRCERROR_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_CRCERROR_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `EVENTS_CRCERROR` reader - Packet received with CRC error"]
pub type EVENTS_CRCERROR_R = crate::BitReader<EVENTS_CRCERROR_A>;
#[doc = "Packet received with CRC error\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EVENTS_CRCERROR_A {
#[doc = "0: Event not generated"]
NOT_GENERATED = 0,
#[doc = "1: Event generated"]
GENERATED = 1,
}
impl From<EVENTS_CRCERROR_A> for bool {
#[inline(always)]
fn from(variant: EVENTS_CRCERROR_A) -> Self {
variant as u8 != 0
}
}
impl EVENTS_CRCERROR_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EVENTS_CRCERROR_A {
match self.bits {
false => EVENTS_CRCERROR_A::NOT_GENERATED,
true => EVENTS_CRCERROR_A::GENERATED,
}
}
#[doc = "Checks if the value of the field is `NOT_GENERATED`"]
#[inline(always)]
pub fn is_not_generated(&self) -> bool {
*self == EVENTS_CRCERROR_A::NOT_GENERATED
}
#[doc = "Checks if the value of the field is `GENERATED`"]
#[inline(always)]
pub fn is_generated(&self) -> bool {
*self == EVENTS_CRCERROR_A::GENERATED
}
}
#[doc = "Field `EVENTS_CRCERROR` writer - Packet received with CRC error"]
pub type EVENTS_CRCERROR_W<'a, const O: u8> =
crate::BitWriter<'a, u32, EVENTS_CRCERROR_SPEC, EVENTS_CRCERROR_A, O>;
impl<'a, const O: u8> EVENTS_CRCERROR_W<'a, O> {
#[doc = "Event not generated"]
#[inline(always)]
pub fn not_generated(self) -> &'a mut W {
self.variant(EVENTS_CRCERROR_A::NOT_GENERATED)
}
#[doc = "Event generated"]
#[inline(always)]
pub fn generated(self) -> &'a mut W {
self.variant(EVENTS_CRCERROR_A::GENERATED)
}
}
impl R {
#[doc = "Bit 0 - Packet received with CRC error"]
#[inline(always)]
pub fn events_crcerror(&self) -> EVENTS_CRCERROR_R {
EVENTS_CRCERROR_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Packet received with CRC error"]
#[inline(always)]
pub fn events_crcerror(&mut self) -> EVENTS_CRCERROR_W<0> {
EVENTS_CRCERROR_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Packet received with CRC error\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [events_crcerror](index.html) module"]
pub struct EVENTS_CRCERROR_SPEC;
impl crate::RegisterSpec for EVENTS_CRCERROR_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_crcerror::R](R) reader structure"]
impl crate::Readable for EVENTS_CRCERROR_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_crcerror::W](W) writer structure"]
impl crate::Writable for EVENTS_CRCERROR_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_CRCERROR to value 0"]
impl crate::Resettable for EVENTS_CRCERROR_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+127
View File
@@ -0,0 +1,127 @@
#[doc = "Register `EVENTS_CRCOK` reader"]
pub struct R(crate::R<EVENTS_CRCOK_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_CRCOK_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_CRCOK_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_CRCOK_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_CRCOK` writer"]
pub struct W(crate::W<EVENTS_CRCOK_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_CRCOK_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<EVENTS_CRCOK_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_CRCOK_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `EVENTS_CRCOK` reader - Packet received with CRC ok"]
pub type EVENTS_CRCOK_R = crate::BitReader<EVENTS_CRCOK_A>;
#[doc = "Packet received with CRC ok\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EVENTS_CRCOK_A {
#[doc = "0: Event not generated"]
NOT_GENERATED = 0,
#[doc = "1: Event generated"]
GENERATED = 1,
}
impl From<EVENTS_CRCOK_A> for bool {
#[inline(always)]
fn from(variant: EVENTS_CRCOK_A) -> Self {
variant as u8 != 0
}
}
impl EVENTS_CRCOK_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EVENTS_CRCOK_A {
match self.bits {
false => EVENTS_CRCOK_A::NOT_GENERATED,
true => EVENTS_CRCOK_A::GENERATED,
}
}
#[doc = "Checks if the value of the field is `NOT_GENERATED`"]
#[inline(always)]
pub fn is_not_generated(&self) -> bool {
*self == EVENTS_CRCOK_A::NOT_GENERATED
}
#[doc = "Checks if the value of the field is `GENERATED`"]
#[inline(always)]
pub fn is_generated(&self) -> bool {
*self == EVENTS_CRCOK_A::GENERATED
}
}
#[doc = "Field `EVENTS_CRCOK` writer - Packet received with CRC ok"]
pub type EVENTS_CRCOK_W<'a, const O: u8> =
crate::BitWriter<'a, u32, EVENTS_CRCOK_SPEC, EVENTS_CRCOK_A, O>;
impl<'a, const O: u8> EVENTS_CRCOK_W<'a, O> {
#[doc = "Event not generated"]
#[inline(always)]
pub fn not_generated(self) -> &'a mut W {
self.variant(EVENTS_CRCOK_A::NOT_GENERATED)
}
#[doc = "Event generated"]
#[inline(always)]
pub fn generated(self) -> &'a mut W {
self.variant(EVENTS_CRCOK_A::GENERATED)
}
}
impl R {
#[doc = "Bit 0 - Packet received with CRC ok"]
#[inline(always)]
pub fn events_crcok(&self) -> EVENTS_CRCOK_R {
EVENTS_CRCOK_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Packet received with CRC ok"]
#[inline(always)]
pub fn events_crcok(&mut self) -> EVENTS_CRCOK_W<0> {
EVENTS_CRCOK_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 received with CRC ok\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [events_crcok](index.html) module"]
pub struct EVENTS_CRCOK_SPEC;
impl crate::RegisterSpec for EVENTS_CRCOK_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_crcok::R](R) reader structure"]
impl crate::Readable for EVENTS_CRCOK_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_crcok::W](W) writer structure"]
impl crate::Writable for EVENTS_CRCOK_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_CRCOK to value 0"]
impl crate::Resettable for EVENTS_CRCOK_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+127
View File
@@ -0,0 +1,127 @@
#[doc = "Register `EVENTS_CTEPRESENT` reader"]
pub struct R(crate::R<EVENTS_CTEPRESENT_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_CTEPRESENT_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_CTEPRESENT_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_CTEPRESENT_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_CTEPRESENT` writer"]
pub struct W(crate::W<EVENTS_CTEPRESENT_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_CTEPRESENT_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_CTEPRESENT_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_CTEPRESENT_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `EVENTS_CTEPRESENT` reader - CTE is present (early warning right after receiving CTEInfo byte)"]
pub type EVENTS_CTEPRESENT_R = crate::BitReader<EVENTS_CTEPRESENT_A>;
#[doc = "CTE is present (early warning right after receiving CTEInfo byte)\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EVENTS_CTEPRESENT_A {
#[doc = "0: Event not generated"]
NOT_GENERATED = 0,
#[doc = "1: Event generated"]
GENERATED = 1,
}
impl From<EVENTS_CTEPRESENT_A> for bool {
#[inline(always)]
fn from(variant: EVENTS_CTEPRESENT_A) -> Self {
variant as u8 != 0
}
}
impl EVENTS_CTEPRESENT_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EVENTS_CTEPRESENT_A {
match self.bits {
false => EVENTS_CTEPRESENT_A::NOT_GENERATED,
true => EVENTS_CTEPRESENT_A::GENERATED,
}
}
#[doc = "Checks if the value of the field is `NOT_GENERATED`"]
#[inline(always)]
pub fn is_not_generated(&self) -> bool {
*self == EVENTS_CTEPRESENT_A::NOT_GENERATED
}
#[doc = "Checks if the value of the field is `GENERATED`"]
#[inline(always)]
pub fn is_generated(&self) -> bool {
*self == EVENTS_CTEPRESENT_A::GENERATED
}
}
#[doc = "Field `EVENTS_CTEPRESENT` writer - CTE is present (early warning right after receiving CTEInfo byte)"]
pub type EVENTS_CTEPRESENT_W<'a, const O: u8> =
crate::BitWriter<'a, u32, EVENTS_CTEPRESENT_SPEC, EVENTS_CTEPRESENT_A, O>;
impl<'a, const O: u8> EVENTS_CTEPRESENT_W<'a, O> {
#[doc = "Event not generated"]
#[inline(always)]
pub fn not_generated(self) -> &'a mut W {
self.variant(EVENTS_CTEPRESENT_A::NOT_GENERATED)
}
#[doc = "Event generated"]
#[inline(always)]
pub fn generated(self) -> &'a mut W {
self.variant(EVENTS_CTEPRESENT_A::GENERATED)
}
}
impl R {
#[doc = "Bit 0 - CTE is present (early warning right after receiving CTEInfo byte)"]
#[inline(always)]
pub fn events_ctepresent(&self) -> EVENTS_CTEPRESENT_R {
EVENTS_CTEPRESENT_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - CTE is present (early warning right after receiving CTEInfo byte)"]
#[inline(always)]
pub fn events_ctepresent(&mut self) -> EVENTS_CTEPRESENT_W<0> {
EVENTS_CTEPRESENT_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 = "CTE is present (early warning right after receiving CTEInfo byte)\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_ctepresent](index.html) module"]
pub struct EVENTS_CTEPRESENT_SPEC;
impl crate::RegisterSpec for EVENTS_CTEPRESENT_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_ctepresent::R](R) reader structure"]
impl crate::Readable for EVENTS_CTEPRESENT_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_ctepresent::W](W) writer structure"]
impl crate::Writable for EVENTS_CTEPRESENT_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_CTEPRESENT to value 0"]
impl crate::Resettable for EVENTS_CTEPRESENT_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+127
View File
@@ -0,0 +1,127 @@
#[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)
}
}
#[doc = "Field `EVENTS_DEVMATCH` reader - A device address match occurred on the last received packet"]
pub type EVENTS_DEVMATCH_R = crate::BitReader<EVENTS_DEVMATCH_A>;
#[doc = "A device address match occurred on the last received packet\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EVENTS_DEVMATCH_A {
#[doc = "0: Event not generated"]
NOT_GENERATED = 0,
#[doc = "1: Event generated"]
GENERATED = 1,
}
impl From<EVENTS_DEVMATCH_A> for bool {
#[inline(always)]
fn from(variant: EVENTS_DEVMATCH_A) -> Self {
variant as u8 != 0
}
}
impl EVENTS_DEVMATCH_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EVENTS_DEVMATCH_A {
match self.bits {
false => EVENTS_DEVMATCH_A::NOT_GENERATED,
true => EVENTS_DEVMATCH_A::GENERATED,
}
}
#[doc = "Checks if the value of the field is `NOT_GENERATED`"]
#[inline(always)]
pub fn is_not_generated(&self) -> bool {
*self == EVENTS_DEVMATCH_A::NOT_GENERATED
}
#[doc = "Checks if the value of the field is `GENERATED`"]
#[inline(always)]
pub fn is_generated(&self) -> bool {
*self == EVENTS_DEVMATCH_A::GENERATED
}
}
#[doc = "Field `EVENTS_DEVMATCH` writer - A device address match occurred on the last received packet"]
pub type EVENTS_DEVMATCH_W<'a, const O: u8> =
crate::BitWriter<'a, u32, EVENTS_DEVMATCH_SPEC, EVENTS_DEVMATCH_A, O>;
impl<'a, const O: u8> EVENTS_DEVMATCH_W<'a, O> {
#[doc = "Event not generated"]
#[inline(always)]
pub fn not_generated(self) -> &'a mut W {
self.variant(EVENTS_DEVMATCH_A::NOT_GENERATED)
}
#[doc = "Event generated"]
#[inline(always)]
pub fn generated(self) -> &'a mut W {
self.variant(EVENTS_DEVMATCH_A::GENERATED)
}
}
impl R {
#[doc = "Bit 0 - A device address match occurred on the last received packet"]
#[inline(always)]
pub fn events_devmatch(&self) -> EVENTS_DEVMATCH_R {
EVENTS_DEVMATCH_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - A device address match occurred on the last received packet"]
#[inline(always)]
pub fn events_devmatch(&mut self) -> EVENTS_DEVMATCH_W<0> {
EVENTS_DEVMATCH_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 = "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
}
}
+127
View File
@@ -0,0 +1,127 @@
#[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)
}
}
#[doc = "Field `EVENTS_DEVMISS` reader - No device address match occurred on the last received packet"]
pub type EVENTS_DEVMISS_R = crate::BitReader<EVENTS_DEVMISS_A>;
#[doc = "No device address match occurred on the last received packet\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EVENTS_DEVMISS_A {
#[doc = "0: Event not generated"]
NOT_GENERATED = 0,
#[doc = "1: Event generated"]
GENERATED = 1,
}
impl From<EVENTS_DEVMISS_A> for bool {
#[inline(always)]
fn from(variant: EVENTS_DEVMISS_A) -> Self {
variant as u8 != 0
}
}
impl EVENTS_DEVMISS_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EVENTS_DEVMISS_A {
match self.bits {
false => EVENTS_DEVMISS_A::NOT_GENERATED,
true => EVENTS_DEVMISS_A::GENERATED,
}
}
#[doc = "Checks if the value of the field is `NOT_GENERATED`"]
#[inline(always)]
pub fn is_not_generated(&self) -> bool {
*self == EVENTS_DEVMISS_A::NOT_GENERATED
}
#[doc = "Checks if the value of the field is `GENERATED`"]
#[inline(always)]
pub fn is_generated(&self) -> bool {
*self == EVENTS_DEVMISS_A::GENERATED
}
}
#[doc = "Field `EVENTS_DEVMISS` writer - No device address match occurred on the last received packet"]
pub type EVENTS_DEVMISS_W<'a, const O: u8> =
crate::BitWriter<'a, u32, EVENTS_DEVMISS_SPEC, EVENTS_DEVMISS_A, O>;
impl<'a, const O: u8> EVENTS_DEVMISS_W<'a, O> {
#[doc = "Event not generated"]
#[inline(always)]
pub fn not_generated(self) -> &'a mut W {
self.variant(EVENTS_DEVMISS_A::NOT_GENERATED)
}
#[doc = "Event generated"]
#[inline(always)]
pub fn generated(self) -> &'a mut W {
self.variant(EVENTS_DEVMISS_A::GENERATED)
}
}
impl R {
#[doc = "Bit 0 - No device address match occurred on the last received packet"]
#[inline(always)]
pub fn events_devmiss(&self) -> EVENTS_DEVMISS_R {
EVENTS_DEVMISS_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - No device address match occurred on the last received packet"]
#[inline(always)]
pub fn events_devmiss(&mut self) -> EVENTS_DEVMISS_W<0> {
EVENTS_DEVMISS_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 = "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
}
}
+127
View File
@@ -0,0 +1,127 @@
#[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)
}
}
#[doc = "Field `EVENTS_DISABLED` reader - RADIO has been disabled"]
pub type EVENTS_DISABLED_R = crate::BitReader<EVENTS_DISABLED_A>;
#[doc = "RADIO has been disabled\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EVENTS_DISABLED_A {
#[doc = "0: Event not generated"]
NOT_GENERATED = 0,
#[doc = "1: Event generated"]
GENERATED = 1,
}
impl From<EVENTS_DISABLED_A> for bool {
#[inline(always)]
fn from(variant: EVENTS_DISABLED_A) -> Self {
variant as u8 != 0
}
}
impl EVENTS_DISABLED_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EVENTS_DISABLED_A {
match self.bits {
false => EVENTS_DISABLED_A::NOT_GENERATED,
true => EVENTS_DISABLED_A::GENERATED,
}
}
#[doc = "Checks if the value of the field is `NOT_GENERATED`"]
#[inline(always)]
pub fn is_not_generated(&self) -> bool {
*self == EVENTS_DISABLED_A::NOT_GENERATED
}
#[doc = "Checks if the value of the field is `GENERATED`"]
#[inline(always)]
pub fn is_generated(&self) -> bool {
*self == EVENTS_DISABLED_A::GENERATED
}
}
#[doc = "Field `EVENTS_DISABLED` writer - RADIO has been disabled"]
pub type EVENTS_DISABLED_W<'a, const O: u8> =
crate::BitWriter<'a, u32, EVENTS_DISABLED_SPEC, EVENTS_DISABLED_A, O>;
impl<'a, const O: u8> EVENTS_DISABLED_W<'a, O> {
#[doc = "Event not generated"]
#[inline(always)]
pub fn not_generated(self) -> &'a mut W {
self.variant(EVENTS_DISABLED_A::NOT_GENERATED)
}
#[doc = "Event generated"]
#[inline(always)]
pub fn generated(self) -> &'a mut W {
self.variant(EVENTS_DISABLED_A::GENERATED)
}
}
impl R {
#[doc = "Bit 0 - RADIO has been disabled"]
#[inline(always)]
pub fn events_disabled(&self) -> EVENTS_DISABLED_R {
EVENTS_DISABLED_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - RADIO has been disabled"]
#[inline(always)]
pub fn events_disabled(&mut self) -> EVENTS_DISABLED_W<0> {
EVENTS_DISABLED_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "RADIO has been disabled\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [events_disabled](index.html) module"]
pub struct EVENTS_DISABLED_SPEC;
impl crate::RegisterSpec for EVENTS_DISABLED_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_disabled::R](R) reader structure"]
impl crate::Readable for EVENTS_DISABLED_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_disabled::W](W) writer structure"]
impl crate::Writable for EVENTS_DISABLED_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_DISABLED to value 0"]
impl crate::Resettable for EVENTS_DISABLED_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+127
View File
@@ -0,0 +1,127 @@
#[doc = "Register `EVENTS_EDEND` reader"]
pub struct R(crate::R<EVENTS_EDEND_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_EDEND_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_EDEND_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_EDEND_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_EDEND` writer"]
pub struct W(crate::W<EVENTS_EDEND_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_EDEND_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_EDEND_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_EDEND_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `EVENTS_EDEND` reader - Sampling of energy detection complete. A new ED sample is ready for readout from the RADIO.EDSAMPLE register."]
pub type EVENTS_EDEND_R = crate::BitReader<EVENTS_EDEND_A>;
#[doc = "Sampling of energy detection complete. A new ED sample is ready for readout from the RADIO.EDSAMPLE register.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EVENTS_EDEND_A {
#[doc = "0: Event not generated"]
NOT_GENERATED = 0,
#[doc = "1: Event generated"]
GENERATED = 1,
}
impl From<EVENTS_EDEND_A> for bool {
#[inline(always)]
fn from(variant: EVENTS_EDEND_A) -> Self {
variant as u8 != 0
}
}
impl EVENTS_EDEND_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EVENTS_EDEND_A {
match self.bits {
false => EVENTS_EDEND_A::NOT_GENERATED,
true => EVENTS_EDEND_A::GENERATED,
}
}
#[doc = "Checks if the value of the field is `NOT_GENERATED`"]
#[inline(always)]
pub fn is_not_generated(&self) -> bool {
*self == EVENTS_EDEND_A::NOT_GENERATED
}
#[doc = "Checks if the value of the field is `GENERATED`"]
#[inline(always)]
pub fn is_generated(&self) -> bool {
*self == EVENTS_EDEND_A::GENERATED
}
}
#[doc = "Field `EVENTS_EDEND` writer - Sampling of energy detection complete. A new ED sample is ready for readout from the RADIO.EDSAMPLE register."]
pub type EVENTS_EDEND_W<'a, const O: u8> =
crate::BitWriter<'a, u32, EVENTS_EDEND_SPEC, EVENTS_EDEND_A, O>;
impl<'a, const O: u8> EVENTS_EDEND_W<'a, O> {
#[doc = "Event not generated"]
#[inline(always)]
pub fn not_generated(self) -> &'a mut W {
self.variant(EVENTS_EDEND_A::NOT_GENERATED)
}
#[doc = "Event generated"]
#[inline(always)]
pub fn generated(self) -> &'a mut W {
self.variant(EVENTS_EDEND_A::GENERATED)
}
}
impl R {
#[doc = "Bit 0 - Sampling of energy detection complete. A new ED sample is ready for readout from the RADIO.EDSAMPLE register."]
#[inline(always)]
pub fn events_edend(&self) -> EVENTS_EDEND_R {
EVENTS_EDEND_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Sampling of energy detection complete. A new ED sample is ready for readout from the RADIO.EDSAMPLE register."]
#[inline(always)]
pub fn events_edend(&mut self) -> EVENTS_EDEND_W<0> {
EVENTS_EDEND_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 = "Sampling of energy detection complete. A new ED sample is ready for readout from the RADIO.EDSAMPLE 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_edend](index.html) module"]
pub struct EVENTS_EDEND_SPEC;
impl crate::RegisterSpec for EVENTS_EDEND_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_edend::R](R) reader structure"]
impl crate::Readable for EVENTS_EDEND_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_edend::W](W) writer structure"]
impl crate::Writable for EVENTS_EDEND_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_EDEND to value 0"]
impl crate::Resettable for EVENTS_EDEND_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+127
View File
@@ -0,0 +1,127 @@
#[doc = "Register `EVENTS_EDSTOPPED` reader"]
pub struct R(crate::R<EVENTS_EDSTOPPED_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_EDSTOPPED_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_EDSTOPPED_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_EDSTOPPED_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_EDSTOPPED` writer"]
pub struct W(crate::W<EVENTS_EDSTOPPED_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_EDSTOPPED_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_EDSTOPPED_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_EDSTOPPED_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `EVENTS_EDSTOPPED` reader - The sampling of energy detection has stopped"]
pub type EVENTS_EDSTOPPED_R = crate::BitReader<EVENTS_EDSTOPPED_A>;
#[doc = "The sampling of energy detection has stopped\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EVENTS_EDSTOPPED_A {
#[doc = "0: Event not generated"]
NOT_GENERATED = 0,
#[doc = "1: Event generated"]
GENERATED = 1,
}
impl From<EVENTS_EDSTOPPED_A> for bool {
#[inline(always)]
fn from(variant: EVENTS_EDSTOPPED_A) -> Self {
variant as u8 != 0
}
}
impl EVENTS_EDSTOPPED_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EVENTS_EDSTOPPED_A {
match self.bits {
false => EVENTS_EDSTOPPED_A::NOT_GENERATED,
true => EVENTS_EDSTOPPED_A::GENERATED,
}
}
#[doc = "Checks if the value of the field is `NOT_GENERATED`"]
#[inline(always)]
pub fn is_not_generated(&self) -> bool {
*self == EVENTS_EDSTOPPED_A::NOT_GENERATED
}
#[doc = "Checks if the value of the field is `GENERATED`"]
#[inline(always)]
pub fn is_generated(&self) -> bool {
*self == EVENTS_EDSTOPPED_A::GENERATED
}
}
#[doc = "Field `EVENTS_EDSTOPPED` writer - The sampling of energy detection has stopped"]
pub type EVENTS_EDSTOPPED_W<'a, const O: u8> =
crate::BitWriter<'a, u32, EVENTS_EDSTOPPED_SPEC, EVENTS_EDSTOPPED_A, O>;
impl<'a, const O: u8> EVENTS_EDSTOPPED_W<'a, O> {
#[doc = "Event not generated"]
#[inline(always)]
pub fn not_generated(self) -> &'a mut W {
self.variant(EVENTS_EDSTOPPED_A::NOT_GENERATED)
}
#[doc = "Event generated"]
#[inline(always)]
pub fn generated(self) -> &'a mut W {
self.variant(EVENTS_EDSTOPPED_A::GENERATED)
}
}
impl R {
#[doc = "Bit 0 - The sampling of energy detection has stopped"]
#[inline(always)]
pub fn events_edstopped(&self) -> EVENTS_EDSTOPPED_R {
EVENTS_EDSTOPPED_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - The sampling of energy detection has stopped"]
#[inline(always)]
pub fn events_edstopped(&mut self) -> EVENTS_EDSTOPPED_W<0> {
EVENTS_EDSTOPPED_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "The sampling of energy detection has stopped\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [events_edstopped](index.html) module"]
pub struct EVENTS_EDSTOPPED_SPEC;
impl crate::RegisterSpec for EVENTS_EDSTOPPED_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_edstopped::R](R) reader structure"]
impl crate::Readable for EVENTS_EDSTOPPED_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_edstopped::W](W) writer structure"]
impl crate::Writable for EVENTS_EDSTOPPED_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_EDSTOPPED to value 0"]
impl crate::Resettable for EVENTS_EDSTOPPED_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+127
View File
@@ -0,0 +1,127 @@
#[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)
}
}
#[doc = "Field `EVENTS_END` reader - Packet sent or received"]
pub type EVENTS_END_R = crate::BitReader<EVENTS_END_A>;
#[doc = "Packet sent or received\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EVENTS_END_A {
#[doc = "0: Event not generated"]
NOT_GENERATED = 0,
#[doc = "1: Event generated"]
GENERATED = 1,
}
impl From<EVENTS_END_A> for bool {
#[inline(always)]
fn from(variant: EVENTS_END_A) -> Self {
variant as u8 != 0
}
}
impl EVENTS_END_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EVENTS_END_A {
match self.bits {
false => EVENTS_END_A::NOT_GENERATED,
true => EVENTS_END_A::GENERATED,
}
}
#[doc = "Checks if the value of the field is `NOT_GENERATED`"]
#[inline(always)]
pub fn is_not_generated(&self) -> bool {
*self == EVENTS_END_A::NOT_GENERATED
}
#[doc = "Checks if the value of the field is `GENERATED`"]
#[inline(always)]
pub fn is_generated(&self) -> bool {
*self == EVENTS_END_A::GENERATED
}
}
#[doc = "Field `EVENTS_END` writer - Packet sent or received"]
pub type EVENTS_END_W<'a, const O: u8> =
crate::BitWriter<'a, u32, EVENTS_END_SPEC, EVENTS_END_A, O>;
impl<'a, const O: u8> EVENTS_END_W<'a, O> {
#[doc = "Event not generated"]
#[inline(always)]
pub fn not_generated(self) -> &'a mut W {
self.variant(EVENTS_END_A::NOT_GENERATED)
}
#[doc = "Event generated"]
#[inline(always)]
pub fn generated(self) -> &'a mut W {
self.variant(EVENTS_END_A::GENERATED)
}
}
impl R {
#[doc = "Bit 0 - Packet sent or received"]
#[inline(always)]
pub fn events_end(&self) -> EVENTS_END_R {
EVENTS_END_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Packet sent or received"]
#[inline(always)]
pub fn events_end(&mut self) -> EVENTS_END_W<0> {
EVENTS_END_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 sent or received\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [events_end](index.html) module"]
pub struct EVENTS_END_SPEC;
impl crate::RegisterSpec for EVENTS_END_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_end::R](R) reader structure"]
impl crate::Readable for EVENTS_END_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_end::W](W) writer structure"]
impl crate::Writable for EVENTS_END_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_END to value 0"]
impl crate::Resettable for EVENTS_END_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+127
View File
@@ -0,0 +1,127 @@
#[doc = "Register `EVENTS_FRAMESTART` reader"]
pub struct R(crate::R<EVENTS_FRAMESTART_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_FRAMESTART_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_FRAMESTART_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_FRAMESTART_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_FRAMESTART` writer"]
pub struct W(crate::W<EVENTS_FRAMESTART_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_FRAMESTART_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_FRAMESTART_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_FRAMESTART_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `EVENTS_FRAMESTART` reader - IEEE 802.15.4 length field received"]
pub type EVENTS_FRAMESTART_R = crate::BitReader<EVENTS_FRAMESTART_A>;
#[doc = "IEEE 802.15.4 length field received\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EVENTS_FRAMESTART_A {
#[doc = "0: Event not generated"]
NOT_GENERATED = 0,
#[doc = "1: Event generated"]
GENERATED = 1,
}
impl From<EVENTS_FRAMESTART_A> for bool {
#[inline(always)]
fn from(variant: EVENTS_FRAMESTART_A) -> Self {
variant as u8 != 0
}
}
impl EVENTS_FRAMESTART_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EVENTS_FRAMESTART_A {
match self.bits {
false => EVENTS_FRAMESTART_A::NOT_GENERATED,
true => EVENTS_FRAMESTART_A::GENERATED,
}
}
#[doc = "Checks if the value of the field is `NOT_GENERATED`"]
#[inline(always)]
pub fn is_not_generated(&self) -> bool {
*self == EVENTS_FRAMESTART_A::NOT_GENERATED
}
#[doc = "Checks if the value of the field is `GENERATED`"]
#[inline(always)]
pub fn is_generated(&self) -> bool {
*self == EVENTS_FRAMESTART_A::GENERATED
}
}
#[doc = "Field `EVENTS_FRAMESTART` writer - IEEE 802.15.4 length field received"]
pub type EVENTS_FRAMESTART_W<'a, const O: u8> =
crate::BitWriter<'a, u32, EVENTS_FRAMESTART_SPEC, EVENTS_FRAMESTART_A, O>;
impl<'a, const O: u8> EVENTS_FRAMESTART_W<'a, O> {
#[doc = "Event not generated"]
#[inline(always)]
pub fn not_generated(self) -> &'a mut W {
self.variant(EVENTS_FRAMESTART_A::NOT_GENERATED)
}
#[doc = "Event generated"]
#[inline(always)]
pub fn generated(self) -> &'a mut W {
self.variant(EVENTS_FRAMESTART_A::GENERATED)
}
}
impl R {
#[doc = "Bit 0 - IEEE 802.15.4 length field received"]
#[inline(always)]
pub fn events_framestart(&self) -> EVENTS_FRAMESTART_R {
EVENTS_FRAMESTART_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - IEEE 802.15.4 length field received"]
#[inline(always)]
pub fn events_framestart(&mut self) -> EVENTS_FRAMESTART_W<0> {
EVENTS_FRAMESTART_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 = "IEEE 802.15.4 length field received\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [events_framestart](index.html) module"]
pub struct EVENTS_FRAMESTART_SPEC;
impl crate::RegisterSpec for EVENTS_FRAMESTART_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_framestart::R](R) reader structure"]
impl crate::Readable for EVENTS_FRAMESTART_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_framestart::W](W) writer structure"]
impl crate::Writable for EVENTS_FRAMESTART_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_FRAMESTART to value 0"]
impl crate::Resettable for EVENTS_FRAMESTART_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+127
View File
@@ -0,0 +1,127 @@
#[doc = "Register `EVENTS_MHRMATCH` reader"]
pub struct R(crate::R<EVENTS_MHRMATCH_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_MHRMATCH_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_MHRMATCH_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_MHRMATCH_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_MHRMATCH` writer"]
pub struct W(crate::W<EVENTS_MHRMATCH_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_MHRMATCH_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_MHRMATCH_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_MHRMATCH_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `EVENTS_MHRMATCH` reader - MAC header match found"]
pub type EVENTS_MHRMATCH_R = crate::BitReader<EVENTS_MHRMATCH_A>;
#[doc = "MAC header match found\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EVENTS_MHRMATCH_A {
#[doc = "0: Event not generated"]
NOT_GENERATED = 0,
#[doc = "1: Event generated"]
GENERATED = 1,
}
impl From<EVENTS_MHRMATCH_A> for bool {
#[inline(always)]
fn from(variant: EVENTS_MHRMATCH_A) -> Self {
variant as u8 != 0
}
}
impl EVENTS_MHRMATCH_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EVENTS_MHRMATCH_A {
match self.bits {
false => EVENTS_MHRMATCH_A::NOT_GENERATED,
true => EVENTS_MHRMATCH_A::GENERATED,
}
}
#[doc = "Checks if the value of the field is `NOT_GENERATED`"]
#[inline(always)]
pub fn is_not_generated(&self) -> bool {
*self == EVENTS_MHRMATCH_A::NOT_GENERATED
}
#[doc = "Checks if the value of the field is `GENERATED`"]
#[inline(always)]
pub fn is_generated(&self) -> bool {
*self == EVENTS_MHRMATCH_A::GENERATED
}
}
#[doc = "Field `EVENTS_MHRMATCH` writer - MAC header match found"]
pub type EVENTS_MHRMATCH_W<'a, const O: u8> =
crate::BitWriter<'a, u32, EVENTS_MHRMATCH_SPEC, EVENTS_MHRMATCH_A, O>;
impl<'a, const O: u8> EVENTS_MHRMATCH_W<'a, O> {
#[doc = "Event not generated"]
#[inline(always)]
pub fn not_generated(self) -> &'a mut W {
self.variant(EVENTS_MHRMATCH_A::NOT_GENERATED)
}
#[doc = "Event generated"]
#[inline(always)]
pub fn generated(self) -> &'a mut W {
self.variant(EVENTS_MHRMATCH_A::GENERATED)
}
}
impl R {
#[doc = "Bit 0 - MAC header match found"]
#[inline(always)]
pub fn events_mhrmatch(&self) -> EVENTS_MHRMATCH_R {
EVENTS_MHRMATCH_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - MAC header match found"]
#[inline(always)]
pub fn events_mhrmatch(&mut self) -> EVENTS_MHRMATCH_W<0> {
EVENTS_MHRMATCH_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 = "MAC header match found\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_mhrmatch](index.html) module"]
pub struct EVENTS_MHRMATCH_SPEC;
impl crate::RegisterSpec for EVENTS_MHRMATCH_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_mhrmatch::R](R) reader structure"]
impl crate::Readable for EVENTS_MHRMATCH_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_mhrmatch::W](W) writer structure"]
impl crate::Writable for EVENTS_MHRMATCH_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_MHRMATCH to value 0"]
impl crate::Resettable for EVENTS_MHRMATCH_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+127
View File
@@ -0,0 +1,127 @@
#[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)
}
}
#[doc = "Field `EVENTS_PAYLOAD` reader - Packet payload sent or received"]
pub type EVENTS_PAYLOAD_R = crate::BitReader<EVENTS_PAYLOAD_A>;
#[doc = "Packet payload sent or received\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EVENTS_PAYLOAD_A {
#[doc = "0: Event not generated"]
NOT_GENERATED = 0,
#[doc = "1: Event generated"]
GENERATED = 1,
}
impl From<EVENTS_PAYLOAD_A> for bool {
#[inline(always)]
fn from(variant: EVENTS_PAYLOAD_A) -> Self {
variant as u8 != 0
}
}
impl EVENTS_PAYLOAD_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EVENTS_PAYLOAD_A {
match self.bits {
false => EVENTS_PAYLOAD_A::NOT_GENERATED,
true => EVENTS_PAYLOAD_A::GENERATED,
}
}
#[doc = "Checks if the value of the field is `NOT_GENERATED`"]
#[inline(always)]
pub fn is_not_generated(&self) -> bool {
*self == EVENTS_PAYLOAD_A::NOT_GENERATED
}
#[doc = "Checks if the value of the field is `GENERATED`"]
#[inline(always)]
pub fn is_generated(&self) -> bool {
*self == EVENTS_PAYLOAD_A::GENERATED
}
}
#[doc = "Field `EVENTS_PAYLOAD` writer - Packet payload sent or received"]
pub type EVENTS_PAYLOAD_W<'a, const O: u8> =
crate::BitWriter<'a, u32, EVENTS_PAYLOAD_SPEC, EVENTS_PAYLOAD_A, O>;
impl<'a, const O: u8> EVENTS_PAYLOAD_W<'a, O> {
#[doc = "Event not generated"]
#[inline(always)]
pub fn not_generated(self) -> &'a mut W {
self.variant(EVENTS_PAYLOAD_A::NOT_GENERATED)
}
#[doc = "Event generated"]
#[inline(always)]
pub fn generated(self) -> &'a mut W {
self.variant(EVENTS_PAYLOAD_A::GENERATED)
}
}
impl R {
#[doc = "Bit 0 - Packet payload sent or received"]
#[inline(always)]
pub fn events_payload(&self) -> EVENTS_PAYLOAD_R {
EVENTS_PAYLOAD_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Packet payload sent or received"]
#[inline(always)]
pub fn events_payload(&mut self) -> EVENTS_PAYLOAD_W<0> {
EVENTS_PAYLOAD_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 payload sent or received\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [events_payload](index.html) module"]
pub struct EVENTS_PAYLOAD_SPEC;
impl crate::RegisterSpec for EVENTS_PAYLOAD_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_payload::R](R) reader structure"]
impl crate::Readable for EVENTS_PAYLOAD_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_payload::W](W) writer structure"]
impl crate::Writable for EVENTS_PAYLOAD_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_PAYLOAD to value 0"]
impl crate::Resettable for EVENTS_PAYLOAD_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+127
View File
@@ -0,0 +1,127 @@
#[doc = "Register `EVENTS_PHYEND` reader"]
pub struct R(crate::R<EVENTS_PHYEND_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_PHYEND_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_PHYEND_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_PHYEND_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_PHYEND` writer"]
pub struct W(crate::W<EVENTS_PHYEND_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_PHYEND_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_PHYEND_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_PHYEND_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `EVENTS_PHYEND` reader - Generated when last bit is sent on air, or received from air"]
pub type EVENTS_PHYEND_R = crate::BitReader<EVENTS_PHYEND_A>;
#[doc = "Generated when last bit is sent on air, or received from air\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EVENTS_PHYEND_A {
#[doc = "0: Event not generated"]
NOT_GENERATED = 0,
#[doc = "1: Event generated"]
GENERATED = 1,
}
impl From<EVENTS_PHYEND_A> for bool {
#[inline(always)]
fn from(variant: EVENTS_PHYEND_A) -> Self {
variant as u8 != 0
}
}
impl EVENTS_PHYEND_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EVENTS_PHYEND_A {
match self.bits {
false => EVENTS_PHYEND_A::NOT_GENERATED,
true => EVENTS_PHYEND_A::GENERATED,
}
}
#[doc = "Checks if the value of the field is `NOT_GENERATED`"]
#[inline(always)]
pub fn is_not_generated(&self) -> bool {
*self == EVENTS_PHYEND_A::NOT_GENERATED
}
#[doc = "Checks if the value of the field is `GENERATED`"]
#[inline(always)]
pub fn is_generated(&self) -> bool {
*self == EVENTS_PHYEND_A::GENERATED
}
}
#[doc = "Field `EVENTS_PHYEND` writer - Generated when last bit is sent on air, or received from air"]
pub type EVENTS_PHYEND_W<'a, const O: u8> =
crate::BitWriter<'a, u32, EVENTS_PHYEND_SPEC, EVENTS_PHYEND_A, O>;
impl<'a, const O: u8> EVENTS_PHYEND_W<'a, O> {
#[doc = "Event not generated"]
#[inline(always)]
pub fn not_generated(self) -> &'a mut W {
self.variant(EVENTS_PHYEND_A::NOT_GENERATED)
}
#[doc = "Event generated"]
#[inline(always)]
pub fn generated(self) -> &'a mut W {
self.variant(EVENTS_PHYEND_A::GENERATED)
}
}
impl R {
#[doc = "Bit 0 - Generated when last bit is sent on air, or received from air"]
#[inline(always)]
pub fn events_phyend(&self) -> EVENTS_PHYEND_R {
EVENTS_PHYEND_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Generated when last bit is sent on air, or received from air"]
#[inline(always)]
pub fn events_phyend(&mut self) -> EVENTS_PHYEND_W<0> {
EVENTS_PHYEND_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 = "Generated when last bit is sent on air, or received from air\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_phyend](index.html) module"]
pub struct EVENTS_PHYEND_SPEC;
impl crate::RegisterSpec for EVENTS_PHYEND_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_phyend::R](R) reader structure"]
impl crate::Readable for EVENTS_PHYEND_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_phyend::W](W) writer structure"]
impl crate::Writable for EVENTS_PHYEND_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_PHYEND to value 0"]
impl crate::Resettable for EVENTS_PHYEND_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+127
View File
@@ -0,0 +1,127 @@
#[doc = "Register `EVENTS_RATEBOOST` reader"]
pub struct R(crate::R<EVENTS_RATEBOOST_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_RATEBOOST_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_RATEBOOST_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_RATEBOOST_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_RATEBOOST` writer"]
pub struct W(crate::W<EVENTS_RATEBOOST_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_RATEBOOST_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_RATEBOOST_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_RATEBOOST_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `EVENTS_RATEBOOST` reader - Ble_LR CI field received, receive mode is changed from Ble_LR125Kbit to Ble_LR500Kbit."]
pub type EVENTS_RATEBOOST_R = crate::BitReader<EVENTS_RATEBOOST_A>;
#[doc = "Ble_LR CI field received, receive mode is changed from Ble_LR125Kbit to Ble_LR500Kbit.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EVENTS_RATEBOOST_A {
#[doc = "0: Event not generated"]
NOT_GENERATED = 0,
#[doc = "1: Event generated"]
GENERATED = 1,
}
impl From<EVENTS_RATEBOOST_A> for bool {
#[inline(always)]
fn from(variant: EVENTS_RATEBOOST_A) -> Self {
variant as u8 != 0
}
}
impl EVENTS_RATEBOOST_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EVENTS_RATEBOOST_A {
match self.bits {
false => EVENTS_RATEBOOST_A::NOT_GENERATED,
true => EVENTS_RATEBOOST_A::GENERATED,
}
}
#[doc = "Checks if the value of the field is `NOT_GENERATED`"]
#[inline(always)]
pub fn is_not_generated(&self) -> bool {
*self == EVENTS_RATEBOOST_A::NOT_GENERATED
}
#[doc = "Checks if the value of the field is `GENERATED`"]
#[inline(always)]
pub fn is_generated(&self) -> bool {
*self == EVENTS_RATEBOOST_A::GENERATED
}
}
#[doc = "Field `EVENTS_RATEBOOST` writer - Ble_LR CI field received, receive mode is changed from Ble_LR125Kbit to Ble_LR500Kbit."]
pub type EVENTS_RATEBOOST_W<'a, const O: u8> =
crate::BitWriter<'a, u32, EVENTS_RATEBOOST_SPEC, EVENTS_RATEBOOST_A, O>;
impl<'a, const O: u8> EVENTS_RATEBOOST_W<'a, O> {
#[doc = "Event not generated"]
#[inline(always)]
pub fn not_generated(self) -> &'a mut W {
self.variant(EVENTS_RATEBOOST_A::NOT_GENERATED)
}
#[doc = "Event generated"]
#[inline(always)]
pub fn generated(self) -> &'a mut W {
self.variant(EVENTS_RATEBOOST_A::GENERATED)
}
}
impl R {
#[doc = "Bit 0 - Ble_LR CI field received, receive mode is changed from Ble_LR125Kbit to Ble_LR500Kbit."]
#[inline(always)]
pub fn events_rateboost(&self) -> EVENTS_RATEBOOST_R {
EVENTS_RATEBOOST_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Ble_LR CI field received, receive mode is changed from Ble_LR125Kbit to Ble_LR500Kbit."]
#[inline(always)]
pub fn events_rateboost(&mut self) -> EVENTS_RATEBOOST_W<0> {
EVENTS_RATEBOOST_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 = "Ble_LR CI field received, receive mode is changed from Ble_LR125Kbit to Ble_LR500Kbit.\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_rateboost](index.html) module"]
pub struct EVENTS_RATEBOOST_SPEC;
impl crate::RegisterSpec for EVENTS_RATEBOOST_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_rateboost::R](R) reader structure"]
impl crate::Readable for EVENTS_RATEBOOST_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_rateboost::W](W) writer structure"]
impl crate::Writable for EVENTS_RATEBOOST_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_RATEBOOST to value 0"]
impl crate::Resettable for EVENTS_RATEBOOST_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+127
View File
@@ -0,0 +1,127 @@
#[doc = "Register `EVENTS_READY` reader"]
pub struct R(crate::R<EVENTS_READY_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_READY_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_READY_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_READY_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_READY` writer"]
pub struct W(crate::W<EVENTS_READY_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_READY_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<EVENTS_READY_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_READY_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `EVENTS_READY` reader - RADIO has ramped up and is ready to be started"]
pub type EVENTS_READY_R = crate::BitReader<EVENTS_READY_A>;
#[doc = "RADIO has ramped up and is ready to be started\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EVENTS_READY_A {
#[doc = "0: Event not generated"]
NOT_GENERATED = 0,
#[doc = "1: Event generated"]
GENERATED = 1,
}
impl From<EVENTS_READY_A> for bool {
#[inline(always)]
fn from(variant: EVENTS_READY_A) -> Self {
variant as u8 != 0
}
}
impl EVENTS_READY_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EVENTS_READY_A {
match self.bits {
false => EVENTS_READY_A::NOT_GENERATED,
true => EVENTS_READY_A::GENERATED,
}
}
#[doc = "Checks if the value of the field is `NOT_GENERATED`"]
#[inline(always)]
pub fn is_not_generated(&self) -> bool {
*self == EVENTS_READY_A::NOT_GENERATED
}
#[doc = "Checks if the value of the field is `GENERATED`"]
#[inline(always)]
pub fn is_generated(&self) -> bool {
*self == EVENTS_READY_A::GENERATED
}
}
#[doc = "Field `EVENTS_READY` writer - RADIO has ramped up and is ready to be started"]
pub type EVENTS_READY_W<'a, const O: u8> =
crate::BitWriter<'a, u32, EVENTS_READY_SPEC, EVENTS_READY_A, O>;
impl<'a, const O: u8> EVENTS_READY_W<'a, O> {
#[doc = "Event not generated"]
#[inline(always)]
pub fn not_generated(self) -> &'a mut W {
self.variant(EVENTS_READY_A::NOT_GENERATED)
}
#[doc = "Event generated"]
#[inline(always)]
pub fn generated(self) -> &'a mut W {
self.variant(EVENTS_READY_A::GENERATED)
}
}
impl R {
#[doc = "Bit 0 - RADIO has ramped up and is ready to be started"]
#[inline(always)]
pub fn events_ready(&self) -> EVENTS_READY_R {
EVENTS_READY_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - RADIO has ramped up and is ready to be started"]
#[inline(always)]
pub fn events_ready(&mut self) -> EVENTS_READY_W<0> {
EVENTS_READY_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "RADIO has ramped up and is ready to be started\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [events_ready](index.html) module"]
pub struct EVENTS_READY_SPEC;
impl crate::RegisterSpec for EVENTS_READY_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_ready::R](R) reader structure"]
impl crate::Readable for EVENTS_READY_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_ready::W](W) writer structure"]
impl crate::Writable for EVENTS_READY_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_READY to value 0"]
impl crate::Resettable for EVENTS_READY_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+127
View File
@@ -0,0 +1,127 @@
#[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)
}
}
#[doc = "Field `EVENTS_RSSIEND` reader - Sampling of receive signal strength complete"]
pub type EVENTS_RSSIEND_R = crate::BitReader<EVENTS_RSSIEND_A>;
#[doc = "Sampling of receive signal strength complete\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EVENTS_RSSIEND_A {
#[doc = "0: Event not generated"]
NOT_GENERATED = 0,
#[doc = "1: Event generated"]
GENERATED = 1,
}
impl From<EVENTS_RSSIEND_A> for bool {
#[inline(always)]
fn from(variant: EVENTS_RSSIEND_A) -> Self {
variant as u8 != 0
}
}
impl EVENTS_RSSIEND_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EVENTS_RSSIEND_A {
match self.bits {
false => EVENTS_RSSIEND_A::NOT_GENERATED,
true => EVENTS_RSSIEND_A::GENERATED,
}
}
#[doc = "Checks if the value of the field is `NOT_GENERATED`"]
#[inline(always)]
pub fn is_not_generated(&self) -> bool {
*self == EVENTS_RSSIEND_A::NOT_GENERATED
}
#[doc = "Checks if the value of the field is `GENERATED`"]
#[inline(always)]
pub fn is_generated(&self) -> bool {
*self == EVENTS_RSSIEND_A::GENERATED
}
}
#[doc = "Field `EVENTS_RSSIEND` writer - Sampling of receive signal strength complete"]
pub type EVENTS_RSSIEND_W<'a, const O: u8> =
crate::BitWriter<'a, u32, EVENTS_RSSIEND_SPEC, EVENTS_RSSIEND_A, O>;
impl<'a, const O: u8> EVENTS_RSSIEND_W<'a, O> {
#[doc = "Event not generated"]
#[inline(always)]
pub fn not_generated(self) -> &'a mut W {
self.variant(EVENTS_RSSIEND_A::NOT_GENERATED)
}
#[doc = "Event generated"]
#[inline(always)]
pub fn generated(self) -> &'a mut W {
self.variant(EVENTS_RSSIEND_A::GENERATED)
}
}
impl R {
#[doc = "Bit 0 - Sampling of receive signal strength complete"]
#[inline(always)]
pub fn events_rssiend(&self) -> EVENTS_RSSIEND_R {
EVENTS_RSSIEND_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Sampling of receive signal strength complete"]
#[inline(always)]
pub fn events_rssiend(&mut self) -> EVENTS_RSSIEND_W<0> {
EVENTS_RSSIEND_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 = "Sampling of receive signal strength complete\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [events_rssiend](index.html) module"]
pub struct EVENTS_RSSIEND_SPEC;
impl crate::RegisterSpec for EVENTS_RSSIEND_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_rssiend::R](R) reader structure"]
impl crate::Readable for EVENTS_RSSIEND_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_rssiend::W](W) writer structure"]
impl crate::Writable for EVENTS_RSSIEND_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_RSSIEND to value 0"]
impl crate::Resettable for EVENTS_RSSIEND_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+127
View File
@@ -0,0 +1,127 @@
#[doc = "Register `EVENTS_RXREADY` reader"]
pub struct R(crate::R<EVENTS_RXREADY_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_RXREADY_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_RXREADY_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_RXREADY_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_RXREADY` writer"]
pub struct W(crate::W<EVENTS_RXREADY_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_RXREADY_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_RXREADY_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_RXREADY_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `EVENTS_RXREADY` reader - RADIO has ramped up and is ready to be started RX path"]
pub type EVENTS_RXREADY_R = crate::BitReader<EVENTS_RXREADY_A>;
#[doc = "RADIO has ramped up and is ready to be started RX path\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EVENTS_RXREADY_A {
#[doc = "0: Event not generated"]
NOT_GENERATED = 0,
#[doc = "1: Event generated"]
GENERATED = 1,
}
impl From<EVENTS_RXREADY_A> for bool {
#[inline(always)]
fn from(variant: EVENTS_RXREADY_A) -> Self {
variant as u8 != 0
}
}
impl EVENTS_RXREADY_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EVENTS_RXREADY_A {
match self.bits {
false => EVENTS_RXREADY_A::NOT_GENERATED,
true => EVENTS_RXREADY_A::GENERATED,
}
}
#[doc = "Checks if the value of the field is `NOT_GENERATED`"]
#[inline(always)]
pub fn is_not_generated(&self) -> bool {
*self == EVENTS_RXREADY_A::NOT_GENERATED
}
#[doc = "Checks if the value of the field is `GENERATED`"]
#[inline(always)]
pub fn is_generated(&self) -> bool {
*self == EVENTS_RXREADY_A::GENERATED
}
}
#[doc = "Field `EVENTS_RXREADY` writer - RADIO has ramped up and is ready to be started RX path"]
pub type EVENTS_RXREADY_W<'a, const O: u8> =
crate::BitWriter<'a, u32, EVENTS_RXREADY_SPEC, EVENTS_RXREADY_A, O>;
impl<'a, const O: u8> EVENTS_RXREADY_W<'a, O> {
#[doc = "Event not generated"]
#[inline(always)]
pub fn not_generated(self) -> &'a mut W {
self.variant(EVENTS_RXREADY_A::NOT_GENERATED)
}
#[doc = "Event generated"]
#[inline(always)]
pub fn generated(self) -> &'a mut W {
self.variant(EVENTS_RXREADY_A::GENERATED)
}
}
impl R {
#[doc = "Bit 0 - RADIO has ramped up and is ready to be started RX path"]
#[inline(always)]
pub fn events_rxready(&self) -> EVENTS_RXREADY_R {
EVENTS_RXREADY_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - RADIO has ramped up and is ready to be started RX path"]
#[inline(always)]
pub fn events_rxready(&mut self) -> EVENTS_RXREADY_W<0> {
EVENTS_RXREADY_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "RADIO has ramped up and is ready to be started RX path\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_rxready](index.html) module"]
pub struct EVENTS_RXREADY_SPEC;
impl crate::RegisterSpec for EVENTS_RXREADY_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_rxready::R](R) reader structure"]
impl crate::Readable for EVENTS_RXREADY_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_rxready::W](W) writer structure"]
impl crate::Writable for EVENTS_RXREADY_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_RXREADY to value 0"]
impl crate::Resettable for EVENTS_RXREADY_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+127
View File
@@ -0,0 +1,127 @@
#[doc = "Register `EVENTS_SYNC` reader"]
pub struct R(crate::R<EVENTS_SYNC_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_SYNC_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_SYNC_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_SYNC_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_SYNC` writer"]
pub struct W(crate::W<EVENTS_SYNC_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_SYNC_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_SYNC_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_SYNC_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `EVENTS_SYNC` reader - Preamble indicator"]
pub type EVENTS_SYNC_R = crate::BitReader<EVENTS_SYNC_A>;
#[doc = "Preamble indicator\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EVENTS_SYNC_A {
#[doc = "0: Event not generated"]
NOT_GENERATED = 0,
#[doc = "1: Event generated"]
GENERATED = 1,
}
impl From<EVENTS_SYNC_A> for bool {
#[inline(always)]
fn from(variant: EVENTS_SYNC_A) -> Self {
variant as u8 != 0
}
}
impl EVENTS_SYNC_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EVENTS_SYNC_A {
match self.bits {
false => EVENTS_SYNC_A::NOT_GENERATED,
true => EVENTS_SYNC_A::GENERATED,
}
}
#[doc = "Checks if the value of the field is `NOT_GENERATED`"]
#[inline(always)]
pub fn is_not_generated(&self) -> bool {
*self == EVENTS_SYNC_A::NOT_GENERATED
}
#[doc = "Checks if the value of the field is `GENERATED`"]
#[inline(always)]
pub fn is_generated(&self) -> bool {
*self == EVENTS_SYNC_A::GENERATED
}
}
#[doc = "Field `EVENTS_SYNC` writer - Preamble indicator"]
pub type EVENTS_SYNC_W<'a, const O: u8> =
crate::BitWriter<'a, u32, EVENTS_SYNC_SPEC, EVENTS_SYNC_A, O>;
impl<'a, const O: u8> EVENTS_SYNC_W<'a, O> {
#[doc = "Event not generated"]
#[inline(always)]
pub fn not_generated(self) -> &'a mut W {
self.variant(EVENTS_SYNC_A::NOT_GENERATED)
}
#[doc = "Event generated"]
#[inline(always)]
pub fn generated(self) -> &'a mut W {
self.variant(EVENTS_SYNC_A::GENERATED)
}
}
impl R {
#[doc = "Bit 0 - Preamble indicator"]
#[inline(always)]
pub fn events_sync(&self) -> EVENTS_SYNC_R {
EVENTS_SYNC_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Preamble indicator"]
#[inline(always)]
pub fn events_sync(&mut self) -> EVENTS_SYNC_W<0> {
EVENTS_SYNC_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 = "Preamble indicator\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_sync](index.html) module"]
pub struct EVENTS_SYNC_SPEC;
impl crate::RegisterSpec for EVENTS_SYNC_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_sync::R](R) reader structure"]
impl crate::Readable for EVENTS_SYNC_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_sync::W](W) writer structure"]
impl crate::Writable for EVENTS_SYNC_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_SYNC to value 0"]
impl crate::Resettable for EVENTS_SYNC_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+127
View File
@@ -0,0 +1,127 @@
#[doc = "Register `EVENTS_TXREADY` reader"]
pub struct R(crate::R<EVENTS_TXREADY_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_TXREADY_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_TXREADY_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_TXREADY_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_TXREADY` writer"]
pub struct W(crate::W<EVENTS_TXREADY_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_TXREADY_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_TXREADY_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_TXREADY_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `EVENTS_TXREADY` reader - RADIO has ramped up and is ready to be started TX path"]
pub type EVENTS_TXREADY_R = crate::BitReader<EVENTS_TXREADY_A>;
#[doc = "RADIO has ramped up and is ready to be started TX path\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EVENTS_TXREADY_A {
#[doc = "0: Event not generated"]
NOT_GENERATED = 0,
#[doc = "1: Event generated"]
GENERATED = 1,
}
impl From<EVENTS_TXREADY_A> for bool {
#[inline(always)]
fn from(variant: EVENTS_TXREADY_A) -> Self {
variant as u8 != 0
}
}
impl EVENTS_TXREADY_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EVENTS_TXREADY_A {
match self.bits {
false => EVENTS_TXREADY_A::NOT_GENERATED,
true => EVENTS_TXREADY_A::GENERATED,
}
}
#[doc = "Checks if the value of the field is `NOT_GENERATED`"]
#[inline(always)]
pub fn is_not_generated(&self) -> bool {
*self == EVENTS_TXREADY_A::NOT_GENERATED
}
#[doc = "Checks if the value of the field is `GENERATED`"]
#[inline(always)]
pub fn is_generated(&self) -> bool {
*self == EVENTS_TXREADY_A::GENERATED
}
}
#[doc = "Field `EVENTS_TXREADY` writer - RADIO has ramped up and is ready to be started TX path"]
pub type EVENTS_TXREADY_W<'a, const O: u8> =
crate::BitWriter<'a, u32, EVENTS_TXREADY_SPEC, EVENTS_TXREADY_A, O>;
impl<'a, const O: u8> EVENTS_TXREADY_W<'a, O> {
#[doc = "Event not generated"]
#[inline(always)]
pub fn not_generated(self) -> &'a mut W {
self.variant(EVENTS_TXREADY_A::NOT_GENERATED)
}
#[doc = "Event generated"]
#[inline(always)]
pub fn generated(self) -> &'a mut W {
self.variant(EVENTS_TXREADY_A::GENERATED)
}
}
impl R {
#[doc = "Bit 0 - RADIO has ramped up and is ready to be started TX path"]
#[inline(always)]
pub fn events_txready(&self) -> EVENTS_TXREADY_R {
EVENTS_TXREADY_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - RADIO has ramped up and is ready to be started TX path"]
#[inline(always)]
pub fn events_txready(&mut self) -> EVENTS_TXREADY_W<0> {
EVENTS_TXREADY_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "RADIO has ramped up and is ready to be started TX path\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_txready](index.html) module"]
pub struct EVENTS_TXREADY_SPEC;
impl crate::RegisterSpec for EVENTS_TXREADY_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_txready::R](R) reader structure"]
impl crate::Readable for EVENTS_TXREADY_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_txready::W](W) writer structure"]
impl crate::Writable for EVENTS_TXREADY_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_TXREADY to value 0"]
impl crate::Resettable for EVENTS_TXREADY_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+140
View File
@@ -0,0 +1,140 @@
#[doc = "Register `FREQUENCY` reader"]
pub struct R(crate::R<FREQUENCY_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<FREQUENCY_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<FREQUENCY_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<FREQUENCY_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `FREQUENCY` writer"]
pub struct W(crate::W<FREQUENCY_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<FREQUENCY_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<FREQUENCY_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<FREQUENCY_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `FREQUENCY` reader - Radio channel frequency"]
pub type FREQUENCY_R = crate::FieldReader<u8, u8>;
#[doc = "Field `FREQUENCY` writer - Radio channel frequency"]
pub type FREQUENCY_W<'a, const O: u8> = crate::FieldWriter<'a, u32, FREQUENCY_SPEC, u8, u8, 7, O>;
#[doc = "Field `MAP` reader - Channel map selection"]
pub type MAP_R = crate::BitReader<MAP_A>;
#[doc = "Channel map selection\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum MAP_A {
#[doc = "0: Channel map between 2400 MHz and 2500 MHz"]
DEFAULT = 0,
#[doc = "1: Channel map between 2360 MHz and 2460 MHz"]
LOW = 1,
}
impl From<MAP_A> for bool {
#[inline(always)]
fn from(variant: MAP_A) -> Self {
variant as u8 != 0
}
}
impl MAP_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> MAP_A {
match self.bits {
false => MAP_A::DEFAULT,
true => MAP_A::LOW,
}
}
#[doc = "Checks if the value of the field is `DEFAULT`"]
#[inline(always)]
pub fn is_default(&self) -> bool {
*self == MAP_A::DEFAULT
}
#[doc = "Checks if the value of the field is `LOW`"]
#[inline(always)]
pub fn is_low(&self) -> bool {
*self == MAP_A::LOW
}
}
#[doc = "Field `MAP` writer - Channel map selection"]
pub type MAP_W<'a, const O: u8> = crate::BitWriter<'a, u32, FREQUENCY_SPEC, MAP_A, O>;
impl<'a, const O: u8> MAP_W<'a, O> {
#[doc = "Channel map between 2400 MHz and 2500 MHz"]
#[inline(always)]
pub fn default(self) -> &'a mut W {
self.variant(MAP_A::DEFAULT)
}
#[doc = "Channel map between 2360 MHz and 2460 MHz"]
#[inline(always)]
pub fn low(self) -> &'a mut W {
self.variant(MAP_A::LOW)
}
}
impl R {
#[doc = "Bits 0:6 - Radio channel frequency"]
#[inline(always)]
pub fn frequency(&self) -> FREQUENCY_R {
FREQUENCY_R::new((self.bits & 0x7f) as u8)
}
#[doc = "Bit 8 - Channel map selection"]
#[inline(always)]
pub fn map(&self) -> MAP_R {
MAP_R::new(((self.bits >> 8) & 1) != 0)
}
}
impl W {
#[doc = "Bits 0:6 - Radio channel frequency"]
#[inline(always)]
pub fn frequency(&mut self) -> FREQUENCY_W<0> {
FREQUENCY_W::new(self)
}
#[doc = "Bit 8 - Channel map selection"]
#[inline(always)]
pub fn map(&mut self) -> MAP_W<8> {
MAP_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Frequency\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [frequency](index.html) module"]
pub struct FREQUENCY_SPEC;
impl crate::RegisterSpec for FREQUENCY_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [frequency::R](R) reader structure"]
impl crate::Readable for FREQUENCY_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [frequency::W](W) writer structure"]
impl crate::Writable for FREQUENCY_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets FREQUENCY to value 0x02"]
impl crate::Resettable for FREQUENCY_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0x02
}
}
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+81
View File
@@ -0,0 +1,81 @@
#[doc = "Register `MHRMATCHCONF` reader"]
pub struct R(crate::R<MHRMATCHCONF_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<MHRMATCHCONF_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<MHRMATCHCONF_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<MHRMATCHCONF_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `MHRMATCHCONF` writer"]
pub struct W(crate::W<MHRMATCHCONF_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<MHRMATCHCONF_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<MHRMATCHCONF_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<MHRMATCHCONF_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `MHRMATCHCONF` reader - Search pattern configuration"]
pub type MHRMATCHCONF_R = crate::FieldReader<u32, u32>;
#[doc = "Field `MHRMATCHCONF` writer - Search pattern configuration"]
pub type MHRMATCHCONF_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, MHRMATCHCONF_SPEC, u32, u32, 32, O>;
impl R {
#[doc = "Bits 0:31 - Search pattern configuration"]
#[inline(always)]
pub fn mhrmatchconf(&self) -> MHRMATCHCONF_R {
MHRMATCHCONF_R::new(self.bits)
}
}
impl W {
#[doc = "Bits 0:31 - Search pattern configuration"]
#[inline(always)]
pub fn mhrmatchconf(&mut self) -> MHRMATCHCONF_W<0> {
MHRMATCHCONF_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 = "Search pattern 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 [mhrmatchconf](index.html) module"]
pub struct MHRMATCHCONF_SPEC;
impl crate::RegisterSpec for MHRMATCHCONF_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [mhrmatchconf::R](R) reader structure"]
impl crate::Readable for MHRMATCHCONF_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [mhrmatchconf::W](W) writer structure"]
impl crate::Writable for MHRMATCHCONF_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets MHRMATCHCONF to value 0"]
impl crate::Resettable for MHRMATCHCONF_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+81
View File
@@ -0,0 +1,81 @@
#[doc = "Register `MHRMATCHMAS` reader"]
pub struct R(crate::R<MHRMATCHMAS_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<MHRMATCHMAS_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<MHRMATCHMAS_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<MHRMATCHMAS_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `MHRMATCHMAS` writer"]
pub struct W(crate::W<MHRMATCHMAS_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<MHRMATCHMAS_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<MHRMATCHMAS_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<MHRMATCHMAS_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `MHRMATCHMAS` reader - Pattern mask"]
pub type MHRMATCHMAS_R = crate::FieldReader<u32, u32>;
#[doc = "Field `MHRMATCHMAS` writer - Pattern mask"]
pub type MHRMATCHMAS_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, MHRMATCHMAS_SPEC, u32, u32, 32, O>;
impl R {
#[doc = "Bits 0:31 - Pattern mask"]
#[inline(always)]
pub fn mhrmatchmas(&self) -> MHRMATCHMAS_R {
MHRMATCHMAS_R::new(self.bits)
}
}
impl W {
#[doc = "Bits 0:31 - Pattern mask"]
#[inline(always)]
pub fn mhrmatchmas(&mut self) -> MHRMATCHMAS_W<0> {
MHRMATCHMAS_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 = "Pattern mask\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 [mhrmatchmas](index.html) module"]
pub struct MHRMATCHMAS_SPEC;
impl crate::RegisterSpec for MHRMATCHMAS_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [mhrmatchmas::R](R) reader structure"]
impl crate::Readable for MHRMATCHMAS_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [mhrmatchmas::W](W) writer structure"]
impl crate::Writable for MHRMATCHMAS_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets MHRMATCHMAS to value 0"]
impl crate::Resettable for MHRMATCHMAS_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+193
View File
@@ -0,0 +1,193 @@
#[doc = "Register `MODE` reader"]
pub struct R(crate::R<MODE_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<MODE_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<MODE_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<MODE_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `MODE` writer"]
pub struct W(crate::W<MODE_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<MODE_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<MODE_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<MODE_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `MODE` reader - Radio data rate and modulation setting. The radio supports frequency-shift keying (FSK) modulation."]
pub type MODE_R = crate::FieldReader<u8, MODE_A>;
#[doc = "Radio data rate and modulation setting. The radio supports frequency-shift keying (FSK) modulation.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum MODE_A {
#[doc = "0: 1 Mbps Nordic proprietary radio mode"]
NRF_1MBIT = 0,
#[doc = "1: 2 Mbps Nordic proprietary radio mode"]
NRF_2MBIT = 1,
#[doc = "3: 1 Mbps BLE"]
BLE_1MBIT = 3,
#[doc = "4: 2 Mbps BLE"]
BLE_2MBIT = 4,
#[doc = "5: Long Range 125 kbps TX, 125 kbps and 500 kbps RX"]
BLE_LR125KBIT = 5,
#[doc = "6: Long Range 500 kbps TX, 125 kbps and 500 kbps RX"]
BLE_LR500KBIT = 6,
#[doc = "15: IEEE 802.15.4-2006 250 kbps"]
IEEE802154_250KBIT = 15,
}
impl From<MODE_A> for u8 {
#[inline(always)]
fn from(variant: MODE_A) -> Self {
variant as _
}
}
impl MODE_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> Option<MODE_A> {
match self.bits {
0 => Some(MODE_A::NRF_1MBIT),
1 => Some(MODE_A::NRF_2MBIT),
3 => Some(MODE_A::BLE_1MBIT),
4 => Some(MODE_A::BLE_2MBIT),
5 => Some(MODE_A::BLE_LR125KBIT),
6 => Some(MODE_A::BLE_LR500KBIT),
15 => Some(MODE_A::IEEE802154_250KBIT),
_ => None,
}
}
#[doc = "Checks if the value of the field is `NRF_1MBIT`"]
#[inline(always)]
pub fn is_nrf_1mbit(&self) -> bool {
*self == MODE_A::NRF_1MBIT
}
#[doc = "Checks if the value of the field is `NRF_2MBIT`"]
#[inline(always)]
pub fn is_nrf_2mbit(&self) -> bool {
*self == MODE_A::NRF_2MBIT
}
#[doc = "Checks if the value of the field is `BLE_1MBIT`"]
#[inline(always)]
pub fn is_ble_1mbit(&self) -> bool {
*self == MODE_A::BLE_1MBIT
}
#[doc = "Checks if the value of the field is `BLE_2MBIT`"]
#[inline(always)]
pub fn is_ble_2mbit(&self) -> bool {
*self == MODE_A::BLE_2MBIT
}
#[doc = "Checks if the value of the field is `BLE_LR125KBIT`"]
#[inline(always)]
pub fn is_ble_lr125kbit(&self) -> bool {
*self == MODE_A::BLE_LR125KBIT
}
#[doc = "Checks if the value of the field is `BLE_LR500KBIT`"]
#[inline(always)]
pub fn is_ble_lr500kbit(&self) -> bool {
*self == MODE_A::BLE_LR500KBIT
}
#[doc = "Checks if the value of the field is `IEEE802154_250KBIT`"]
#[inline(always)]
pub fn is_ieee802154_250kbit(&self) -> bool {
*self == MODE_A::IEEE802154_250KBIT
}
}
#[doc = "Field `MODE` writer - Radio data rate and modulation setting. The radio supports frequency-shift keying (FSK) modulation."]
pub type MODE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MODE_SPEC, u8, MODE_A, 4, O>;
impl<'a, const O: u8> MODE_W<'a, O> {
#[doc = "1 Mbps Nordic proprietary radio mode"]
#[inline(always)]
pub fn nrf_1mbit(self) -> &'a mut W {
self.variant(MODE_A::NRF_1MBIT)
}
#[doc = "2 Mbps Nordic proprietary radio mode"]
#[inline(always)]
pub fn nrf_2mbit(self) -> &'a mut W {
self.variant(MODE_A::NRF_2MBIT)
}
#[doc = "1 Mbps BLE"]
#[inline(always)]
pub fn ble_1mbit(self) -> &'a mut W {
self.variant(MODE_A::BLE_1MBIT)
}
#[doc = "2 Mbps BLE"]
#[inline(always)]
pub fn ble_2mbit(self) -> &'a mut W {
self.variant(MODE_A::BLE_2MBIT)
}
#[doc = "Long Range 125 kbps TX, 125 kbps and 500 kbps RX"]
#[inline(always)]
pub fn ble_lr125kbit(self) -> &'a mut W {
self.variant(MODE_A::BLE_LR125KBIT)
}
#[doc = "Long Range 500 kbps TX, 125 kbps and 500 kbps RX"]
#[inline(always)]
pub fn ble_lr500kbit(self) -> &'a mut W {
self.variant(MODE_A::BLE_LR500KBIT)
}
#[doc = "IEEE 802.15.4-2006 250 kbps"]
#[inline(always)]
pub fn ieee802154_250kbit(self) -> &'a mut W {
self.variant(MODE_A::IEEE802154_250KBIT)
}
}
impl R {
#[doc = "Bits 0:3 - Radio data rate and modulation setting. The radio supports frequency-shift keying (FSK) modulation."]
#[inline(always)]
pub fn mode(&self) -> MODE_R {
MODE_R::new((self.bits & 0x0f) as u8)
}
}
impl W {
#[doc = "Bits 0:3 - Radio data rate and modulation setting. The radio supports frequency-shift keying (FSK) modulation."]
#[inline(always)]
pub fn mode(&mut self) -> MODE_W<0> {
MODE_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Data rate and modulation\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [mode](index.html) module"]
pub struct MODE_SPEC;
impl crate::RegisterSpec for MODE_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [mode::R](R) reader structure"]
impl crate::Readable for MODE_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [mode::W](W) writer structure"]
impl crate::Writable for MODE_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets MODE to value 0"]
impl crate::Resettable for MODE_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+201
View File
@@ -0,0 +1,201 @@
#[doc = "Register `MODECNF0` reader"]
pub struct R(crate::R<MODECNF0_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<MODECNF0_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<MODECNF0_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<MODECNF0_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `MODECNF0` writer"]
pub struct W(crate::W<MODECNF0_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<MODECNF0_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<MODECNF0_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<MODECNF0_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `RU` reader - Radio ramp-up time"]
pub type RU_R = crate::BitReader<RU_A>;
#[doc = "Radio ramp-up time\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RU_A {
#[doc = "0: Default ramp-up time (tRXEN and tTXEN), compatible with firmware written for nRF51"]
DEFAULT = 0,
#[doc = "1: Fast ramp-up (tRXEN,FAST and tTXEN,FAST), see electrical specifications for more information"]
FAST = 1,
}
impl From<RU_A> for bool {
#[inline(always)]
fn from(variant: RU_A) -> Self {
variant as u8 != 0
}
}
impl RU_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RU_A {
match self.bits {
false => RU_A::DEFAULT,
true => RU_A::FAST,
}
}
#[doc = "Checks if the value of the field is `DEFAULT`"]
#[inline(always)]
pub fn is_default(&self) -> bool {
*self == RU_A::DEFAULT
}
#[doc = "Checks if the value of the field is `FAST`"]
#[inline(always)]
pub fn is_fast(&self) -> bool {
*self == RU_A::FAST
}
}
#[doc = "Field `RU` writer - Radio ramp-up time"]
pub type RU_W<'a, const O: u8> = crate::BitWriter<'a, u32, MODECNF0_SPEC, RU_A, O>;
impl<'a, const O: u8> RU_W<'a, O> {
#[doc = "Default ramp-up time (tRXEN and tTXEN), compatible with firmware written for nRF51"]
#[inline(always)]
pub fn default(self) -> &'a mut W {
self.variant(RU_A::DEFAULT)
}
#[doc = "Fast ramp-up (tRXEN,FAST and tTXEN,FAST), see electrical specifications for more information"]
#[inline(always)]
pub fn fast(self) -> &'a mut W {
self.variant(RU_A::FAST)
}
}
#[doc = "Field `DTX` reader - Default TX value"]
pub type DTX_R = crate::FieldReader<u8, DTX_A>;
#[doc = "Default TX value\n\nValue on reset: 2"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum DTX_A {
#[doc = "0: Transmit '1'"]
B1 = 0,
#[doc = "1: Transmit '0'"]
B0 = 1,
#[doc = "2: Transmit center frequency"]
CENTER = 2,
}
impl From<DTX_A> for u8 {
#[inline(always)]
fn from(variant: DTX_A) -> Self {
variant as _
}
}
impl DTX_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> Option<DTX_A> {
match self.bits {
0 => Some(DTX_A::B1),
1 => Some(DTX_A::B0),
2 => Some(DTX_A::CENTER),
_ => None,
}
}
#[doc = "Checks if the value of the field is `B1`"]
#[inline(always)]
pub fn is_b1(&self) -> bool {
*self == DTX_A::B1
}
#[doc = "Checks if the value of the field is `B0`"]
#[inline(always)]
pub fn is_b0(&self) -> bool {
*self == DTX_A::B0
}
#[doc = "Checks if the value of the field is `CENTER`"]
#[inline(always)]
pub fn is_center(&self) -> bool {
*self == DTX_A::CENTER
}
}
#[doc = "Field `DTX` writer - Default TX value"]
pub type DTX_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MODECNF0_SPEC, u8, DTX_A, 2, O>;
impl<'a, const O: u8> DTX_W<'a, O> {
#[doc = "Transmit '1'"]
#[inline(always)]
pub fn b1(self) -> &'a mut W {
self.variant(DTX_A::B1)
}
#[doc = "Transmit '0'"]
#[inline(always)]
pub fn b0(self) -> &'a mut W {
self.variant(DTX_A::B0)
}
#[doc = "Transmit center frequency"]
#[inline(always)]
pub fn center(self) -> &'a mut W {
self.variant(DTX_A::CENTER)
}
}
impl R {
#[doc = "Bit 0 - Radio ramp-up time"]
#[inline(always)]
pub fn ru(&self) -> RU_R {
RU_R::new((self.bits & 1) != 0)
}
#[doc = "Bits 8:9 - Default TX value"]
#[inline(always)]
pub fn dtx(&self) -> DTX_R {
DTX_R::new(((self.bits >> 8) & 3) as u8)
}
}
impl W {
#[doc = "Bit 0 - Radio ramp-up time"]
#[inline(always)]
pub fn ru(&mut self) -> RU_W<0> {
RU_W::new(self)
}
#[doc = "Bits 8:9 - Default TX value"]
#[inline(always)]
pub fn dtx(&mut self) -> DTX_W<8> {
DTX_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Radio mode configuration register 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [modecnf0](index.html) module"]
pub struct MODECNF0_SPEC;
impl crate::RegisterSpec for MODECNF0_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [modecnf0::R](R) reader structure"]
impl crate::Readable for MODECNF0_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [modecnf0::W](W) writer structure"]
impl crate::Writable for MODECNF0_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets MODECNF0 to value 0x0200"]
impl crate::Resettable for MODECNF0_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0x0200
}
}
+81
View File
@@ -0,0 +1,81 @@
#[doc = "Register `PACKETPTR` reader"]
pub struct R(crate::R<PACKETPTR_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<PACKETPTR_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<PACKETPTR_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<PACKETPTR_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `PACKETPTR` writer"]
pub struct W(crate::W<PACKETPTR_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<PACKETPTR_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<PACKETPTR_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<PACKETPTR_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `PACKETPTR` reader - Packet pointer"]
pub type PACKETPTR_R = crate::FieldReader<u32, u32>;
#[doc = "Field `PACKETPTR` writer - Packet pointer"]
pub type PACKETPTR_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, PACKETPTR_SPEC, u32, u32, 32, O>;
impl R {
#[doc = "Bits 0:31 - Packet pointer"]
#[inline(always)]
pub fn packetptr(&self) -> PACKETPTR_R {
PACKETPTR_R::new(self.bits)
}
}
impl W {
#[doc = "Bits 0:31 - Packet pointer"]
#[inline(always)]
pub fn packetptr(&mut self) -> PACKETPTR_W<0> {
PACKETPTR_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Packet pointer\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [packetptr](index.html) module"]
pub struct PACKETPTR_SPEC;
impl crate::RegisterSpec for PACKETPTR_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [packetptr::R](R) reader structure"]
impl crate::Readable for PACKETPTR_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [packetptr::W](W) writer structure"]
impl crate::Writable for PACKETPTR_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets PACKETPTR to value 0x0100_0000"]
impl crate::Resettable for PACKETPTR_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0x0100_0000
}
}
+344
View File
@@ -0,0 +1,344 @@
#[doc = "Register `PCNF0` reader"]
pub struct R(crate::R<PCNF0_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<PCNF0_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<PCNF0_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<PCNF0_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `PCNF0` writer"]
pub struct W(crate::W<PCNF0_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<PCNF0_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<PCNF0_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<PCNF0_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `LFLEN` reader - Length on air of LENGTH field in number of bits"]
pub type LFLEN_R = crate::FieldReader<u8, u8>;
#[doc = "Field `LFLEN` writer - Length on air of LENGTH field in number of bits"]
pub type LFLEN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PCNF0_SPEC, u8, u8, 4, O>;
#[doc = "Field `S0LEN` reader - Length on air of S0 field in number of bytes"]
pub type S0LEN_R = crate::BitReader<bool>;
#[doc = "Field `S0LEN` writer - Length on air of S0 field in number of bytes"]
pub type S0LEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PCNF0_SPEC, bool, O>;
#[doc = "Field `S1LEN` reader - Length on air of S1 field in number of bits"]
pub type S1LEN_R = crate::FieldReader<u8, u8>;
#[doc = "Field `S1LEN` writer - Length on air of S1 field in number of bits"]
pub type S1LEN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PCNF0_SPEC, u8, u8, 4, O>;
#[doc = "Field `S1INCL` reader - Include or exclude S1 field in RAM"]
pub type S1INCL_R = crate::BitReader<S1INCL_A>;
#[doc = "Include or exclude S1 field in RAM\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum S1INCL_A {
#[doc = "0: Include S1 field in RAM only if S1LEN &gt; 0"]
AUTOMATIC = 0,
#[doc = "1: Always include S1 field in RAM independent of S1LEN"]
INCLUDE = 1,
}
impl From<S1INCL_A> for bool {
#[inline(always)]
fn from(variant: S1INCL_A) -> Self {
variant as u8 != 0
}
}
impl S1INCL_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> S1INCL_A {
match self.bits {
false => S1INCL_A::AUTOMATIC,
true => S1INCL_A::INCLUDE,
}
}
#[doc = "Checks if the value of the field is `AUTOMATIC`"]
#[inline(always)]
pub fn is_automatic(&self) -> bool {
*self == S1INCL_A::AUTOMATIC
}
#[doc = "Checks if the value of the field is `INCLUDE`"]
#[inline(always)]
pub fn is_include(&self) -> bool {
*self == S1INCL_A::INCLUDE
}
}
#[doc = "Field `S1INCL` writer - Include or exclude S1 field in RAM"]
pub type S1INCL_W<'a, const O: u8> = crate::BitWriter<'a, u32, PCNF0_SPEC, S1INCL_A, O>;
impl<'a, const O: u8> S1INCL_W<'a, O> {
#[doc = "Include S1 field in RAM only if S1LEN &gt; 0"]
#[inline(always)]
pub fn automatic(self) -> &'a mut W {
self.variant(S1INCL_A::AUTOMATIC)
}
#[doc = "Always include S1 field in RAM independent of S1LEN"]
#[inline(always)]
pub fn include(self) -> &'a mut W {
self.variant(S1INCL_A::INCLUDE)
}
}
#[doc = "Field `CILEN` reader - Length of code indicator - Long Range"]
pub type CILEN_R = crate::FieldReader<u8, u8>;
#[doc = "Field `CILEN` writer - Length of code indicator - Long Range"]
pub type CILEN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PCNF0_SPEC, u8, u8, 2, O>;
#[doc = "Field `PLEN` reader - Length of preamble on air. Decision point: TASKS_START task"]
pub type PLEN_R = crate::FieldReader<u8, PLEN_A>;
#[doc = "Length of preamble on air. Decision point: TASKS_START task\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum PLEN_A {
#[doc = "0: 8-bit preamble"]
_8BIT = 0,
#[doc = "1: 16-bit preamble"]
_16BIT = 1,
#[doc = "2: 32-bit zero preamble - used for IEEE 802.15.4"]
_32BIT_ZERO = 2,
#[doc = "3: Preamble - used for Bluetooth LE Long Range"]
LONG_RANGE = 3,
}
impl From<PLEN_A> for u8 {
#[inline(always)]
fn from(variant: PLEN_A) -> Self {
variant as _
}
}
impl PLEN_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> PLEN_A {
match self.bits {
0 => PLEN_A::_8BIT,
1 => PLEN_A::_16BIT,
2 => PLEN_A::_32BIT_ZERO,
3 => PLEN_A::LONG_RANGE,
_ => unreachable!(),
}
}
#[doc = "Checks if the value of the field is `_8BIT`"]
#[inline(always)]
pub fn is_8bit(&self) -> bool {
*self == PLEN_A::_8BIT
}
#[doc = "Checks if the value of the field is `_16BIT`"]
#[inline(always)]
pub fn is_16bit(&self) -> bool {
*self == PLEN_A::_16BIT
}
#[doc = "Checks if the value of the field is `_32BIT_ZERO`"]
#[inline(always)]
pub fn is_32bit_zero(&self) -> bool {
*self == PLEN_A::_32BIT_ZERO
}
#[doc = "Checks if the value of the field is `LONG_RANGE`"]
#[inline(always)]
pub fn is_long_range(&self) -> bool {
*self == PLEN_A::LONG_RANGE
}
}
#[doc = "Field `PLEN` writer - Length of preamble on air. Decision point: TASKS_START task"]
pub type PLEN_W<'a, const O: u8> = crate::FieldWriterSafe<'a, u32, PCNF0_SPEC, u8, PLEN_A, 2, O>;
impl<'a, const O: u8> PLEN_W<'a, O> {
#[doc = "8-bit preamble"]
#[inline(always)]
pub fn _8bit(self) -> &'a mut W {
self.variant(PLEN_A::_8BIT)
}
#[doc = "16-bit preamble"]
#[inline(always)]
pub fn _16bit(self) -> &'a mut W {
self.variant(PLEN_A::_16BIT)
}
#[doc = "32-bit zero preamble - used for IEEE 802.15.4"]
#[inline(always)]
pub fn _32bit_zero(self) -> &'a mut W {
self.variant(PLEN_A::_32BIT_ZERO)
}
#[doc = "Preamble - used for Bluetooth LE Long Range"]
#[inline(always)]
pub fn long_range(self) -> &'a mut W {
self.variant(PLEN_A::LONG_RANGE)
}
}
#[doc = "Field `CRCINC` reader - Indicates if LENGTH field contains CRC or not"]
pub type CRCINC_R = crate::BitReader<CRCINC_A>;
#[doc = "Indicates if LENGTH field contains CRC or not\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CRCINC_A {
#[doc = "0: LENGTH does not contain CRC"]
EXCLUDE = 0,
#[doc = "1: LENGTH includes CRC"]
INCLUDE = 1,
}
impl From<CRCINC_A> for bool {
#[inline(always)]
fn from(variant: CRCINC_A) -> Self {
variant as u8 != 0
}
}
impl CRCINC_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> CRCINC_A {
match self.bits {
false => CRCINC_A::EXCLUDE,
true => CRCINC_A::INCLUDE,
}
}
#[doc = "Checks if the value of the field is `EXCLUDE`"]
#[inline(always)]
pub fn is_exclude(&self) -> bool {
*self == CRCINC_A::EXCLUDE
}
#[doc = "Checks if the value of the field is `INCLUDE`"]
#[inline(always)]
pub fn is_include(&self) -> bool {
*self == CRCINC_A::INCLUDE
}
}
#[doc = "Field `CRCINC` writer - Indicates if LENGTH field contains CRC or not"]
pub type CRCINC_W<'a, const O: u8> = crate::BitWriter<'a, u32, PCNF0_SPEC, CRCINC_A, O>;
impl<'a, const O: u8> CRCINC_W<'a, O> {
#[doc = "LENGTH does not contain CRC"]
#[inline(always)]
pub fn exclude(self) -> &'a mut W {
self.variant(CRCINC_A::EXCLUDE)
}
#[doc = "LENGTH includes CRC"]
#[inline(always)]
pub fn include(self) -> &'a mut W {
self.variant(CRCINC_A::INCLUDE)
}
}
#[doc = "Field `TERMLEN` reader - Length of TERM field in Long Range operation"]
pub type TERMLEN_R = crate::FieldReader<u8, u8>;
#[doc = "Field `TERMLEN` writer - Length of TERM field in Long Range operation"]
pub type TERMLEN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PCNF0_SPEC, u8, u8, 2, O>;
impl R {
#[doc = "Bits 0:3 - Length on air of LENGTH field in number of bits"]
#[inline(always)]
pub fn lflen(&self) -> LFLEN_R {
LFLEN_R::new((self.bits & 0x0f) as u8)
}
#[doc = "Bit 8 - Length on air of S0 field in number of bytes"]
#[inline(always)]
pub fn s0len(&self) -> S0LEN_R {
S0LEN_R::new(((self.bits >> 8) & 1) != 0)
}
#[doc = "Bits 16:19 - Length on air of S1 field in number of bits"]
#[inline(always)]
pub fn s1len(&self) -> S1LEN_R {
S1LEN_R::new(((self.bits >> 16) & 0x0f) as u8)
}
#[doc = "Bit 20 - Include or exclude S1 field in RAM"]
#[inline(always)]
pub fn s1incl(&self) -> S1INCL_R {
S1INCL_R::new(((self.bits >> 20) & 1) != 0)
}
#[doc = "Bits 22:23 - Length of code indicator - Long Range"]
#[inline(always)]
pub fn cilen(&self) -> CILEN_R {
CILEN_R::new(((self.bits >> 22) & 3) as u8)
}
#[doc = "Bits 24:25 - Length of preamble on air. Decision point: TASKS_START task"]
#[inline(always)]
pub fn plen(&self) -> PLEN_R {
PLEN_R::new(((self.bits >> 24) & 3) as u8)
}
#[doc = "Bit 26 - Indicates if LENGTH field contains CRC or not"]
#[inline(always)]
pub fn crcinc(&self) -> CRCINC_R {
CRCINC_R::new(((self.bits >> 26) & 1) != 0)
}
#[doc = "Bits 29:30 - Length of TERM field in Long Range operation"]
#[inline(always)]
pub fn termlen(&self) -> TERMLEN_R {
TERMLEN_R::new(((self.bits >> 29) & 3) as u8)
}
}
impl W {
#[doc = "Bits 0:3 - Length on air of LENGTH field in number of bits"]
#[inline(always)]
pub fn lflen(&mut self) -> LFLEN_W<0> {
LFLEN_W::new(self)
}
#[doc = "Bit 8 - Length on air of S0 field in number of bytes"]
#[inline(always)]
pub fn s0len(&mut self) -> S0LEN_W<8> {
S0LEN_W::new(self)
}
#[doc = "Bits 16:19 - Length on air of S1 field in number of bits"]
#[inline(always)]
pub fn s1len(&mut self) -> S1LEN_W<16> {
S1LEN_W::new(self)
}
#[doc = "Bit 20 - Include or exclude S1 field in RAM"]
#[inline(always)]
pub fn s1incl(&mut self) -> S1INCL_W<20> {
S1INCL_W::new(self)
}
#[doc = "Bits 22:23 - Length of code indicator - Long Range"]
#[inline(always)]
pub fn cilen(&mut self) -> CILEN_W<22> {
CILEN_W::new(self)
}
#[doc = "Bits 24:25 - Length of preamble on air. Decision point: TASKS_START task"]
#[inline(always)]
pub fn plen(&mut self) -> PLEN_W<24> {
PLEN_W::new(self)
}
#[doc = "Bit 26 - Indicates if LENGTH field contains CRC or not"]
#[inline(always)]
pub fn crcinc(&mut self) -> CRCINC_W<26> {
CRCINC_W::new(self)
}
#[doc = "Bits 29:30 - Length of TERM field in Long Range operation"]
#[inline(always)]
pub fn termlen(&mut self) -> TERMLEN_W<29> {
TERMLEN_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Packet configuration register 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [pcnf0](index.html) module"]
pub struct PCNF0_SPEC;
impl crate::RegisterSpec for PCNF0_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [pcnf0::R](R) reader structure"]
impl crate::Readable for PCNF0_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [pcnf0::W](W) writer structure"]
impl crate::Writable for PCNF0_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets PCNF0 to value 0"]
impl crate::Resettable for PCNF0_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+228
View File
@@ -0,0 +1,228 @@
#[doc = "Register `PCNF1` reader"]
pub struct R(crate::R<PCNF1_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<PCNF1_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<PCNF1_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<PCNF1_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `PCNF1` writer"]
pub struct W(crate::W<PCNF1_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<PCNF1_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<PCNF1_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<PCNF1_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `MAXLEN` reader - Maximum length of packet payload. If the packet payload is larger than MAXLEN, the radio will truncate the payload to MAXLEN."]
pub type MAXLEN_R = crate::FieldReader<u8, u8>;
#[doc = "Field `MAXLEN` writer - Maximum length of packet payload. If the packet payload is larger than MAXLEN, the radio will truncate the payload to MAXLEN."]
pub type MAXLEN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PCNF1_SPEC, u8, u8, 8, O>;
#[doc = "Field `STATLEN` reader - Static length in number of bytes"]
pub type STATLEN_R = crate::FieldReader<u8, u8>;
#[doc = "Field `STATLEN` writer - Static length in number of bytes"]
pub type STATLEN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PCNF1_SPEC, u8, u8, 8, O>;
#[doc = "Field `BALEN` reader - Base address length in number of bytes"]
pub type BALEN_R = crate::FieldReader<u8, u8>;
#[doc = "Field `BALEN` writer - Base address length in number of bytes"]
pub type BALEN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PCNF1_SPEC, u8, u8, 3, O>;
#[doc = "Field `ENDIAN` reader - On-air endianness of packet, this applies to the S0, LENGTH, S1, and the PAYLOAD fields."]
pub type ENDIAN_R = crate::BitReader<ENDIAN_A>;
#[doc = "On-air endianness of packet, this applies to the S0, LENGTH, S1, and the PAYLOAD fields.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ENDIAN_A {
#[doc = "0: Least significant bit on air first"]
LITTLE = 0,
#[doc = "1: Most significant bit on air first"]
BIG = 1,
}
impl From<ENDIAN_A> for bool {
#[inline(always)]
fn from(variant: ENDIAN_A) -> Self {
variant as u8 != 0
}
}
impl ENDIAN_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ENDIAN_A {
match self.bits {
false => ENDIAN_A::LITTLE,
true => ENDIAN_A::BIG,
}
}
#[doc = "Checks if the value of the field is `LITTLE`"]
#[inline(always)]
pub fn is_little(&self) -> bool {
*self == ENDIAN_A::LITTLE
}
#[doc = "Checks if the value of the field is `BIG`"]
#[inline(always)]
pub fn is_big(&self) -> bool {
*self == ENDIAN_A::BIG
}
}
#[doc = "Field `ENDIAN` writer - On-air endianness of packet, this applies to the S0, LENGTH, S1, and the PAYLOAD fields."]
pub type ENDIAN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PCNF1_SPEC, ENDIAN_A, O>;
impl<'a, const O: u8> ENDIAN_W<'a, O> {
#[doc = "Least significant bit on air first"]
#[inline(always)]
pub fn little(self) -> &'a mut W {
self.variant(ENDIAN_A::LITTLE)
}
#[doc = "Most significant bit on air first"]
#[inline(always)]
pub fn big(self) -> &'a mut W {
self.variant(ENDIAN_A::BIG)
}
}
#[doc = "Field `WHITEEN` reader - Enable or disable packet whitening"]
pub type WHITEEN_R = crate::BitReader<WHITEEN_A>;
#[doc = "Enable or disable packet whitening\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum WHITEEN_A {
#[doc = "0: Disable"]
DISABLED = 0,
#[doc = "1: Enable"]
ENABLED = 1,
}
impl From<WHITEEN_A> for bool {
#[inline(always)]
fn from(variant: WHITEEN_A) -> Self {
variant as u8 != 0
}
}
impl WHITEEN_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> WHITEEN_A {
match self.bits {
false => WHITEEN_A::DISABLED,
true => WHITEEN_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == WHITEEN_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == WHITEEN_A::ENABLED
}
}
#[doc = "Field `WHITEEN` writer - Enable or disable packet whitening"]
pub type WHITEEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PCNF1_SPEC, WHITEEN_A, O>;
impl<'a, const O: u8> WHITEEN_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(WHITEEN_A::DISABLED)
}
#[doc = "Enable"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(WHITEEN_A::ENABLED)
}
}
impl R {
#[doc = "Bits 0:7 - Maximum length of packet payload. If the packet payload is larger than MAXLEN, the radio will truncate the payload to MAXLEN."]
#[inline(always)]
pub fn maxlen(&self) -> MAXLEN_R {
MAXLEN_R::new((self.bits & 0xff) as u8)
}
#[doc = "Bits 8:15 - Static length in number of bytes"]
#[inline(always)]
pub fn statlen(&self) -> STATLEN_R {
STATLEN_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 16:18 - Base address length in number of bytes"]
#[inline(always)]
pub fn balen(&self) -> BALEN_R {
BALEN_R::new(((self.bits >> 16) & 7) as u8)
}
#[doc = "Bit 24 - On-air endianness of packet, this applies to the S0, LENGTH, S1, and the PAYLOAD fields."]
#[inline(always)]
pub fn endian(&self) -> ENDIAN_R {
ENDIAN_R::new(((self.bits >> 24) & 1) != 0)
}
#[doc = "Bit 25 - Enable or disable packet whitening"]
#[inline(always)]
pub fn whiteen(&self) -> WHITEEN_R {
WHITEEN_R::new(((self.bits >> 25) & 1) != 0)
}
}
impl W {
#[doc = "Bits 0:7 - Maximum length of packet payload. If the packet payload is larger than MAXLEN, the radio will truncate the payload to MAXLEN."]
#[inline(always)]
pub fn maxlen(&mut self) -> MAXLEN_W<0> {
MAXLEN_W::new(self)
}
#[doc = "Bits 8:15 - Static length in number of bytes"]
#[inline(always)]
pub fn statlen(&mut self) -> STATLEN_W<8> {
STATLEN_W::new(self)
}
#[doc = "Bits 16:18 - Base address length in number of bytes"]
#[inline(always)]
pub fn balen(&mut self) -> BALEN_W<16> {
BALEN_W::new(self)
}
#[doc = "Bit 24 - On-air endianness of packet, this applies to the S0, LENGTH, S1, and the PAYLOAD fields."]
#[inline(always)]
pub fn endian(&mut self) -> ENDIAN_W<24> {
ENDIAN_W::new(self)
}
#[doc = "Bit 25 - Enable or disable packet whitening"]
#[inline(always)]
pub fn whiteen(&mut self) -> WHITEEN_W<25> {
WHITEEN_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Packet configuration register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [pcnf1](index.html) module"]
pub struct PCNF1_SPEC;
impl crate::RegisterSpec for PCNF1_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [pcnf1::R](R) reader structure"]
impl crate::Readable for PCNF1_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [pcnf1::W](W) writer structure"]
impl crate::Writable for PCNF1_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets PCNF1 to value 0"]
impl crate::Resettable for PCNF1_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+117
View File
@@ -0,0 +1,117 @@
#[doc = "Register `PDUSTAT` reader"]
pub struct R(crate::R<PDUSTAT_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<PDUSTAT_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<PDUSTAT_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<PDUSTAT_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `PDUSTAT` reader - Status on payload length vs. PCNF1.MAXLEN"]
pub type PDUSTAT_R = crate::BitReader<PDUSTAT_A>;
#[doc = "Status on payload length vs. PCNF1.MAXLEN\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum PDUSTAT_A {
#[doc = "0: Payload less than PCNF1.MAXLEN"]
LESS_THAN = 0,
#[doc = "1: Payload greater than PCNF1.MAXLEN"]
GREATER_THAN = 1,
}
impl From<PDUSTAT_A> for bool {
#[inline(always)]
fn from(variant: PDUSTAT_A) -> Self {
variant as u8 != 0
}
}
impl PDUSTAT_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> PDUSTAT_A {
match self.bits {
false => PDUSTAT_A::LESS_THAN,
true => PDUSTAT_A::GREATER_THAN,
}
}
#[doc = "Checks if the value of the field is `LESS_THAN`"]
#[inline(always)]
pub fn is_less_than(&self) -> bool {
*self == PDUSTAT_A::LESS_THAN
}
#[doc = "Checks if the value of the field is `GREATER_THAN`"]
#[inline(always)]
pub fn is_greater_than(&self) -> bool {
*self == PDUSTAT_A::GREATER_THAN
}
}
#[doc = "Field `CISTAT` reader - Status on what rate packet is received with in Long Range"]
pub type CISTAT_R = crate::FieldReader<u8, CISTAT_A>;
#[doc = "Status on what rate packet is received with in Long Range\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum CISTAT_A {
#[doc = "0: Frame is received at 125 kbps"]
LR125KBIT = 0,
#[doc = "1: Frame is received at 500 kbps"]
LR500KBIT = 1,
}
impl From<CISTAT_A> for u8 {
#[inline(always)]
fn from(variant: CISTAT_A) -> Self {
variant as _
}
}
impl CISTAT_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> Option<CISTAT_A> {
match self.bits {
0 => Some(CISTAT_A::LR125KBIT),
1 => Some(CISTAT_A::LR500KBIT),
_ => None,
}
}
#[doc = "Checks if the value of the field is `LR125KBIT`"]
#[inline(always)]
pub fn is_lr125kbit(&self) -> bool {
*self == CISTAT_A::LR125KBIT
}
#[doc = "Checks if the value of the field is `LR500KBIT`"]
#[inline(always)]
pub fn is_lr500kbit(&self) -> bool {
*self == CISTAT_A::LR500KBIT
}
}
impl R {
#[doc = "Bit 0 - Status on payload length vs. PCNF1.MAXLEN"]
#[inline(always)]
pub fn pdustat(&self) -> PDUSTAT_R {
PDUSTAT_R::new((self.bits & 1) != 0)
}
#[doc = "Bits 1:2 - Status on what rate packet is received with in Long Range"]
#[inline(always)]
pub fn cistat(&self) -> CISTAT_R {
CISTAT_R::new(((self.bits >> 1) & 3) as u8)
}
}
#[doc = "Payload status\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [pdustat](index.html) module"]
pub struct PDUSTAT_SPEC;
impl crate::RegisterSpec for PDUSTAT_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [pdustat::R](R) reader structure"]
impl crate::Readable for PDUSTAT_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets PDUSTAT to value 0"]
impl crate::Resettable for PDUSTAT_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+126
View File
@@ -0,0 +1,126 @@
#[doc = "Register `POWER` reader"]
pub struct R(crate::R<POWER_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<POWER_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<POWER_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<POWER_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `POWER` writer"]
pub struct W(crate::W<POWER_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<POWER_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<POWER_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<POWER_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `POWER` reader - Peripheral power control. The peripheral and its registers will be reset to its initial state by switching the peripheral off and then back on again."]
pub type POWER_R = crate::BitReader<POWER_A>;
#[doc = "Peripheral power control. The peripheral and its registers will be reset to its initial state by switching the peripheral off and then back on again.\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum POWER_A {
#[doc = "0: Peripheral is powered off"]
DISABLED = 0,
#[doc = "1: Peripheral is powered on"]
ENABLED = 1,
}
impl From<POWER_A> for bool {
#[inline(always)]
fn from(variant: POWER_A) -> Self {
variant as u8 != 0
}
}
impl POWER_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> POWER_A {
match self.bits {
false => POWER_A::DISABLED,
true => POWER_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == POWER_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == POWER_A::ENABLED
}
}
#[doc = "Field `POWER` writer - Peripheral power control. The peripheral and its registers will be reset to its initial state by switching the peripheral off and then back on again."]
pub type POWER_W<'a, const O: u8> = crate::BitWriter<'a, u32, POWER_SPEC, POWER_A, O>;
impl<'a, const O: u8> POWER_W<'a, O> {
#[doc = "Peripheral is powered off"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(POWER_A::DISABLED)
}
#[doc = "Peripheral is powered on"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(POWER_A::ENABLED)
}
}
impl R {
#[doc = "Bit 0 - Peripheral power control. The peripheral and its registers will be reset to its initial state by switching the peripheral off and then back on again."]
#[inline(always)]
pub fn power(&self) -> POWER_R {
POWER_R::new((self.bits & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Peripheral power control. The peripheral and its registers will be reset to its initial state by switching the peripheral off and then back on again."]
#[inline(always)]
pub fn power(&mut self) -> POWER_W<0> {
POWER_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Peripheral power control\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [power](index.html) module"]
pub struct POWER_SPEC;
impl crate::RegisterSpec for POWER_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [power::R](R) reader structure"]
impl crate::Readable for POWER_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [power::W](W) writer structure"]
impl crate::Writable for POWER_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets POWER to value 0x01"]
impl crate::Resettable for POWER_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0x01
}
}
+122
View File
@@ -0,0 +1,122 @@
#[doc = "Register `PREFIX0` reader"]
pub struct R(crate::R<PREFIX0_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<PREFIX0_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<PREFIX0_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<PREFIX0_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `PREFIX0` writer"]
pub struct W(crate::W<PREFIX0_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<PREFIX0_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<PREFIX0_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<PREFIX0_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `AP0` reader - Address prefix 0."]
pub type AP0_R = crate::FieldReader<u8, u8>;
#[doc = "Field `AP0` writer - Address prefix 0."]
pub type AP0_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PREFIX0_SPEC, u8, u8, 8, O>;
#[doc = "Field `AP1` reader - Address prefix 1."]
pub type AP1_R = crate::FieldReader<u8, u8>;
#[doc = "Field `AP1` writer - Address prefix 1."]
pub type AP1_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PREFIX0_SPEC, u8, u8, 8, O>;
#[doc = "Field `AP2` reader - Address prefix 2."]
pub type AP2_R = crate::FieldReader<u8, u8>;
#[doc = "Field `AP2` writer - Address prefix 2."]
pub type AP2_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PREFIX0_SPEC, u8, u8, 8, O>;
#[doc = "Field `AP3` reader - Address prefix 3."]
pub type AP3_R = crate::FieldReader<u8, u8>;
#[doc = "Field `AP3` writer - Address prefix 3."]
pub type AP3_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PREFIX0_SPEC, u8, u8, 8, O>;
impl R {
#[doc = "Bits 0:7 - Address prefix 0."]
#[inline(always)]
pub fn ap0(&self) -> AP0_R {
AP0_R::new((self.bits & 0xff) as u8)
}
#[doc = "Bits 8:15 - Address prefix 1."]
#[inline(always)]
pub fn ap1(&self) -> AP1_R {
AP1_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 16:23 - Address prefix 2."]
#[inline(always)]
pub fn ap2(&self) -> AP2_R {
AP2_R::new(((self.bits >> 16) & 0xff) as u8)
}
#[doc = "Bits 24:31 - Address prefix 3."]
#[inline(always)]
pub fn ap3(&self) -> AP3_R {
AP3_R::new(((self.bits >> 24) & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 0:7 - Address prefix 0."]
#[inline(always)]
pub fn ap0(&mut self) -> AP0_W<0> {
AP0_W::new(self)
}
#[doc = "Bits 8:15 - Address prefix 1."]
#[inline(always)]
pub fn ap1(&mut self) -> AP1_W<8> {
AP1_W::new(self)
}
#[doc = "Bits 16:23 - Address prefix 2."]
#[inline(always)]
pub fn ap2(&mut self) -> AP2_W<16> {
AP2_W::new(self)
}
#[doc = "Bits 24:31 - Address prefix 3."]
#[inline(always)]
pub fn ap3(&mut self) -> AP3_W<24> {
AP3_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Prefixes bytes for logical addresses 0-3\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [prefix0](index.html) module"]
pub struct PREFIX0_SPEC;
impl crate::RegisterSpec for PREFIX0_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [prefix0::R](R) reader structure"]
impl crate::Readable for PREFIX0_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [prefix0::W](W) writer structure"]
impl crate::Writable for PREFIX0_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets PREFIX0 to value 0"]
impl crate::Resettable for PREFIX0_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+122
View File
@@ -0,0 +1,122 @@
#[doc = "Register `PREFIX1` reader"]
pub struct R(crate::R<PREFIX1_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<PREFIX1_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<PREFIX1_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<PREFIX1_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `PREFIX1` writer"]
pub struct W(crate::W<PREFIX1_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<PREFIX1_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<PREFIX1_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<PREFIX1_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `AP4` reader - Address prefix 4."]
pub type AP4_R = crate::FieldReader<u8, u8>;
#[doc = "Field `AP4` writer - Address prefix 4."]
pub type AP4_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PREFIX1_SPEC, u8, u8, 8, O>;
#[doc = "Field `AP5` reader - Address prefix 5."]
pub type AP5_R = crate::FieldReader<u8, u8>;
#[doc = "Field `AP5` writer - Address prefix 5."]
pub type AP5_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PREFIX1_SPEC, u8, u8, 8, O>;
#[doc = "Field `AP6` reader - Address prefix 6."]
pub type AP6_R = crate::FieldReader<u8, u8>;
#[doc = "Field `AP6` writer - Address prefix 6."]
pub type AP6_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PREFIX1_SPEC, u8, u8, 8, O>;
#[doc = "Field `AP7` reader - Address prefix 7."]
pub type AP7_R = crate::FieldReader<u8, u8>;
#[doc = "Field `AP7` writer - Address prefix 7."]
pub type AP7_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PREFIX1_SPEC, u8, u8, 8, O>;
impl R {
#[doc = "Bits 0:7 - Address prefix 4."]
#[inline(always)]
pub fn ap4(&self) -> AP4_R {
AP4_R::new((self.bits & 0xff) as u8)
}
#[doc = "Bits 8:15 - Address prefix 5."]
#[inline(always)]
pub fn ap5(&self) -> AP5_R {
AP5_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[doc = "Bits 16:23 - Address prefix 6."]
#[inline(always)]
pub fn ap6(&self) -> AP6_R {
AP6_R::new(((self.bits >> 16) & 0xff) as u8)
}
#[doc = "Bits 24:31 - Address prefix 7."]
#[inline(always)]
pub fn ap7(&self) -> AP7_R {
AP7_R::new(((self.bits >> 24) & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 0:7 - Address prefix 4."]
#[inline(always)]
pub fn ap4(&mut self) -> AP4_W<0> {
AP4_W::new(self)
}
#[doc = "Bits 8:15 - Address prefix 5."]
#[inline(always)]
pub fn ap5(&mut self) -> AP5_W<8> {
AP5_W::new(self)
}
#[doc = "Bits 16:23 - Address prefix 6."]
#[inline(always)]
pub fn ap6(&mut self) -> AP6_W<16> {
AP6_W::new(self)
}
#[doc = "Bits 24:31 - Address prefix 7."]
#[inline(always)]
pub fn ap7(&mut self) -> AP7_W<24> {
AP7_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Prefixes bytes for logical addresses 4-7\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [prefix1](index.html) module"]
pub struct PREFIX1_SPEC;
impl crate::RegisterSpec for PREFIX1_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [prefix1::R](R) reader structure"]
impl crate::Readable for PREFIX1_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [prefix1::W](W) writer structure"]
impl crate::Writable for PREFIX1_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets PREFIX1 to value 0"]
impl crate::Resettable for PREFIX1_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+10
View File
@@ -0,0 +1,10 @@
#[doc = r"Register block"]
#[repr(C)]
pub struct PSEL {
#[doc = "0x00..0x20 - Description collection: Pin select for DFE pin n"]
pub dfegpio: [DFEGPIO; 8],
}
#[doc = "DFEGPIO (rw) register accessor: an alias for `Reg<DFEGPIO_SPEC>`"]
pub type DFEGPIO = crate::Reg<dfegpio::DFEGPIO_SPEC>;
#[doc = "Description collection: Pin select for DFE pin n"]
pub mod dfegpio;
+155
View File
@@ -0,0 +1,155 @@
#[doc = "Register `DFEGPIO[%s]` reader"]
pub struct R(crate::R<DFEGPIO_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<DFEGPIO_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<DFEGPIO_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<DFEGPIO_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `DFEGPIO[%s]` writer"]
pub struct W(crate::W<DFEGPIO_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<DFEGPIO_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<DFEGPIO_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<DFEGPIO_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `PIN` reader - Pin number"]
pub type PIN_R = crate::FieldReader<u8, u8>;
#[doc = "Field `PIN` writer - Pin number"]
pub type PIN_W<'a, const O: u8> = crate::FieldWriter<'a, u32, DFEGPIO_SPEC, u8, u8, 5, O>;
#[doc = "Field `PORT` reader - Port number"]
pub type PORT_R = crate::BitReader<bool>;
#[doc = "Field `PORT` writer - Port number"]
pub type PORT_W<'a, const O: u8> = crate::BitWriter<'a, u32, DFEGPIO_SPEC, bool, O>;
#[doc = "Field `CONNECT` reader - Connection"]
pub type CONNECT_R = crate::BitReader<CONNECT_A>;
#[doc = "Connection\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CONNECT_A {
#[doc = "1: Disconnect"]
DISCONNECTED = 1,
#[doc = "0: Connect"]
CONNECTED = 0,
}
impl From<CONNECT_A> for bool {
#[inline(always)]
fn from(variant: CONNECT_A) -> Self {
variant as u8 != 0
}
}
impl CONNECT_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> CONNECT_A {
match self.bits {
true => CONNECT_A::DISCONNECTED,
false => CONNECT_A::CONNECTED,
}
}
#[doc = "Checks if the value of the field is `DISCONNECTED`"]
#[inline(always)]
pub fn is_disconnected(&self) -> bool {
*self == CONNECT_A::DISCONNECTED
}
#[doc = "Checks if the value of the field is `CONNECTED`"]
#[inline(always)]
pub fn is_connected(&self) -> bool {
*self == CONNECT_A::CONNECTED
}
}
#[doc = "Field `CONNECT` writer - Connection"]
pub type CONNECT_W<'a, const O: u8> = crate::BitWriter<'a, u32, DFEGPIO_SPEC, CONNECT_A, O>;
impl<'a, const O: u8> CONNECT_W<'a, O> {
#[doc = "Disconnect"]
#[inline(always)]
pub fn disconnected(self) -> &'a mut W {
self.variant(CONNECT_A::DISCONNECTED)
}
#[doc = "Connect"]
#[inline(always)]
pub fn connected(self) -> &'a mut W {
self.variant(CONNECT_A::CONNECTED)
}
}
impl R {
#[doc = "Bits 0:4 - Pin number"]
#[inline(always)]
pub fn pin(&self) -> PIN_R {
PIN_R::new((self.bits & 0x1f) as u8)
}
#[doc = "Bit 5 - Port number"]
#[inline(always)]
pub fn port(&self) -> PORT_R {
PORT_R::new(((self.bits >> 5) & 1) != 0)
}
#[doc = "Bit 31 - Connection"]
#[inline(always)]
pub fn connect(&self) -> CONNECT_R {
CONNECT_R::new(((self.bits >> 31) & 1) != 0)
}
}
impl W {
#[doc = "Bits 0:4 - Pin number"]
#[inline(always)]
pub fn pin(&mut self) -> PIN_W<0> {
PIN_W::new(self)
}
#[doc = "Bit 5 - Port number"]
#[inline(always)]
pub fn port(&mut self) -> PORT_W<5> {
PORT_W::new(self)
}
#[doc = "Bit 31 - Connection"]
#[inline(always)]
pub fn connect(&mut self) -> CONNECT_W<31> {
CONNECT_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Description collection: Pin select for DFE pin n\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [dfegpio](index.html) module"]
pub struct DFEGPIO_SPEC;
impl crate::RegisterSpec for DFEGPIO_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [dfegpio::R](R) reader structure"]
impl crate::Readable for DFEGPIO_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [dfegpio::W](W) writer structure"]
impl crate::Writable for DFEGPIO_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets DFEGPIO[%s]
to value 0xffff_ffff"]
impl crate::Resettable for DFEGPIO_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0xffff_ffff
}
}
+140
View File
@@ -0,0 +1,140 @@
#[doc = "Register `PUBLISH_ADDRESS` reader"]
pub struct R(crate::R<PUBLISH_ADDRESS_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<PUBLISH_ADDRESS_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<PUBLISH_ADDRESS_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<PUBLISH_ADDRESS_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `PUBLISH_ADDRESS` writer"]
pub struct W(crate::W<PUBLISH_ADDRESS_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<PUBLISH_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<PUBLISH_ADDRESS_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<PUBLISH_ADDRESS_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `CHIDX` reader - DPPI channel that event ADDRESS will publish to."]
pub type CHIDX_R = crate::FieldReader<u8, u8>;
#[doc = "Field `CHIDX` writer - DPPI channel that event ADDRESS will publish to."]
pub type CHIDX_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PUBLISH_ADDRESS_SPEC, u8, u8, 8, O>;
#[doc = "Field `EN` reader - "]
pub type EN_R = crate::BitReader<EN_A>;
#[doc = "\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EN_A {
#[doc = "0: Disable publishing"]
DISABLED = 0,
#[doc = "1: Enable publishing"]
ENABLED = 1,
}
impl From<EN_A> for bool {
#[inline(always)]
fn from(variant: EN_A) -> Self {
variant as u8 != 0
}
}
impl EN_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EN_A {
match self.bits {
false => EN_A::DISABLED,
true => EN_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == EN_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == EN_A::ENABLED
}
}
#[doc = "Field `EN` writer - "]
pub type EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUBLISH_ADDRESS_SPEC, EN_A, O>;
impl<'a, const O: u8> EN_W<'a, O> {
#[doc = "Disable publishing"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(EN_A::DISABLED)
}
#[doc = "Enable publishing"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(EN_A::ENABLED)
}
}
impl R {
#[doc = "Bits 0:7 - DPPI channel that event ADDRESS will publish to."]
#[inline(always)]
pub fn chidx(&self) -> CHIDX_R {
CHIDX_R::new((self.bits & 0xff) as u8)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&self) -> EN_R {
EN_R::new(((self.bits >> 31) & 1) != 0)
}
}
impl W {
#[doc = "Bits 0:7 - DPPI channel that event ADDRESS will publish to."]
#[inline(always)]
pub fn chidx(&mut self) -> CHIDX_W<0> {
CHIDX_W::new(self)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&mut self) -> EN_W<31> {
EN_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 = "Publish configuration for event ADDRESS\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 [publish_address](index.html) module"]
pub struct PUBLISH_ADDRESS_SPEC;
impl crate::RegisterSpec for PUBLISH_ADDRESS_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [publish_address::R](R) reader structure"]
impl crate::Readable for PUBLISH_ADDRESS_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [publish_address::W](W) writer structure"]
impl crate::Writable for PUBLISH_ADDRESS_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets PUBLISH_ADDRESS to value 0"]
impl crate::Resettable for PUBLISH_ADDRESS_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+140
View File
@@ -0,0 +1,140 @@
#[doc = "Register `PUBLISH_BCMATCH` reader"]
pub struct R(crate::R<PUBLISH_BCMATCH_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<PUBLISH_BCMATCH_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<PUBLISH_BCMATCH_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<PUBLISH_BCMATCH_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `PUBLISH_BCMATCH` writer"]
pub struct W(crate::W<PUBLISH_BCMATCH_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<PUBLISH_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<PUBLISH_BCMATCH_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<PUBLISH_BCMATCH_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `CHIDX` reader - DPPI channel that event BCMATCH will publish to."]
pub type CHIDX_R = crate::FieldReader<u8, u8>;
#[doc = "Field `CHIDX` writer - DPPI channel that event BCMATCH will publish to."]
pub type CHIDX_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PUBLISH_BCMATCH_SPEC, u8, u8, 8, O>;
#[doc = "Field `EN` reader - "]
pub type EN_R = crate::BitReader<EN_A>;
#[doc = "\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EN_A {
#[doc = "0: Disable publishing"]
DISABLED = 0,
#[doc = "1: Enable publishing"]
ENABLED = 1,
}
impl From<EN_A> for bool {
#[inline(always)]
fn from(variant: EN_A) -> Self {
variant as u8 != 0
}
}
impl EN_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EN_A {
match self.bits {
false => EN_A::DISABLED,
true => EN_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == EN_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == EN_A::ENABLED
}
}
#[doc = "Field `EN` writer - "]
pub type EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUBLISH_BCMATCH_SPEC, EN_A, O>;
impl<'a, const O: u8> EN_W<'a, O> {
#[doc = "Disable publishing"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(EN_A::DISABLED)
}
#[doc = "Enable publishing"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(EN_A::ENABLED)
}
}
impl R {
#[doc = "Bits 0:7 - DPPI channel that event BCMATCH will publish to."]
#[inline(always)]
pub fn chidx(&self) -> CHIDX_R {
CHIDX_R::new((self.bits & 0xff) as u8)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&self) -> EN_R {
EN_R::new(((self.bits >> 31) & 1) != 0)
}
}
impl W {
#[doc = "Bits 0:7 - DPPI channel that event BCMATCH will publish to."]
#[inline(always)]
pub fn chidx(&mut self) -> CHIDX_W<0> {
CHIDX_W::new(self)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&mut self) -> EN_W<31> {
EN_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 = "Publish configuration for event BCMATCH\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 [publish_bcmatch](index.html) module"]
pub struct PUBLISH_BCMATCH_SPEC;
impl crate::RegisterSpec for PUBLISH_BCMATCH_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [publish_bcmatch::R](R) reader structure"]
impl crate::Readable for PUBLISH_BCMATCH_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [publish_bcmatch::W](W) writer structure"]
impl crate::Writable for PUBLISH_BCMATCH_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets PUBLISH_BCMATCH to value 0"]
impl crate::Resettable for PUBLISH_BCMATCH_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+140
View File
@@ -0,0 +1,140 @@
#[doc = "Register `PUBLISH_CCABUSY` reader"]
pub struct R(crate::R<PUBLISH_CCABUSY_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<PUBLISH_CCABUSY_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<PUBLISH_CCABUSY_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<PUBLISH_CCABUSY_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `PUBLISH_CCABUSY` writer"]
pub struct W(crate::W<PUBLISH_CCABUSY_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<PUBLISH_CCABUSY_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<PUBLISH_CCABUSY_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<PUBLISH_CCABUSY_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `CHIDX` reader - DPPI channel that event CCABUSY will publish to."]
pub type CHIDX_R = crate::FieldReader<u8, u8>;
#[doc = "Field `CHIDX` writer - DPPI channel that event CCABUSY will publish to."]
pub type CHIDX_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PUBLISH_CCABUSY_SPEC, u8, u8, 8, O>;
#[doc = "Field `EN` reader - "]
pub type EN_R = crate::BitReader<EN_A>;
#[doc = "\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EN_A {
#[doc = "0: Disable publishing"]
DISABLED = 0,
#[doc = "1: Enable publishing"]
ENABLED = 1,
}
impl From<EN_A> for bool {
#[inline(always)]
fn from(variant: EN_A) -> Self {
variant as u8 != 0
}
}
impl EN_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EN_A {
match self.bits {
false => EN_A::DISABLED,
true => EN_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == EN_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == EN_A::ENABLED
}
}
#[doc = "Field `EN` writer - "]
pub type EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUBLISH_CCABUSY_SPEC, EN_A, O>;
impl<'a, const O: u8> EN_W<'a, O> {
#[doc = "Disable publishing"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(EN_A::DISABLED)
}
#[doc = "Enable publishing"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(EN_A::ENABLED)
}
}
impl R {
#[doc = "Bits 0:7 - DPPI channel that event CCABUSY will publish to."]
#[inline(always)]
pub fn chidx(&self) -> CHIDX_R {
CHIDX_R::new((self.bits & 0xff) as u8)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&self) -> EN_R {
EN_R::new(((self.bits >> 31) & 1) != 0)
}
}
impl W {
#[doc = "Bits 0:7 - DPPI channel that event CCABUSY will publish to."]
#[inline(always)]
pub fn chidx(&mut self) -> CHIDX_W<0> {
CHIDX_W::new(self)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&mut self) -> EN_W<31> {
EN_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 = "Publish configuration for event CCABUSY\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 [publish_ccabusy](index.html) module"]
pub struct PUBLISH_CCABUSY_SPEC;
impl crate::RegisterSpec for PUBLISH_CCABUSY_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [publish_ccabusy::R](R) reader structure"]
impl crate::Readable for PUBLISH_CCABUSY_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [publish_ccabusy::W](W) writer structure"]
impl crate::Writable for PUBLISH_CCABUSY_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets PUBLISH_CCABUSY to value 0"]
impl crate::Resettable for PUBLISH_CCABUSY_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+140
View File
@@ -0,0 +1,140 @@
#[doc = "Register `PUBLISH_CCAIDLE` reader"]
pub struct R(crate::R<PUBLISH_CCAIDLE_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<PUBLISH_CCAIDLE_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<PUBLISH_CCAIDLE_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<PUBLISH_CCAIDLE_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `PUBLISH_CCAIDLE` writer"]
pub struct W(crate::W<PUBLISH_CCAIDLE_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<PUBLISH_CCAIDLE_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<PUBLISH_CCAIDLE_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<PUBLISH_CCAIDLE_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `CHIDX` reader - DPPI channel that event CCAIDLE will publish to."]
pub type CHIDX_R = crate::FieldReader<u8, u8>;
#[doc = "Field `CHIDX` writer - DPPI channel that event CCAIDLE will publish to."]
pub type CHIDX_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PUBLISH_CCAIDLE_SPEC, u8, u8, 8, O>;
#[doc = "Field `EN` reader - "]
pub type EN_R = crate::BitReader<EN_A>;
#[doc = "\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EN_A {
#[doc = "0: Disable publishing"]
DISABLED = 0,
#[doc = "1: Enable publishing"]
ENABLED = 1,
}
impl From<EN_A> for bool {
#[inline(always)]
fn from(variant: EN_A) -> Self {
variant as u8 != 0
}
}
impl EN_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EN_A {
match self.bits {
false => EN_A::DISABLED,
true => EN_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == EN_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == EN_A::ENABLED
}
}
#[doc = "Field `EN` writer - "]
pub type EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUBLISH_CCAIDLE_SPEC, EN_A, O>;
impl<'a, const O: u8> EN_W<'a, O> {
#[doc = "Disable publishing"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(EN_A::DISABLED)
}
#[doc = "Enable publishing"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(EN_A::ENABLED)
}
}
impl R {
#[doc = "Bits 0:7 - DPPI channel that event CCAIDLE will publish to."]
#[inline(always)]
pub fn chidx(&self) -> CHIDX_R {
CHIDX_R::new((self.bits & 0xff) as u8)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&self) -> EN_R {
EN_R::new(((self.bits >> 31) & 1) != 0)
}
}
impl W {
#[doc = "Bits 0:7 - DPPI channel that event CCAIDLE will publish to."]
#[inline(always)]
pub fn chidx(&mut self) -> CHIDX_W<0> {
CHIDX_W::new(self)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&mut self) -> EN_W<31> {
EN_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 = "Publish configuration for event CCAIDLE\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 [publish_ccaidle](index.html) module"]
pub struct PUBLISH_CCAIDLE_SPEC;
impl crate::RegisterSpec for PUBLISH_CCAIDLE_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [publish_ccaidle::R](R) reader structure"]
impl crate::Readable for PUBLISH_CCAIDLE_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [publish_ccaidle::W](W) writer structure"]
impl crate::Writable for PUBLISH_CCAIDLE_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets PUBLISH_CCAIDLE to value 0"]
impl crate::Resettable for PUBLISH_CCAIDLE_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
@@ -0,0 +1,141 @@
#[doc = "Register `PUBLISH_CCASTOPPED` reader"]
pub struct R(crate::R<PUBLISH_CCASTOPPED_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<PUBLISH_CCASTOPPED_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<PUBLISH_CCASTOPPED_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<PUBLISH_CCASTOPPED_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `PUBLISH_CCASTOPPED` writer"]
pub struct W(crate::W<PUBLISH_CCASTOPPED_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<PUBLISH_CCASTOPPED_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<PUBLISH_CCASTOPPED_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<PUBLISH_CCASTOPPED_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `CHIDX` reader - DPPI channel that event CCASTOPPED will publish to."]
pub type CHIDX_R = crate::FieldReader<u8, u8>;
#[doc = "Field `CHIDX` writer - DPPI channel that event CCASTOPPED will publish to."]
pub type CHIDX_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, PUBLISH_CCASTOPPED_SPEC, u8, u8, 8, O>;
#[doc = "Field `EN` reader - "]
pub type EN_R = crate::BitReader<EN_A>;
#[doc = "\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EN_A {
#[doc = "0: Disable publishing"]
DISABLED = 0,
#[doc = "1: Enable publishing"]
ENABLED = 1,
}
impl From<EN_A> for bool {
#[inline(always)]
fn from(variant: EN_A) -> Self {
variant as u8 != 0
}
}
impl EN_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EN_A {
match self.bits {
false => EN_A::DISABLED,
true => EN_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == EN_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == EN_A::ENABLED
}
}
#[doc = "Field `EN` writer - "]
pub type EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUBLISH_CCASTOPPED_SPEC, EN_A, O>;
impl<'a, const O: u8> EN_W<'a, O> {
#[doc = "Disable publishing"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(EN_A::DISABLED)
}
#[doc = "Enable publishing"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(EN_A::ENABLED)
}
}
impl R {
#[doc = "Bits 0:7 - DPPI channel that event CCASTOPPED will publish to."]
#[inline(always)]
pub fn chidx(&self) -> CHIDX_R {
CHIDX_R::new((self.bits & 0xff) as u8)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&self) -> EN_R {
EN_R::new(((self.bits >> 31) & 1) != 0)
}
}
impl W {
#[doc = "Bits 0:7 - DPPI channel that event CCASTOPPED will publish to."]
#[inline(always)]
pub fn chidx(&mut self) -> CHIDX_W<0> {
CHIDX_W::new(self)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&mut self) -> EN_W<31> {
EN_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 = "Publish configuration for event CCASTOPPED\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 [publish_ccastopped](index.html) module"]
pub struct PUBLISH_CCASTOPPED_SPEC;
impl crate::RegisterSpec for PUBLISH_CCASTOPPED_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [publish_ccastopped::R](R) reader structure"]
impl crate::Readable for PUBLISH_CCASTOPPED_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [publish_ccastopped::W](W) writer structure"]
impl crate::Writable for PUBLISH_CCASTOPPED_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets PUBLISH_CCASTOPPED to value 0"]
impl crate::Resettable for PUBLISH_CCASTOPPED_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+141
View File
@@ -0,0 +1,141 @@
#[doc = "Register `PUBLISH_CRCERROR` reader"]
pub struct R(crate::R<PUBLISH_CRCERROR_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<PUBLISH_CRCERROR_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<PUBLISH_CRCERROR_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<PUBLISH_CRCERROR_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `PUBLISH_CRCERROR` writer"]
pub struct W(crate::W<PUBLISH_CRCERROR_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<PUBLISH_CRCERROR_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<PUBLISH_CRCERROR_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<PUBLISH_CRCERROR_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `CHIDX` reader - DPPI channel that event CRCERROR will publish to."]
pub type CHIDX_R = crate::FieldReader<u8, u8>;
#[doc = "Field `CHIDX` writer - DPPI channel that event CRCERROR will publish to."]
pub type CHIDX_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, PUBLISH_CRCERROR_SPEC, u8, u8, 8, O>;
#[doc = "Field `EN` reader - "]
pub type EN_R = crate::BitReader<EN_A>;
#[doc = "\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EN_A {
#[doc = "0: Disable publishing"]
DISABLED = 0,
#[doc = "1: Enable publishing"]
ENABLED = 1,
}
impl From<EN_A> for bool {
#[inline(always)]
fn from(variant: EN_A) -> Self {
variant as u8 != 0
}
}
impl EN_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EN_A {
match self.bits {
false => EN_A::DISABLED,
true => EN_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == EN_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == EN_A::ENABLED
}
}
#[doc = "Field `EN` writer - "]
pub type EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUBLISH_CRCERROR_SPEC, EN_A, O>;
impl<'a, const O: u8> EN_W<'a, O> {
#[doc = "Disable publishing"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(EN_A::DISABLED)
}
#[doc = "Enable publishing"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(EN_A::ENABLED)
}
}
impl R {
#[doc = "Bits 0:7 - DPPI channel that event CRCERROR will publish to."]
#[inline(always)]
pub fn chidx(&self) -> CHIDX_R {
CHIDX_R::new((self.bits & 0xff) as u8)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&self) -> EN_R {
EN_R::new(((self.bits >> 31) & 1) != 0)
}
}
impl W {
#[doc = "Bits 0:7 - DPPI channel that event CRCERROR will publish to."]
#[inline(always)]
pub fn chidx(&mut self) -> CHIDX_W<0> {
CHIDX_W::new(self)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&mut self) -> EN_W<31> {
EN_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 = "Publish configuration for event CRCERROR\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 [publish_crcerror](index.html) module"]
pub struct PUBLISH_CRCERROR_SPEC;
impl crate::RegisterSpec for PUBLISH_CRCERROR_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [publish_crcerror::R](R) reader structure"]
impl crate::Readable for PUBLISH_CRCERROR_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [publish_crcerror::W](W) writer structure"]
impl crate::Writable for PUBLISH_CRCERROR_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets PUBLISH_CRCERROR to value 0"]
impl crate::Resettable for PUBLISH_CRCERROR_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+140
View File
@@ -0,0 +1,140 @@
#[doc = "Register `PUBLISH_CRCOK` reader"]
pub struct R(crate::R<PUBLISH_CRCOK_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<PUBLISH_CRCOK_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<PUBLISH_CRCOK_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<PUBLISH_CRCOK_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `PUBLISH_CRCOK` writer"]
pub struct W(crate::W<PUBLISH_CRCOK_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<PUBLISH_CRCOK_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<PUBLISH_CRCOK_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<PUBLISH_CRCOK_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `CHIDX` reader - DPPI channel that event CRCOK will publish to."]
pub type CHIDX_R = crate::FieldReader<u8, u8>;
#[doc = "Field `CHIDX` writer - DPPI channel that event CRCOK will publish to."]
pub type CHIDX_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PUBLISH_CRCOK_SPEC, u8, u8, 8, O>;
#[doc = "Field `EN` reader - "]
pub type EN_R = crate::BitReader<EN_A>;
#[doc = "\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EN_A {
#[doc = "0: Disable publishing"]
DISABLED = 0,
#[doc = "1: Enable publishing"]
ENABLED = 1,
}
impl From<EN_A> for bool {
#[inline(always)]
fn from(variant: EN_A) -> Self {
variant as u8 != 0
}
}
impl EN_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EN_A {
match self.bits {
false => EN_A::DISABLED,
true => EN_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == EN_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == EN_A::ENABLED
}
}
#[doc = "Field `EN` writer - "]
pub type EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUBLISH_CRCOK_SPEC, EN_A, O>;
impl<'a, const O: u8> EN_W<'a, O> {
#[doc = "Disable publishing"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(EN_A::DISABLED)
}
#[doc = "Enable publishing"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(EN_A::ENABLED)
}
}
impl R {
#[doc = "Bits 0:7 - DPPI channel that event CRCOK will publish to."]
#[inline(always)]
pub fn chidx(&self) -> CHIDX_R {
CHIDX_R::new((self.bits & 0xff) as u8)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&self) -> EN_R {
EN_R::new(((self.bits >> 31) & 1) != 0)
}
}
impl W {
#[doc = "Bits 0:7 - DPPI channel that event CRCOK will publish to."]
#[inline(always)]
pub fn chidx(&mut self) -> CHIDX_W<0> {
CHIDX_W::new(self)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&mut self) -> EN_W<31> {
EN_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 = "Publish configuration for event CRCOK\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 [publish_crcok](index.html) module"]
pub struct PUBLISH_CRCOK_SPEC;
impl crate::RegisterSpec for PUBLISH_CRCOK_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [publish_crcok::R](R) reader structure"]
impl crate::Readable for PUBLISH_CRCOK_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [publish_crcok::W](W) writer structure"]
impl crate::Writable for PUBLISH_CRCOK_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets PUBLISH_CRCOK to value 0"]
impl crate::Resettable for PUBLISH_CRCOK_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
@@ -0,0 +1,141 @@
#[doc = "Register `PUBLISH_CTEPRESENT` reader"]
pub struct R(crate::R<PUBLISH_CTEPRESENT_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<PUBLISH_CTEPRESENT_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<PUBLISH_CTEPRESENT_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<PUBLISH_CTEPRESENT_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `PUBLISH_CTEPRESENT` writer"]
pub struct W(crate::W<PUBLISH_CTEPRESENT_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<PUBLISH_CTEPRESENT_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<PUBLISH_CTEPRESENT_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<PUBLISH_CTEPRESENT_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `CHIDX` reader - DPPI channel that event CTEPRESENT will publish to."]
pub type CHIDX_R = crate::FieldReader<u8, u8>;
#[doc = "Field `CHIDX` writer - DPPI channel that event CTEPRESENT will publish to."]
pub type CHIDX_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, PUBLISH_CTEPRESENT_SPEC, u8, u8, 8, O>;
#[doc = "Field `EN` reader - "]
pub type EN_R = crate::BitReader<EN_A>;
#[doc = "\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EN_A {
#[doc = "0: Disable publishing"]
DISABLED = 0,
#[doc = "1: Enable publishing"]
ENABLED = 1,
}
impl From<EN_A> for bool {
#[inline(always)]
fn from(variant: EN_A) -> Self {
variant as u8 != 0
}
}
impl EN_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EN_A {
match self.bits {
false => EN_A::DISABLED,
true => EN_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == EN_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == EN_A::ENABLED
}
}
#[doc = "Field `EN` writer - "]
pub type EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUBLISH_CTEPRESENT_SPEC, EN_A, O>;
impl<'a, const O: u8> EN_W<'a, O> {
#[doc = "Disable publishing"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(EN_A::DISABLED)
}
#[doc = "Enable publishing"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(EN_A::ENABLED)
}
}
impl R {
#[doc = "Bits 0:7 - DPPI channel that event CTEPRESENT will publish to."]
#[inline(always)]
pub fn chidx(&self) -> CHIDX_R {
CHIDX_R::new((self.bits & 0xff) as u8)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&self) -> EN_R {
EN_R::new(((self.bits >> 31) & 1) != 0)
}
}
impl W {
#[doc = "Bits 0:7 - DPPI channel that event CTEPRESENT will publish to."]
#[inline(always)]
pub fn chidx(&mut self) -> CHIDX_W<0> {
CHIDX_W::new(self)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&mut self) -> EN_W<31> {
EN_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 = "Publish configuration for event CTEPRESENT\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 [publish_ctepresent](index.html) module"]
pub struct PUBLISH_CTEPRESENT_SPEC;
impl crate::RegisterSpec for PUBLISH_CTEPRESENT_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [publish_ctepresent::R](R) reader structure"]
impl crate::Readable for PUBLISH_CTEPRESENT_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [publish_ctepresent::W](W) writer structure"]
impl crate::Writable for PUBLISH_CTEPRESENT_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets PUBLISH_CTEPRESENT to value 0"]
impl crate::Resettable for PUBLISH_CTEPRESENT_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+141
View File
@@ -0,0 +1,141 @@
#[doc = "Register `PUBLISH_DEVMATCH` reader"]
pub struct R(crate::R<PUBLISH_DEVMATCH_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<PUBLISH_DEVMATCH_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<PUBLISH_DEVMATCH_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<PUBLISH_DEVMATCH_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `PUBLISH_DEVMATCH` writer"]
pub struct W(crate::W<PUBLISH_DEVMATCH_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<PUBLISH_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<PUBLISH_DEVMATCH_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<PUBLISH_DEVMATCH_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `CHIDX` reader - DPPI channel that event DEVMATCH will publish to."]
pub type CHIDX_R = crate::FieldReader<u8, u8>;
#[doc = "Field `CHIDX` writer - DPPI channel that event DEVMATCH will publish to."]
pub type CHIDX_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, PUBLISH_DEVMATCH_SPEC, u8, u8, 8, O>;
#[doc = "Field `EN` reader - "]
pub type EN_R = crate::BitReader<EN_A>;
#[doc = "\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EN_A {
#[doc = "0: Disable publishing"]
DISABLED = 0,
#[doc = "1: Enable publishing"]
ENABLED = 1,
}
impl From<EN_A> for bool {
#[inline(always)]
fn from(variant: EN_A) -> Self {
variant as u8 != 0
}
}
impl EN_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EN_A {
match self.bits {
false => EN_A::DISABLED,
true => EN_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == EN_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == EN_A::ENABLED
}
}
#[doc = "Field `EN` writer - "]
pub type EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUBLISH_DEVMATCH_SPEC, EN_A, O>;
impl<'a, const O: u8> EN_W<'a, O> {
#[doc = "Disable publishing"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(EN_A::DISABLED)
}
#[doc = "Enable publishing"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(EN_A::ENABLED)
}
}
impl R {
#[doc = "Bits 0:7 - DPPI channel that event DEVMATCH will publish to."]
#[inline(always)]
pub fn chidx(&self) -> CHIDX_R {
CHIDX_R::new((self.bits & 0xff) as u8)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&self) -> EN_R {
EN_R::new(((self.bits >> 31) & 1) != 0)
}
}
impl W {
#[doc = "Bits 0:7 - DPPI channel that event DEVMATCH will publish to."]
#[inline(always)]
pub fn chidx(&mut self) -> CHIDX_W<0> {
CHIDX_W::new(self)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&mut self) -> EN_W<31> {
EN_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 = "Publish configuration for event DEVMATCH\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 [publish_devmatch](index.html) module"]
pub struct PUBLISH_DEVMATCH_SPEC;
impl crate::RegisterSpec for PUBLISH_DEVMATCH_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [publish_devmatch::R](R) reader structure"]
impl crate::Readable for PUBLISH_DEVMATCH_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [publish_devmatch::W](W) writer structure"]
impl crate::Writable for PUBLISH_DEVMATCH_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets PUBLISH_DEVMATCH to value 0"]
impl crate::Resettable for PUBLISH_DEVMATCH_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+140
View File
@@ -0,0 +1,140 @@
#[doc = "Register `PUBLISH_DEVMISS` reader"]
pub struct R(crate::R<PUBLISH_DEVMISS_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<PUBLISH_DEVMISS_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<PUBLISH_DEVMISS_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<PUBLISH_DEVMISS_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `PUBLISH_DEVMISS` writer"]
pub struct W(crate::W<PUBLISH_DEVMISS_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<PUBLISH_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<PUBLISH_DEVMISS_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<PUBLISH_DEVMISS_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `CHIDX` reader - DPPI channel that event DEVMISS will publish to."]
pub type CHIDX_R = crate::FieldReader<u8, u8>;
#[doc = "Field `CHIDX` writer - DPPI channel that event DEVMISS will publish to."]
pub type CHIDX_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PUBLISH_DEVMISS_SPEC, u8, u8, 8, O>;
#[doc = "Field `EN` reader - "]
pub type EN_R = crate::BitReader<EN_A>;
#[doc = "\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EN_A {
#[doc = "0: Disable publishing"]
DISABLED = 0,
#[doc = "1: Enable publishing"]
ENABLED = 1,
}
impl From<EN_A> for bool {
#[inline(always)]
fn from(variant: EN_A) -> Self {
variant as u8 != 0
}
}
impl EN_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EN_A {
match self.bits {
false => EN_A::DISABLED,
true => EN_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == EN_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == EN_A::ENABLED
}
}
#[doc = "Field `EN` writer - "]
pub type EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUBLISH_DEVMISS_SPEC, EN_A, O>;
impl<'a, const O: u8> EN_W<'a, O> {
#[doc = "Disable publishing"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(EN_A::DISABLED)
}
#[doc = "Enable publishing"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(EN_A::ENABLED)
}
}
impl R {
#[doc = "Bits 0:7 - DPPI channel that event DEVMISS will publish to."]
#[inline(always)]
pub fn chidx(&self) -> CHIDX_R {
CHIDX_R::new((self.bits & 0xff) as u8)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&self) -> EN_R {
EN_R::new(((self.bits >> 31) & 1) != 0)
}
}
impl W {
#[doc = "Bits 0:7 - DPPI channel that event DEVMISS will publish to."]
#[inline(always)]
pub fn chidx(&mut self) -> CHIDX_W<0> {
CHIDX_W::new(self)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&mut self) -> EN_W<31> {
EN_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 = "Publish configuration for event DEVMISS\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 [publish_devmiss](index.html) module"]
pub struct PUBLISH_DEVMISS_SPEC;
impl crate::RegisterSpec for PUBLISH_DEVMISS_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [publish_devmiss::R](R) reader structure"]
impl crate::Readable for PUBLISH_DEVMISS_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [publish_devmiss::W](W) writer structure"]
impl crate::Writable for PUBLISH_DEVMISS_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets PUBLISH_DEVMISS to value 0"]
impl crate::Resettable for PUBLISH_DEVMISS_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+141
View File
@@ -0,0 +1,141 @@
#[doc = "Register `PUBLISH_DISABLED` reader"]
pub struct R(crate::R<PUBLISH_DISABLED_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<PUBLISH_DISABLED_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<PUBLISH_DISABLED_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<PUBLISH_DISABLED_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `PUBLISH_DISABLED` writer"]
pub struct W(crate::W<PUBLISH_DISABLED_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<PUBLISH_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<PUBLISH_DISABLED_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<PUBLISH_DISABLED_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `CHIDX` reader - DPPI channel that event DISABLED will publish to."]
pub type CHIDX_R = crate::FieldReader<u8, u8>;
#[doc = "Field `CHIDX` writer - DPPI channel that event DISABLED will publish to."]
pub type CHIDX_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, PUBLISH_DISABLED_SPEC, u8, u8, 8, O>;
#[doc = "Field `EN` reader - "]
pub type EN_R = crate::BitReader<EN_A>;
#[doc = "\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EN_A {
#[doc = "0: Disable publishing"]
DISABLED = 0,
#[doc = "1: Enable publishing"]
ENABLED = 1,
}
impl From<EN_A> for bool {
#[inline(always)]
fn from(variant: EN_A) -> Self {
variant as u8 != 0
}
}
impl EN_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EN_A {
match self.bits {
false => EN_A::DISABLED,
true => EN_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == EN_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == EN_A::ENABLED
}
}
#[doc = "Field `EN` writer - "]
pub type EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUBLISH_DISABLED_SPEC, EN_A, O>;
impl<'a, const O: u8> EN_W<'a, O> {
#[doc = "Disable publishing"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(EN_A::DISABLED)
}
#[doc = "Enable publishing"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(EN_A::ENABLED)
}
}
impl R {
#[doc = "Bits 0:7 - DPPI channel that event DISABLED will publish to."]
#[inline(always)]
pub fn chidx(&self) -> CHIDX_R {
CHIDX_R::new((self.bits & 0xff) as u8)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&self) -> EN_R {
EN_R::new(((self.bits >> 31) & 1) != 0)
}
}
impl W {
#[doc = "Bits 0:7 - DPPI channel that event DISABLED will publish to."]
#[inline(always)]
pub fn chidx(&mut self) -> CHIDX_W<0> {
CHIDX_W::new(self)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&mut self) -> EN_W<31> {
EN_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 = "Publish configuration for event DISABLED\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [publish_disabled](index.html) module"]
pub struct PUBLISH_DISABLED_SPEC;
impl crate::RegisterSpec for PUBLISH_DISABLED_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [publish_disabled::R](R) reader structure"]
impl crate::Readable for PUBLISH_DISABLED_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [publish_disabled::W](W) writer structure"]
impl crate::Writable for PUBLISH_DISABLED_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets PUBLISH_DISABLED to value 0"]
impl crate::Resettable for PUBLISH_DISABLED_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+140
View File
@@ -0,0 +1,140 @@
#[doc = "Register `PUBLISH_EDEND` reader"]
pub struct R(crate::R<PUBLISH_EDEND_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<PUBLISH_EDEND_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<PUBLISH_EDEND_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<PUBLISH_EDEND_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `PUBLISH_EDEND` writer"]
pub struct W(crate::W<PUBLISH_EDEND_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<PUBLISH_EDEND_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<PUBLISH_EDEND_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<PUBLISH_EDEND_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `CHIDX` reader - DPPI channel that event EDEND will publish to."]
pub type CHIDX_R = crate::FieldReader<u8, u8>;
#[doc = "Field `CHIDX` writer - DPPI channel that event EDEND will publish to."]
pub type CHIDX_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PUBLISH_EDEND_SPEC, u8, u8, 8, O>;
#[doc = "Field `EN` reader - "]
pub type EN_R = crate::BitReader<EN_A>;
#[doc = "\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EN_A {
#[doc = "0: Disable publishing"]
DISABLED = 0,
#[doc = "1: Enable publishing"]
ENABLED = 1,
}
impl From<EN_A> for bool {
#[inline(always)]
fn from(variant: EN_A) -> Self {
variant as u8 != 0
}
}
impl EN_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EN_A {
match self.bits {
false => EN_A::DISABLED,
true => EN_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == EN_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == EN_A::ENABLED
}
}
#[doc = "Field `EN` writer - "]
pub type EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUBLISH_EDEND_SPEC, EN_A, O>;
impl<'a, const O: u8> EN_W<'a, O> {
#[doc = "Disable publishing"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(EN_A::DISABLED)
}
#[doc = "Enable publishing"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(EN_A::ENABLED)
}
}
impl R {
#[doc = "Bits 0:7 - DPPI channel that event EDEND will publish to."]
#[inline(always)]
pub fn chidx(&self) -> CHIDX_R {
CHIDX_R::new((self.bits & 0xff) as u8)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&self) -> EN_R {
EN_R::new(((self.bits >> 31) & 1) != 0)
}
}
impl W {
#[doc = "Bits 0:7 - DPPI channel that event EDEND will publish to."]
#[inline(always)]
pub fn chidx(&mut self) -> CHIDX_W<0> {
CHIDX_W::new(self)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&mut self) -> EN_W<31> {
EN_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 = "Publish configuration for event EDEND\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 [publish_edend](index.html) module"]
pub struct PUBLISH_EDEND_SPEC;
impl crate::RegisterSpec for PUBLISH_EDEND_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [publish_edend::R](R) reader structure"]
impl crate::Readable for PUBLISH_EDEND_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [publish_edend::W](W) writer structure"]
impl crate::Writable for PUBLISH_EDEND_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets PUBLISH_EDEND to value 0"]
impl crate::Resettable for PUBLISH_EDEND_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+141
View File
@@ -0,0 +1,141 @@
#[doc = "Register `PUBLISH_EDSTOPPED` reader"]
pub struct R(crate::R<PUBLISH_EDSTOPPED_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<PUBLISH_EDSTOPPED_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<PUBLISH_EDSTOPPED_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<PUBLISH_EDSTOPPED_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `PUBLISH_EDSTOPPED` writer"]
pub struct W(crate::W<PUBLISH_EDSTOPPED_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<PUBLISH_EDSTOPPED_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<PUBLISH_EDSTOPPED_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<PUBLISH_EDSTOPPED_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `CHIDX` reader - DPPI channel that event EDSTOPPED will publish to."]
pub type CHIDX_R = crate::FieldReader<u8, u8>;
#[doc = "Field `CHIDX` writer - DPPI channel that event EDSTOPPED will publish to."]
pub type CHIDX_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, PUBLISH_EDSTOPPED_SPEC, u8, u8, 8, O>;
#[doc = "Field `EN` reader - "]
pub type EN_R = crate::BitReader<EN_A>;
#[doc = "\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EN_A {
#[doc = "0: Disable publishing"]
DISABLED = 0,
#[doc = "1: Enable publishing"]
ENABLED = 1,
}
impl From<EN_A> for bool {
#[inline(always)]
fn from(variant: EN_A) -> Self {
variant as u8 != 0
}
}
impl EN_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EN_A {
match self.bits {
false => EN_A::DISABLED,
true => EN_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == EN_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == EN_A::ENABLED
}
}
#[doc = "Field `EN` writer - "]
pub type EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUBLISH_EDSTOPPED_SPEC, EN_A, O>;
impl<'a, const O: u8> EN_W<'a, O> {
#[doc = "Disable publishing"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(EN_A::DISABLED)
}
#[doc = "Enable publishing"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(EN_A::ENABLED)
}
}
impl R {
#[doc = "Bits 0:7 - DPPI channel that event EDSTOPPED will publish to."]
#[inline(always)]
pub fn chidx(&self) -> CHIDX_R {
CHIDX_R::new((self.bits & 0xff) as u8)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&self) -> EN_R {
EN_R::new(((self.bits >> 31) & 1) != 0)
}
}
impl W {
#[doc = "Bits 0:7 - DPPI channel that event EDSTOPPED will publish to."]
#[inline(always)]
pub fn chidx(&mut self) -> CHIDX_W<0> {
CHIDX_W::new(self)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&mut self) -> EN_W<31> {
EN_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 = "Publish configuration for event EDSTOPPED\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 [publish_edstopped](index.html) module"]
pub struct PUBLISH_EDSTOPPED_SPEC;
impl crate::RegisterSpec for PUBLISH_EDSTOPPED_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [publish_edstopped::R](R) reader structure"]
impl crate::Readable for PUBLISH_EDSTOPPED_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [publish_edstopped::W](W) writer structure"]
impl crate::Writable for PUBLISH_EDSTOPPED_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets PUBLISH_EDSTOPPED to value 0"]
impl crate::Resettable for PUBLISH_EDSTOPPED_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+140
View File
@@ -0,0 +1,140 @@
#[doc = "Register `PUBLISH_END` reader"]
pub struct R(crate::R<PUBLISH_END_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<PUBLISH_END_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<PUBLISH_END_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<PUBLISH_END_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `PUBLISH_END` writer"]
pub struct W(crate::W<PUBLISH_END_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<PUBLISH_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<PUBLISH_END_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<PUBLISH_END_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `CHIDX` reader - DPPI channel that event END will publish to."]
pub type CHIDX_R = crate::FieldReader<u8, u8>;
#[doc = "Field `CHIDX` writer - DPPI channel that event END will publish to."]
pub type CHIDX_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PUBLISH_END_SPEC, u8, u8, 8, O>;
#[doc = "Field `EN` reader - "]
pub type EN_R = crate::BitReader<EN_A>;
#[doc = "\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EN_A {
#[doc = "0: Disable publishing"]
DISABLED = 0,
#[doc = "1: Enable publishing"]
ENABLED = 1,
}
impl From<EN_A> for bool {
#[inline(always)]
fn from(variant: EN_A) -> Self {
variant as u8 != 0
}
}
impl EN_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EN_A {
match self.bits {
false => EN_A::DISABLED,
true => EN_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == EN_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == EN_A::ENABLED
}
}
#[doc = "Field `EN` writer - "]
pub type EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUBLISH_END_SPEC, EN_A, O>;
impl<'a, const O: u8> EN_W<'a, O> {
#[doc = "Disable publishing"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(EN_A::DISABLED)
}
#[doc = "Enable publishing"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(EN_A::ENABLED)
}
}
impl R {
#[doc = "Bits 0:7 - DPPI channel that event END will publish to."]
#[inline(always)]
pub fn chidx(&self) -> CHIDX_R {
CHIDX_R::new((self.bits & 0xff) as u8)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&self) -> EN_R {
EN_R::new(((self.bits >> 31) & 1) != 0)
}
}
impl W {
#[doc = "Bits 0:7 - DPPI channel that event END will publish to."]
#[inline(always)]
pub fn chidx(&mut self) -> CHIDX_W<0> {
CHIDX_W::new(self)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&mut self) -> EN_W<31> {
EN_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 = "Publish configuration for event END\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 [publish_end](index.html) module"]
pub struct PUBLISH_END_SPEC;
impl crate::RegisterSpec for PUBLISH_END_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [publish_end::R](R) reader structure"]
impl crate::Readable for PUBLISH_END_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [publish_end::W](W) writer structure"]
impl crate::Writable for PUBLISH_END_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets PUBLISH_END to value 0"]
impl crate::Resettable for PUBLISH_END_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
@@ -0,0 +1,141 @@
#[doc = "Register `PUBLISH_FRAMESTART` reader"]
pub struct R(crate::R<PUBLISH_FRAMESTART_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<PUBLISH_FRAMESTART_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<PUBLISH_FRAMESTART_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<PUBLISH_FRAMESTART_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `PUBLISH_FRAMESTART` writer"]
pub struct W(crate::W<PUBLISH_FRAMESTART_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<PUBLISH_FRAMESTART_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<PUBLISH_FRAMESTART_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<PUBLISH_FRAMESTART_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `CHIDX` reader - DPPI channel that event FRAMESTART will publish to."]
pub type CHIDX_R = crate::FieldReader<u8, u8>;
#[doc = "Field `CHIDX` writer - DPPI channel that event FRAMESTART will publish to."]
pub type CHIDX_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, PUBLISH_FRAMESTART_SPEC, u8, u8, 8, O>;
#[doc = "Field `EN` reader - "]
pub type EN_R = crate::BitReader<EN_A>;
#[doc = "\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EN_A {
#[doc = "0: Disable publishing"]
DISABLED = 0,
#[doc = "1: Enable publishing"]
ENABLED = 1,
}
impl From<EN_A> for bool {
#[inline(always)]
fn from(variant: EN_A) -> Self {
variant as u8 != 0
}
}
impl EN_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EN_A {
match self.bits {
false => EN_A::DISABLED,
true => EN_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == EN_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == EN_A::ENABLED
}
}
#[doc = "Field `EN` writer - "]
pub type EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUBLISH_FRAMESTART_SPEC, EN_A, O>;
impl<'a, const O: u8> EN_W<'a, O> {
#[doc = "Disable publishing"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(EN_A::DISABLED)
}
#[doc = "Enable publishing"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(EN_A::ENABLED)
}
}
impl R {
#[doc = "Bits 0:7 - DPPI channel that event FRAMESTART will publish to."]
#[inline(always)]
pub fn chidx(&self) -> CHIDX_R {
CHIDX_R::new((self.bits & 0xff) as u8)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&self) -> EN_R {
EN_R::new(((self.bits >> 31) & 1) != 0)
}
}
impl W {
#[doc = "Bits 0:7 - DPPI channel that event FRAMESTART will publish to."]
#[inline(always)]
pub fn chidx(&mut self) -> CHIDX_W<0> {
CHIDX_W::new(self)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&mut self) -> EN_W<31> {
EN_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 = "Publish configuration for event FRAMESTART\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 [publish_framestart](index.html) module"]
pub struct PUBLISH_FRAMESTART_SPEC;
impl crate::RegisterSpec for PUBLISH_FRAMESTART_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [publish_framestart::R](R) reader structure"]
impl crate::Readable for PUBLISH_FRAMESTART_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [publish_framestart::W](W) writer structure"]
impl crate::Writable for PUBLISH_FRAMESTART_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets PUBLISH_FRAMESTART to value 0"]
impl crate::Resettable for PUBLISH_FRAMESTART_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+141
View File
@@ -0,0 +1,141 @@
#[doc = "Register `PUBLISH_MHRMATCH` reader"]
pub struct R(crate::R<PUBLISH_MHRMATCH_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<PUBLISH_MHRMATCH_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<PUBLISH_MHRMATCH_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<PUBLISH_MHRMATCH_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `PUBLISH_MHRMATCH` writer"]
pub struct W(crate::W<PUBLISH_MHRMATCH_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<PUBLISH_MHRMATCH_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<PUBLISH_MHRMATCH_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<PUBLISH_MHRMATCH_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `CHIDX` reader - DPPI channel that event MHRMATCH will publish to."]
pub type CHIDX_R = crate::FieldReader<u8, u8>;
#[doc = "Field `CHIDX` writer - DPPI channel that event MHRMATCH will publish to."]
pub type CHIDX_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, PUBLISH_MHRMATCH_SPEC, u8, u8, 8, O>;
#[doc = "Field `EN` reader - "]
pub type EN_R = crate::BitReader<EN_A>;
#[doc = "\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EN_A {
#[doc = "0: Disable publishing"]
DISABLED = 0,
#[doc = "1: Enable publishing"]
ENABLED = 1,
}
impl From<EN_A> for bool {
#[inline(always)]
fn from(variant: EN_A) -> Self {
variant as u8 != 0
}
}
impl EN_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EN_A {
match self.bits {
false => EN_A::DISABLED,
true => EN_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == EN_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == EN_A::ENABLED
}
}
#[doc = "Field `EN` writer - "]
pub type EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUBLISH_MHRMATCH_SPEC, EN_A, O>;
impl<'a, const O: u8> EN_W<'a, O> {
#[doc = "Disable publishing"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(EN_A::DISABLED)
}
#[doc = "Enable publishing"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(EN_A::ENABLED)
}
}
impl R {
#[doc = "Bits 0:7 - DPPI channel that event MHRMATCH will publish to."]
#[inline(always)]
pub fn chidx(&self) -> CHIDX_R {
CHIDX_R::new((self.bits & 0xff) as u8)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&self) -> EN_R {
EN_R::new(((self.bits >> 31) & 1) != 0)
}
}
impl W {
#[doc = "Bits 0:7 - DPPI channel that event MHRMATCH will publish to."]
#[inline(always)]
pub fn chidx(&mut self) -> CHIDX_W<0> {
CHIDX_W::new(self)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&mut self) -> EN_W<31> {
EN_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 = "Publish configuration for event MHRMATCH\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 [publish_mhrmatch](index.html) module"]
pub struct PUBLISH_MHRMATCH_SPEC;
impl crate::RegisterSpec for PUBLISH_MHRMATCH_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [publish_mhrmatch::R](R) reader structure"]
impl crate::Readable for PUBLISH_MHRMATCH_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [publish_mhrmatch::W](W) writer structure"]
impl crate::Writable for PUBLISH_MHRMATCH_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets PUBLISH_MHRMATCH to value 0"]
impl crate::Resettable for PUBLISH_MHRMATCH_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+140
View File
@@ -0,0 +1,140 @@
#[doc = "Register `PUBLISH_PAYLOAD` reader"]
pub struct R(crate::R<PUBLISH_PAYLOAD_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<PUBLISH_PAYLOAD_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<PUBLISH_PAYLOAD_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<PUBLISH_PAYLOAD_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `PUBLISH_PAYLOAD` writer"]
pub struct W(crate::W<PUBLISH_PAYLOAD_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<PUBLISH_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<PUBLISH_PAYLOAD_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<PUBLISH_PAYLOAD_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `CHIDX` reader - DPPI channel that event PAYLOAD will publish to."]
pub type CHIDX_R = crate::FieldReader<u8, u8>;
#[doc = "Field `CHIDX` writer - DPPI channel that event PAYLOAD will publish to."]
pub type CHIDX_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PUBLISH_PAYLOAD_SPEC, u8, u8, 8, O>;
#[doc = "Field `EN` reader - "]
pub type EN_R = crate::BitReader<EN_A>;
#[doc = "\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EN_A {
#[doc = "0: Disable publishing"]
DISABLED = 0,
#[doc = "1: Enable publishing"]
ENABLED = 1,
}
impl From<EN_A> for bool {
#[inline(always)]
fn from(variant: EN_A) -> Self {
variant as u8 != 0
}
}
impl EN_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EN_A {
match self.bits {
false => EN_A::DISABLED,
true => EN_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == EN_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == EN_A::ENABLED
}
}
#[doc = "Field `EN` writer - "]
pub type EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUBLISH_PAYLOAD_SPEC, EN_A, O>;
impl<'a, const O: u8> EN_W<'a, O> {
#[doc = "Disable publishing"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(EN_A::DISABLED)
}
#[doc = "Enable publishing"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(EN_A::ENABLED)
}
}
impl R {
#[doc = "Bits 0:7 - DPPI channel that event PAYLOAD will publish to."]
#[inline(always)]
pub fn chidx(&self) -> CHIDX_R {
CHIDX_R::new((self.bits & 0xff) as u8)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&self) -> EN_R {
EN_R::new(((self.bits >> 31) & 1) != 0)
}
}
impl W {
#[doc = "Bits 0:7 - DPPI channel that event PAYLOAD will publish to."]
#[inline(always)]
pub fn chidx(&mut self) -> CHIDX_W<0> {
CHIDX_W::new(self)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&mut self) -> EN_W<31> {
EN_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 = "Publish configuration for event PAYLOAD\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 [publish_payload](index.html) module"]
pub struct PUBLISH_PAYLOAD_SPEC;
impl crate::RegisterSpec for PUBLISH_PAYLOAD_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [publish_payload::R](R) reader structure"]
impl crate::Readable for PUBLISH_PAYLOAD_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [publish_payload::W](W) writer structure"]
impl crate::Writable for PUBLISH_PAYLOAD_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets PUBLISH_PAYLOAD to value 0"]
impl crate::Resettable for PUBLISH_PAYLOAD_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+140
View File
@@ -0,0 +1,140 @@
#[doc = "Register `PUBLISH_PHYEND` reader"]
pub struct R(crate::R<PUBLISH_PHYEND_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<PUBLISH_PHYEND_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<PUBLISH_PHYEND_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<PUBLISH_PHYEND_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `PUBLISH_PHYEND` writer"]
pub struct W(crate::W<PUBLISH_PHYEND_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<PUBLISH_PHYEND_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<PUBLISH_PHYEND_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<PUBLISH_PHYEND_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `CHIDX` reader - DPPI channel that event PHYEND will publish to."]
pub type CHIDX_R = crate::FieldReader<u8, u8>;
#[doc = "Field `CHIDX` writer - DPPI channel that event PHYEND will publish to."]
pub type CHIDX_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PUBLISH_PHYEND_SPEC, u8, u8, 8, O>;
#[doc = "Field `EN` reader - "]
pub type EN_R = crate::BitReader<EN_A>;
#[doc = "\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EN_A {
#[doc = "0: Disable publishing"]
DISABLED = 0,
#[doc = "1: Enable publishing"]
ENABLED = 1,
}
impl From<EN_A> for bool {
#[inline(always)]
fn from(variant: EN_A) -> Self {
variant as u8 != 0
}
}
impl EN_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EN_A {
match self.bits {
false => EN_A::DISABLED,
true => EN_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == EN_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == EN_A::ENABLED
}
}
#[doc = "Field `EN` writer - "]
pub type EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUBLISH_PHYEND_SPEC, EN_A, O>;
impl<'a, const O: u8> EN_W<'a, O> {
#[doc = "Disable publishing"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(EN_A::DISABLED)
}
#[doc = "Enable publishing"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(EN_A::ENABLED)
}
}
impl R {
#[doc = "Bits 0:7 - DPPI channel that event PHYEND will publish to."]
#[inline(always)]
pub fn chidx(&self) -> CHIDX_R {
CHIDX_R::new((self.bits & 0xff) as u8)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&self) -> EN_R {
EN_R::new(((self.bits >> 31) & 1) != 0)
}
}
impl W {
#[doc = "Bits 0:7 - DPPI channel that event PHYEND will publish to."]
#[inline(always)]
pub fn chidx(&mut self) -> CHIDX_W<0> {
CHIDX_W::new(self)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&mut self) -> EN_W<31> {
EN_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 = "Publish configuration for event PHYEND\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 [publish_phyend](index.html) module"]
pub struct PUBLISH_PHYEND_SPEC;
impl crate::RegisterSpec for PUBLISH_PHYEND_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [publish_phyend::R](R) reader structure"]
impl crate::Readable for PUBLISH_PHYEND_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [publish_phyend::W](W) writer structure"]
impl crate::Writable for PUBLISH_PHYEND_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets PUBLISH_PHYEND to value 0"]
impl crate::Resettable for PUBLISH_PHYEND_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+141
View File
@@ -0,0 +1,141 @@
#[doc = "Register `PUBLISH_RATEBOOST` reader"]
pub struct R(crate::R<PUBLISH_RATEBOOST_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<PUBLISH_RATEBOOST_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<PUBLISH_RATEBOOST_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<PUBLISH_RATEBOOST_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `PUBLISH_RATEBOOST` writer"]
pub struct W(crate::W<PUBLISH_RATEBOOST_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<PUBLISH_RATEBOOST_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<PUBLISH_RATEBOOST_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<PUBLISH_RATEBOOST_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `CHIDX` reader - DPPI channel that event RATEBOOST will publish to."]
pub type CHIDX_R = crate::FieldReader<u8, u8>;
#[doc = "Field `CHIDX` writer - DPPI channel that event RATEBOOST will publish to."]
pub type CHIDX_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, PUBLISH_RATEBOOST_SPEC, u8, u8, 8, O>;
#[doc = "Field `EN` reader - "]
pub type EN_R = crate::BitReader<EN_A>;
#[doc = "\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EN_A {
#[doc = "0: Disable publishing"]
DISABLED = 0,
#[doc = "1: Enable publishing"]
ENABLED = 1,
}
impl From<EN_A> for bool {
#[inline(always)]
fn from(variant: EN_A) -> Self {
variant as u8 != 0
}
}
impl EN_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EN_A {
match self.bits {
false => EN_A::DISABLED,
true => EN_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == EN_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == EN_A::ENABLED
}
}
#[doc = "Field `EN` writer - "]
pub type EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUBLISH_RATEBOOST_SPEC, EN_A, O>;
impl<'a, const O: u8> EN_W<'a, O> {
#[doc = "Disable publishing"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(EN_A::DISABLED)
}
#[doc = "Enable publishing"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(EN_A::ENABLED)
}
}
impl R {
#[doc = "Bits 0:7 - DPPI channel that event RATEBOOST will publish to."]
#[inline(always)]
pub fn chidx(&self) -> CHIDX_R {
CHIDX_R::new((self.bits & 0xff) as u8)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&self) -> EN_R {
EN_R::new(((self.bits >> 31) & 1) != 0)
}
}
impl W {
#[doc = "Bits 0:7 - DPPI channel that event RATEBOOST will publish to."]
#[inline(always)]
pub fn chidx(&mut self) -> CHIDX_W<0> {
CHIDX_W::new(self)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&mut self) -> EN_W<31> {
EN_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 = "Publish configuration for event RATEBOOST\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 [publish_rateboost](index.html) module"]
pub struct PUBLISH_RATEBOOST_SPEC;
impl crate::RegisterSpec for PUBLISH_RATEBOOST_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [publish_rateboost::R](R) reader structure"]
impl crate::Readable for PUBLISH_RATEBOOST_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [publish_rateboost::W](W) writer structure"]
impl crate::Writable for PUBLISH_RATEBOOST_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets PUBLISH_RATEBOOST to value 0"]
impl crate::Resettable for PUBLISH_RATEBOOST_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+140
View File
@@ -0,0 +1,140 @@
#[doc = "Register `PUBLISH_READY` reader"]
pub struct R(crate::R<PUBLISH_READY_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<PUBLISH_READY_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<PUBLISH_READY_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<PUBLISH_READY_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `PUBLISH_READY` writer"]
pub struct W(crate::W<PUBLISH_READY_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<PUBLISH_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<PUBLISH_READY_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<PUBLISH_READY_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `CHIDX` reader - DPPI channel that event READY will publish to."]
pub type CHIDX_R = crate::FieldReader<u8, u8>;
#[doc = "Field `CHIDX` writer - DPPI channel that event READY will publish to."]
pub type CHIDX_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PUBLISH_READY_SPEC, u8, u8, 8, O>;
#[doc = "Field `EN` reader - "]
pub type EN_R = crate::BitReader<EN_A>;
#[doc = "\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EN_A {
#[doc = "0: Disable publishing"]
DISABLED = 0,
#[doc = "1: Enable publishing"]
ENABLED = 1,
}
impl From<EN_A> for bool {
#[inline(always)]
fn from(variant: EN_A) -> Self {
variant as u8 != 0
}
}
impl EN_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EN_A {
match self.bits {
false => EN_A::DISABLED,
true => EN_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == EN_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == EN_A::ENABLED
}
}
#[doc = "Field `EN` writer - "]
pub type EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUBLISH_READY_SPEC, EN_A, O>;
impl<'a, const O: u8> EN_W<'a, O> {
#[doc = "Disable publishing"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(EN_A::DISABLED)
}
#[doc = "Enable publishing"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(EN_A::ENABLED)
}
}
impl R {
#[doc = "Bits 0:7 - DPPI channel that event READY will publish to."]
#[inline(always)]
pub fn chidx(&self) -> CHIDX_R {
CHIDX_R::new((self.bits & 0xff) as u8)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&self) -> EN_R {
EN_R::new(((self.bits >> 31) & 1) != 0)
}
}
impl W {
#[doc = "Bits 0:7 - DPPI channel that event READY will publish to."]
#[inline(always)]
pub fn chidx(&mut self) -> CHIDX_W<0> {
CHIDX_W::new(self)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&mut self) -> EN_W<31> {
EN_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 = "Publish configuration for event READY\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [publish_ready](index.html) module"]
pub struct PUBLISH_READY_SPEC;
impl crate::RegisterSpec for PUBLISH_READY_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [publish_ready::R](R) reader structure"]
impl crate::Readable for PUBLISH_READY_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [publish_ready::W](W) writer structure"]
impl crate::Writable for PUBLISH_READY_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets PUBLISH_READY to value 0"]
impl crate::Resettable for PUBLISH_READY_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+140
View File
@@ -0,0 +1,140 @@
#[doc = "Register `PUBLISH_RSSIEND` reader"]
pub struct R(crate::R<PUBLISH_RSSIEND_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<PUBLISH_RSSIEND_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<PUBLISH_RSSIEND_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<PUBLISH_RSSIEND_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `PUBLISH_RSSIEND` writer"]
pub struct W(crate::W<PUBLISH_RSSIEND_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<PUBLISH_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<PUBLISH_RSSIEND_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<PUBLISH_RSSIEND_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `CHIDX` reader - DPPI channel that event RSSIEND will publish to."]
pub type CHIDX_R = crate::FieldReader<u8, u8>;
#[doc = "Field `CHIDX` writer - DPPI channel that event RSSIEND will publish to."]
pub type CHIDX_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PUBLISH_RSSIEND_SPEC, u8, u8, 8, O>;
#[doc = "Field `EN` reader - "]
pub type EN_R = crate::BitReader<EN_A>;
#[doc = "\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EN_A {
#[doc = "0: Disable publishing"]
DISABLED = 0,
#[doc = "1: Enable publishing"]
ENABLED = 1,
}
impl From<EN_A> for bool {
#[inline(always)]
fn from(variant: EN_A) -> Self {
variant as u8 != 0
}
}
impl EN_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EN_A {
match self.bits {
false => EN_A::DISABLED,
true => EN_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == EN_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == EN_A::ENABLED
}
}
#[doc = "Field `EN` writer - "]
pub type EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUBLISH_RSSIEND_SPEC, EN_A, O>;
impl<'a, const O: u8> EN_W<'a, O> {
#[doc = "Disable publishing"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(EN_A::DISABLED)
}
#[doc = "Enable publishing"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(EN_A::ENABLED)
}
}
impl R {
#[doc = "Bits 0:7 - DPPI channel that event RSSIEND will publish to."]
#[inline(always)]
pub fn chidx(&self) -> CHIDX_R {
CHIDX_R::new((self.bits & 0xff) as u8)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&self) -> EN_R {
EN_R::new(((self.bits >> 31) & 1) != 0)
}
}
impl W {
#[doc = "Bits 0:7 - DPPI channel that event RSSIEND will publish to."]
#[inline(always)]
pub fn chidx(&mut self) -> CHIDX_W<0> {
CHIDX_W::new(self)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&mut self) -> EN_W<31> {
EN_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 = "Publish configuration for event RSSIEND\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 [publish_rssiend](index.html) module"]
pub struct PUBLISH_RSSIEND_SPEC;
impl crate::RegisterSpec for PUBLISH_RSSIEND_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [publish_rssiend::R](R) reader structure"]
impl crate::Readable for PUBLISH_RSSIEND_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [publish_rssiend::W](W) writer structure"]
impl crate::Writable for PUBLISH_RSSIEND_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets PUBLISH_RSSIEND to value 0"]
impl crate::Resettable for PUBLISH_RSSIEND_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+140
View File
@@ -0,0 +1,140 @@
#[doc = "Register `PUBLISH_RXREADY` reader"]
pub struct R(crate::R<PUBLISH_RXREADY_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<PUBLISH_RXREADY_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<PUBLISH_RXREADY_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<PUBLISH_RXREADY_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `PUBLISH_RXREADY` writer"]
pub struct W(crate::W<PUBLISH_RXREADY_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<PUBLISH_RXREADY_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<PUBLISH_RXREADY_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<PUBLISH_RXREADY_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `CHIDX` reader - DPPI channel that event RXREADY will publish to."]
pub type CHIDX_R = crate::FieldReader<u8, u8>;
#[doc = "Field `CHIDX` writer - DPPI channel that event RXREADY will publish to."]
pub type CHIDX_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PUBLISH_RXREADY_SPEC, u8, u8, 8, O>;
#[doc = "Field `EN` reader - "]
pub type EN_R = crate::BitReader<EN_A>;
#[doc = "\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EN_A {
#[doc = "0: Disable publishing"]
DISABLED = 0,
#[doc = "1: Enable publishing"]
ENABLED = 1,
}
impl From<EN_A> for bool {
#[inline(always)]
fn from(variant: EN_A) -> Self {
variant as u8 != 0
}
}
impl EN_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EN_A {
match self.bits {
false => EN_A::DISABLED,
true => EN_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == EN_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == EN_A::ENABLED
}
}
#[doc = "Field `EN` writer - "]
pub type EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUBLISH_RXREADY_SPEC, EN_A, O>;
impl<'a, const O: u8> EN_W<'a, O> {
#[doc = "Disable publishing"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(EN_A::DISABLED)
}
#[doc = "Enable publishing"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(EN_A::ENABLED)
}
}
impl R {
#[doc = "Bits 0:7 - DPPI channel that event RXREADY will publish to."]
#[inline(always)]
pub fn chidx(&self) -> CHIDX_R {
CHIDX_R::new((self.bits & 0xff) as u8)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&self) -> EN_R {
EN_R::new(((self.bits >> 31) & 1) != 0)
}
}
impl W {
#[doc = "Bits 0:7 - DPPI channel that event RXREADY will publish to."]
#[inline(always)]
pub fn chidx(&mut self) -> CHIDX_W<0> {
CHIDX_W::new(self)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&mut self) -> EN_W<31> {
EN_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 = "Publish configuration for event RXREADY\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 [publish_rxready](index.html) module"]
pub struct PUBLISH_RXREADY_SPEC;
impl crate::RegisterSpec for PUBLISH_RXREADY_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [publish_rxready::R](R) reader structure"]
impl crate::Readable for PUBLISH_RXREADY_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [publish_rxready::W](W) writer structure"]
impl crate::Writable for PUBLISH_RXREADY_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets PUBLISH_RXREADY to value 0"]
impl crate::Resettable for PUBLISH_RXREADY_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+140
View File
@@ -0,0 +1,140 @@
#[doc = "Register `PUBLISH_SYNC` reader"]
pub struct R(crate::R<PUBLISH_SYNC_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<PUBLISH_SYNC_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<PUBLISH_SYNC_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<PUBLISH_SYNC_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `PUBLISH_SYNC` writer"]
pub struct W(crate::W<PUBLISH_SYNC_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<PUBLISH_SYNC_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<PUBLISH_SYNC_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<PUBLISH_SYNC_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `CHIDX` reader - DPPI channel that event SYNC will publish to."]
pub type CHIDX_R = crate::FieldReader<u8, u8>;
#[doc = "Field `CHIDX` writer - DPPI channel that event SYNC will publish to."]
pub type CHIDX_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PUBLISH_SYNC_SPEC, u8, u8, 8, O>;
#[doc = "Field `EN` reader - "]
pub type EN_R = crate::BitReader<EN_A>;
#[doc = "\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EN_A {
#[doc = "0: Disable publishing"]
DISABLED = 0,
#[doc = "1: Enable publishing"]
ENABLED = 1,
}
impl From<EN_A> for bool {
#[inline(always)]
fn from(variant: EN_A) -> Self {
variant as u8 != 0
}
}
impl EN_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EN_A {
match self.bits {
false => EN_A::DISABLED,
true => EN_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == EN_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == EN_A::ENABLED
}
}
#[doc = "Field `EN` writer - "]
pub type EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUBLISH_SYNC_SPEC, EN_A, O>;
impl<'a, const O: u8> EN_W<'a, O> {
#[doc = "Disable publishing"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(EN_A::DISABLED)
}
#[doc = "Enable publishing"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(EN_A::ENABLED)
}
}
impl R {
#[doc = "Bits 0:7 - DPPI channel that event SYNC will publish to."]
#[inline(always)]
pub fn chidx(&self) -> CHIDX_R {
CHIDX_R::new((self.bits & 0xff) as u8)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&self) -> EN_R {
EN_R::new(((self.bits >> 31) & 1) != 0)
}
}
impl W {
#[doc = "Bits 0:7 - DPPI channel that event SYNC will publish to."]
#[inline(always)]
pub fn chidx(&mut self) -> CHIDX_W<0> {
CHIDX_W::new(self)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&mut self) -> EN_W<31> {
EN_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 = "Publish configuration for event SYNC\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 [publish_sync](index.html) module"]
pub struct PUBLISH_SYNC_SPEC;
impl crate::RegisterSpec for PUBLISH_SYNC_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [publish_sync::R](R) reader structure"]
impl crate::Readable for PUBLISH_SYNC_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [publish_sync::W](W) writer structure"]
impl crate::Writable for PUBLISH_SYNC_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets PUBLISH_SYNC to value 0"]
impl crate::Resettable for PUBLISH_SYNC_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+140
View File
@@ -0,0 +1,140 @@
#[doc = "Register `PUBLISH_TXREADY` reader"]
pub struct R(crate::R<PUBLISH_TXREADY_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<PUBLISH_TXREADY_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<PUBLISH_TXREADY_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<PUBLISH_TXREADY_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `PUBLISH_TXREADY` writer"]
pub struct W(crate::W<PUBLISH_TXREADY_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<PUBLISH_TXREADY_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<PUBLISH_TXREADY_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<PUBLISH_TXREADY_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `CHIDX` reader - DPPI channel that event TXREADY will publish to."]
pub type CHIDX_R = crate::FieldReader<u8, u8>;
#[doc = "Field `CHIDX` writer - DPPI channel that event TXREADY will publish to."]
pub type CHIDX_W<'a, const O: u8> = crate::FieldWriter<'a, u32, PUBLISH_TXREADY_SPEC, u8, u8, 8, O>;
#[doc = "Field `EN` reader - "]
pub type EN_R = crate::BitReader<EN_A>;
#[doc = "\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EN_A {
#[doc = "0: Disable publishing"]
DISABLED = 0,
#[doc = "1: Enable publishing"]
ENABLED = 1,
}
impl From<EN_A> for bool {
#[inline(always)]
fn from(variant: EN_A) -> Self {
variant as u8 != 0
}
}
impl EN_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EN_A {
match self.bits {
false => EN_A::DISABLED,
true => EN_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == EN_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == EN_A::ENABLED
}
}
#[doc = "Field `EN` writer - "]
pub type EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, PUBLISH_TXREADY_SPEC, EN_A, O>;
impl<'a, const O: u8> EN_W<'a, O> {
#[doc = "Disable publishing"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(EN_A::DISABLED)
}
#[doc = "Enable publishing"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(EN_A::ENABLED)
}
}
impl R {
#[doc = "Bits 0:7 - DPPI channel that event TXREADY will publish to."]
#[inline(always)]
pub fn chidx(&self) -> CHIDX_R {
CHIDX_R::new((self.bits & 0xff) as u8)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&self) -> EN_R {
EN_R::new(((self.bits >> 31) & 1) != 0)
}
}
impl W {
#[doc = "Bits 0:7 - DPPI channel that event TXREADY will publish to."]
#[inline(always)]
pub fn chidx(&mut self) -> CHIDX_W<0> {
CHIDX_W::new(self)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&mut self) -> EN_W<31> {
EN_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 = "Publish configuration for event TXREADY\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 [publish_txready](index.html) module"]
pub struct PUBLISH_TXREADY_SPEC;
impl crate::RegisterSpec for PUBLISH_TXREADY_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [publish_txready::R](R) reader structure"]
impl crate::Readable for PUBLISH_TXREADY_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [publish_txready::W](W) writer structure"]
impl crate::Writable for PUBLISH_TXREADY_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets PUBLISH_TXREADY to value 0"]
impl crate::Resettable for PUBLISH_TXREADY_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+40
View File
@@ -0,0 +1,40 @@
#[doc = "Register `RSSISAMPLE` reader"]
pub struct R(crate::R<RSSISAMPLE_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<RSSISAMPLE_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<RSSISAMPLE_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<RSSISAMPLE_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `RSSISAMPLE` reader - RSSI sample."]
pub type RSSISAMPLE_R = crate::FieldReader<u8, u8>;
impl R {
#[doc = "Bits 0:6 - RSSI sample."]
#[inline(always)]
pub fn rssisample(&self) -> RSSISAMPLE_R {
RSSISAMPLE_R::new((self.bits & 0x7f) as u8)
}
}
#[doc = "RSSI sample\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [rssisample](index.html) module"]
pub struct RSSISAMPLE_SPEC;
impl crate::RegisterSpec for RSSISAMPLE_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [rssisample::R](R) reader structure"]
impl crate::Readable for RSSISAMPLE_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets RSSISAMPLE to value 0"]
impl crate::Resettable for RSSISAMPLE_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+546
View File
@@ -0,0 +1,546 @@
#[doc = "Register `RXADDRESSES` reader"]
pub struct R(crate::R<RXADDRESSES_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<RXADDRESSES_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<RXADDRESSES_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<RXADDRESSES_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `RXADDRESSES` writer"]
pub struct W(crate::W<RXADDRESSES_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<RXADDRESSES_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<RXADDRESSES_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<RXADDRESSES_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `ADDR0` reader - Enable or disable reception on logical address 0."]
pub type ADDR0_R = crate::BitReader<ADDR0_A>;
#[doc = "Enable or disable reception on logical address 0.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ADDR0_A {
#[doc = "0: Disable"]
DISABLED = 0,
#[doc = "1: Enable"]
ENABLED = 1,
}
impl From<ADDR0_A> for bool {
#[inline(always)]
fn from(variant: ADDR0_A) -> Self {
variant as u8 != 0
}
}
impl ADDR0_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ADDR0_A {
match self.bits {
false => ADDR0_A::DISABLED,
true => ADDR0_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ADDR0_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ADDR0_A::ENABLED
}
}
#[doc = "Field `ADDR0` writer - Enable or disable reception on logical address 0."]
pub type ADDR0_W<'a, const O: u8> = crate::BitWriter<'a, u32, RXADDRESSES_SPEC, ADDR0_A, O>;
impl<'a, const O: u8> ADDR0_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ADDR0_A::DISABLED)
}
#[doc = "Enable"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ADDR0_A::ENABLED)
}
}
#[doc = "Field `ADDR1` reader - Enable or disable reception on logical address 1."]
pub type ADDR1_R = crate::BitReader<ADDR1_A>;
#[doc = "Enable or disable reception on logical address 1.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ADDR1_A {
#[doc = "0: Disable"]
DISABLED = 0,
#[doc = "1: Enable"]
ENABLED = 1,
}
impl From<ADDR1_A> for bool {
#[inline(always)]
fn from(variant: ADDR1_A) -> Self {
variant as u8 != 0
}
}
impl ADDR1_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ADDR1_A {
match self.bits {
false => ADDR1_A::DISABLED,
true => ADDR1_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ADDR1_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ADDR1_A::ENABLED
}
}
#[doc = "Field `ADDR1` writer - Enable or disable reception on logical address 1."]
pub type ADDR1_W<'a, const O: u8> = crate::BitWriter<'a, u32, RXADDRESSES_SPEC, ADDR1_A, O>;
impl<'a, const O: u8> ADDR1_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ADDR1_A::DISABLED)
}
#[doc = "Enable"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ADDR1_A::ENABLED)
}
}
#[doc = "Field `ADDR2` reader - Enable or disable reception on logical address 2."]
pub type ADDR2_R = crate::BitReader<ADDR2_A>;
#[doc = "Enable or disable reception on logical address 2.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ADDR2_A {
#[doc = "0: Disable"]
DISABLED = 0,
#[doc = "1: Enable"]
ENABLED = 1,
}
impl From<ADDR2_A> for bool {
#[inline(always)]
fn from(variant: ADDR2_A) -> Self {
variant as u8 != 0
}
}
impl ADDR2_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ADDR2_A {
match self.bits {
false => ADDR2_A::DISABLED,
true => ADDR2_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ADDR2_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ADDR2_A::ENABLED
}
}
#[doc = "Field `ADDR2` writer - Enable or disable reception on logical address 2."]
pub type ADDR2_W<'a, const O: u8> = crate::BitWriter<'a, u32, RXADDRESSES_SPEC, ADDR2_A, O>;
impl<'a, const O: u8> ADDR2_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ADDR2_A::DISABLED)
}
#[doc = "Enable"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ADDR2_A::ENABLED)
}
}
#[doc = "Field `ADDR3` reader - Enable or disable reception on logical address 3."]
pub type ADDR3_R = crate::BitReader<ADDR3_A>;
#[doc = "Enable or disable reception on logical address 3.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ADDR3_A {
#[doc = "0: Disable"]
DISABLED = 0,
#[doc = "1: Enable"]
ENABLED = 1,
}
impl From<ADDR3_A> for bool {
#[inline(always)]
fn from(variant: ADDR3_A) -> Self {
variant as u8 != 0
}
}
impl ADDR3_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ADDR3_A {
match self.bits {
false => ADDR3_A::DISABLED,
true => ADDR3_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ADDR3_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ADDR3_A::ENABLED
}
}
#[doc = "Field `ADDR3` writer - Enable or disable reception on logical address 3."]
pub type ADDR3_W<'a, const O: u8> = crate::BitWriter<'a, u32, RXADDRESSES_SPEC, ADDR3_A, O>;
impl<'a, const O: u8> ADDR3_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ADDR3_A::DISABLED)
}
#[doc = "Enable"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ADDR3_A::ENABLED)
}
}
#[doc = "Field `ADDR4` reader - Enable or disable reception on logical address 4."]
pub type ADDR4_R = crate::BitReader<ADDR4_A>;
#[doc = "Enable or disable reception on logical address 4.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ADDR4_A {
#[doc = "0: Disable"]
DISABLED = 0,
#[doc = "1: Enable"]
ENABLED = 1,
}
impl From<ADDR4_A> for bool {
#[inline(always)]
fn from(variant: ADDR4_A) -> Self {
variant as u8 != 0
}
}
impl ADDR4_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ADDR4_A {
match self.bits {
false => ADDR4_A::DISABLED,
true => ADDR4_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ADDR4_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ADDR4_A::ENABLED
}
}
#[doc = "Field `ADDR4` writer - Enable or disable reception on logical address 4."]
pub type ADDR4_W<'a, const O: u8> = crate::BitWriter<'a, u32, RXADDRESSES_SPEC, ADDR4_A, O>;
impl<'a, const O: u8> ADDR4_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ADDR4_A::DISABLED)
}
#[doc = "Enable"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ADDR4_A::ENABLED)
}
}
#[doc = "Field `ADDR5` reader - Enable or disable reception on logical address 5."]
pub type ADDR5_R = crate::BitReader<ADDR5_A>;
#[doc = "Enable or disable reception on logical address 5.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ADDR5_A {
#[doc = "0: Disable"]
DISABLED = 0,
#[doc = "1: Enable"]
ENABLED = 1,
}
impl From<ADDR5_A> for bool {
#[inline(always)]
fn from(variant: ADDR5_A) -> Self {
variant as u8 != 0
}
}
impl ADDR5_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ADDR5_A {
match self.bits {
false => ADDR5_A::DISABLED,
true => ADDR5_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ADDR5_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ADDR5_A::ENABLED
}
}
#[doc = "Field `ADDR5` writer - Enable or disable reception on logical address 5."]
pub type ADDR5_W<'a, const O: u8> = crate::BitWriter<'a, u32, RXADDRESSES_SPEC, ADDR5_A, O>;
impl<'a, const O: u8> ADDR5_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ADDR5_A::DISABLED)
}
#[doc = "Enable"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ADDR5_A::ENABLED)
}
}
#[doc = "Field `ADDR6` reader - Enable or disable reception on logical address 6."]
pub type ADDR6_R = crate::BitReader<ADDR6_A>;
#[doc = "Enable or disable reception on logical address 6.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ADDR6_A {
#[doc = "0: Disable"]
DISABLED = 0,
#[doc = "1: Enable"]
ENABLED = 1,
}
impl From<ADDR6_A> for bool {
#[inline(always)]
fn from(variant: ADDR6_A) -> Self {
variant as u8 != 0
}
}
impl ADDR6_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ADDR6_A {
match self.bits {
false => ADDR6_A::DISABLED,
true => ADDR6_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ADDR6_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ADDR6_A::ENABLED
}
}
#[doc = "Field `ADDR6` writer - Enable or disable reception on logical address 6."]
pub type ADDR6_W<'a, const O: u8> = crate::BitWriter<'a, u32, RXADDRESSES_SPEC, ADDR6_A, O>;
impl<'a, const O: u8> ADDR6_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ADDR6_A::DISABLED)
}
#[doc = "Enable"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ADDR6_A::ENABLED)
}
}
#[doc = "Field `ADDR7` reader - Enable or disable reception on logical address 7."]
pub type ADDR7_R = crate::BitReader<ADDR7_A>;
#[doc = "Enable or disable reception on logical address 7.\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ADDR7_A {
#[doc = "0: Disable"]
DISABLED = 0,
#[doc = "1: Enable"]
ENABLED = 1,
}
impl From<ADDR7_A> for bool {
#[inline(always)]
fn from(variant: ADDR7_A) -> Self {
variant as u8 != 0
}
}
impl ADDR7_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ADDR7_A {
match self.bits {
false => ADDR7_A::DISABLED,
true => ADDR7_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ADDR7_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ADDR7_A::ENABLED
}
}
#[doc = "Field `ADDR7` writer - Enable or disable reception on logical address 7."]
pub type ADDR7_W<'a, const O: u8> = crate::BitWriter<'a, u32, RXADDRESSES_SPEC, ADDR7_A, O>;
impl<'a, const O: u8> ADDR7_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ADDR7_A::DISABLED)
}
#[doc = "Enable"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ADDR7_A::ENABLED)
}
}
impl R {
#[doc = "Bit 0 - Enable or disable reception on logical address 0."]
#[inline(always)]
pub fn addr0(&self) -> ADDR0_R {
ADDR0_R::new((self.bits & 1) != 0)
}
#[doc = "Bit 1 - Enable or disable reception on logical address 1."]
#[inline(always)]
pub fn addr1(&self) -> ADDR1_R {
ADDR1_R::new(((self.bits >> 1) & 1) != 0)
}
#[doc = "Bit 2 - Enable or disable reception on logical address 2."]
#[inline(always)]
pub fn addr2(&self) -> ADDR2_R {
ADDR2_R::new(((self.bits >> 2) & 1) != 0)
}
#[doc = "Bit 3 - Enable or disable reception on logical address 3."]
#[inline(always)]
pub fn addr3(&self) -> ADDR3_R {
ADDR3_R::new(((self.bits >> 3) & 1) != 0)
}
#[doc = "Bit 4 - Enable or disable reception on logical address 4."]
#[inline(always)]
pub fn addr4(&self) -> ADDR4_R {
ADDR4_R::new(((self.bits >> 4) & 1) != 0)
}
#[doc = "Bit 5 - Enable or disable reception on logical address 5."]
#[inline(always)]
pub fn addr5(&self) -> ADDR5_R {
ADDR5_R::new(((self.bits >> 5) & 1) != 0)
}
#[doc = "Bit 6 - Enable or disable reception on logical address 6."]
#[inline(always)]
pub fn addr6(&self) -> ADDR6_R {
ADDR6_R::new(((self.bits >> 6) & 1) != 0)
}
#[doc = "Bit 7 - Enable or disable reception on logical address 7."]
#[inline(always)]
pub fn addr7(&self) -> ADDR7_R {
ADDR7_R::new(((self.bits >> 7) & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Enable or disable reception on logical address 0."]
#[inline(always)]
pub fn addr0(&mut self) -> ADDR0_W<0> {
ADDR0_W::new(self)
}
#[doc = "Bit 1 - Enable or disable reception on logical address 1."]
#[inline(always)]
pub fn addr1(&mut self) -> ADDR1_W<1> {
ADDR1_W::new(self)
}
#[doc = "Bit 2 - Enable or disable reception on logical address 2."]
#[inline(always)]
pub fn addr2(&mut self) -> ADDR2_W<2> {
ADDR2_W::new(self)
}
#[doc = "Bit 3 - Enable or disable reception on logical address 3."]
#[inline(always)]
pub fn addr3(&mut self) -> ADDR3_W<3> {
ADDR3_W::new(self)
}
#[doc = "Bit 4 - Enable or disable reception on logical address 4."]
#[inline(always)]
pub fn addr4(&mut self) -> ADDR4_W<4> {
ADDR4_W::new(self)
}
#[doc = "Bit 5 - Enable or disable reception on logical address 5."]
#[inline(always)]
pub fn addr5(&mut self) -> ADDR5_W<5> {
ADDR5_W::new(self)
}
#[doc = "Bit 6 - Enable or disable reception on logical address 6."]
#[inline(always)]
pub fn addr6(&mut self) -> ADDR6_W<6> {
ADDR6_W::new(self)
}
#[doc = "Bit 7 - Enable or disable reception on logical address 7."]
#[inline(always)]
pub fn addr7(&mut self) -> ADDR7_W<7> {
ADDR7_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Receive address select\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [rxaddresses](index.html) module"]
pub struct RXADDRESSES_SPEC;
impl crate::RegisterSpec for RXADDRESSES_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [rxaddresses::R](R) reader structure"]
impl crate::Readable for RXADDRESSES_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [rxaddresses::W](W) writer structure"]
impl crate::Writable for RXADDRESSES_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets RXADDRESSES to value 0"]
impl crate::Resettable for RXADDRESSES_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+40
View File
@@ -0,0 +1,40 @@
#[doc = "Register `RXCRC` reader"]
pub struct R(crate::R<RXCRC_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<RXCRC_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<RXCRC_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<RXCRC_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `RXCRC` reader - CRC field of previously received packet"]
pub type RXCRC_R = crate::FieldReader<u32, u32>;
impl R {
#[doc = "Bits 0:23 - CRC field of previously received packet"]
#[inline(always)]
pub fn rxcrc(&self) -> RXCRC_R {
RXCRC_R::new((self.bits & 0x00ff_ffff) as u32)
}
}
#[doc = "CRC field of previously received packet\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [rxcrc](index.html) module"]
pub struct RXCRC_SPEC;
impl crate::RegisterSpec for RXCRC_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [rxcrc::R](R) reader structure"]
impl crate::Readable for RXCRC_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets RXCRC to value 0"]
impl crate::Resettable for RXCRC_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+40
View File
@@ -0,0 +1,40 @@
#[doc = "Register `RXMATCH` reader"]
pub struct R(crate::R<RXMATCH_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<RXMATCH_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<RXMATCH_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<RXMATCH_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `RXMATCH` reader - Received address"]
pub type RXMATCH_R = crate::FieldReader<u8, u8>;
impl R {
#[doc = "Bits 0:2 - Received address"]
#[inline(always)]
pub fn rxmatch(&self) -> RXMATCH_R {
RXMATCH_R::new((self.bits & 7) as u8)
}
}
#[doc = "Received address\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [rxmatch](index.html) module"]
pub struct RXMATCH_SPEC;
impl crate::RegisterSpec for RXMATCH_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [rxmatch::R](R) reader structure"]
impl crate::Readable for RXMATCH_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets RXMATCH to value 0"]
impl crate::Resettable for RXMATCH_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+80
View File
@@ -0,0 +1,80 @@
#[doc = "Register `SFD` reader"]
pub struct R(crate::R<SFD_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<SFD_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<SFD_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<SFD_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `SFD` writer"]
pub struct W(crate::W<SFD_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<SFD_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<SFD_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<SFD_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `SFD` reader - IEEE 802.15.4 start of frame delimiter"]
pub type SFD_R = crate::FieldReader<u8, u8>;
#[doc = "Field `SFD` writer - IEEE 802.15.4 start of frame delimiter"]
pub type SFD_W<'a, const O: u8> = crate::FieldWriter<'a, u32, SFD_SPEC, u8, u8, 8, O>;
impl R {
#[doc = "Bits 0:7 - IEEE 802.15.4 start of frame delimiter"]
#[inline(always)]
pub fn sfd(&self) -> SFD_R {
SFD_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 0:7 - IEEE 802.15.4 start of frame delimiter"]
#[inline(always)]
pub fn sfd(&mut self) -> SFD_W<0> {
SFD_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 = "IEEE 802.15.4 start of frame delimiter\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 [sfd](index.html) module"]
pub struct SFD_SPEC;
impl crate::RegisterSpec for SFD_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [sfd::R](R) reader structure"]
impl crate::Readable for SFD_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [sfd::W](W) writer structure"]
impl crate::Writable for SFD_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets SFD to value 0xa7"]
impl crate::Resettable for SFD_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0xa7
}
}
File diff suppressed because it is too large. Load diff
+132
View File
@@ -0,0 +1,132 @@
#[doc = "Register `STATE` reader"]
pub struct R(crate::R<STATE_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<STATE_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<STATE_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<STATE_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `STATE` reader - Current radio state"]
pub type STATE_R = crate::FieldReader<u8, STATE_A>;
#[doc = "Current radio state\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum STATE_A {
#[doc = "0: RADIO is in the Disabled state"]
DISABLED = 0,
#[doc = "1: RADIO is in the RXRU state"]
RX_RU = 1,
#[doc = "2: RADIO is in the RXIDLE state"]
RX_IDLE = 2,
#[doc = "3: RADIO is in the RX state"]
RX = 3,
#[doc = "4: RADIO is in the RXDISABLED state"]
RX_DISABLE = 4,
#[doc = "9: RADIO is in the TXRU state"]
TX_RU = 9,
#[doc = "10: RADIO is in the TXIDLE state"]
TX_IDLE = 10,
#[doc = "11: RADIO is in the TX state"]
TX = 11,
#[doc = "12: RADIO is in the TXDISABLED state"]
TX_DISABLE = 12,
}
impl From<STATE_A> for u8 {
#[inline(always)]
fn from(variant: STATE_A) -> Self {
variant as _
}
}
impl STATE_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> Option<STATE_A> {
match self.bits {
0 => Some(STATE_A::DISABLED),
1 => Some(STATE_A::RX_RU),
2 => Some(STATE_A::RX_IDLE),
3 => Some(STATE_A::RX),
4 => Some(STATE_A::RX_DISABLE),
9 => Some(STATE_A::TX_RU),
10 => Some(STATE_A::TX_IDLE),
11 => Some(STATE_A::TX),
12 => Some(STATE_A::TX_DISABLE),
_ => None,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == STATE_A::DISABLED
}
#[doc = "Checks if the value of the field is `RX_RU`"]
#[inline(always)]
pub fn is_rx_ru(&self) -> bool {
*self == STATE_A::RX_RU
}
#[doc = "Checks if the value of the field is `RX_IDLE`"]
#[inline(always)]
pub fn is_rx_idle(&self) -> bool {
*self == STATE_A::RX_IDLE
}
#[doc = "Checks if the value of the field is `RX`"]
#[inline(always)]
pub fn is_rx(&self) -> bool {
*self == STATE_A::RX
}
#[doc = "Checks if the value of the field is `RX_DISABLE`"]
#[inline(always)]
pub fn is_rx_disable(&self) -> bool {
*self == STATE_A::RX_DISABLE
}
#[doc = "Checks if the value of the field is `TX_RU`"]
#[inline(always)]
pub fn is_tx_ru(&self) -> bool {
*self == STATE_A::TX_RU
}
#[doc = "Checks if the value of the field is `TX_IDLE`"]
#[inline(always)]
pub fn is_tx_idle(&self) -> bool {
*self == STATE_A::TX_IDLE
}
#[doc = "Checks if the value of the field is `TX`"]
#[inline(always)]
pub fn is_tx(&self) -> bool {
*self == STATE_A::TX
}
#[doc = "Checks if the value of the field is `TX_DISABLE`"]
#[inline(always)]
pub fn is_tx_disable(&self) -> bool {
*self == STATE_A::TX_DISABLE
}
}
impl R {
#[doc = "Bits 0:3 - Current radio state"]
#[inline(always)]
pub fn state(&self) -> STATE_R {
STATE_R::new((self.bits & 0x0f) as u8)
}
}
#[doc = "Current radio state\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [state](index.html) module"]
pub struct STATE_SPEC;
impl crate::RegisterSpec for STATE_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [state::R](R) reader structure"]
impl crate::Readable for STATE_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets STATE to value 0"]
impl crate::Resettable for STATE_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+141
View File
@@ -0,0 +1,141 @@
#[doc = "Register `SUBSCRIBE_BCSTART` reader"]
pub struct R(crate::R<SUBSCRIBE_BCSTART_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<SUBSCRIBE_BCSTART_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<SUBSCRIBE_BCSTART_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<SUBSCRIBE_BCSTART_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `SUBSCRIBE_BCSTART` writer"]
pub struct W(crate::W<SUBSCRIBE_BCSTART_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<SUBSCRIBE_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<SUBSCRIBE_BCSTART_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<SUBSCRIBE_BCSTART_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `CHIDX` reader - DPPI channel that task BCSTART will subscribe to"]
pub type CHIDX_R = crate::FieldReader<u8, u8>;
#[doc = "Field `CHIDX` writer - DPPI channel that task BCSTART will subscribe to"]
pub type CHIDX_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, SUBSCRIBE_BCSTART_SPEC, u8, u8, 8, O>;
#[doc = "Field `EN` reader - "]
pub type EN_R = crate::BitReader<EN_A>;
#[doc = "\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EN_A {
#[doc = "0: Disable subscription"]
DISABLED = 0,
#[doc = "1: Enable subscription"]
ENABLED = 1,
}
impl From<EN_A> for bool {
#[inline(always)]
fn from(variant: EN_A) -> Self {
variant as u8 != 0
}
}
impl EN_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EN_A {
match self.bits {
false => EN_A::DISABLED,
true => EN_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == EN_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == EN_A::ENABLED
}
}
#[doc = "Field `EN` writer - "]
pub type EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBSCRIBE_BCSTART_SPEC, EN_A, O>;
impl<'a, const O: u8> EN_W<'a, O> {
#[doc = "Disable subscription"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(EN_A::DISABLED)
}
#[doc = "Enable subscription"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(EN_A::ENABLED)
}
}
impl R {
#[doc = "Bits 0:7 - DPPI channel that task BCSTART will subscribe to"]
#[inline(always)]
pub fn chidx(&self) -> CHIDX_R {
CHIDX_R::new((self.bits & 0xff) as u8)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&self) -> EN_R {
EN_R::new(((self.bits >> 31) & 1) != 0)
}
}
impl W {
#[doc = "Bits 0:7 - DPPI channel that task BCSTART will subscribe to"]
#[inline(always)]
pub fn chidx(&mut self) -> CHIDX_W<0> {
CHIDX_W::new(self)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&mut self) -> EN_W<31> {
EN_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 = "Subscribe configuration for task BCSTART\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 [subscribe_bcstart](index.html) module"]
pub struct SUBSCRIBE_BCSTART_SPEC;
impl crate::RegisterSpec for SUBSCRIBE_BCSTART_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [subscribe_bcstart::R](R) reader structure"]
impl crate::Readable for SUBSCRIBE_BCSTART_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [subscribe_bcstart::W](W) writer structure"]
impl crate::Writable for SUBSCRIBE_BCSTART_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets SUBSCRIBE_BCSTART to value 0"]
impl crate::Resettable for SUBSCRIBE_BCSTART_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+141
View File
@@ -0,0 +1,141 @@
#[doc = "Register `SUBSCRIBE_BCSTOP` reader"]
pub struct R(crate::R<SUBSCRIBE_BCSTOP_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<SUBSCRIBE_BCSTOP_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<SUBSCRIBE_BCSTOP_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<SUBSCRIBE_BCSTOP_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `SUBSCRIBE_BCSTOP` writer"]
pub struct W(crate::W<SUBSCRIBE_BCSTOP_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<SUBSCRIBE_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<SUBSCRIBE_BCSTOP_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<SUBSCRIBE_BCSTOP_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `CHIDX` reader - DPPI channel that task BCSTOP will subscribe to"]
pub type CHIDX_R = crate::FieldReader<u8, u8>;
#[doc = "Field `CHIDX` writer - DPPI channel that task BCSTOP will subscribe to"]
pub type CHIDX_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, SUBSCRIBE_BCSTOP_SPEC, u8, u8, 8, O>;
#[doc = "Field `EN` reader - "]
pub type EN_R = crate::BitReader<EN_A>;
#[doc = "\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EN_A {
#[doc = "0: Disable subscription"]
DISABLED = 0,
#[doc = "1: Enable subscription"]
ENABLED = 1,
}
impl From<EN_A> for bool {
#[inline(always)]
fn from(variant: EN_A) -> Self {
variant as u8 != 0
}
}
impl EN_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EN_A {
match self.bits {
false => EN_A::DISABLED,
true => EN_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == EN_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == EN_A::ENABLED
}
}
#[doc = "Field `EN` writer - "]
pub type EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBSCRIBE_BCSTOP_SPEC, EN_A, O>;
impl<'a, const O: u8> EN_W<'a, O> {
#[doc = "Disable subscription"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(EN_A::DISABLED)
}
#[doc = "Enable subscription"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(EN_A::ENABLED)
}
}
impl R {
#[doc = "Bits 0:7 - DPPI channel that task BCSTOP will subscribe to"]
#[inline(always)]
pub fn chidx(&self) -> CHIDX_R {
CHIDX_R::new((self.bits & 0xff) as u8)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&self) -> EN_R {
EN_R::new(((self.bits >> 31) & 1) != 0)
}
}
impl W {
#[doc = "Bits 0:7 - DPPI channel that task BCSTOP will subscribe to"]
#[inline(always)]
pub fn chidx(&mut self) -> CHIDX_W<0> {
CHIDX_W::new(self)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&mut self) -> EN_W<31> {
EN_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 = "Subscribe configuration for task BCSTOP\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 [subscribe_bcstop](index.html) module"]
pub struct SUBSCRIBE_BCSTOP_SPEC;
impl crate::RegisterSpec for SUBSCRIBE_BCSTOP_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [subscribe_bcstop::R](R) reader structure"]
impl crate::Readable for SUBSCRIBE_BCSTOP_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [subscribe_bcstop::W](W) writer structure"]
impl crate::Writable for SUBSCRIBE_BCSTOP_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets SUBSCRIBE_BCSTOP to value 0"]
impl crate::Resettable for SUBSCRIBE_BCSTOP_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
@@ -0,0 +1,141 @@
#[doc = "Register `SUBSCRIBE_CCASTART` reader"]
pub struct R(crate::R<SUBSCRIBE_CCASTART_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<SUBSCRIBE_CCASTART_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<SUBSCRIBE_CCASTART_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<SUBSCRIBE_CCASTART_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `SUBSCRIBE_CCASTART` writer"]
pub struct W(crate::W<SUBSCRIBE_CCASTART_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<SUBSCRIBE_CCASTART_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<SUBSCRIBE_CCASTART_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<SUBSCRIBE_CCASTART_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `CHIDX` reader - DPPI channel that task CCASTART will subscribe to"]
pub type CHIDX_R = crate::FieldReader<u8, u8>;
#[doc = "Field `CHIDX` writer - DPPI channel that task CCASTART will subscribe to"]
pub type CHIDX_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, SUBSCRIBE_CCASTART_SPEC, u8, u8, 8, O>;
#[doc = "Field `EN` reader - "]
pub type EN_R = crate::BitReader<EN_A>;
#[doc = "\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EN_A {
#[doc = "0: Disable subscription"]
DISABLED = 0,
#[doc = "1: Enable subscription"]
ENABLED = 1,
}
impl From<EN_A> for bool {
#[inline(always)]
fn from(variant: EN_A) -> Self {
variant as u8 != 0
}
}
impl EN_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> EN_A {
match self.bits {
false => EN_A::DISABLED,
true => EN_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == EN_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == EN_A::ENABLED
}
}
#[doc = "Field `EN` writer - "]
pub type EN_W<'a, const O: u8> = crate::BitWriter<'a, u32, SUBSCRIBE_CCASTART_SPEC, EN_A, O>;
impl<'a, const O: u8> EN_W<'a, O> {
#[doc = "Disable subscription"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(EN_A::DISABLED)
}
#[doc = "Enable subscription"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(EN_A::ENABLED)
}
}
impl R {
#[doc = "Bits 0:7 - DPPI channel that task CCASTART will subscribe to"]
#[inline(always)]
pub fn chidx(&self) -> CHIDX_R {
CHIDX_R::new((self.bits & 0xff) as u8)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&self) -> EN_R {
EN_R::new(((self.bits >> 31) & 1) != 0)
}
}
impl W {
#[doc = "Bits 0:7 - DPPI channel that task CCASTART will subscribe to"]
#[inline(always)]
pub fn chidx(&mut self) -> CHIDX_W<0> {
CHIDX_W::new(self)
}
#[doc = "Bit 31"]
#[inline(always)]
pub fn en(&mut self) -> EN_W<31> {
EN_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 = "Subscribe configuration for task CCASTART\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 [subscribe_ccastart](index.html) module"]
pub struct SUBSCRIBE_CCASTART_SPEC;
impl crate::RegisterSpec for SUBSCRIBE_CCASTART_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [subscribe_ccastart::R](R) reader structure"]
impl crate::Readable for SUBSCRIBE_CCASTART_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [subscribe_ccastart::W](W) writer structure"]
impl crate::Writable for SUBSCRIBE_CCASTART_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets SUBSCRIBE_CCASTART to value 0"]
impl crate::Resettable for SUBSCRIBE_CCASTART_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
Loaded 100 of 17624 files, more files were not shown because too many files have changed in this diff. Show more