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

+337
View File
@@ -0,0 +1,337 @@
#[doc = "Register `BAUDRATE` reader"]
pub struct R(crate::R<BAUDRATE_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<BAUDRATE_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<BAUDRATE_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<BAUDRATE_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `BAUDRATE` writer"]
pub struct W(crate::W<BAUDRATE_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<BAUDRATE_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<BAUDRATE_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<BAUDRATE_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `BAUDRATE` reader - Baud rate"]
pub type BAUDRATE_R = crate::FieldReader<u32, BAUDRATE_A>;
#[doc = "Baud rate\n\nValue on reset: 67108864"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u32)]
pub enum BAUDRATE_A {
#[doc = "323584: 1200 baud (actual rate: 1205)"]
BAUD1200 = 323584,
#[doc = "643072: 2400 baud (actual rate: 2396)"]
BAUD2400 = 643072,
#[doc = "1290240: 4800 baud (actual rate: 4808)"]
BAUD4800 = 1290240,
#[doc = "2576384: 9600 baud (actual rate: 9598)"]
BAUD9600 = 2576384,
#[doc = "3862528: 14400 baud (actual rate: 14401)"]
BAUD14400 = 3862528,
#[doc = "5152768: 19200 baud (actual rate: 19208)"]
BAUD19200 = 5152768,
#[doc = "7716864: 28800 baud (actual rate: 28777)"]
BAUD28800 = 7716864,
#[doc = "8388608: 31250 baud"]
BAUD31250 = 8388608,
#[doc = "10289152: 38400 baud (actual rate: 38369)"]
BAUD38400 = 10289152,
#[doc = "15007744: 56000 baud (actual rate: 55944)"]
BAUD56000 = 15007744,
#[doc = "15400960: 57600 baud (actual rate: 57554)"]
BAUD57600 = 15400960,
#[doc = "20615168: 76800 baud (actual rate: 76923)"]
BAUD76800 = 20615168,
#[doc = "30801920: 115200 baud (actual rate: 115108)"]
BAUD115200 = 30801920,
#[doc = "61865984: 230400 baud (actual rate: 231884)"]
BAUD230400 = 61865984,
#[doc = "67108864: 250000 baud"]
BAUD250000 = 67108864,
#[doc = "121634816: 460800 baud (actual rate: 457143)"]
BAUD460800 = 121634816,
#[doc = "251658240: 921600 baud (actual rate: 941176)"]
BAUD921600 = 251658240,
#[doc = "268435456: 1Mega baud"]
BAUD1M = 268435456,
}
impl From<BAUDRATE_A> for u32 {
#[inline(always)]
fn from(variant: BAUDRATE_A) -> Self {
variant as _
}
}
impl BAUDRATE_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> Option<BAUDRATE_A> {
match self.bits {
323584 => Some(BAUDRATE_A::BAUD1200),
643072 => Some(BAUDRATE_A::BAUD2400),
1290240 => Some(BAUDRATE_A::BAUD4800),
2576384 => Some(BAUDRATE_A::BAUD9600),
3862528 => Some(BAUDRATE_A::BAUD14400),
5152768 => Some(BAUDRATE_A::BAUD19200),
7716864 => Some(BAUDRATE_A::BAUD28800),
8388608 => Some(BAUDRATE_A::BAUD31250),
10289152 => Some(BAUDRATE_A::BAUD38400),
15007744 => Some(BAUDRATE_A::BAUD56000),
15400960 => Some(BAUDRATE_A::BAUD57600),
20615168 => Some(BAUDRATE_A::BAUD76800),
30801920 => Some(BAUDRATE_A::BAUD115200),
61865984 => Some(BAUDRATE_A::BAUD230400),
67108864 => Some(BAUDRATE_A::BAUD250000),
121634816 => Some(BAUDRATE_A::BAUD460800),
251658240 => Some(BAUDRATE_A::BAUD921600),
268435456 => Some(BAUDRATE_A::BAUD1M),
_ => None,
}
}
#[doc = "Checks if the value of the field is `BAUD1200`"]
#[inline(always)]
pub fn is_baud1200(&self) -> bool {
*self == BAUDRATE_A::BAUD1200
}
#[doc = "Checks if the value of the field is `BAUD2400`"]
#[inline(always)]
pub fn is_baud2400(&self) -> bool {
*self == BAUDRATE_A::BAUD2400
}
#[doc = "Checks if the value of the field is `BAUD4800`"]
#[inline(always)]
pub fn is_baud4800(&self) -> bool {
*self == BAUDRATE_A::BAUD4800
}
#[doc = "Checks if the value of the field is `BAUD9600`"]
#[inline(always)]
pub fn is_baud9600(&self) -> bool {
*self == BAUDRATE_A::BAUD9600
}
#[doc = "Checks if the value of the field is `BAUD14400`"]
#[inline(always)]
pub fn is_baud14400(&self) -> bool {
*self == BAUDRATE_A::BAUD14400
}
#[doc = "Checks if the value of the field is `BAUD19200`"]
#[inline(always)]
pub fn is_baud19200(&self) -> bool {
*self == BAUDRATE_A::BAUD19200
}
#[doc = "Checks if the value of the field is `BAUD28800`"]
#[inline(always)]
pub fn is_baud28800(&self) -> bool {
*self == BAUDRATE_A::BAUD28800
}
#[doc = "Checks if the value of the field is `BAUD31250`"]
#[inline(always)]
pub fn is_baud31250(&self) -> bool {
*self == BAUDRATE_A::BAUD31250
}
#[doc = "Checks if the value of the field is `BAUD38400`"]
#[inline(always)]
pub fn is_baud38400(&self) -> bool {
*self == BAUDRATE_A::BAUD38400
}
#[doc = "Checks if the value of the field is `BAUD56000`"]
#[inline(always)]
pub fn is_baud56000(&self) -> bool {
*self == BAUDRATE_A::BAUD56000
}
#[doc = "Checks if the value of the field is `BAUD57600`"]
#[inline(always)]
pub fn is_baud57600(&self) -> bool {
*self == BAUDRATE_A::BAUD57600
}
#[doc = "Checks if the value of the field is `BAUD76800`"]
#[inline(always)]
pub fn is_baud76800(&self) -> bool {
*self == BAUDRATE_A::BAUD76800
}
#[doc = "Checks if the value of the field is `BAUD115200`"]
#[inline(always)]
pub fn is_baud115200(&self) -> bool {
*self == BAUDRATE_A::BAUD115200
}
#[doc = "Checks if the value of the field is `BAUD230400`"]
#[inline(always)]
pub fn is_baud230400(&self) -> bool {
*self == BAUDRATE_A::BAUD230400
}
#[doc = "Checks if the value of the field is `BAUD250000`"]
#[inline(always)]
pub fn is_baud250000(&self) -> bool {
*self == BAUDRATE_A::BAUD250000
}
#[doc = "Checks if the value of the field is `BAUD460800`"]
#[inline(always)]
pub fn is_baud460800(&self) -> bool {
*self == BAUDRATE_A::BAUD460800
}
#[doc = "Checks if the value of the field is `BAUD921600`"]
#[inline(always)]
pub fn is_baud921600(&self) -> bool {
*self == BAUDRATE_A::BAUD921600
}
#[doc = "Checks if the value of the field is `BAUD1M`"]
#[inline(always)]
pub fn is_baud1m(&self) -> bool {
*self == BAUDRATE_A::BAUD1M
}
}
#[doc = "Field `BAUDRATE` writer - Baud rate"]
pub type BAUDRATE_W<'a, const O: u8> =
crate::FieldWriter<'a, u32, BAUDRATE_SPEC, u32, BAUDRATE_A, 32, O>;
impl<'a, const O: u8> BAUDRATE_W<'a, O> {
#[doc = "1200 baud (actual rate: 1205)"]
#[inline(always)]
pub fn baud1200(self) -> &'a mut W {
self.variant(BAUDRATE_A::BAUD1200)
}
#[doc = "2400 baud (actual rate: 2396)"]
#[inline(always)]
pub fn baud2400(self) -> &'a mut W {
self.variant(BAUDRATE_A::BAUD2400)
}
#[doc = "4800 baud (actual rate: 4808)"]
#[inline(always)]
pub fn baud4800(self) -> &'a mut W {
self.variant(BAUDRATE_A::BAUD4800)
}
#[doc = "9600 baud (actual rate: 9598)"]
#[inline(always)]
pub fn baud9600(self) -> &'a mut W {
self.variant(BAUDRATE_A::BAUD9600)
}
#[doc = "14400 baud (actual rate: 14401)"]
#[inline(always)]
pub fn baud14400(self) -> &'a mut W {
self.variant(BAUDRATE_A::BAUD14400)
}
#[doc = "19200 baud (actual rate: 19208)"]
#[inline(always)]
pub fn baud19200(self) -> &'a mut W {
self.variant(BAUDRATE_A::BAUD19200)
}
#[doc = "28800 baud (actual rate: 28777)"]
#[inline(always)]
pub fn baud28800(self) -> &'a mut W {
self.variant(BAUDRATE_A::BAUD28800)
}
#[doc = "31250 baud"]
#[inline(always)]
pub fn baud31250(self) -> &'a mut W {
self.variant(BAUDRATE_A::BAUD31250)
}
#[doc = "38400 baud (actual rate: 38369)"]
#[inline(always)]
pub fn baud38400(self) -> &'a mut W {
self.variant(BAUDRATE_A::BAUD38400)
}
#[doc = "56000 baud (actual rate: 55944)"]
#[inline(always)]
pub fn baud56000(self) -> &'a mut W {
self.variant(BAUDRATE_A::BAUD56000)
}
#[doc = "57600 baud (actual rate: 57554)"]
#[inline(always)]
pub fn baud57600(self) -> &'a mut W {
self.variant(BAUDRATE_A::BAUD57600)
}
#[doc = "76800 baud (actual rate: 76923)"]
#[inline(always)]
pub fn baud76800(self) -> &'a mut W {
self.variant(BAUDRATE_A::BAUD76800)
}
#[doc = "115200 baud (actual rate: 115108)"]
#[inline(always)]
pub fn baud115200(self) -> &'a mut W {
self.variant(BAUDRATE_A::BAUD115200)
}
#[doc = "230400 baud (actual rate: 231884)"]
#[inline(always)]
pub fn baud230400(self) -> &'a mut W {
self.variant(BAUDRATE_A::BAUD230400)
}
#[doc = "250000 baud"]
#[inline(always)]
pub fn baud250000(self) -> &'a mut W {
self.variant(BAUDRATE_A::BAUD250000)
}
#[doc = "460800 baud (actual rate: 457143)"]
#[inline(always)]
pub fn baud460800(self) -> &'a mut W {
self.variant(BAUDRATE_A::BAUD460800)
}
#[doc = "921600 baud (actual rate: 941176)"]
#[inline(always)]
pub fn baud921600(self) -> &'a mut W {
self.variant(BAUDRATE_A::BAUD921600)
}
#[doc = "1Mega baud"]
#[inline(always)]
pub fn baud1m(self) -> &'a mut W {
self.variant(BAUDRATE_A::BAUD1M)
}
}
impl R {
#[doc = "Bits 0:31 - Baud rate"]
#[inline(always)]
pub fn baudrate(&self) -> BAUDRATE_R {
BAUDRATE_R::new(self.bits)
}
}
impl W {
#[doc = "Bits 0:31 - Baud rate"]
#[inline(always)]
pub fn baudrate(&mut self) -> BAUDRATE_W<0> {
BAUDRATE_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 = "Baud rate. Accuracy depends on the HFCLK source selected.\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 [baudrate](index.html) module"]
pub struct BAUDRATE_SPEC;
impl crate::RegisterSpec for BAUDRATE_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [baudrate::R](R) reader structure"]
impl crate::Readable for BAUDRATE_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [baudrate::W](W) writer structure"]
impl crate::Writable for BAUDRATE_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets BAUDRATE to value 0x0400_0000"]
impl crate::Resettable for BAUDRATE_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0x0400_0000
}
}
+188
View File
@@ -0,0 +1,188 @@
#[doc = "Register `CONFIG` reader"]
pub struct R(crate::R<CONFIG_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CONFIG_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CONFIG_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CONFIG_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `CONFIG` writer"]
pub struct W(crate::W<CONFIG_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<CONFIG_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<CONFIG_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<CONFIG_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `HWFC` reader - Hardware flow control"]
pub type HWFC_R = crate::BitReader<HWFC_A>;
#[doc = "Hardware flow control\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum HWFC_A {
#[doc = "0: Disabled"]
DISABLED = 0,
#[doc = "1: Enabled"]
ENABLED = 1,
}
impl From<HWFC_A> for bool {
#[inline(always)]
fn from(variant: HWFC_A) -> Self {
variant as u8 != 0
}
}
impl HWFC_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> HWFC_A {
match self.bits {
false => HWFC_A::DISABLED,
true => HWFC_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == HWFC_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == HWFC_A::ENABLED
}
}
#[doc = "Field `HWFC` writer - Hardware flow control"]
pub type HWFC_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG_SPEC, HWFC_A, O>;
impl<'a, const O: u8> HWFC_W<'a, O> {
#[doc = "Disabled"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(HWFC_A::DISABLED)
}
#[doc = "Enabled"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(HWFC_A::ENABLED)
}
}
#[doc = "Field `PARITY` reader - Parity"]
pub type PARITY_R = crate::FieldReader<u8, PARITY_A>;
#[doc = "Parity\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum PARITY_A {
#[doc = "0: Exclude parity bit"]
EXCLUDED = 0,
#[doc = "7: Include parity bit"]
INCLUDED = 7,
}
impl From<PARITY_A> for u8 {
#[inline(always)]
fn from(variant: PARITY_A) -> Self {
variant as _
}
}
impl PARITY_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> Option<PARITY_A> {
match self.bits {
0 => Some(PARITY_A::EXCLUDED),
7 => Some(PARITY_A::INCLUDED),
_ => None,
}
}
#[doc = "Checks if the value of the field is `EXCLUDED`"]
#[inline(always)]
pub fn is_excluded(&self) -> bool {
*self == PARITY_A::EXCLUDED
}
#[doc = "Checks if the value of the field is `INCLUDED`"]
#[inline(always)]
pub fn is_included(&self) -> bool {
*self == PARITY_A::INCLUDED
}
}
#[doc = "Field `PARITY` writer - Parity"]
pub type PARITY_W<'a, const O: u8> = crate::FieldWriter<'a, u32, CONFIG_SPEC, u8, PARITY_A, 3, O>;
impl<'a, const O: u8> PARITY_W<'a, O> {
#[doc = "Exclude parity bit"]
#[inline(always)]
pub fn excluded(self) -> &'a mut W {
self.variant(PARITY_A::EXCLUDED)
}
#[doc = "Include parity bit"]
#[inline(always)]
pub fn included(self) -> &'a mut W {
self.variant(PARITY_A::INCLUDED)
}
}
impl R {
#[doc = "Bit 0 - Hardware flow control"]
#[inline(always)]
pub fn hwfc(&self) -> HWFC_R {
HWFC_R::new((self.bits & 1) != 0)
}
#[doc = "Bits 1:3 - Parity"]
#[inline(always)]
pub fn parity(&self) -> PARITY_R {
PARITY_R::new(((self.bits >> 1) & 7) as u8)
}
}
impl W {
#[doc = "Bit 0 - Hardware flow control"]
#[inline(always)]
pub fn hwfc(&mut self) -> HWFC_W<0> {
HWFC_W::new(self)
}
#[doc = "Bits 1:3 - Parity"]
#[inline(always)]
pub fn parity(&mut self) -> PARITY_W<1> {
PARITY_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Configuration of parity and hardware flow 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 [config](index.html) module"]
pub struct CONFIG_SPEC;
impl crate::RegisterSpec for CONFIG_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [config::R](R) reader structure"]
impl crate::Readable for CONFIG_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [config::W](W) writer structure"]
impl crate::Writable for CONFIG_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets CONFIG to value 0"]
impl crate::Resettable for CONFIG_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+128
View File
@@ -0,0 +1,128 @@
#[doc = "Register `ENABLE` reader"]
pub struct R(crate::R<ENABLE_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<ENABLE_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<ENABLE_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<ENABLE_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `ENABLE` writer"]
pub struct W(crate::W<ENABLE_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<ENABLE_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<ENABLE_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<ENABLE_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `ENABLE` reader - Enable or disable UARTE"]
pub type ENABLE_R = crate::FieldReader<u8, ENABLE_A>;
#[doc = "Enable or disable UARTE\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum ENABLE_A {
#[doc = "0: Disable UARTE"]
DISABLED = 0,
#[doc = "8: Enable UARTE"]
ENABLED = 8,
}
impl From<ENABLE_A> for u8 {
#[inline(always)]
fn from(variant: ENABLE_A) -> Self {
variant as _
}
}
impl ENABLE_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> Option<ENABLE_A> {
match self.bits {
0 => Some(ENABLE_A::DISABLED),
8 => Some(ENABLE_A::ENABLED),
_ => None,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ENABLE_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ENABLE_A::ENABLED
}
}
#[doc = "Field `ENABLE` writer - Enable or disable UARTE"]
pub type ENABLE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, ENABLE_SPEC, u8, ENABLE_A, 4, O>;
impl<'a, const O: u8> ENABLE_W<'a, O> {
#[doc = "Disable UARTE"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ENABLE_A::DISABLED)
}
#[doc = "Enable UARTE"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ENABLE_A::ENABLED)
}
}
impl R {
#[doc = "Bits 0:3 - Enable or disable UARTE"]
#[inline(always)]
pub fn enable(&self) -> ENABLE_R {
ENABLE_R::new((self.bits & 0x0f) as u8)
}
}
impl W {
#[doc = "Bits 0:3 - Enable or disable UARTE"]
#[inline(always)]
pub fn enable(&mut self) -> ENABLE_W<0> {
ENABLE_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Enable UART\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [enable](index.html) module"]
pub struct ENABLE_SPEC;
impl crate::RegisterSpec for ENABLE_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [enable::R](R) reader structure"]
impl crate::Readable for ENABLE_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [enable::W](W) writer structure"]
impl crate::Writable for ENABLE_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets ENABLE to value 0"]
impl crate::Resettable for ENABLE_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+306
View File
@@ -0,0 +1,306 @@
#[doc = "Register `ERRORSRC` reader"]
pub struct R(crate::R<ERRORSRC_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<ERRORSRC_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<ERRORSRC_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<ERRORSRC_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `ERRORSRC` writer"]
pub struct W(crate::W<ERRORSRC_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<ERRORSRC_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<ERRORSRC_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<ERRORSRC_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `OVERRUN` reader - Overrun error"]
pub type OVERRUN_R = crate::BitReader<OVERRUN_A>;
#[doc = "Overrun error\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum OVERRUN_A {
#[doc = "0: Read: error not present"]
NOT_PRESENT = 0,
#[doc = "1: Read: error present"]
PRESENT = 1,
}
impl From<OVERRUN_A> for bool {
#[inline(always)]
fn from(variant: OVERRUN_A) -> Self {
variant as u8 != 0
}
}
impl OVERRUN_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> OVERRUN_A {
match self.bits {
false => OVERRUN_A::NOT_PRESENT,
true => OVERRUN_A::PRESENT,
}
}
#[doc = "Checks if the value of the field is `NOT_PRESENT`"]
#[inline(always)]
pub fn is_not_present(&self) -> bool {
*self == OVERRUN_A::NOT_PRESENT
}
#[doc = "Checks if the value of the field is `PRESENT`"]
#[inline(always)]
pub fn is_present(&self) -> bool {
*self == OVERRUN_A::PRESENT
}
}
#[doc = "Field `OVERRUN` writer - Overrun error"]
pub type OVERRUN_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, ERRORSRC_SPEC, OVERRUN_A, O>;
impl<'a, const O: u8> OVERRUN_W<'a, O> {
#[doc = "Read: error not present"]
#[inline(always)]
pub fn not_present(self) -> &'a mut W {
self.variant(OVERRUN_A::NOT_PRESENT)
}
#[doc = "Read: error present"]
#[inline(always)]
pub fn present(self) -> &'a mut W {
self.variant(OVERRUN_A::PRESENT)
}
}
#[doc = "Field `PARITY` reader - Parity error"]
pub type PARITY_R = crate::BitReader<PARITY_A>;
#[doc = "Parity error\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum PARITY_A {
#[doc = "0: Read: error not present"]
NOT_PRESENT = 0,
#[doc = "1: Read: error present"]
PRESENT = 1,
}
impl From<PARITY_A> for bool {
#[inline(always)]
fn from(variant: PARITY_A) -> Self {
variant as u8 != 0
}
}
impl PARITY_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> PARITY_A {
match self.bits {
false => PARITY_A::NOT_PRESENT,
true => PARITY_A::PRESENT,
}
}
#[doc = "Checks if the value of the field is `NOT_PRESENT`"]
#[inline(always)]
pub fn is_not_present(&self) -> bool {
*self == PARITY_A::NOT_PRESENT
}
#[doc = "Checks if the value of the field is `PRESENT`"]
#[inline(always)]
pub fn is_present(&self) -> bool {
*self == PARITY_A::PRESENT
}
}
#[doc = "Field `PARITY` writer - Parity error"]
pub type PARITY_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, ERRORSRC_SPEC, PARITY_A, O>;
impl<'a, const O: u8> PARITY_W<'a, O> {
#[doc = "Read: error not present"]
#[inline(always)]
pub fn not_present(self) -> &'a mut W {
self.variant(PARITY_A::NOT_PRESENT)
}
#[doc = "Read: error present"]
#[inline(always)]
pub fn present(self) -> &'a mut W {
self.variant(PARITY_A::PRESENT)
}
}
#[doc = "Field `FRAMING` reader - Framing error occurred"]
pub type FRAMING_R = crate::BitReader<FRAMING_A>;
#[doc = "Framing error occurred\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum FRAMING_A {
#[doc = "0: Read: error not present"]
NOT_PRESENT = 0,
#[doc = "1: Read: error present"]
PRESENT = 1,
}
impl From<FRAMING_A> for bool {
#[inline(always)]
fn from(variant: FRAMING_A) -> Self {
variant as u8 != 0
}
}
impl FRAMING_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> FRAMING_A {
match self.bits {
false => FRAMING_A::NOT_PRESENT,
true => FRAMING_A::PRESENT,
}
}
#[doc = "Checks if the value of the field is `NOT_PRESENT`"]
#[inline(always)]
pub fn is_not_present(&self) -> bool {
*self == FRAMING_A::NOT_PRESENT
}
#[doc = "Checks if the value of the field is `PRESENT`"]
#[inline(always)]
pub fn is_present(&self) -> bool {
*self == FRAMING_A::PRESENT
}
}
#[doc = "Field `FRAMING` writer - Framing error occurred"]
pub type FRAMING_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, ERRORSRC_SPEC, FRAMING_A, O>;
impl<'a, const O: u8> FRAMING_W<'a, O> {
#[doc = "Read: error not present"]
#[inline(always)]
pub fn not_present(self) -> &'a mut W {
self.variant(FRAMING_A::NOT_PRESENT)
}
#[doc = "Read: error present"]
#[inline(always)]
pub fn present(self) -> &'a mut W {
self.variant(FRAMING_A::PRESENT)
}
}
#[doc = "Field `BREAK` reader - Break condition"]
pub type BREAK_R = crate::BitReader<BREAK_A>;
#[doc = "Break condition\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum BREAK_A {
#[doc = "0: Read: error not present"]
NOT_PRESENT = 0,
#[doc = "1: Read: error present"]
PRESENT = 1,
}
impl From<BREAK_A> for bool {
#[inline(always)]
fn from(variant: BREAK_A) -> Self {
variant as u8 != 0
}
}
impl BREAK_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> BREAK_A {
match self.bits {
false => BREAK_A::NOT_PRESENT,
true => BREAK_A::PRESENT,
}
}
#[doc = "Checks if the value of the field is `NOT_PRESENT`"]
#[inline(always)]
pub fn is_not_present(&self) -> bool {
*self == BREAK_A::NOT_PRESENT
}
#[doc = "Checks if the value of the field is `PRESENT`"]
#[inline(always)]
pub fn is_present(&self) -> bool {
*self == BREAK_A::PRESENT
}
}
#[doc = "Field `BREAK` writer - Break condition"]
pub type BREAK_W<'a, const O: u8> = crate::BitWriter1C<'a, u32, ERRORSRC_SPEC, BREAK_A, O>;
impl<'a, const O: u8> BREAK_W<'a, O> {
#[doc = "Read: error not present"]
#[inline(always)]
pub fn not_present(self) -> &'a mut W {
self.variant(BREAK_A::NOT_PRESENT)
}
#[doc = "Read: error present"]
#[inline(always)]
pub fn present(self) -> &'a mut W {
self.variant(BREAK_A::PRESENT)
}
}
impl R {
#[doc = "Bit 0 - Overrun error"]
#[inline(always)]
pub fn overrun(&self) -> OVERRUN_R {
OVERRUN_R::new((self.bits & 1) != 0)
}
#[doc = "Bit 1 - Parity error"]
#[inline(always)]
pub fn parity(&self) -> PARITY_R {
PARITY_R::new(((self.bits >> 1) & 1) != 0)
}
#[doc = "Bit 2 - Framing error occurred"]
#[inline(always)]
pub fn framing(&self) -> FRAMING_R {
FRAMING_R::new(((self.bits >> 2) & 1) != 0)
}
#[doc = "Bit 3 - Break condition"]
#[inline(always)]
pub fn break_(&self) -> BREAK_R {
BREAK_R::new(((self.bits >> 3) & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Overrun error"]
#[inline(always)]
pub fn overrun(&mut self) -> OVERRUN_W<0> {
OVERRUN_W::new(self)
}
#[doc = "Bit 1 - Parity error"]
#[inline(always)]
pub fn parity(&mut self) -> PARITY_W<1> {
PARITY_W::new(self)
}
#[doc = "Bit 2 - Framing error occurred"]
#[inline(always)]
pub fn framing(&mut self) -> FRAMING_W<2> {
FRAMING_W::new(self)
}
#[doc = "Bit 3 - Break condition"]
#[inline(always)]
pub fn break_(&mut self) -> BREAK_W<3> {
BREAK_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 = "Error source\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 [errorsrc](index.html) module"]
pub struct ERRORSRC_SPEC;
impl crate::RegisterSpec for ERRORSRC_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [errorsrc::R](R) reader structure"]
impl crate::Readable for ERRORSRC_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [errorsrc::W](W) writer structure"]
impl crate::Writable for ERRORSRC_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets ERRORSRC to value 0"]
impl crate::Resettable for ERRORSRC_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+64
View File
@@ -0,0 +1,64 @@
#[doc = "Register `EVENTS_CTS` reader"]
pub struct R(crate::R<EVENTS_CTS_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_CTS_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_CTS_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_CTS_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_CTS` writer"]
pub struct W(crate::W<EVENTS_CTS_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_CTS_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_CTS_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_CTS_SPEC>) -> Self {
W(writer)
}
}
impl W {
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CTS is activated (set low). 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_cts](index.html) module"]
pub struct EVENTS_CTS_SPEC;
impl crate::RegisterSpec for EVENTS_CTS_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_cts::R](R) reader structure"]
impl crate::Readable for EVENTS_CTS_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_cts::W](W) writer structure"]
impl crate::Writable for EVENTS_CTS_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_CTS to value 0"]
impl crate::Resettable for EVENTS_CTS_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+64
View File
@@ -0,0 +1,64 @@
#[doc = "Register `EVENTS_ENDRX` reader"]
pub struct R(crate::R<EVENTS_ENDRX_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_ENDRX_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_ENDRX_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_ENDRX_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_ENDRX` writer"]
pub struct W(crate::W<EVENTS_ENDRX_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_ENDRX_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<EVENTS_ENDRX_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_ENDRX_SPEC>) -> Self {
W(writer)
}
}
impl W {
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Receive buffer is filled up\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [events_endrx](index.html) module"]
pub struct EVENTS_ENDRX_SPEC;
impl crate::RegisterSpec for EVENTS_ENDRX_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_endrx::R](R) reader structure"]
impl crate::Readable for EVENTS_ENDRX_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_endrx::W](W) writer structure"]
impl crate::Writable for EVENTS_ENDRX_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_ENDRX to value 0"]
impl crate::Resettable for EVENTS_ENDRX_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+64
View File
@@ -0,0 +1,64 @@
#[doc = "Register `EVENTS_ENDTX` reader"]
pub struct R(crate::R<EVENTS_ENDTX_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_ENDTX_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_ENDTX_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_ENDTX_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_ENDTX` writer"]
pub struct W(crate::W<EVENTS_ENDTX_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_ENDTX_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<EVENTS_ENDTX_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_ENDTX_SPEC>) -> Self {
W(writer)
}
}
impl W {
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Last TX byte transmitted\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [events_endtx](index.html) module"]
pub struct EVENTS_ENDTX_SPEC;
impl crate::RegisterSpec for EVENTS_ENDTX_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_endtx::R](R) reader structure"]
impl crate::Readable for EVENTS_ENDTX_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_endtx::W](W) writer structure"]
impl crate::Writable for EVENTS_ENDTX_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_ENDTX to value 0"]
impl crate::Resettable for EVENTS_ENDTX_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+64
View File
@@ -0,0 +1,64 @@
#[doc = "Register `EVENTS_ERROR` reader"]
pub struct R(crate::R<EVENTS_ERROR_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_ERROR_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_ERROR_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_ERROR_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_ERROR` writer"]
pub struct W(crate::W<EVENTS_ERROR_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_ERROR_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<EVENTS_ERROR_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_ERROR_SPEC>) -> Self {
W(writer)
}
}
impl W {
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Error detected\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [events_error](index.html) module"]
pub struct EVENTS_ERROR_SPEC;
impl crate::RegisterSpec for EVENTS_ERROR_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_error::R](R) reader structure"]
impl crate::Readable for EVENTS_ERROR_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_error::W](W) writer structure"]
impl crate::Writable for EVENTS_ERROR_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_ERROR to value 0"]
impl crate::Resettable for EVENTS_ERROR_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+64
View File
@@ -0,0 +1,64 @@
#[doc = "Register `EVENTS_NCTS` reader"]
pub struct R(crate::R<EVENTS_NCTS_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_NCTS_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_NCTS_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_NCTS_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_NCTS` writer"]
pub struct W(crate::W<EVENTS_NCTS_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_NCTS_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_NCTS_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_NCTS_SPEC>) -> Self {
W(writer)
}
}
impl W {
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "CTS is deactivated (set high). Not 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_ncts](index.html) module"]
pub struct EVENTS_NCTS_SPEC;
impl crate::RegisterSpec for EVENTS_NCTS_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_ncts::R](R) reader structure"]
impl crate::Readable for EVENTS_NCTS_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_ncts::W](W) writer structure"]
impl crate::Writable for EVENTS_NCTS_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_NCTS to value 0"]
impl crate::Resettable for EVENTS_NCTS_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+64
View File
@@ -0,0 +1,64 @@
#[doc = "Register `EVENTS_RXDRDY` reader"]
pub struct R(crate::R<EVENTS_RXDRDY_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_RXDRDY_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_RXDRDY_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_RXDRDY_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_RXDRDY` writer"]
pub struct W(crate::W<EVENTS_RXDRDY_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_RXDRDY_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_RXDRDY_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_RXDRDY_SPEC>) -> Self {
W(writer)
}
}
impl W {
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Data received in RXD (but potentially not yet transferred to Data RAM)\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [events_rxdrdy](index.html) module"]
pub struct EVENTS_RXDRDY_SPEC;
impl crate::RegisterSpec for EVENTS_RXDRDY_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_rxdrdy::R](R) reader structure"]
impl crate::Readable for EVENTS_RXDRDY_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_rxdrdy::W](W) writer structure"]
impl crate::Writable for EVENTS_RXDRDY_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_RXDRDY to value 0"]
impl crate::Resettable for EVENTS_RXDRDY_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+64
View File
@@ -0,0 +1,64 @@
#[doc = "Register `EVENTS_RXSTARTED` reader"]
pub struct R(crate::R<EVENTS_RXSTARTED_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_RXSTARTED_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_RXSTARTED_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_RXSTARTED_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_RXSTARTED` writer"]
pub struct W(crate::W<EVENTS_RXSTARTED_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_RXSTARTED_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_RXSTARTED_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_RXSTARTED_SPEC>) -> Self {
W(writer)
}
}
impl W {
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "UART receiver has started\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [events_rxstarted](index.html) module"]
pub struct EVENTS_RXSTARTED_SPEC;
impl crate::RegisterSpec for EVENTS_RXSTARTED_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_rxstarted::R](R) reader structure"]
impl crate::Readable for EVENTS_RXSTARTED_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_rxstarted::W](W) writer structure"]
impl crate::Writable for EVENTS_RXSTARTED_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_RXSTARTED to value 0"]
impl crate::Resettable for EVENTS_RXSTARTED_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+64
View File
@@ -0,0 +1,64 @@
#[doc = "Register `EVENTS_RXTO` reader"]
pub struct R(crate::R<EVENTS_RXTO_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_RXTO_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_RXTO_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_RXTO_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_RXTO` writer"]
pub struct W(crate::W<EVENTS_RXTO_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_RXTO_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_RXTO_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_RXTO_SPEC>) -> Self {
W(writer)
}
}
impl W {
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Receiver timeout\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_rxto](index.html) module"]
pub struct EVENTS_RXTO_SPEC;
impl crate::RegisterSpec for EVENTS_RXTO_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_rxto::R](R) reader structure"]
impl crate::Readable for EVENTS_RXTO_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_rxto::W](W) writer structure"]
impl crate::Writable for EVENTS_RXTO_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_RXTO to value 0"]
impl crate::Resettable for EVENTS_RXTO_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+64
View File
@@ -0,0 +1,64 @@
#[doc = "Register `EVENTS_TXDRDY` reader"]
pub struct R(crate::R<EVENTS_TXDRDY_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_TXDRDY_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_TXDRDY_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_TXDRDY_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_TXDRDY` writer"]
pub struct W(crate::W<EVENTS_TXDRDY_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_TXDRDY_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_TXDRDY_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_TXDRDY_SPEC>) -> Self {
W(writer)
}
}
impl W {
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Data sent from TXD\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_txdrdy](index.html) module"]
pub struct EVENTS_TXDRDY_SPEC;
impl crate::RegisterSpec for EVENTS_TXDRDY_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_txdrdy::R](R) reader structure"]
impl crate::Readable for EVENTS_TXDRDY_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_txdrdy::W](W) writer structure"]
impl crate::Writable for EVENTS_TXDRDY_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_TXDRDY to value 0"]
impl crate::Resettable for EVENTS_TXDRDY_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+64
View File
@@ -0,0 +1,64 @@
#[doc = "Register `EVENTS_TXSTARTED` reader"]
pub struct R(crate::R<EVENTS_TXSTARTED_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_TXSTARTED_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_TXSTARTED_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_TXSTARTED_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_TXSTARTED` writer"]
pub struct W(crate::W<EVENTS_TXSTARTED_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_TXSTARTED_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_TXSTARTED_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_TXSTARTED_SPEC>) -> Self {
W(writer)
}
}
impl W {
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "UART transmitter has started\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [events_txstarted](index.html) module"]
pub struct EVENTS_TXSTARTED_SPEC;
impl crate::RegisterSpec for EVENTS_TXSTARTED_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_txstarted::R](R) reader structure"]
impl crate::Readable for EVENTS_TXSTARTED_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_txstarted::W](W) writer structure"]
impl crate::Writable for EVENTS_TXSTARTED_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_TXSTARTED to value 0"]
impl crate::Resettable for EVENTS_TXSTARTED_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+64
View File
@@ -0,0 +1,64 @@
#[doc = "Register `EVENTS_TXSTOPPED` reader"]
pub struct R(crate::R<EVENTS_TXSTOPPED_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<EVENTS_TXSTOPPED_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<EVENTS_TXSTOPPED_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<EVENTS_TXSTOPPED_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `EVENTS_TXSTOPPED` writer"]
pub struct W(crate::W<EVENTS_TXSTOPPED_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<EVENTS_TXSTOPPED_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_TXSTOPPED_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<EVENTS_TXSTOPPED_SPEC>) -> Self {
W(writer)
}
}
impl W {
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Transmitter 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_txstopped](index.html) module"]
pub struct EVENTS_TXSTOPPED_SPEC;
impl crate::RegisterSpec for EVENTS_TXSTOPPED_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [events_txstopped::R](R) reader structure"]
impl crate::Readable for EVENTS_TXSTOPPED_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [events_txstopped::W](W) writer structure"]
impl crate::Writable for EVENTS_TXSTOPPED_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets EVENTS_TXSTOPPED to value 0"]
impl crate::Resettable for EVENTS_TXSTOPPED_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+726
View File
@@ -0,0 +1,726 @@
#[doc = "Register `INTEN` reader"]
pub struct R(crate::R<INTEN_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<INTEN_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<INTEN_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<INTEN_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `INTEN` writer"]
pub struct W(crate::W<INTEN_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<INTEN_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<INTEN_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<INTEN_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `CTS` reader - Enable or disable interrupt for CTS event"]
pub type CTS_R = crate::BitReader<CTS_A>;
#[doc = "Enable or disable interrupt for CTS event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CTS_A {
#[doc = "0: Disable"]
DISABLED = 0,
#[doc = "1: Enable"]
ENABLED = 1,
}
impl From<CTS_A> for bool {
#[inline(always)]
fn from(variant: CTS_A) -> Self {
variant as u8 != 0
}
}
impl CTS_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> CTS_A {
match self.bits {
false => CTS_A::DISABLED,
true => CTS_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == CTS_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == CTS_A::ENABLED
}
}
#[doc = "Field `CTS` writer - Enable or disable interrupt for CTS event"]
pub type CTS_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, CTS_A, O>;
impl<'a, const O: u8> CTS_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(CTS_A::DISABLED)
}
#[doc = "Enable"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(CTS_A::ENABLED)
}
}
#[doc = "Field `NCTS` reader - Enable or disable interrupt for NCTS event"]
pub type NCTS_R = crate::BitReader<NCTS_A>;
#[doc = "Enable or disable interrupt for NCTS event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum NCTS_A {
#[doc = "0: Disable"]
DISABLED = 0,
#[doc = "1: Enable"]
ENABLED = 1,
}
impl From<NCTS_A> for bool {
#[inline(always)]
fn from(variant: NCTS_A) -> Self {
variant as u8 != 0
}
}
impl NCTS_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> NCTS_A {
match self.bits {
false => NCTS_A::DISABLED,
true => NCTS_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == NCTS_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == NCTS_A::ENABLED
}
}
#[doc = "Field `NCTS` writer - Enable or disable interrupt for NCTS event"]
pub type NCTS_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, NCTS_A, O>;
impl<'a, const O: u8> NCTS_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(NCTS_A::DISABLED)
}
#[doc = "Enable"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(NCTS_A::ENABLED)
}
}
#[doc = "Field `RXDRDY` reader - Enable or disable interrupt for RXDRDY event"]
pub type RXDRDY_R = crate::BitReader<RXDRDY_A>;
#[doc = "Enable or disable interrupt for RXDRDY event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RXDRDY_A {
#[doc = "0: Disable"]
DISABLED = 0,
#[doc = "1: Enable"]
ENABLED = 1,
}
impl From<RXDRDY_A> for bool {
#[inline(always)]
fn from(variant: RXDRDY_A) -> Self {
variant as u8 != 0
}
}
impl RXDRDY_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RXDRDY_A {
match self.bits {
false => RXDRDY_A::DISABLED,
true => RXDRDY_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == RXDRDY_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == RXDRDY_A::ENABLED
}
}
#[doc = "Field `RXDRDY` writer - Enable or disable interrupt for RXDRDY event"]
pub type RXDRDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, RXDRDY_A, O>;
impl<'a, const O: u8> RXDRDY_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(RXDRDY_A::DISABLED)
}
#[doc = "Enable"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(RXDRDY_A::ENABLED)
}
}
#[doc = "Field `ENDRX` reader - Enable or disable interrupt for ENDRX event"]
pub type ENDRX_R = crate::BitReader<ENDRX_A>;
#[doc = "Enable or disable interrupt for ENDRX event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ENDRX_A {
#[doc = "0: Disable"]
DISABLED = 0,
#[doc = "1: Enable"]
ENABLED = 1,
}
impl From<ENDRX_A> for bool {
#[inline(always)]
fn from(variant: ENDRX_A) -> Self {
variant as u8 != 0
}
}
impl ENDRX_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ENDRX_A {
match self.bits {
false => ENDRX_A::DISABLED,
true => ENDRX_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ENDRX_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ENDRX_A::ENABLED
}
}
#[doc = "Field `ENDRX` writer - Enable or disable interrupt for ENDRX event"]
pub type ENDRX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, ENDRX_A, O>;
impl<'a, const O: u8> ENDRX_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ENDRX_A::DISABLED)
}
#[doc = "Enable"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ENDRX_A::ENABLED)
}
}
#[doc = "Field `TXDRDY` reader - Enable or disable interrupt for TXDRDY event"]
pub type TXDRDY_R = crate::BitReader<TXDRDY_A>;
#[doc = "Enable or disable interrupt for TXDRDY event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TXDRDY_A {
#[doc = "0: Disable"]
DISABLED = 0,
#[doc = "1: Enable"]
ENABLED = 1,
}
impl From<TXDRDY_A> for bool {
#[inline(always)]
fn from(variant: TXDRDY_A) -> Self {
variant as u8 != 0
}
}
impl TXDRDY_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> TXDRDY_A {
match self.bits {
false => TXDRDY_A::DISABLED,
true => TXDRDY_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == TXDRDY_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == TXDRDY_A::ENABLED
}
}
#[doc = "Field `TXDRDY` writer - Enable or disable interrupt for TXDRDY event"]
pub type TXDRDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, TXDRDY_A, O>;
impl<'a, const O: u8> TXDRDY_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(TXDRDY_A::DISABLED)
}
#[doc = "Enable"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(TXDRDY_A::ENABLED)
}
}
#[doc = "Field `ENDTX` reader - Enable or disable interrupt for ENDTX event"]
pub type ENDTX_R = crate::BitReader<ENDTX_A>;
#[doc = "Enable or disable interrupt for ENDTX event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ENDTX_A {
#[doc = "0: Disable"]
DISABLED = 0,
#[doc = "1: Enable"]
ENABLED = 1,
}
impl From<ENDTX_A> for bool {
#[inline(always)]
fn from(variant: ENDTX_A) -> Self {
variant as u8 != 0
}
}
impl ENDTX_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ENDTX_A {
match self.bits {
false => ENDTX_A::DISABLED,
true => ENDTX_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ENDTX_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ENDTX_A::ENABLED
}
}
#[doc = "Field `ENDTX` writer - Enable or disable interrupt for ENDTX event"]
pub type ENDTX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, ENDTX_A, O>;
impl<'a, const O: u8> ENDTX_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ENDTX_A::DISABLED)
}
#[doc = "Enable"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ENDTX_A::ENABLED)
}
}
#[doc = "Field `ERROR` reader - Enable or disable interrupt for ERROR event"]
pub type ERROR_R = crate::BitReader<ERROR_A>;
#[doc = "Enable or disable interrupt for ERROR event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ERROR_A {
#[doc = "0: Disable"]
DISABLED = 0,
#[doc = "1: Enable"]
ENABLED = 1,
}
impl From<ERROR_A> for bool {
#[inline(always)]
fn from(variant: ERROR_A) -> Self {
variant as u8 != 0
}
}
impl ERROR_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ERROR_A {
match self.bits {
false => ERROR_A::DISABLED,
true => ERROR_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ERROR_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ERROR_A::ENABLED
}
}
#[doc = "Field `ERROR` writer - Enable or disable interrupt for ERROR event"]
pub type ERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, ERROR_A, O>;
impl<'a, const O: u8> ERROR_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ERROR_A::DISABLED)
}
#[doc = "Enable"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ERROR_A::ENABLED)
}
}
#[doc = "Field `RXTO` reader - Enable or disable interrupt for RXTO event"]
pub type RXTO_R = crate::BitReader<RXTO_A>;
#[doc = "Enable or disable interrupt for RXTO event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RXTO_A {
#[doc = "0: Disable"]
DISABLED = 0,
#[doc = "1: Enable"]
ENABLED = 1,
}
impl From<RXTO_A> for bool {
#[inline(always)]
fn from(variant: RXTO_A) -> Self {
variant as u8 != 0
}
}
impl RXTO_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RXTO_A {
match self.bits {
false => RXTO_A::DISABLED,
true => RXTO_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == RXTO_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == RXTO_A::ENABLED
}
}
#[doc = "Field `RXTO` writer - Enable or disable interrupt for RXTO event"]
pub type RXTO_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, RXTO_A, O>;
impl<'a, const O: u8> RXTO_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(RXTO_A::DISABLED)
}
#[doc = "Enable"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(RXTO_A::ENABLED)
}
}
#[doc = "Field `RXSTARTED` reader - Enable or disable interrupt for RXSTARTED event"]
pub type RXSTARTED_R = crate::BitReader<RXSTARTED_A>;
#[doc = "Enable or disable interrupt for RXSTARTED event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RXSTARTED_A {
#[doc = "0: Disable"]
DISABLED = 0,
#[doc = "1: Enable"]
ENABLED = 1,
}
impl From<RXSTARTED_A> for bool {
#[inline(always)]
fn from(variant: RXSTARTED_A) -> Self {
variant as u8 != 0
}
}
impl RXSTARTED_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RXSTARTED_A {
match self.bits {
false => RXSTARTED_A::DISABLED,
true => RXSTARTED_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == RXSTARTED_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == RXSTARTED_A::ENABLED
}
}
#[doc = "Field `RXSTARTED` writer - Enable or disable interrupt for RXSTARTED event"]
pub type RXSTARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, RXSTARTED_A, O>;
impl<'a, const O: u8> RXSTARTED_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(RXSTARTED_A::DISABLED)
}
#[doc = "Enable"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(RXSTARTED_A::ENABLED)
}
}
#[doc = "Field `TXSTARTED` reader - Enable or disable interrupt for TXSTARTED event"]
pub type TXSTARTED_R = crate::BitReader<TXSTARTED_A>;
#[doc = "Enable or disable interrupt for TXSTARTED event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TXSTARTED_A {
#[doc = "0: Disable"]
DISABLED = 0,
#[doc = "1: Enable"]
ENABLED = 1,
}
impl From<TXSTARTED_A> for bool {
#[inline(always)]
fn from(variant: TXSTARTED_A) -> Self {
variant as u8 != 0
}
}
impl TXSTARTED_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> TXSTARTED_A {
match self.bits {
false => TXSTARTED_A::DISABLED,
true => TXSTARTED_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == TXSTARTED_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == TXSTARTED_A::ENABLED
}
}
#[doc = "Field `TXSTARTED` writer - Enable or disable interrupt for TXSTARTED event"]
pub type TXSTARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, TXSTARTED_A, O>;
impl<'a, const O: u8> TXSTARTED_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(TXSTARTED_A::DISABLED)
}
#[doc = "Enable"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(TXSTARTED_A::ENABLED)
}
}
#[doc = "Field `TXSTOPPED` reader - Enable or disable interrupt for TXSTOPPED event"]
pub type TXSTOPPED_R = crate::BitReader<TXSTOPPED_A>;
#[doc = "Enable or disable interrupt for TXSTOPPED event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TXSTOPPED_A {
#[doc = "0: Disable"]
DISABLED = 0,
#[doc = "1: Enable"]
ENABLED = 1,
}
impl From<TXSTOPPED_A> for bool {
#[inline(always)]
fn from(variant: TXSTOPPED_A) -> Self {
variant as u8 != 0
}
}
impl TXSTOPPED_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> TXSTOPPED_A {
match self.bits {
false => TXSTOPPED_A::DISABLED,
true => TXSTOPPED_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == TXSTOPPED_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == TXSTOPPED_A::ENABLED
}
}
#[doc = "Field `TXSTOPPED` writer - Enable or disable interrupt for TXSTOPPED event"]
pub type TXSTOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTEN_SPEC, TXSTOPPED_A, O>;
impl<'a, const O: u8> TXSTOPPED_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(TXSTOPPED_A::DISABLED)
}
#[doc = "Enable"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(TXSTOPPED_A::ENABLED)
}
}
impl R {
#[doc = "Bit 0 - Enable or disable interrupt for CTS event"]
#[inline(always)]
pub fn cts(&self) -> CTS_R {
CTS_R::new((self.bits & 1) != 0)
}
#[doc = "Bit 1 - Enable or disable interrupt for NCTS event"]
#[inline(always)]
pub fn ncts(&self) -> NCTS_R {
NCTS_R::new(((self.bits >> 1) & 1) != 0)
}
#[doc = "Bit 2 - Enable or disable interrupt for RXDRDY event"]
#[inline(always)]
pub fn rxdrdy(&self) -> RXDRDY_R {
RXDRDY_R::new(((self.bits >> 2) & 1) != 0)
}
#[doc = "Bit 4 - Enable or disable interrupt for ENDRX event"]
#[inline(always)]
pub fn endrx(&self) -> ENDRX_R {
ENDRX_R::new(((self.bits >> 4) & 1) != 0)
}
#[doc = "Bit 7 - Enable or disable interrupt for TXDRDY event"]
#[inline(always)]
pub fn txdrdy(&self) -> TXDRDY_R {
TXDRDY_R::new(((self.bits >> 7) & 1) != 0)
}
#[doc = "Bit 8 - Enable or disable interrupt for ENDTX event"]
#[inline(always)]
pub fn endtx(&self) -> ENDTX_R {
ENDTX_R::new(((self.bits >> 8) & 1) != 0)
}
#[doc = "Bit 9 - Enable or disable interrupt for ERROR event"]
#[inline(always)]
pub fn error(&self) -> ERROR_R {
ERROR_R::new(((self.bits >> 9) & 1) != 0)
}
#[doc = "Bit 17 - Enable or disable interrupt for RXTO event"]
#[inline(always)]
pub fn rxto(&self) -> RXTO_R {
RXTO_R::new(((self.bits >> 17) & 1) != 0)
}
#[doc = "Bit 19 - Enable or disable interrupt for RXSTARTED event"]
#[inline(always)]
pub fn rxstarted(&self) -> RXSTARTED_R {
RXSTARTED_R::new(((self.bits >> 19) & 1) != 0)
}
#[doc = "Bit 20 - Enable or disable interrupt for TXSTARTED event"]
#[inline(always)]
pub fn txstarted(&self) -> TXSTARTED_R {
TXSTARTED_R::new(((self.bits >> 20) & 1) != 0)
}
#[doc = "Bit 22 - Enable or disable interrupt for TXSTOPPED event"]
#[inline(always)]
pub fn txstopped(&self) -> TXSTOPPED_R {
TXSTOPPED_R::new(((self.bits >> 22) & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Enable or disable interrupt for CTS event"]
#[inline(always)]
pub fn cts(&mut self) -> CTS_W<0> {
CTS_W::new(self)
}
#[doc = "Bit 1 - Enable or disable interrupt for NCTS event"]
#[inline(always)]
pub fn ncts(&mut self) -> NCTS_W<1> {
NCTS_W::new(self)
}
#[doc = "Bit 2 - Enable or disable interrupt for RXDRDY event"]
#[inline(always)]
pub fn rxdrdy(&mut self) -> RXDRDY_W<2> {
RXDRDY_W::new(self)
}
#[doc = "Bit 4 - Enable or disable interrupt for ENDRX event"]
#[inline(always)]
pub fn endrx(&mut self) -> ENDRX_W<4> {
ENDRX_W::new(self)
}
#[doc = "Bit 7 - Enable or disable interrupt for TXDRDY event"]
#[inline(always)]
pub fn txdrdy(&mut self) -> TXDRDY_W<7> {
TXDRDY_W::new(self)
}
#[doc = "Bit 8 - Enable or disable interrupt for ENDTX event"]
#[inline(always)]
pub fn endtx(&mut self) -> ENDTX_W<8> {
ENDTX_W::new(self)
}
#[doc = "Bit 9 - Enable or disable interrupt for ERROR event"]
#[inline(always)]
pub fn error(&mut self) -> ERROR_W<9> {
ERROR_W::new(self)
}
#[doc = "Bit 17 - Enable or disable interrupt for RXTO event"]
#[inline(always)]
pub fn rxto(&mut self) -> RXTO_W<17> {
RXTO_W::new(self)
}
#[doc = "Bit 19 - Enable or disable interrupt for RXSTARTED event"]
#[inline(always)]
pub fn rxstarted(&mut self) -> RXSTARTED_W<19> {
RXSTARTED_W::new(self)
}
#[doc = "Bit 20 - Enable or disable interrupt for TXSTARTED event"]
#[inline(always)]
pub fn txstarted(&mut self) -> TXSTARTED_W<20> {
TXSTARTED_W::new(self)
}
#[doc = "Bit 22 - Enable or disable interrupt for TXSTOPPED event"]
#[inline(always)]
pub fn txstopped(&mut self) -> TXSTOPPED_W<22> {
TXSTOPPED_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Enable or disable interrupt\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [inten](index.html) module"]
pub struct INTEN_SPEC;
impl crate::RegisterSpec for INTEN_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [inten::R](R) reader structure"]
impl crate::Readable for INTEN_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [inten::W](W) writer structure"]
impl crate::Writable for INTEN_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets INTEN to value 0"]
impl crate::Resettable for INTEN_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+803
View File
@@ -0,0 +1,803 @@
#[doc = "Register `INTENCLR` reader"]
pub struct R(crate::R<INTENCLR_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<INTENCLR_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<INTENCLR_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<INTENCLR_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `INTENCLR` writer"]
pub struct W(crate::W<INTENCLR_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<INTENCLR_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<INTENCLR_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<INTENCLR_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `CTS` reader - Write '1' to Disable interrupt for CTS event"]
pub type CTS_R = crate::BitReader<CTS_A>;
#[doc = "Write '1' to Disable interrupt for CTS event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CTS_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<CTS_A> for bool {
#[inline(always)]
fn from(variant: CTS_A) -> Self {
variant as u8 != 0
}
}
impl CTS_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> CTS_A {
match self.bits {
false => CTS_A::DISABLED,
true => CTS_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == CTS_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == CTS_A::ENABLED
}
}
#[doc = "Write '1' to Disable interrupt for CTS event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CTS_AW {
#[doc = "1: Disable"]
CLEAR = 1,
}
impl From<CTS_AW> for bool {
#[inline(always)]
fn from(variant: CTS_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `CTS` writer - Write '1' to Disable interrupt for CTS event"]
pub type CTS_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, CTS_AW, O>;
impl<'a, const O: u8> CTS_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(CTS_AW::CLEAR)
}
}
#[doc = "Field `NCTS` reader - Write '1' to Disable interrupt for NCTS event"]
pub type NCTS_R = crate::BitReader<NCTS_A>;
#[doc = "Write '1' to Disable interrupt for NCTS event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum NCTS_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<NCTS_A> for bool {
#[inline(always)]
fn from(variant: NCTS_A) -> Self {
variant as u8 != 0
}
}
impl NCTS_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> NCTS_A {
match self.bits {
false => NCTS_A::DISABLED,
true => NCTS_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == NCTS_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == NCTS_A::ENABLED
}
}
#[doc = "Write '1' to Disable interrupt for NCTS event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum NCTS_AW {
#[doc = "1: Disable"]
CLEAR = 1,
}
impl From<NCTS_AW> for bool {
#[inline(always)]
fn from(variant: NCTS_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `NCTS` writer - Write '1' to Disable interrupt for NCTS event"]
pub type NCTS_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, NCTS_AW, O>;
impl<'a, const O: u8> NCTS_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(NCTS_AW::CLEAR)
}
}
#[doc = "Field `RXDRDY` reader - Write '1' to Disable interrupt for RXDRDY event"]
pub type RXDRDY_R = crate::BitReader<RXDRDY_A>;
#[doc = "Write '1' to Disable interrupt for RXDRDY event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RXDRDY_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<RXDRDY_A> for bool {
#[inline(always)]
fn from(variant: RXDRDY_A) -> Self {
variant as u8 != 0
}
}
impl RXDRDY_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RXDRDY_A {
match self.bits {
false => RXDRDY_A::DISABLED,
true => RXDRDY_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == RXDRDY_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == RXDRDY_A::ENABLED
}
}
#[doc = "Write '1' to Disable interrupt for RXDRDY event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RXDRDY_AW {
#[doc = "1: Disable"]
CLEAR = 1,
}
impl From<RXDRDY_AW> for bool {
#[inline(always)]
fn from(variant: RXDRDY_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `RXDRDY` writer - Write '1' to Disable interrupt for RXDRDY event"]
pub type RXDRDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, RXDRDY_AW, O>;
impl<'a, const O: u8> RXDRDY_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(RXDRDY_AW::CLEAR)
}
}
#[doc = "Field `ENDRX` reader - Write '1' to Disable interrupt for ENDRX event"]
pub type ENDRX_R = crate::BitReader<ENDRX_A>;
#[doc = "Write '1' to Disable interrupt for ENDRX event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ENDRX_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<ENDRX_A> for bool {
#[inline(always)]
fn from(variant: ENDRX_A) -> Self {
variant as u8 != 0
}
}
impl ENDRX_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ENDRX_A {
match self.bits {
false => ENDRX_A::DISABLED,
true => ENDRX_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ENDRX_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ENDRX_A::ENABLED
}
}
#[doc = "Write '1' to Disable interrupt for ENDRX event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ENDRX_AW {
#[doc = "1: Disable"]
CLEAR = 1,
}
impl From<ENDRX_AW> for bool {
#[inline(always)]
fn from(variant: ENDRX_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `ENDRX` writer - Write '1' to Disable interrupt for ENDRX event"]
pub type ENDRX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, ENDRX_AW, O>;
impl<'a, const O: u8> ENDRX_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(ENDRX_AW::CLEAR)
}
}
#[doc = "Field `TXDRDY` reader - Write '1' to Disable interrupt for TXDRDY event"]
pub type TXDRDY_R = crate::BitReader<TXDRDY_A>;
#[doc = "Write '1' to Disable interrupt for TXDRDY event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TXDRDY_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<TXDRDY_A> for bool {
#[inline(always)]
fn from(variant: TXDRDY_A) -> Self {
variant as u8 != 0
}
}
impl TXDRDY_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> TXDRDY_A {
match self.bits {
false => TXDRDY_A::DISABLED,
true => TXDRDY_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == TXDRDY_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == TXDRDY_A::ENABLED
}
}
#[doc = "Write '1' to Disable interrupt for TXDRDY event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TXDRDY_AW {
#[doc = "1: Disable"]
CLEAR = 1,
}
impl From<TXDRDY_AW> for bool {
#[inline(always)]
fn from(variant: TXDRDY_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `TXDRDY` writer - Write '1' to Disable interrupt for TXDRDY event"]
pub type TXDRDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, TXDRDY_AW, O>;
impl<'a, const O: u8> TXDRDY_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(TXDRDY_AW::CLEAR)
}
}
#[doc = "Field `ENDTX` reader - Write '1' to Disable interrupt for ENDTX event"]
pub type ENDTX_R = crate::BitReader<ENDTX_A>;
#[doc = "Write '1' to Disable interrupt for ENDTX event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ENDTX_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<ENDTX_A> for bool {
#[inline(always)]
fn from(variant: ENDTX_A) -> Self {
variant as u8 != 0
}
}
impl ENDTX_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ENDTX_A {
match self.bits {
false => ENDTX_A::DISABLED,
true => ENDTX_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ENDTX_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ENDTX_A::ENABLED
}
}
#[doc = "Write '1' to Disable interrupt for ENDTX event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ENDTX_AW {
#[doc = "1: Disable"]
CLEAR = 1,
}
impl From<ENDTX_AW> for bool {
#[inline(always)]
fn from(variant: ENDTX_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `ENDTX` writer - Write '1' to Disable interrupt for ENDTX event"]
pub type ENDTX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, ENDTX_AW, O>;
impl<'a, const O: u8> ENDTX_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(ENDTX_AW::CLEAR)
}
}
#[doc = "Field `ERROR` reader - Write '1' to Disable interrupt for ERROR event"]
pub type ERROR_R = crate::BitReader<ERROR_A>;
#[doc = "Write '1' to Disable interrupt for ERROR event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ERROR_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<ERROR_A> for bool {
#[inline(always)]
fn from(variant: ERROR_A) -> Self {
variant as u8 != 0
}
}
impl ERROR_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ERROR_A {
match self.bits {
false => ERROR_A::DISABLED,
true => ERROR_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ERROR_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ERROR_A::ENABLED
}
}
#[doc = "Write '1' to Disable interrupt for ERROR event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ERROR_AW {
#[doc = "1: Disable"]
CLEAR = 1,
}
impl From<ERROR_AW> for bool {
#[inline(always)]
fn from(variant: ERROR_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `ERROR` writer - Write '1' to Disable interrupt for ERROR event"]
pub type ERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, ERROR_AW, O>;
impl<'a, const O: u8> ERROR_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(ERROR_AW::CLEAR)
}
}
#[doc = "Field `RXTO` reader - Write '1' to Disable interrupt for RXTO event"]
pub type RXTO_R = crate::BitReader<RXTO_A>;
#[doc = "Write '1' to Disable interrupt for RXTO event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RXTO_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<RXTO_A> for bool {
#[inline(always)]
fn from(variant: RXTO_A) -> Self {
variant as u8 != 0
}
}
impl RXTO_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RXTO_A {
match self.bits {
false => RXTO_A::DISABLED,
true => RXTO_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == RXTO_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == RXTO_A::ENABLED
}
}
#[doc = "Write '1' to Disable interrupt for RXTO event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RXTO_AW {
#[doc = "1: Disable"]
CLEAR = 1,
}
impl From<RXTO_AW> for bool {
#[inline(always)]
fn from(variant: RXTO_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `RXTO` writer - Write '1' to Disable interrupt for RXTO event"]
pub type RXTO_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, RXTO_AW, O>;
impl<'a, const O: u8> RXTO_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(RXTO_AW::CLEAR)
}
}
#[doc = "Field `RXSTARTED` reader - Write '1' to Disable interrupt for RXSTARTED event"]
pub type RXSTARTED_R = crate::BitReader<RXSTARTED_A>;
#[doc = "Write '1' to Disable interrupt for RXSTARTED event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RXSTARTED_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<RXSTARTED_A> for bool {
#[inline(always)]
fn from(variant: RXSTARTED_A) -> Self {
variant as u8 != 0
}
}
impl RXSTARTED_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RXSTARTED_A {
match self.bits {
false => RXSTARTED_A::DISABLED,
true => RXSTARTED_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == RXSTARTED_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == RXSTARTED_A::ENABLED
}
}
#[doc = "Write '1' to Disable interrupt for RXSTARTED event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RXSTARTED_AW {
#[doc = "1: Disable"]
CLEAR = 1,
}
impl From<RXSTARTED_AW> for bool {
#[inline(always)]
fn from(variant: RXSTARTED_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `RXSTARTED` writer - Write '1' to Disable interrupt for RXSTARTED event"]
pub type RXSTARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, RXSTARTED_AW, O>;
impl<'a, const O: u8> RXSTARTED_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(RXSTARTED_AW::CLEAR)
}
}
#[doc = "Field `TXSTARTED` reader - Write '1' to Disable interrupt for TXSTARTED event"]
pub type TXSTARTED_R = crate::BitReader<TXSTARTED_A>;
#[doc = "Write '1' to Disable interrupt for TXSTARTED event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TXSTARTED_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<TXSTARTED_A> for bool {
#[inline(always)]
fn from(variant: TXSTARTED_A) -> Self {
variant as u8 != 0
}
}
impl TXSTARTED_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> TXSTARTED_A {
match self.bits {
false => TXSTARTED_A::DISABLED,
true => TXSTARTED_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == TXSTARTED_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == TXSTARTED_A::ENABLED
}
}
#[doc = "Write '1' to Disable interrupt for TXSTARTED event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TXSTARTED_AW {
#[doc = "1: Disable"]
CLEAR = 1,
}
impl From<TXSTARTED_AW> for bool {
#[inline(always)]
fn from(variant: TXSTARTED_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `TXSTARTED` writer - Write '1' to Disable interrupt for TXSTARTED event"]
pub type TXSTARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, TXSTARTED_AW, O>;
impl<'a, const O: u8> TXSTARTED_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(TXSTARTED_AW::CLEAR)
}
}
#[doc = "Field `TXSTOPPED` reader - Write '1' to Disable interrupt for TXSTOPPED event"]
pub type TXSTOPPED_R = crate::BitReader<TXSTOPPED_A>;
#[doc = "Write '1' to Disable interrupt for TXSTOPPED event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TXSTOPPED_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<TXSTOPPED_A> for bool {
#[inline(always)]
fn from(variant: TXSTOPPED_A) -> Self {
variant as u8 != 0
}
}
impl TXSTOPPED_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> TXSTOPPED_A {
match self.bits {
false => TXSTOPPED_A::DISABLED,
true => TXSTOPPED_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == TXSTOPPED_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == TXSTOPPED_A::ENABLED
}
}
#[doc = "Write '1' to Disable interrupt for TXSTOPPED event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TXSTOPPED_AW {
#[doc = "1: Disable"]
CLEAR = 1,
}
impl From<TXSTOPPED_AW> for bool {
#[inline(always)]
fn from(variant: TXSTOPPED_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `TXSTOPPED` writer - Write '1' to Disable interrupt for TXSTOPPED event"]
pub type TXSTOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENCLR_SPEC, TXSTOPPED_AW, O>;
impl<'a, const O: u8> TXSTOPPED_W<'a, O> {
#[doc = "Disable"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(TXSTOPPED_AW::CLEAR)
}
}
impl R {
#[doc = "Bit 0 - Write '1' to Disable interrupt for CTS event"]
#[inline(always)]
pub fn cts(&self) -> CTS_R {
CTS_R::new((self.bits & 1) != 0)
}
#[doc = "Bit 1 - Write '1' to Disable interrupt for NCTS event"]
#[inline(always)]
pub fn ncts(&self) -> NCTS_R {
NCTS_R::new(((self.bits >> 1) & 1) != 0)
}
#[doc = "Bit 2 - Write '1' to Disable interrupt for RXDRDY event"]
#[inline(always)]
pub fn rxdrdy(&self) -> RXDRDY_R {
RXDRDY_R::new(((self.bits >> 2) & 1) != 0)
}
#[doc = "Bit 4 - Write '1' to Disable interrupt for ENDRX event"]
#[inline(always)]
pub fn endrx(&self) -> ENDRX_R {
ENDRX_R::new(((self.bits >> 4) & 1) != 0)
}
#[doc = "Bit 7 - Write '1' to Disable interrupt for TXDRDY event"]
#[inline(always)]
pub fn txdrdy(&self) -> TXDRDY_R {
TXDRDY_R::new(((self.bits >> 7) & 1) != 0)
}
#[doc = "Bit 8 - Write '1' to Disable interrupt for ENDTX event"]
#[inline(always)]
pub fn endtx(&self) -> ENDTX_R {
ENDTX_R::new(((self.bits >> 8) & 1) != 0)
}
#[doc = "Bit 9 - Write '1' to Disable interrupt for ERROR event"]
#[inline(always)]
pub fn error(&self) -> ERROR_R {
ERROR_R::new(((self.bits >> 9) & 1) != 0)
}
#[doc = "Bit 17 - Write '1' to Disable interrupt for RXTO event"]
#[inline(always)]
pub fn rxto(&self) -> RXTO_R {
RXTO_R::new(((self.bits >> 17) & 1) != 0)
}
#[doc = "Bit 19 - Write '1' to Disable interrupt for RXSTARTED event"]
#[inline(always)]
pub fn rxstarted(&self) -> RXSTARTED_R {
RXSTARTED_R::new(((self.bits >> 19) & 1) != 0)
}
#[doc = "Bit 20 - Write '1' to Disable interrupt for TXSTARTED event"]
#[inline(always)]
pub fn txstarted(&self) -> TXSTARTED_R {
TXSTARTED_R::new(((self.bits >> 20) & 1) != 0)
}
#[doc = "Bit 22 - Write '1' to Disable interrupt for TXSTOPPED event"]
#[inline(always)]
pub fn txstopped(&self) -> TXSTOPPED_R {
TXSTOPPED_R::new(((self.bits >> 22) & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Write '1' to Disable interrupt for CTS event"]
#[inline(always)]
pub fn cts(&mut self) -> CTS_W<0> {
CTS_W::new(self)
}
#[doc = "Bit 1 - Write '1' to Disable interrupt for NCTS event"]
#[inline(always)]
pub fn ncts(&mut self) -> NCTS_W<1> {
NCTS_W::new(self)
}
#[doc = "Bit 2 - Write '1' to Disable interrupt for RXDRDY event"]
#[inline(always)]
pub fn rxdrdy(&mut self) -> RXDRDY_W<2> {
RXDRDY_W::new(self)
}
#[doc = "Bit 4 - Write '1' to Disable interrupt for ENDRX event"]
#[inline(always)]
pub fn endrx(&mut self) -> ENDRX_W<4> {
ENDRX_W::new(self)
}
#[doc = "Bit 7 - Write '1' to Disable interrupt for TXDRDY event"]
#[inline(always)]
pub fn txdrdy(&mut self) -> TXDRDY_W<7> {
TXDRDY_W::new(self)
}
#[doc = "Bit 8 - Write '1' to Disable interrupt for ENDTX event"]
#[inline(always)]
pub fn endtx(&mut self) -> ENDTX_W<8> {
ENDTX_W::new(self)
}
#[doc = "Bit 9 - Write '1' to Disable interrupt for ERROR event"]
#[inline(always)]
pub fn error(&mut self) -> ERROR_W<9> {
ERROR_W::new(self)
}
#[doc = "Bit 17 - Write '1' to Disable interrupt for RXTO event"]
#[inline(always)]
pub fn rxto(&mut self) -> RXTO_W<17> {
RXTO_W::new(self)
}
#[doc = "Bit 19 - Write '1' to Disable interrupt for RXSTARTED event"]
#[inline(always)]
pub fn rxstarted(&mut self) -> RXSTARTED_W<19> {
RXSTARTED_W::new(self)
}
#[doc = "Bit 20 - Write '1' to Disable interrupt for TXSTARTED event"]
#[inline(always)]
pub fn txstarted(&mut self) -> TXSTARTED_W<20> {
TXSTARTED_W::new(self)
}
#[doc = "Bit 22 - Write '1' to Disable interrupt for TXSTOPPED event"]
#[inline(always)]
pub fn txstopped(&mut self) -> TXSTOPPED_W<22> {
TXSTOPPED_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Disable interrupt\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [intenclr](index.html) module"]
pub struct INTENCLR_SPEC;
impl crate::RegisterSpec for INTENCLR_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [intenclr::R](R) reader structure"]
impl crate::Readable for INTENCLR_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [intenclr::W](W) writer structure"]
impl crate::Writable for INTENCLR_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets INTENCLR to value 0"]
impl crate::Resettable for INTENCLR_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+803
View File
@@ -0,0 +1,803 @@
#[doc = "Register `INTENSET` reader"]
pub struct R(crate::R<INTENSET_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<INTENSET_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<INTENSET_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<INTENSET_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `INTENSET` writer"]
pub struct W(crate::W<INTENSET_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<INTENSET_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<INTENSET_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<INTENSET_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `CTS` reader - Write '1' to Enable interrupt for CTS event"]
pub type CTS_R = crate::BitReader<CTS_A>;
#[doc = "Write '1' to Enable interrupt for CTS event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CTS_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<CTS_A> for bool {
#[inline(always)]
fn from(variant: CTS_A) -> Self {
variant as u8 != 0
}
}
impl CTS_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> CTS_A {
match self.bits {
false => CTS_A::DISABLED,
true => CTS_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == CTS_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == CTS_A::ENABLED
}
}
#[doc = "Write '1' to Enable interrupt for CTS event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CTS_AW {
#[doc = "1: Enable"]
SET = 1,
}
impl From<CTS_AW> for bool {
#[inline(always)]
fn from(variant: CTS_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `CTS` writer - Write '1' to Enable interrupt for CTS event"]
pub type CTS_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, CTS_AW, O>;
impl<'a, const O: u8> CTS_W<'a, O> {
#[doc = "Enable"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(CTS_AW::SET)
}
}
#[doc = "Field `NCTS` reader - Write '1' to Enable interrupt for NCTS event"]
pub type NCTS_R = crate::BitReader<NCTS_A>;
#[doc = "Write '1' to Enable interrupt for NCTS event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum NCTS_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<NCTS_A> for bool {
#[inline(always)]
fn from(variant: NCTS_A) -> Self {
variant as u8 != 0
}
}
impl NCTS_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> NCTS_A {
match self.bits {
false => NCTS_A::DISABLED,
true => NCTS_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == NCTS_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == NCTS_A::ENABLED
}
}
#[doc = "Write '1' to Enable interrupt for NCTS event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum NCTS_AW {
#[doc = "1: Enable"]
SET = 1,
}
impl From<NCTS_AW> for bool {
#[inline(always)]
fn from(variant: NCTS_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `NCTS` writer - Write '1' to Enable interrupt for NCTS event"]
pub type NCTS_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, NCTS_AW, O>;
impl<'a, const O: u8> NCTS_W<'a, O> {
#[doc = "Enable"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(NCTS_AW::SET)
}
}
#[doc = "Field `RXDRDY` reader - Write '1' to Enable interrupt for RXDRDY event"]
pub type RXDRDY_R = crate::BitReader<RXDRDY_A>;
#[doc = "Write '1' to Enable interrupt for RXDRDY event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RXDRDY_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<RXDRDY_A> for bool {
#[inline(always)]
fn from(variant: RXDRDY_A) -> Self {
variant as u8 != 0
}
}
impl RXDRDY_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RXDRDY_A {
match self.bits {
false => RXDRDY_A::DISABLED,
true => RXDRDY_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == RXDRDY_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == RXDRDY_A::ENABLED
}
}
#[doc = "Write '1' to Enable interrupt for RXDRDY event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RXDRDY_AW {
#[doc = "1: Enable"]
SET = 1,
}
impl From<RXDRDY_AW> for bool {
#[inline(always)]
fn from(variant: RXDRDY_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `RXDRDY` writer - Write '1' to Enable interrupt for RXDRDY event"]
pub type RXDRDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, RXDRDY_AW, O>;
impl<'a, const O: u8> RXDRDY_W<'a, O> {
#[doc = "Enable"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(RXDRDY_AW::SET)
}
}
#[doc = "Field `ENDRX` reader - Write '1' to Enable interrupt for ENDRX event"]
pub type ENDRX_R = crate::BitReader<ENDRX_A>;
#[doc = "Write '1' to Enable interrupt for ENDRX event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ENDRX_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<ENDRX_A> for bool {
#[inline(always)]
fn from(variant: ENDRX_A) -> Self {
variant as u8 != 0
}
}
impl ENDRX_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ENDRX_A {
match self.bits {
false => ENDRX_A::DISABLED,
true => ENDRX_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ENDRX_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ENDRX_A::ENABLED
}
}
#[doc = "Write '1' to Enable interrupt for ENDRX event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ENDRX_AW {
#[doc = "1: Enable"]
SET = 1,
}
impl From<ENDRX_AW> for bool {
#[inline(always)]
fn from(variant: ENDRX_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `ENDRX` writer - Write '1' to Enable interrupt for ENDRX event"]
pub type ENDRX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, ENDRX_AW, O>;
impl<'a, const O: u8> ENDRX_W<'a, O> {
#[doc = "Enable"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(ENDRX_AW::SET)
}
}
#[doc = "Field `TXDRDY` reader - Write '1' to Enable interrupt for TXDRDY event"]
pub type TXDRDY_R = crate::BitReader<TXDRDY_A>;
#[doc = "Write '1' to Enable interrupt for TXDRDY event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TXDRDY_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<TXDRDY_A> for bool {
#[inline(always)]
fn from(variant: TXDRDY_A) -> Self {
variant as u8 != 0
}
}
impl TXDRDY_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> TXDRDY_A {
match self.bits {
false => TXDRDY_A::DISABLED,
true => TXDRDY_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == TXDRDY_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == TXDRDY_A::ENABLED
}
}
#[doc = "Write '1' to Enable interrupt for TXDRDY event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TXDRDY_AW {
#[doc = "1: Enable"]
SET = 1,
}
impl From<TXDRDY_AW> for bool {
#[inline(always)]
fn from(variant: TXDRDY_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `TXDRDY` writer - Write '1' to Enable interrupt for TXDRDY event"]
pub type TXDRDY_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, TXDRDY_AW, O>;
impl<'a, const O: u8> TXDRDY_W<'a, O> {
#[doc = "Enable"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(TXDRDY_AW::SET)
}
}
#[doc = "Field `ENDTX` reader - Write '1' to Enable interrupt for ENDTX event"]
pub type ENDTX_R = crate::BitReader<ENDTX_A>;
#[doc = "Write '1' to Enable interrupt for ENDTX event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ENDTX_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<ENDTX_A> for bool {
#[inline(always)]
fn from(variant: ENDTX_A) -> Self {
variant as u8 != 0
}
}
impl ENDTX_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ENDTX_A {
match self.bits {
false => ENDTX_A::DISABLED,
true => ENDTX_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ENDTX_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ENDTX_A::ENABLED
}
}
#[doc = "Write '1' to Enable interrupt for ENDTX event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ENDTX_AW {
#[doc = "1: Enable"]
SET = 1,
}
impl From<ENDTX_AW> for bool {
#[inline(always)]
fn from(variant: ENDTX_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `ENDTX` writer - Write '1' to Enable interrupt for ENDTX event"]
pub type ENDTX_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, ENDTX_AW, O>;
impl<'a, const O: u8> ENDTX_W<'a, O> {
#[doc = "Enable"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(ENDTX_AW::SET)
}
}
#[doc = "Field `ERROR` reader - Write '1' to Enable interrupt for ERROR event"]
pub type ERROR_R = crate::BitReader<ERROR_A>;
#[doc = "Write '1' to Enable interrupt for ERROR event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ERROR_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<ERROR_A> for bool {
#[inline(always)]
fn from(variant: ERROR_A) -> Self {
variant as u8 != 0
}
}
impl ERROR_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ERROR_A {
match self.bits {
false => ERROR_A::DISABLED,
true => ERROR_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ERROR_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ERROR_A::ENABLED
}
}
#[doc = "Write '1' to Enable interrupt for ERROR event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ERROR_AW {
#[doc = "1: Enable"]
SET = 1,
}
impl From<ERROR_AW> for bool {
#[inline(always)]
fn from(variant: ERROR_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `ERROR` writer - Write '1' to Enable interrupt for ERROR event"]
pub type ERROR_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, ERROR_AW, O>;
impl<'a, const O: u8> ERROR_W<'a, O> {
#[doc = "Enable"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(ERROR_AW::SET)
}
}
#[doc = "Field `RXTO` reader - Write '1' to Enable interrupt for RXTO event"]
pub type RXTO_R = crate::BitReader<RXTO_A>;
#[doc = "Write '1' to Enable interrupt for RXTO event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RXTO_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<RXTO_A> for bool {
#[inline(always)]
fn from(variant: RXTO_A) -> Self {
variant as u8 != 0
}
}
impl RXTO_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RXTO_A {
match self.bits {
false => RXTO_A::DISABLED,
true => RXTO_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == RXTO_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == RXTO_A::ENABLED
}
}
#[doc = "Write '1' to Enable interrupt for RXTO event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RXTO_AW {
#[doc = "1: Enable"]
SET = 1,
}
impl From<RXTO_AW> for bool {
#[inline(always)]
fn from(variant: RXTO_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `RXTO` writer - Write '1' to Enable interrupt for RXTO event"]
pub type RXTO_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, RXTO_AW, O>;
impl<'a, const O: u8> RXTO_W<'a, O> {
#[doc = "Enable"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(RXTO_AW::SET)
}
}
#[doc = "Field `RXSTARTED` reader - Write '1' to Enable interrupt for RXSTARTED event"]
pub type RXSTARTED_R = crate::BitReader<RXSTARTED_A>;
#[doc = "Write '1' to Enable interrupt for RXSTARTED event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RXSTARTED_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<RXSTARTED_A> for bool {
#[inline(always)]
fn from(variant: RXSTARTED_A) -> Self {
variant as u8 != 0
}
}
impl RXSTARTED_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RXSTARTED_A {
match self.bits {
false => RXSTARTED_A::DISABLED,
true => RXSTARTED_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == RXSTARTED_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == RXSTARTED_A::ENABLED
}
}
#[doc = "Write '1' to Enable interrupt for RXSTARTED event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RXSTARTED_AW {
#[doc = "1: Enable"]
SET = 1,
}
impl From<RXSTARTED_AW> for bool {
#[inline(always)]
fn from(variant: RXSTARTED_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `RXSTARTED` writer - Write '1' to Enable interrupt for RXSTARTED event"]
pub type RXSTARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, RXSTARTED_AW, O>;
impl<'a, const O: u8> RXSTARTED_W<'a, O> {
#[doc = "Enable"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(RXSTARTED_AW::SET)
}
}
#[doc = "Field `TXSTARTED` reader - Write '1' to Enable interrupt for TXSTARTED event"]
pub type TXSTARTED_R = crate::BitReader<TXSTARTED_A>;
#[doc = "Write '1' to Enable interrupt for TXSTARTED event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TXSTARTED_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<TXSTARTED_A> for bool {
#[inline(always)]
fn from(variant: TXSTARTED_A) -> Self {
variant as u8 != 0
}
}
impl TXSTARTED_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> TXSTARTED_A {
match self.bits {
false => TXSTARTED_A::DISABLED,
true => TXSTARTED_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == TXSTARTED_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == TXSTARTED_A::ENABLED
}
}
#[doc = "Write '1' to Enable interrupt for TXSTARTED event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TXSTARTED_AW {
#[doc = "1: Enable"]
SET = 1,
}
impl From<TXSTARTED_AW> for bool {
#[inline(always)]
fn from(variant: TXSTARTED_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `TXSTARTED` writer - Write '1' to Enable interrupt for TXSTARTED event"]
pub type TXSTARTED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, TXSTARTED_AW, O>;
impl<'a, const O: u8> TXSTARTED_W<'a, O> {
#[doc = "Enable"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(TXSTARTED_AW::SET)
}
}
#[doc = "Field `TXSTOPPED` reader - Write '1' to Enable interrupt for TXSTOPPED event"]
pub type TXSTOPPED_R = crate::BitReader<TXSTOPPED_A>;
#[doc = "Write '1' to Enable interrupt for TXSTOPPED event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TXSTOPPED_A {
#[doc = "0: Read: Disabled"]
DISABLED = 0,
#[doc = "1: Read: Enabled"]
ENABLED = 1,
}
impl From<TXSTOPPED_A> for bool {
#[inline(always)]
fn from(variant: TXSTOPPED_A) -> Self {
variant as u8 != 0
}
}
impl TXSTOPPED_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> TXSTOPPED_A {
match self.bits {
false => TXSTOPPED_A::DISABLED,
true => TXSTOPPED_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == TXSTOPPED_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == TXSTOPPED_A::ENABLED
}
}
#[doc = "Write '1' to Enable interrupt for TXSTOPPED event\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TXSTOPPED_AW {
#[doc = "1: Enable"]
SET = 1,
}
impl From<TXSTOPPED_AW> for bool {
#[inline(always)]
fn from(variant: TXSTOPPED_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `TXSTOPPED` writer - Write '1' to Enable interrupt for TXSTOPPED event"]
pub type TXSTOPPED_W<'a, const O: u8> = crate::BitWriter<'a, u32, INTENSET_SPEC, TXSTOPPED_AW, O>;
impl<'a, const O: u8> TXSTOPPED_W<'a, O> {
#[doc = "Enable"]
#[inline(always)]
pub fn set(self) -> &'a mut W {
self.variant(TXSTOPPED_AW::SET)
}
}
impl R {
#[doc = "Bit 0 - Write '1' to Enable interrupt for CTS event"]
#[inline(always)]
pub fn cts(&self) -> CTS_R {
CTS_R::new((self.bits & 1) != 0)
}
#[doc = "Bit 1 - Write '1' to Enable interrupt for NCTS event"]
#[inline(always)]
pub fn ncts(&self) -> NCTS_R {
NCTS_R::new(((self.bits >> 1) & 1) != 0)
}
#[doc = "Bit 2 - Write '1' to Enable interrupt for RXDRDY event"]
#[inline(always)]
pub fn rxdrdy(&self) -> RXDRDY_R {
RXDRDY_R::new(((self.bits >> 2) & 1) != 0)
}
#[doc = "Bit 4 - Write '1' to Enable interrupt for ENDRX event"]
#[inline(always)]
pub fn endrx(&self) -> ENDRX_R {
ENDRX_R::new(((self.bits >> 4) & 1) != 0)
}
#[doc = "Bit 7 - Write '1' to Enable interrupt for TXDRDY event"]
#[inline(always)]
pub fn txdrdy(&self) -> TXDRDY_R {
TXDRDY_R::new(((self.bits >> 7) & 1) != 0)
}
#[doc = "Bit 8 - Write '1' to Enable interrupt for ENDTX event"]
#[inline(always)]
pub fn endtx(&self) -> ENDTX_R {
ENDTX_R::new(((self.bits >> 8) & 1) != 0)
}
#[doc = "Bit 9 - Write '1' to Enable interrupt for ERROR event"]
#[inline(always)]
pub fn error(&self) -> ERROR_R {
ERROR_R::new(((self.bits >> 9) & 1) != 0)
}
#[doc = "Bit 17 - Write '1' to Enable interrupt for RXTO event"]
#[inline(always)]
pub fn rxto(&self) -> RXTO_R {
RXTO_R::new(((self.bits >> 17) & 1) != 0)
}
#[doc = "Bit 19 - Write '1' to Enable interrupt for RXSTARTED event"]
#[inline(always)]
pub fn rxstarted(&self) -> RXSTARTED_R {
RXSTARTED_R::new(((self.bits >> 19) & 1) != 0)
}
#[doc = "Bit 20 - Write '1' to Enable interrupt for TXSTARTED event"]
#[inline(always)]
pub fn txstarted(&self) -> TXSTARTED_R {
TXSTARTED_R::new(((self.bits >> 20) & 1) != 0)
}
#[doc = "Bit 22 - Write '1' to Enable interrupt for TXSTOPPED event"]
#[inline(always)]
pub fn txstopped(&self) -> TXSTOPPED_R {
TXSTOPPED_R::new(((self.bits >> 22) & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - Write '1' to Enable interrupt for CTS event"]
#[inline(always)]
pub fn cts(&mut self) -> CTS_W<0> {
CTS_W::new(self)
}
#[doc = "Bit 1 - Write '1' to Enable interrupt for NCTS event"]
#[inline(always)]
pub fn ncts(&mut self) -> NCTS_W<1> {
NCTS_W::new(self)
}
#[doc = "Bit 2 - Write '1' to Enable interrupt for RXDRDY event"]
#[inline(always)]
pub fn rxdrdy(&mut self) -> RXDRDY_W<2> {
RXDRDY_W::new(self)
}
#[doc = "Bit 4 - Write '1' to Enable interrupt for ENDRX event"]
#[inline(always)]
pub fn endrx(&mut self) -> ENDRX_W<4> {
ENDRX_W::new(self)
}
#[doc = "Bit 7 - Write '1' to Enable interrupt for TXDRDY event"]
#[inline(always)]
pub fn txdrdy(&mut self) -> TXDRDY_W<7> {
TXDRDY_W::new(self)
}
#[doc = "Bit 8 - Write '1' to Enable interrupt for ENDTX event"]
#[inline(always)]
pub fn endtx(&mut self) -> ENDTX_W<8> {
ENDTX_W::new(self)
}
#[doc = "Bit 9 - Write '1' to Enable interrupt for ERROR event"]
#[inline(always)]
pub fn error(&mut self) -> ERROR_W<9> {
ERROR_W::new(self)
}
#[doc = "Bit 17 - Write '1' to Enable interrupt for RXTO event"]
#[inline(always)]
pub fn rxto(&mut self) -> RXTO_W<17> {
RXTO_W::new(self)
}
#[doc = "Bit 19 - Write '1' to Enable interrupt for RXSTARTED event"]
#[inline(always)]
pub fn rxstarted(&mut self) -> RXSTARTED_W<19> {
RXSTARTED_W::new(self)
}
#[doc = "Bit 20 - Write '1' to Enable interrupt for TXSTARTED event"]
#[inline(always)]
pub fn txstarted(&mut self) -> TXSTARTED_W<20> {
TXSTARTED_W::new(self)
}
#[doc = "Bit 22 - Write '1' to Enable interrupt for TXSTOPPED event"]
#[inline(always)]
pub fn txstopped(&mut self) -> TXSTOPPED_W<22> {
TXSTOPPED_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Enable interrupt\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [intenset](index.html) module"]
pub struct INTENSET_SPEC;
impl crate::RegisterSpec for INTENSET_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [intenset::R](R) reader structure"]
impl crate::Readable for INTENSET_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [intenset::W](W) writer structure"]
impl crate::Writable for INTENSET_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets INTENSET to value 0"]
impl crate::Resettable for INTENSET_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+28
View File
@@ -0,0 +1,28 @@
#[doc = r"Register block"]
#[repr(C)]
pub struct PSEL {
#[doc = "0x00 - Pin select for RTS signal"]
pub rts: RTS,
#[doc = "0x04 - Pin select for TXD signal"]
pub txd: TXD,
#[doc = "0x08 - Pin select for CTS signal"]
pub cts: CTS,
#[doc = "0x0c - Pin select for RXD signal"]
pub rxd: RXD,
}
#[doc = "RTS (rw) register accessor: an alias for `Reg<RTS_SPEC>`"]
pub type RTS = crate::Reg<rts::RTS_SPEC>;
#[doc = "Pin select for RTS signal"]
pub mod rts;
#[doc = "TXD (rw) register accessor: an alias for `Reg<TXD_SPEC>`"]
pub type TXD = crate::Reg<txd::TXD_SPEC>;
#[doc = "Pin select for TXD signal"]
pub mod txd;
#[doc = "CTS (rw) register accessor: an alias for `Reg<CTS_SPEC>`"]
pub type CTS = crate::Reg<cts::CTS_SPEC>;
#[doc = "Pin select for CTS signal"]
pub mod cts;
#[doc = "RXD (rw) register accessor: an alias for `Reg<RXD_SPEC>`"]
pub type RXD = crate::Reg<rxd::RXD_SPEC>;
#[doc = "Pin select for RXD signal"]
pub mod rxd;
+140
View File
@@ -0,0 +1,140 @@
#[doc = "Register `CTS` reader"]
pub struct R(crate::R<CTS_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CTS_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CTS_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CTS_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `CTS` writer"]
pub struct W(crate::W<CTS_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<CTS_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<CTS_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<CTS_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, CTS_SPEC, u8, u8, 5, 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, CTS_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 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 31 - Connection"]
#[inline(always)]
pub fn connect(&mut self) -> CONNECT_W<31> {
CONNECT_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Pin select for CTS signal\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [cts](index.html) module"]
pub struct CTS_SPEC;
impl crate::RegisterSpec for CTS_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [cts::R](R) reader structure"]
impl crate::Readable for CTS_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [cts::W](W) writer structure"]
impl crate::Writable for CTS_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets CTS to value 0xffff_ffff"]
impl crate::Resettable for CTS_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0xffff_ffff
}
}
+140
View File
@@ -0,0 +1,140 @@
#[doc = "Register `RTS` reader"]
pub struct R(crate::R<RTS_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<RTS_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<RTS_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<RTS_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `RTS` writer"]
pub struct W(crate::W<RTS_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<RTS_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<RTS_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<RTS_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, RTS_SPEC, u8, u8, 5, 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, RTS_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 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 31 - Connection"]
#[inline(always)]
pub fn connect(&mut self) -> CONNECT_W<31> {
CONNECT_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Pin select for RTS signal\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [rts](index.html) module"]
pub struct RTS_SPEC;
impl crate::RegisterSpec for RTS_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [rts::R](R) reader structure"]
impl crate::Readable for RTS_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [rts::W](W) writer structure"]
impl crate::Writable for RTS_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets RTS to value 0xffff_ffff"]
impl crate::Resettable for RTS_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0xffff_ffff
}
}
+140
View File
@@ -0,0 +1,140 @@
#[doc = "Register `RXD` reader"]
pub struct R(crate::R<RXD_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<RXD_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<RXD_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<RXD_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `RXD` writer"]
pub struct W(crate::W<RXD_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<RXD_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<RXD_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<RXD_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, RXD_SPEC, u8, u8, 5, 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, RXD_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 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 31 - Connection"]
#[inline(always)]
pub fn connect(&mut self) -> CONNECT_W<31> {
CONNECT_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Pin select for RXD signal\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [rxd](index.html) module"]
pub struct RXD_SPEC;
impl crate::RegisterSpec for RXD_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [rxd::R](R) reader structure"]
impl crate::Readable for RXD_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [rxd::W](W) writer structure"]
impl crate::Writable for RXD_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets RXD to value 0xffff_ffff"]
impl crate::Resettable for RXD_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0xffff_ffff
}
}
+140
View File
@@ -0,0 +1,140 @@
#[doc = "Register `TXD` reader"]
pub struct R(crate::R<TXD_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<TXD_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<TXD_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<TXD_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `TXD` writer"]
pub struct W(crate::W<TXD_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<TXD_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<TXD_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<TXD_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, TXD_SPEC, u8, u8, 5, 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, TXD_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 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 31 - Connection"]
#[inline(always)]
pub fn connect(&mut self) -> CONNECT_W<31> {
CONNECT_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Pin select for TXD signal\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [txd](index.html) module"]
pub struct TXD_SPEC;
impl crate::RegisterSpec for TXD_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [txd::R](R) reader structure"]
impl crate::Readable for TXD_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [txd::W](W) writer structure"]
impl crate::Writable for TXD_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets TXD to value 0xffff_ffff"]
impl crate::Resettable for TXD_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0xffff_ffff
}
}
+22
View File
@@ -0,0 +1,22 @@
#[doc = r"Register block"]
#[repr(C)]
pub struct RXD {
#[doc = "0x00 - Data pointer"]
pub ptr: PTR,
#[doc = "0x04 - Maximum number of bytes in receive buffer"]
pub maxcnt: MAXCNT,
#[doc = "0x08 - Number of bytes 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 bytes in receive buffer"]
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 bytes 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 bytes transferred in the last transaction"]
pub type AMOUNT_R = crate::FieldReader<u8, u8>;
impl R {
#[doc = "Bits 0:7 - Number of bytes transferred in the last transaction"]
#[inline(always)]
pub fn amount(&self) -> AMOUNT_R {
AMOUNT_R::new((self.bits & 0xff) as u8)
}
}
#[doc = "Number of bytes 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 bytes in receive buffer"]
pub type MAXCNT_R = crate::FieldReader<u8, u8>;
#[doc = "Field `MAXCNT` writer - Maximum number of bytes in receive buffer"]
pub type MAXCNT_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MAXCNT_SPEC, u8, u8, 8, O>;
impl R {
#[doc = "Bits 0:7 - Maximum number of bytes in receive buffer"]
#[inline(always)]
pub fn maxcnt(&self) -> MAXCNT_R {
MAXCNT_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 0:7 - Maximum number of bytes in receive buffer"]
#[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 bytes in receive buffer\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [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 0"]
impl crate::Resettable for MAXCNT_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+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 0"]
impl crate::Resettable for PTR_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+188
View File
@@ -0,0 +1,188 @@
#[doc = "Register `SHORTS` reader"]
pub struct R(crate::R<SHORTS_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<SHORTS_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<SHORTS_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<SHORTS_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `SHORTS` writer"]
pub struct W(crate::W<SHORTS_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<SHORTS_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<SHORTS_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<SHORTS_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `ENDRX_STARTRX` reader - Shortcut between ENDRX event and STARTRX task"]
pub type ENDRX_STARTRX_R = crate::BitReader<ENDRX_STARTRX_A>;
#[doc = "Shortcut between ENDRX event and STARTRX task\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ENDRX_STARTRX_A {
#[doc = "0: Disable shortcut"]
DISABLED = 0,
#[doc = "1: Enable shortcut"]
ENABLED = 1,
}
impl From<ENDRX_STARTRX_A> for bool {
#[inline(always)]
fn from(variant: ENDRX_STARTRX_A) -> Self {
variant as u8 != 0
}
}
impl ENDRX_STARTRX_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ENDRX_STARTRX_A {
match self.bits {
false => ENDRX_STARTRX_A::DISABLED,
true => ENDRX_STARTRX_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ENDRX_STARTRX_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ENDRX_STARTRX_A::ENABLED
}
}
#[doc = "Field `ENDRX_STARTRX` writer - Shortcut between ENDRX event and STARTRX task"]
pub type ENDRX_STARTRX_W<'a, const O: u8> =
crate::BitWriter<'a, u32, SHORTS_SPEC, ENDRX_STARTRX_A, O>;
impl<'a, const O: u8> ENDRX_STARTRX_W<'a, O> {
#[doc = "Disable shortcut"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ENDRX_STARTRX_A::DISABLED)
}
#[doc = "Enable shortcut"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ENDRX_STARTRX_A::ENABLED)
}
}
#[doc = "Field `ENDRX_STOPRX` reader - Shortcut between ENDRX event and STOPRX task"]
pub type ENDRX_STOPRX_R = crate::BitReader<ENDRX_STOPRX_A>;
#[doc = "Shortcut between ENDRX event and STOPRX task\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ENDRX_STOPRX_A {
#[doc = "0: Disable shortcut"]
DISABLED = 0,
#[doc = "1: Enable shortcut"]
ENABLED = 1,
}
impl From<ENDRX_STOPRX_A> for bool {
#[inline(always)]
fn from(variant: ENDRX_STOPRX_A) -> Self {
variant as u8 != 0
}
}
impl ENDRX_STOPRX_R {
#[doc = "Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> ENDRX_STOPRX_A {
match self.bits {
false => ENDRX_STOPRX_A::DISABLED,
true => ENDRX_STOPRX_A::ENABLED,
}
}
#[doc = "Checks if the value of the field is `DISABLED`"]
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ENDRX_STOPRX_A::DISABLED
}
#[doc = "Checks if the value of the field is `ENABLED`"]
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ENDRX_STOPRX_A::ENABLED
}
}
#[doc = "Field `ENDRX_STOPRX` writer - Shortcut between ENDRX event and STOPRX task"]
pub type ENDRX_STOPRX_W<'a, const O: u8> =
crate::BitWriter<'a, u32, SHORTS_SPEC, ENDRX_STOPRX_A, O>;
impl<'a, const O: u8> ENDRX_STOPRX_W<'a, O> {
#[doc = "Disable shortcut"]
#[inline(always)]
pub fn disabled(self) -> &'a mut W {
self.variant(ENDRX_STOPRX_A::DISABLED)
}
#[doc = "Enable shortcut"]
#[inline(always)]
pub fn enabled(self) -> &'a mut W {
self.variant(ENDRX_STOPRX_A::ENABLED)
}
}
impl R {
#[doc = "Bit 5 - Shortcut between ENDRX event and STARTRX task"]
#[inline(always)]
pub fn endrx_startrx(&self) -> ENDRX_STARTRX_R {
ENDRX_STARTRX_R::new(((self.bits >> 5) & 1) != 0)
}
#[doc = "Bit 6 - Shortcut between ENDRX event and STOPRX task"]
#[inline(always)]
pub fn endrx_stoprx(&self) -> ENDRX_STOPRX_R {
ENDRX_STOPRX_R::new(((self.bits >> 6) & 1) != 0)
}
}
impl W {
#[doc = "Bit 5 - Shortcut between ENDRX event and STARTRX task"]
#[inline(always)]
pub fn endrx_startrx(&mut self) -> ENDRX_STARTRX_W<5> {
ENDRX_STARTRX_W::new(self)
}
#[doc = "Bit 6 - Shortcut between ENDRX event and STOPRX task"]
#[inline(always)]
pub fn endrx_stoprx(&mut self) -> ENDRX_STOPRX_W<6> {
ENDRX_STOPRX_W::new(self)
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Shortcut register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [shorts](index.html) module"]
pub struct SHORTS_SPEC;
impl crate::RegisterSpec for SHORTS_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [shorts::R](R) reader structure"]
impl crate::Readable for SHORTS_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [shorts::W](W) writer structure"]
impl crate::Writable for SHORTS_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets SHORTS to value 0"]
impl crate::Resettable for SHORTS_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+45
View File
@@ -0,0 +1,45 @@
#[doc = "Register `TASKS_FLUSHRX` writer"]
pub struct W(crate::W<TASKS_FLUSHRX_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<TASKS_FLUSHRX_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<TASKS_FLUSHRX_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<TASKS_FLUSHRX_SPEC>) -> Self {
W(writer)
}
}
impl W {
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Flush RX FIFO into RX buffer\n\nThis register you can [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [tasks_flushrx](index.html) module"]
pub struct TASKS_FLUSHRX_SPEC;
impl crate::RegisterSpec for TASKS_FLUSHRX_SPEC {
type Ux = u32;
}
#[doc = "`write(|w| ..)` method takes [tasks_flushrx::W](W) writer structure"]
impl crate::Writable for TASKS_FLUSHRX_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets TASKS_FLUSHRX to value 0"]
impl crate::Resettable for TASKS_FLUSHRX_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+45
View File
@@ -0,0 +1,45 @@
#[doc = "Register `TASKS_STARTRX` writer"]
pub struct W(crate::W<TASKS_STARTRX_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<TASKS_STARTRX_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<TASKS_STARTRX_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<TASKS_STARTRX_SPEC>) -> Self {
W(writer)
}
}
impl W {
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Start UART receiver\n\nThis register you can [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [tasks_startrx](index.html) module"]
pub struct TASKS_STARTRX_SPEC;
impl crate::RegisterSpec for TASKS_STARTRX_SPEC {
type Ux = u32;
}
#[doc = "`write(|w| ..)` method takes [tasks_startrx::W](W) writer structure"]
impl crate::Writable for TASKS_STARTRX_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets TASKS_STARTRX to value 0"]
impl crate::Resettable for TASKS_STARTRX_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+45
View File
@@ -0,0 +1,45 @@
#[doc = "Register `TASKS_STARTTX` writer"]
pub struct W(crate::W<TASKS_STARTTX_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<TASKS_STARTTX_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<TASKS_STARTTX_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<TASKS_STARTTX_SPEC>) -> Self {
W(writer)
}
}
impl W {
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Start UART transmitter\n\nThis register you can [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [tasks_starttx](index.html) module"]
pub struct TASKS_STARTTX_SPEC;
impl crate::RegisterSpec for TASKS_STARTTX_SPEC {
type Ux = u32;
}
#[doc = "`write(|w| ..)` method takes [tasks_starttx::W](W) writer structure"]
impl crate::Writable for TASKS_STARTTX_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets TASKS_STARTTX to value 0"]
impl crate::Resettable for TASKS_STARTTX_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+45
View File
@@ -0,0 +1,45 @@
#[doc = "Register `TASKS_STOPRX` writer"]
pub struct W(crate::W<TASKS_STOPRX_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<TASKS_STOPRX_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<TASKS_STOPRX_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<TASKS_STOPRX_SPEC>) -> Self {
W(writer)
}
}
impl W {
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Stop UART receiver\n\nThis register you can [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [tasks_stoprx](index.html) module"]
pub struct TASKS_STOPRX_SPEC;
impl crate::RegisterSpec for TASKS_STOPRX_SPEC {
type Ux = u32;
}
#[doc = "`write(|w| ..)` method takes [tasks_stoprx::W](W) writer structure"]
impl crate::Writable for TASKS_STOPRX_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets TASKS_STOPRX to value 0"]
impl crate::Resettable for TASKS_STOPRX_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+45
View File
@@ -0,0 +1,45 @@
#[doc = "Register `TASKS_STOPTX` writer"]
pub struct W(crate::W<TASKS_STOPTX_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<TASKS_STOPTX_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<TASKS_STOPTX_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<TASKS_STOPTX_SPEC>) -> Self {
W(writer)
}
}
impl W {
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "Stop UART transmitter\n\nThis register you can [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [tasks_stoptx](index.html) module"]
pub struct TASKS_STOPTX_SPEC;
impl crate::RegisterSpec for TASKS_STOPTX_SPEC {
type Ux = u32;
}
#[doc = "`write(|w| ..)` method takes [tasks_stoptx::W](W) writer structure"]
impl crate::Writable for TASKS_STOPTX_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets TASKS_STOPTX to value 0"]
impl crate::Resettable for TASKS_STOPTX_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+22
View File
@@ -0,0 +1,22 @@
#[doc = r"Register block"]
#[repr(C)]
pub struct TXD {
#[doc = "0x00 - Data pointer"]
pub ptr: PTR,
#[doc = "0x04 - Maximum number of bytes in transmit buffer"]
pub maxcnt: MAXCNT,
#[doc = "0x08 - Number of bytes 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 bytes in transmit buffer"]
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 bytes 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 bytes transferred in the last transaction"]
pub type AMOUNT_R = crate::FieldReader<u8, u8>;
impl R {
#[doc = "Bits 0:7 - Number of bytes transferred in the last transaction"]
#[inline(always)]
pub fn amount(&self) -> AMOUNT_R {
AMOUNT_R::new((self.bits & 0xff) as u8)
}
}
#[doc = "Number of bytes 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 bytes in transmit buffer"]
pub type MAXCNT_R = crate::FieldReader<u8, u8>;
#[doc = "Field `MAXCNT` writer - Maximum number of bytes in transmit buffer"]
pub type MAXCNT_W<'a, const O: u8> = crate::FieldWriter<'a, u32, MAXCNT_SPEC, u8, u8, 8, O>;
impl R {
#[doc = "Bits 0:7 - Maximum number of bytes in transmit buffer"]
#[inline(always)]
pub fn maxcnt(&self) -> MAXCNT_R {
MAXCNT_R::new((self.bits & 0xff) as u8)
}
}
impl W {
#[doc = "Bits 0:7 - Maximum number of bytes in transmit buffer"]
#[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 bytes in transmit buffer\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [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 0"]
impl crate::Resettable for MAXCNT_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}
+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 0"]
impl crate::Resettable for PTR_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}