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:
17624 files changed
+4564928
-38
No files matched your search
+337
@@ -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 = "3866624: 14400 baud (actual rate: 14414)"]
|
||||
BAUD14400 = 3866624,
|
||||
#[doc = "5152768: 19200 baud (actual rate: 19208)"]
|
||||
BAUD19200 = 5152768,
|
||||
#[doc = "7729152: 28800 baud (actual rate: 28829)"]
|
||||
BAUD28800 = 7729152,
|
||||
#[doc = "8388608: 31250 baud"]
|
||||
BAUD31250 = 8388608,
|
||||
#[doc = "10309632: 38400 baud (actual rate: 38462)"]
|
||||
BAUD38400 = 10309632,
|
||||
#[doc = "15007744: 56000 baud (actual rate: 55944)"]
|
||||
BAUD56000 = 15007744,
|
||||
#[doc = "15462400: 57600 baud (actual rate: 57762)"]
|
||||
BAUD57600 = 15462400,
|
||||
#[doc = "20615168: 76800 baud (actual rate: 76923)"]
|
||||
BAUD76800 = 20615168,
|
||||
#[doc = "30924800: 115200 baud (actual rate: 115942)"]
|
||||
BAUD115200 = 30924800,
|
||||
#[doc = "61845504: 230400 baud (actual rate: 231884)"]
|
||||
BAUD230400 = 61845504,
|
||||
#[doc = "67108864: 250000 baud"]
|
||||
BAUD250000 = 67108864,
|
||||
#[doc = "123695104: 460800 baud (actual rate: 470588)"]
|
||||
BAUD460800 = 123695104,
|
||||
#[doc = "247386112: 921600 baud (actual rate: 941176)"]
|
||||
BAUD921600 = 247386112,
|
||||
#[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),
|
||||
3866624 => Some(BAUDRATE_A::BAUD14400),
|
||||
5152768 => Some(BAUDRATE_A::BAUD19200),
|
||||
7729152 => Some(BAUDRATE_A::BAUD28800),
|
||||
8388608 => Some(BAUDRATE_A::BAUD31250),
|
||||
10309632 => Some(BAUDRATE_A::BAUD38400),
|
||||
15007744 => Some(BAUDRATE_A::BAUD56000),
|
||||
15462400 => Some(BAUDRATE_A::BAUD57600),
|
||||
20615168 => Some(BAUDRATE_A::BAUD76800),
|
||||
30924800 => Some(BAUDRATE_A::BAUD115200),
|
||||
61845504 => Some(BAUDRATE_A::BAUD230400),
|
||||
67108864 => Some(BAUDRATE_A::BAUD250000),
|
||||
123695104 => Some(BAUDRATE_A::BAUD460800),
|
||||
247386112 => 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: 14414)"]
|
||||
#[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: 28829)"]
|
||||
#[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: 38462)"]
|
||||
#[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: 57762)"]
|
||||
#[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: 115942)"]
|
||||
#[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: 470588)"]
|
||||
#[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
|
||||
}
|
||||
}
|
||||
+248
@@ -0,0 +1,248 @@
|
||||
#[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)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `STOP` reader - Stop bits"]
|
||||
pub type STOP_R = crate::BitReader<STOP_A>;
|
||||
#[doc = "Stop bits\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum STOP_A {
|
||||
#[doc = "0: One stop bit"]
|
||||
ONE = 0,
|
||||
#[doc = "1: Two stop bits"]
|
||||
TWO = 1,
|
||||
}
|
||||
impl From<STOP_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: STOP_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl STOP_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> STOP_A {
|
||||
match self.bits {
|
||||
false => STOP_A::ONE,
|
||||
true => STOP_A::TWO,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ONE`"]
|
||||
#[inline(always)]
|
||||
pub fn is_one(&self) -> bool {
|
||||
*self == STOP_A::ONE
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `TWO`"]
|
||||
#[inline(always)]
|
||||
pub fn is_two(&self) -> bool {
|
||||
*self == STOP_A::TWO
|
||||
}
|
||||
}
|
||||
#[doc = "Field `STOP` writer - Stop bits"]
|
||||
pub type STOP_W<'a, const O: u8> = crate::BitWriter<'a, u32, CONFIG_SPEC, STOP_A, O>;
|
||||
impl<'a, const O: u8> STOP_W<'a, O> {
|
||||
#[doc = "One stop bit"]
|
||||
#[inline(always)]
|
||||
pub fn one(self) -> &'a mut W {
|
||||
self.variant(STOP_A::ONE)
|
||||
}
|
||||
#[doc = "Two stop bits"]
|
||||
#[inline(always)]
|
||||
pub fn two(self) -> &'a mut W {
|
||||
self.variant(STOP_A::TWO)
|
||||
}
|
||||
}
|
||||
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)
|
||||
}
|
||||
#[doc = "Bit 4 - Stop bits"]
|
||||
#[inline(always)]
|
||||
pub fn stop(&self) -> STOP_R {
|
||||
STOP_R::new(((self.bits >> 4) & 1) != 0)
|
||||
}
|
||||
}
|
||||
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 = "Bit 4 - Stop bits"]
|
||||
#[inline(always)]
|
||||
pub fn stop(&mut self) -> STOP_W<4> {
|
||||
STOP_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
@@ -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 UART"]
|
||||
pub type ENABLE_R = crate::FieldReader<u8, ENABLE_A>;
|
||||
#[doc = "Enable or disable UART\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
#[repr(u8)]
|
||||
pub enum ENABLE_A {
|
||||
#[doc = "0: Disable UART"]
|
||||
DISABLED = 0,
|
||||
#[doc = "4: Enable UART"]
|
||||
ENABLED = 4,
|
||||
}
|
||||
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),
|
||||
4 => 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 UART"]
|
||||
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 UART"]
|
||||
#[inline(always)]
|
||||
pub fn disabled(self) -> &'a mut W {
|
||||
self.variant(ENABLE_A::DISABLED)
|
||||
}
|
||||
#[doc = "Enable UART"]
|
||||
#[inline(always)]
|
||||
pub fn enabled(self) -> &'a mut W {
|
||||
self.variant(ENABLE_A::ENABLED)
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:3 - Enable or disable UART"]
|
||||
#[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 UART"]
|
||||
#[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
@@ -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
|
||||
}
|
||||
}
|
||||
+127
@@ -0,0 +1,127 @@
|
||||
#[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)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `EVENTS_CTS` reader - CTS is activated (set low). Clear To Send."]
|
||||
pub type EVENTS_CTS_R = crate::BitReader<EVENTS_CTS_A>;
|
||||
#[doc = "CTS is activated (set low). Clear To Send.\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum EVENTS_CTS_A {
|
||||
#[doc = "0: Event not generated"]
|
||||
NOT_GENERATED = 0,
|
||||
#[doc = "1: Event generated"]
|
||||
GENERATED = 1,
|
||||
}
|
||||
impl From<EVENTS_CTS_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: EVENTS_CTS_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl EVENTS_CTS_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> EVENTS_CTS_A {
|
||||
match self.bits {
|
||||
false => EVENTS_CTS_A::NOT_GENERATED,
|
||||
true => EVENTS_CTS_A::GENERATED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `NOT_GENERATED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_not_generated(&self) -> bool {
|
||||
*self == EVENTS_CTS_A::NOT_GENERATED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `GENERATED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_generated(&self) -> bool {
|
||||
*self == EVENTS_CTS_A::GENERATED
|
||||
}
|
||||
}
|
||||
#[doc = "Field `EVENTS_CTS` writer - CTS is activated (set low). Clear To Send."]
|
||||
pub type EVENTS_CTS_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, EVENTS_CTS_SPEC, EVENTS_CTS_A, O>;
|
||||
impl<'a, const O: u8> EVENTS_CTS_W<'a, O> {
|
||||
#[doc = "Event not generated"]
|
||||
#[inline(always)]
|
||||
pub fn not_generated(self) -> &'a mut W {
|
||||
self.variant(EVENTS_CTS_A::NOT_GENERATED)
|
||||
}
|
||||
#[doc = "Event generated"]
|
||||
#[inline(always)]
|
||||
pub fn generated(self) -> &'a mut W {
|
||||
self.variant(EVENTS_CTS_A::GENERATED)
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - CTS is activated (set low). Clear To Send."]
|
||||
#[inline(always)]
|
||||
pub fn events_cts(&self) -> EVENTS_CTS_R {
|
||||
EVENTS_CTS_R::new((self.bits & 1) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - CTS is activated (set low). Clear To Send."]
|
||||
#[inline(always)]
|
||||
pub fn events_cts(&mut self) -> EVENTS_CTS_W<0> {
|
||||
EVENTS_CTS_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 = "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
|
||||
}
|
||||
}
|
||||
+127
@@ -0,0 +1,127 @@
|
||||
#[doc = "Register `EVENTS_ERROR` reader"]
|
||||
pub struct R(crate::R<EVENTS_ERROR_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<EVENTS_ERROR_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<EVENTS_ERROR_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<EVENTS_ERROR_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `EVENTS_ERROR` writer"]
|
||||
pub struct W(crate::W<EVENTS_ERROR_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<EVENTS_ERROR_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<EVENTS_ERROR_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<EVENTS_ERROR_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `EVENTS_ERROR` reader - Error detected"]
|
||||
pub type EVENTS_ERROR_R = crate::BitReader<EVENTS_ERROR_A>;
|
||||
#[doc = "Error detected\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum EVENTS_ERROR_A {
|
||||
#[doc = "0: Event not generated"]
|
||||
NOT_GENERATED = 0,
|
||||
#[doc = "1: Event generated"]
|
||||
GENERATED = 1,
|
||||
}
|
||||
impl From<EVENTS_ERROR_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: EVENTS_ERROR_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl EVENTS_ERROR_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> EVENTS_ERROR_A {
|
||||
match self.bits {
|
||||
false => EVENTS_ERROR_A::NOT_GENERATED,
|
||||
true => EVENTS_ERROR_A::GENERATED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `NOT_GENERATED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_not_generated(&self) -> bool {
|
||||
*self == EVENTS_ERROR_A::NOT_GENERATED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `GENERATED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_generated(&self) -> bool {
|
||||
*self == EVENTS_ERROR_A::GENERATED
|
||||
}
|
||||
}
|
||||
#[doc = "Field `EVENTS_ERROR` writer - Error detected"]
|
||||
pub type EVENTS_ERROR_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, EVENTS_ERROR_SPEC, EVENTS_ERROR_A, O>;
|
||||
impl<'a, const O: u8> EVENTS_ERROR_W<'a, O> {
|
||||
#[doc = "Event not generated"]
|
||||
#[inline(always)]
|
||||
pub fn not_generated(self) -> &'a mut W {
|
||||
self.variant(EVENTS_ERROR_A::NOT_GENERATED)
|
||||
}
|
||||
#[doc = "Event generated"]
|
||||
#[inline(always)]
|
||||
pub fn generated(self) -> &'a mut W {
|
||||
self.variant(EVENTS_ERROR_A::GENERATED)
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - Error detected"]
|
||||
#[inline(always)]
|
||||
pub fn events_error(&self) -> EVENTS_ERROR_R {
|
||||
EVENTS_ERROR_R::new((self.bits & 1) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Error detected"]
|
||||
#[inline(always)]
|
||||
pub fn events_error(&mut self) -> EVENTS_ERROR_W<0> {
|
||||
EVENTS_ERROR_W::new(self)
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "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
|
||||
}
|
||||
}
|
||||
+127
@@ -0,0 +1,127 @@
|
||||
#[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)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `EVENTS_NCTS` reader - CTS is deactivated (set high). Not Clear To Send."]
|
||||
pub type EVENTS_NCTS_R = crate::BitReader<EVENTS_NCTS_A>;
|
||||
#[doc = "CTS is deactivated (set high). Not Clear To Send.\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum EVENTS_NCTS_A {
|
||||
#[doc = "0: Event not generated"]
|
||||
NOT_GENERATED = 0,
|
||||
#[doc = "1: Event generated"]
|
||||
GENERATED = 1,
|
||||
}
|
||||
impl From<EVENTS_NCTS_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: EVENTS_NCTS_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl EVENTS_NCTS_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> EVENTS_NCTS_A {
|
||||
match self.bits {
|
||||
false => EVENTS_NCTS_A::NOT_GENERATED,
|
||||
true => EVENTS_NCTS_A::GENERATED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `NOT_GENERATED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_not_generated(&self) -> bool {
|
||||
*self == EVENTS_NCTS_A::NOT_GENERATED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `GENERATED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_generated(&self) -> bool {
|
||||
*self == EVENTS_NCTS_A::GENERATED
|
||||
}
|
||||
}
|
||||
#[doc = "Field `EVENTS_NCTS` writer - CTS is deactivated (set high). Not Clear To Send."]
|
||||
pub type EVENTS_NCTS_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, EVENTS_NCTS_SPEC, EVENTS_NCTS_A, O>;
|
||||
impl<'a, const O: u8> EVENTS_NCTS_W<'a, O> {
|
||||
#[doc = "Event not generated"]
|
||||
#[inline(always)]
|
||||
pub fn not_generated(self) -> &'a mut W {
|
||||
self.variant(EVENTS_NCTS_A::NOT_GENERATED)
|
||||
}
|
||||
#[doc = "Event generated"]
|
||||
#[inline(always)]
|
||||
pub fn generated(self) -> &'a mut W {
|
||||
self.variant(EVENTS_NCTS_A::GENERATED)
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - CTS is deactivated (set high). Not Clear To Send."]
|
||||
#[inline(always)]
|
||||
pub fn events_ncts(&self) -> EVENTS_NCTS_R {
|
||||
EVENTS_NCTS_R::new((self.bits & 1) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - CTS is deactivated (set high). Not Clear To Send."]
|
||||
#[inline(always)]
|
||||
pub fn events_ncts(&mut self) -> EVENTS_NCTS_W<0> {
|
||||
EVENTS_NCTS_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 = "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
|
||||
}
|
||||
}
|
||||
+127
@@ -0,0 +1,127 @@
|
||||
#[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)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `EVENTS_RXDRDY` reader - Data received in RXD"]
|
||||
pub type EVENTS_RXDRDY_R = crate::BitReader<EVENTS_RXDRDY_A>;
|
||||
#[doc = "Data received in RXD\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum EVENTS_RXDRDY_A {
|
||||
#[doc = "0: Event not generated"]
|
||||
NOT_GENERATED = 0,
|
||||
#[doc = "1: Event generated"]
|
||||
GENERATED = 1,
|
||||
}
|
||||
impl From<EVENTS_RXDRDY_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: EVENTS_RXDRDY_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl EVENTS_RXDRDY_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> EVENTS_RXDRDY_A {
|
||||
match self.bits {
|
||||
false => EVENTS_RXDRDY_A::NOT_GENERATED,
|
||||
true => EVENTS_RXDRDY_A::GENERATED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `NOT_GENERATED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_not_generated(&self) -> bool {
|
||||
*self == EVENTS_RXDRDY_A::NOT_GENERATED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `GENERATED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_generated(&self) -> bool {
|
||||
*self == EVENTS_RXDRDY_A::GENERATED
|
||||
}
|
||||
}
|
||||
#[doc = "Field `EVENTS_RXDRDY` writer - Data received in RXD"]
|
||||
pub type EVENTS_RXDRDY_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, EVENTS_RXDRDY_SPEC, EVENTS_RXDRDY_A, O>;
|
||||
impl<'a, const O: u8> EVENTS_RXDRDY_W<'a, O> {
|
||||
#[doc = "Event not generated"]
|
||||
#[inline(always)]
|
||||
pub fn not_generated(self) -> &'a mut W {
|
||||
self.variant(EVENTS_RXDRDY_A::NOT_GENERATED)
|
||||
}
|
||||
#[doc = "Event generated"]
|
||||
#[inline(always)]
|
||||
pub fn generated(self) -> &'a mut W {
|
||||
self.variant(EVENTS_RXDRDY_A::GENERATED)
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - Data received in RXD"]
|
||||
#[inline(always)]
|
||||
pub fn events_rxdrdy(&self) -> EVENTS_RXDRDY_R {
|
||||
EVENTS_RXDRDY_R::new((self.bits & 1) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Data received in RXD"]
|
||||
#[inline(always)]
|
||||
pub fn events_rxdrdy(&mut self) -> EVENTS_RXDRDY_W<0> {
|
||||
EVENTS_RXDRDY_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 received in RXD\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
|
||||
}
|
||||
}
|
||||
+127
@@ -0,0 +1,127 @@
|
||||
#[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)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `EVENTS_RXTO` reader - Receiver timeout"]
|
||||
pub type EVENTS_RXTO_R = crate::BitReader<EVENTS_RXTO_A>;
|
||||
#[doc = "Receiver timeout\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum EVENTS_RXTO_A {
|
||||
#[doc = "0: Event not generated"]
|
||||
NOT_GENERATED = 0,
|
||||
#[doc = "1: Event generated"]
|
||||
GENERATED = 1,
|
||||
}
|
||||
impl From<EVENTS_RXTO_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: EVENTS_RXTO_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl EVENTS_RXTO_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> EVENTS_RXTO_A {
|
||||
match self.bits {
|
||||
false => EVENTS_RXTO_A::NOT_GENERATED,
|
||||
true => EVENTS_RXTO_A::GENERATED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `NOT_GENERATED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_not_generated(&self) -> bool {
|
||||
*self == EVENTS_RXTO_A::NOT_GENERATED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `GENERATED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_generated(&self) -> bool {
|
||||
*self == EVENTS_RXTO_A::GENERATED
|
||||
}
|
||||
}
|
||||
#[doc = "Field `EVENTS_RXTO` writer - Receiver timeout"]
|
||||
pub type EVENTS_RXTO_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, EVENTS_RXTO_SPEC, EVENTS_RXTO_A, O>;
|
||||
impl<'a, const O: u8> EVENTS_RXTO_W<'a, O> {
|
||||
#[doc = "Event not generated"]
|
||||
#[inline(always)]
|
||||
pub fn not_generated(self) -> &'a mut W {
|
||||
self.variant(EVENTS_RXTO_A::NOT_GENERATED)
|
||||
}
|
||||
#[doc = "Event generated"]
|
||||
#[inline(always)]
|
||||
pub fn generated(self) -> &'a mut W {
|
||||
self.variant(EVENTS_RXTO_A::GENERATED)
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - Receiver timeout"]
|
||||
#[inline(always)]
|
||||
pub fn events_rxto(&self) -> EVENTS_RXTO_R {
|
||||
EVENTS_RXTO_R::new((self.bits & 1) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Receiver timeout"]
|
||||
#[inline(always)]
|
||||
pub fn events_rxto(&mut self) -> EVENTS_RXTO_W<0> {
|
||||
EVENTS_RXTO_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 = "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
|
||||
}
|
||||
}
|
||||
+127
@@ -0,0 +1,127 @@
|
||||
#[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)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `EVENTS_TXDRDY` reader - Data sent from TXD"]
|
||||
pub type EVENTS_TXDRDY_R = crate::BitReader<EVENTS_TXDRDY_A>;
|
||||
#[doc = "Data sent from TXD\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum EVENTS_TXDRDY_A {
|
||||
#[doc = "0: Event not generated"]
|
||||
NOT_GENERATED = 0,
|
||||
#[doc = "1: Event generated"]
|
||||
GENERATED = 1,
|
||||
}
|
||||
impl From<EVENTS_TXDRDY_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: EVENTS_TXDRDY_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl EVENTS_TXDRDY_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> EVENTS_TXDRDY_A {
|
||||
match self.bits {
|
||||
false => EVENTS_TXDRDY_A::NOT_GENERATED,
|
||||
true => EVENTS_TXDRDY_A::GENERATED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `NOT_GENERATED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_not_generated(&self) -> bool {
|
||||
*self == EVENTS_TXDRDY_A::NOT_GENERATED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `GENERATED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_generated(&self) -> bool {
|
||||
*self == EVENTS_TXDRDY_A::GENERATED
|
||||
}
|
||||
}
|
||||
#[doc = "Field `EVENTS_TXDRDY` writer - Data sent from TXD"]
|
||||
pub type EVENTS_TXDRDY_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, EVENTS_TXDRDY_SPEC, EVENTS_TXDRDY_A, O>;
|
||||
impl<'a, const O: u8> EVENTS_TXDRDY_W<'a, O> {
|
||||
#[doc = "Event not generated"]
|
||||
#[inline(always)]
|
||||
pub fn not_generated(self) -> &'a mut W {
|
||||
self.variant(EVENTS_TXDRDY_A::NOT_GENERATED)
|
||||
}
|
||||
#[doc = "Event generated"]
|
||||
#[inline(always)]
|
||||
pub fn generated(self) -> &'a mut W {
|
||||
self.variant(EVENTS_TXDRDY_A::GENERATED)
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - Data sent from TXD"]
|
||||
#[inline(always)]
|
||||
pub fn events_txdrdy(&self) -> EVENTS_TXDRDY_R {
|
||||
EVENTS_TXDRDY_R::new((self.bits & 1) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Data sent from TXD"]
|
||||
#[inline(always)]
|
||||
pub fn events_txdrdy(&mut self) -> EVENTS_TXDRDY_W<0> {
|
||||
EVENTS_TXDRDY_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 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
|
||||
}
|
||||
}
|
||||
+468
@@ -0,0 +1,468 @@
|
||||
#[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 event CTS"]
|
||||
pub type CTS_R = crate::BitReader<CTS_A>;
|
||||
#[doc = "Write '1' to disable interrupt for event CTS\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 event CTS\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 event CTS"]
|
||||
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 event NCTS"]
|
||||
pub type NCTS_R = crate::BitReader<NCTS_A>;
|
||||
#[doc = "Write '1' to disable interrupt for event NCTS\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 event NCTS\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 event NCTS"]
|
||||
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 event RXDRDY"]
|
||||
pub type RXDRDY_R = crate::BitReader<RXDRDY_A>;
|
||||
#[doc = "Write '1' to disable interrupt for event RXDRDY\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 event RXDRDY\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 event RXDRDY"]
|
||||
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 `TXDRDY` reader - Write '1' to disable interrupt for event TXDRDY"]
|
||||
pub type TXDRDY_R = crate::BitReader<TXDRDY_A>;
|
||||
#[doc = "Write '1' to disable interrupt for event TXDRDY\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 event TXDRDY\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 event TXDRDY"]
|
||||
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 `ERROR` reader - Write '1' to disable interrupt for event ERROR"]
|
||||
pub type ERROR_R = crate::BitReader<ERROR_A>;
|
||||
#[doc = "Write '1' to disable interrupt for event ERROR\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 event ERROR\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 event ERROR"]
|
||||
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 event RXTO"]
|
||||
pub type RXTO_R = crate::BitReader<RXTO_A>;
|
||||
#[doc = "Write '1' to disable interrupt for event RXTO\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 event RXTO\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 event RXTO"]
|
||||
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)
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - Write '1' to disable interrupt for event CTS"]
|
||||
#[inline(always)]
|
||||
pub fn cts(&self) -> CTS_R {
|
||||
CTS_R::new((self.bits & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 1 - Write '1' to disable interrupt for event NCTS"]
|
||||
#[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 event RXDRDY"]
|
||||
#[inline(always)]
|
||||
pub fn rxdrdy(&self) -> RXDRDY_R {
|
||||
RXDRDY_R::new(((self.bits >> 2) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 7 - Write '1' to disable interrupt for event TXDRDY"]
|
||||
#[inline(always)]
|
||||
pub fn txdrdy(&self) -> TXDRDY_R {
|
||||
TXDRDY_R::new(((self.bits >> 7) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 9 - Write '1' to disable interrupt for event ERROR"]
|
||||
#[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 event RXTO"]
|
||||
#[inline(always)]
|
||||
pub fn rxto(&self) -> RXTO_R {
|
||||
RXTO_R::new(((self.bits >> 17) & 1) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Write '1' to disable interrupt for event CTS"]
|
||||
#[inline(always)]
|
||||
pub fn cts(&mut self) -> CTS_W<0> {
|
||||
CTS_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 1 - Write '1' to disable interrupt for event NCTS"]
|
||||
#[inline(always)]
|
||||
pub fn ncts(&mut self) -> NCTS_W<1> {
|
||||
NCTS_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 2 - Write '1' to disable interrupt for event RXDRDY"]
|
||||
#[inline(always)]
|
||||
pub fn rxdrdy(&mut self) -> RXDRDY_W<2> {
|
||||
RXDRDY_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 7 - Write '1' to disable interrupt for event TXDRDY"]
|
||||
#[inline(always)]
|
||||
pub fn txdrdy(&mut self) -> TXDRDY_W<7> {
|
||||
TXDRDY_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 9 - Write '1' to disable interrupt for event ERROR"]
|
||||
#[inline(always)]
|
||||
pub fn error(&mut self) -> ERROR_W<9> {
|
||||
ERROR_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 17 - Write '1' to disable interrupt for event RXTO"]
|
||||
#[inline(always)]
|
||||
pub fn rxto(&mut self) -> RXTO_W<17> {
|
||||
RXTO_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
|
||||
}
|
||||
}
|
||||
+468
@@ -0,0 +1,468 @@
|
||||
#[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 event CTS"]
|
||||
pub type CTS_R = crate::BitReader<CTS_A>;
|
||||
#[doc = "Write '1' to enable interrupt for event CTS\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 event CTS\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 event CTS"]
|
||||
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 event NCTS"]
|
||||
pub type NCTS_R = crate::BitReader<NCTS_A>;
|
||||
#[doc = "Write '1' to enable interrupt for event NCTS\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 event NCTS\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 event NCTS"]
|
||||
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 event RXDRDY"]
|
||||
pub type RXDRDY_R = crate::BitReader<RXDRDY_A>;
|
||||
#[doc = "Write '1' to enable interrupt for event RXDRDY\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 event RXDRDY\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 event RXDRDY"]
|
||||
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 `TXDRDY` reader - Write '1' to enable interrupt for event TXDRDY"]
|
||||
pub type TXDRDY_R = crate::BitReader<TXDRDY_A>;
|
||||
#[doc = "Write '1' to enable interrupt for event TXDRDY\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 event TXDRDY\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 event TXDRDY"]
|
||||
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 `ERROR` reader - Write '1' to enable interrupt for event ERROR"]
|
||||
pub type ERROR_R = crate::BitReader<ERROR_A>;
|
||||
#[doc = "Write '1' to enable interrupt for event ERROR\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 event ERROR\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 event ERROR"]
|
||||
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 event RXTO"]
|
||||
pub type RXTO_R = crate::BitReader<RXTO_A>;
|
||||
#[doc = "Write '1' to enable interrupt for event RXTO\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 event RXTO\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 event RXTO"]
|
||||
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)
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - Write '1' to enable interrupt for event CTS"]
|
||||
#[inline(always)]
|
||||
pub fn cts(&self) -> CTS_R {
|
||||
CTS_R::new((self.bits & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 1 - Write '1' to enable interrupt for event NCTS"]
|
||||
#[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 event RXDRDY"]
|
||||
#[inline(always)]
|
||||
pub fn rxdrdy(&self) -> RXDRDY_R {
|
||||
RXDRDY_R::new(((self.bits >> 2) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 7 - Write '1' to enable interrupt for event TXDRDY"]
|
||||
#[inline(always)]
|
||||
pub fn txdrdy(&self) -> TXDRDY_R {
|
||||
TXDRDY_R::new(((self.bits >> 7) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 9 - Write '1' to enable interrupt for event ERROR"]
|
||||
#[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 event RXTO"]
|
||||
#[inline(always)]
|
||||
pub fn rxto(&self) -> RXTO_R {
|
||||
RXTO_R::new(((self.bits >> 17) & 1) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Write '1' to enable interrupt for event CTS"]
|
||||
#[inline(always)]
|
||||
pub fn cts(&mut self) -> CTS_W<0> {
|
||||
CTS_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 1 - Write '1' to enable interrupt for event NCTS"]
|
||||
#[inline(always)]
|
||||
pub fn ncts(&mut self) -> NCTS_W<1> {
|
||||
NCTS_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 2 - Write '1' to enable interrupt for event RXDRDY"]
|
||||
#[inline(always)]
|
||||
pub fn rxdrdy(&mut self) -> RXDRDY_W<2> {
|
||||
RXDRDY_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 7 - Write '1' to enable interrupt for event TXDRDY"]
|
||||
#[inline(always)]
|
||||
pub fn txdrdy(&mut self) -> TXDRDY_W<7> {
|
||||
TXDRDY_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 9 - Write '1' to enable interrupt for event ERROR"]
|
||||
#[inline(always)]
|
||||
pub fn error(&mut self) -> ERROR_W<9> {
|
||||
ERROR_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 17 - Write '1' to enable interrupt for event RXTO"]
|
||||
#[inline(always)]
|
||||
pub fn rxto(&mut self) -> RXTO_W<17> {
|
||||
RXTO_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
@@ -0,0 +1,28 @@
|
||||
#[doc = r"Register block"]
|
||||
#[repr(C)]
|
||||
pub struct PSEL {
|
||||
#[doc = "0x00 - Pin select for RTS"]
|
||||
pub rts: RTS,
|
||||
#[doc = "0x04 - Pin select for TXD"]
|
||||
pub txd: TXD,
|
||||
#[doc = "0x08 - Pin select for CTS"]
|
||||
pub cts: CTS,
|
||||
#[doc = "0x0c - Pin select for RXD"]
|
||||
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"]
|
||||
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"]
|
||||
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"]
|
||||
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"]
|
||||
pub mod rxd;
|
||||
+140
@@ -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\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
@@ -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\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
@@ -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\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
@@ -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\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
|
||||
}
|
||||
}
|
||||
Vendored
+40
@@ -0,0 +1,40 @@
|
||||
#[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 = "Field `RXD` reader - RX data received in previous transfers, double buffered"]
|
||||
pub type RXD_R = crate::FieldReader<u8, u8>;
|
||||
impl R {
|
||||
#[doc = "Bits 0:7 - RX data received in previous transfers, double buffered"]
|
||||
#[inline(always)]
|
||||
pub fn rxd(&self) -> RXD_R {
|
||||
RXD_R::new((self.bits & 0xff) as u8)
|
||||
}
|
||||
}
|
||||
#[doc = "RXD register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [rxd](index.html) module\n\nOne or more dependent resources other than the current register are immediately affected by a read operation."]
|
||||
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 = "`reset()` method sets RXD to value 0"]
|
||||
impl crate::Resettable for RXD_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
+186
@@ -0,0 +1,186 @@
|
||||
#[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 `CTS_STARTRX` reader - Shortcut between event CTS and task STARTRX"]
|
||||
pub type CTS_STARTRX_R = crate::BitReader<CTS_STARTRX_A>;
|
||||
#[doc = "Shortcut between event CTS and task STARTRX\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum CTS_STARTRX_A {
|
||||
#[doc = "0: Disable shortcut"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Enable shortcut"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<CTS_STARTRX_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: CTS_STARTRX_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl CTS_STARTRX_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> CTS_STARTRX_A {
|
||||
match self.bits {
|
||||
false => CTS_STARTRX_A::DISABLED,
|
||||
true => CTS_STARTRX_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
*self == CTS_STARTRX_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
*self == CTS_STARTRX_A::ENABLED
|
||||
}
|
||||
}
|
||||
#[doc = "Field `CTS_STARTRX` writer - Shortcut between event CTS and task STARTRX"]
|
||||
pub type CTS_STARTRX_W<'a, const O: u8> = crate::BitWriter<'a, u32, SHORTS_SPEC, CTS_STARTRX_A, O>;
|
||||
impl<'a, const O: u8> CTS_STARTRX_W<'a, O> {
|
||||
#[doc = "Disable shortcut"]
|
||||
#[inline(always)]
|
||||
pub fn disabled(self) -> &'a mut W {
|
||||
self.variant(CTS_STARTRX_A::DISABLED)
|
||||
}
|
||||
#[doc = "Enable shortcut"]
|
||||
#[inline(always)]
|
||||
pub fn enabled(self) -> &'a mut W {
|
||||
self.variant(CTS_STARTRX_A::ENABLED)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `NCTS_STOPRX` reader - Shortcut between event NCTS and task STOPRX"]
|
||||
pub type NCTS_STOPRX_R = crate::BitReader<NCTS_STOPRX_A>;
|
||||
#[doc = "Shortcut between event NCTS and task STOPRX\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum NCTS_STOPRX_A {
|
||||
#[doc = "0: Disable shortcut"]
|
||||
DISABLED = 0,
|
||||
#[doc = "1: Enable shortcut"]
|
||||
ENABLED = 1,
|
||||
}
|
||||
impl From<NCTS_STOPRX_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: NCTS_STOPRX_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
impl NCTS_STOPRX_R {
|
||||
#[doc = "Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> NCTS_STOPRX_A {
|
||||
match self.bits {
|
||||
false => NCTS_STOPRX_A::DISABLED,
|
||||
true => NCTS_STOPRX_A::ENABLED,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `DISABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_disabled(&self) -> bool {
|
||||
*self == NCTS_STOPRX_A::DISABLED
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `ENABLED`"]
|
||||
#[inline(always)]
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
*self == NCTS_STOPRX_A::ENABLED
|
||||
}
|
||||
}
|
||||
#[doc = "Field `NCTS_STOPRX` writer - Shortcut between event NCTS and task STOPRX"]
|
||||
pub type NCTS_STOPRX_W<'a, const O: u8> = crate::BitWriter<'a, u32, SHORTS_SPEC, NCTS_STOPRX_A, O>;
|
||||
impl<'a, const O: u8> NCTS_STOPRX_W<'a, O> {
|
||||
#[doc = "Disable shortcut"]
|
||||
#[inline(always)]
|
||||
pub fn disabled(self) -> &'a mut W {
|
||||
self.variant(NCTS_STOPRX_A::DISABLED)
|
||||
}
|
||||
#[doc = "Enable shortcut"]
|
||||
#[inline(always)]
|
||||
pub fn enabled(self) -> &'a mut W {
|
||||
self.variant(NCTS_STOPRX_A::ENABLED)
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 3 - Shortcut between event CTS and task STARTRX"]
|
||||
#[inline(always)]
|
||||
pub fn cts_startrx(&self) -> CTS_STARTRX_R {
|
||||
CTS_STARTRX_R::new(((self.bits >> 3) & 1) != 0)
|
||||
}
|
||||
#[doc = "Bit 4 - Shortcut between event NCTS and task STOPRX"]
|
||||
#[inline(always)]
|
||||
pub fn ncts_stoprx(&self) -> NCTS_STOPRX_R {
|
||||
NCTS_STOPRX_R::new(((self.bits >> 4) & 1) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 3 - Shortcut between event CTS and task STARTRX"]
|
||||
#[inline(always)]
|
||||
pub fn cts_startrx(&mut self) -> CTS_STARTRX_W<3> {
|
||||
CTS_STARTRX_W::new(self)
|
||||
}
|
||||
#[doc = "Bit 4 - Shortcut between event NCTS and task STOPRX"]
|
||||
#[inline(always)]
|
||||
pub fn ncts_stoprx(&mut self) -> NCTS_STOPRX_W<4> {
|
||||
NCTS_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 = "Shortcuts between local events and tasks\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
|
||||
}
|
||||
}
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
#[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)
|
||||
}
|
||||
}
|
||||
#[doc = "Start UART receiver\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum TASKS_STARTRX_AW {
|
||||
#[doc = "1: Trigger task"]
|
||||
TRIGGER = 1,
|
||||
}
|
||||
impl From<TASKS_STARTRX_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: TASKS_STARTRX_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TASKS_STARTRX` writer - Start UART receiver"]
|
||||
pub type TASKS_STARTRX_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, TASKS_STARTRX_SPEC, TASKS_STARTRX_AW, O>;
|
||||
impl<'a, const O: u8> TASKS_STARTRX_W<'a, O> {
|
||||
#[doc = "Trigger task"]
|
||||
#[inline(always)]
|
||||
pub fn trigger(self) -> &'a mut W {
|
||||
self.variant(TASKS_STARTRX_AW::TRIGGER)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Start UART receiver"]
|
||||
#[inline(always)]
|
||||
pub fn tasks_startrx(&mut self) -> TASKS_STARTRX_W<0> {
|
||||
TASKS_STARTRX_W::new(self)
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Start 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
|
||||
}
|
||||
}
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
#[doc = "Register `TASKS_STARTTX` writer"]
|
||||
pub struct W(crate::W<TASKS_STARTTX_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<TASKS_STARTTX_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl core::ops::DerefMut for W {
|
||||
#[inline(always)]
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::W<TASKS_STARTTX_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<TASKS_STARTTX_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Start UART transmitter\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum TASKS_STARTTX_AW {
|
||||
#[doc = "1: Trigger task"]
|
||||
TRIGGER = 1,
|
||||
}
|
||||
impl From<TASKS_STARTTX_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: TASKS_STARTTX_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TASKS_STARTTX` writer - Start UART transmitter"]
|
||||
pub type TASKS_STARTTX_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, TASKS_STARTTX_SPEC, TASKS_STARTTX_AW, O>;
|
||||
impl<'a, const O: u8> TASKS_STARTTX_W<'a, O> {
|
||||
#[doc = "Trigger task"]
|
||||
#[inline(always)]
|
||||
pub fn trigger(self) -> &'a mut W {
|
||||
self.variant(TASKS_STARTTX_AW::TRIGGER)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Start UART transmitter"]
|
||||
#[inline(always)]
|
||||
pub fn tasks_starttx(&mut self) -> TASKS_STARTTX_W<0> {
|
||||
TASKS_STARTTX_W::new(self)
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Start 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
|
||||
}
|
||||
}
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
#[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)
|
||||
}
|
||||
}
|
||||
#[doc = "Stop UART receiver\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum TASKS_STOPRX_AW {
|
||||
#[doc = "1: Trigger task"]
|
||||
TRIGGER = 1,
|
||||
}
|
||||
impl From<TASKS_STOPRX_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: TASKS_STOPRX_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TASKS_STOPRX` writer - Stop UART receiver"]
|
||||
pub type TASKS_STOPRX_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, TASKS_STOPRX_SPEC, TASKS_STOPRX_AW, O>;
|
||||
impl<'a, const O: u8> TASKS_STOPRX_W<'a, O> {
|
||||
#[doc = "Trigger task"]
|
||||
#[inline(always)]
|
||||
pub fn trigger(self) -> &'a mut W {
|
||||
self.variant(TASKS_STOPRX_AW::TRIGGER)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Stop UART receiver"]
|
||||
#[inline(always)]
|
||||
pub fn tasks_stoprx(&mut self) -> TASKS_STOPRX_W<0> {
|
||||
TASKS_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 = "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
|
||||
}
|
||||
}
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
#[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)
|
||||
}
|
||||
}
|
||||
#[doc = "Stop UART transmitter\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum TASKS_STOPTX_AW {
|
||||
#[doc = "1: Trigger task"]
|
||||
TRIGGER = 1,
|
||||
}
|
||||
impl From<TASKS_STOPTX_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: TASKS_STOPTX_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TASKS_STOPTX` writer - Stop UART transmitter"]
|
||||
pub type TASKS_STOPTX_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, TASKS_STOPTX_SPEC, TASKS_STOPTX_AW, O>;
|
||||
impl<'a, const O: u8> TASKS_STOPTX_W<'a, O> {
|
||||
#[doc = "Trigger task"]
|
||||
#[inline(always)]
|
||||
pub fn trigger(self) -> &'a mut W {
|
||||
self.variant(TASKS_STOPTX_AW::TRIGGER)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Stop UART transmitter"]
|
||||
#[inline(always)]
|
||||
pub fn tasks_stoptx(&mut self) -> TASKS_STOPTX_W<0> {
|
||||
TASKS_STOPTX_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 = "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
|
||||
}
|
||||
}
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
#[doc = "Register `TASKS_SUSPEND` writer"]
|
||||
pub struct W(crate::W<TASKS_SUSPEND_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<TASKS_SUSPEND_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_SUSPEND_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<TASKS_SUSPEND_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Suspend UART\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum TASKS_SUSPEND_AW {
|
||||
#[doc = "1: Trigger task"]
|
||||
TRIGGER = 1,
|
||||
}
|
||||
impl From<TASKS_SUSPEND_AW> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: TASKS_SUSPEND_AW) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TASKS_SUSPEND` writer - Suspend UART"]
|
||||
pub type TASKS_SUSPEND_W<'a, const O: u8> =
|
||||
crate::BitWriter<'a, u32, TASKS_SUSPEND_SPEC, TASKS_SUSPEND_AW, O>;
|
||||
impl<'a, const O: u8> TASKS_SUSPEND_W<'a, O> {
|
||||
#[doc = "Trigger task"]
|
||||
#[inline(always)]
|
||||
pub fn trigger(self) -> &'a mut W {
|
||||
self.variant(TASKS_SUSPEND_AW::TRIGGER)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Suspend UART"]
|
||||
#[inline(always)]
|
||||
pub fn tasks_suspend(&mut self) -> TASKS_SUSPEND_W<0> {
|
||||
TASKS_SUSPEND_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 = "Suspend UART\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_suspend](index.html) module"]
|
||||
pub struct TASKS_SUSPEND_SPEC;
|
||||
impl crate::RegisterSpec for TASKS_SUSPEND_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [tasks_suspend::W](W) writer structure"]
|
||||
impl crate::Writable for TASKS_SUSPEND_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets TASKS_SUSPEND to value 0"]
|
||||
impl crate::Resettable for TASKS_SUSPEND_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
Vendored
+52
@@ -0,0 +1,52 @@
|
||||
#[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 `TXD` writer - TX data to be transferred"]
|
||||
pub type TXD_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TXD_SPEC, u8, u8, 8, O>;
|
||||
impl W {
|
||||
#[doc = "Bits 0:7 - TX data to be transferred"]
|
||||
#[inline(always)]
|
||||
pub fn txd(&mut self) -> TXD_W<0> {
|
||||
TXD_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 = "TXD register\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 [txd](index.html) module"]
|
||||
pub struct TXD_SPEC;
|
||||
impl crate::RegisterSpec for TXD_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[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 0"]
|
||||
impl crate::Resettable for TXD_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user