First building PAC version
Generated a first building version of the PAC. The PAC was generated with a specially patched version of svd2rust 0.19.0: https://github.com/robamu/svd2rust/tree/mueller/develop
This commit is contained in:
64
src/uarta/addr9.rs
Normal file
64
src/uarta/addr9.rs
Normal file
@ -0,0 +1,64 @@
|
||||
#[doc = "Register `ADDR9` reader"]
|
||||
pub struct R(crate::R<ADDR9_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<ADDR9_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<ADDR9_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<ADDR9_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `ADDR9` writer"]
|
||||
pub struct W(crate::W<ADDR9_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<ADDR9_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<ADDR9_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<ADDR9_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Address9 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [addr9](index.html) module"]
|
||||
pub struct ADDR9_SPEC;
|
||||
impl crate::RegisterSpec for ADDR9_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [addr9::R](R) reader structure"]
|
||||
impl crate::Readable for ADDR9_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [addr9::W](W) writer structure"]
|
||||
impl crate::Writable for ADDR9_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets ADDR9 to value 0"]
|
||||
impl crate::Resettable for ADDR9_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
64
src/uarta/addr9mask.rs
Normal file
64
src/uarta/addr9mask.rs
Normal file
@ -0,0 +1,64 @@
|
||||
#[doc = "Register `ADDR9MASK` reader"]
|
||||
pub struct R(crate::R<ADDR9MASK_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<ADDR9MASK_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<ADDR9MASK_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<ADDR9MASK_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `ADDR9MASK` writer"]
|
||||
pub struct W(crate::W<ADDR9MASK_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<ADDR9MASK_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<ADDR9MASK_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<ADDR9MASK_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Address9 Mask Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [addr9mask](index.html) module"]
|
||||
pub struct ADDR9MASK_SPEC;
|
||||
impl crate::RegisterSpec for ADDR9MASK_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [addr9mask::R](R) reader structure"]
|
||||
impl crate::Readable for ADDR9MASK_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [addr9mask::W](W) writer structure"]
|
||||
impl crate::Writable for ADDR9MASK_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets ADDR9MASK to value 0"]
|
||||
impl crate::Resettable for ADDR9MASK_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
167
src/uarta/clkscale.rs
Normal file
167
src/uarta/clkscale.rs
Normal file
@ -0,0 +1,167 @@
|
||||
#[doc = "Register `CLKSCALE` reader"]
|
||||
pub struct R(crate::R<CLKSCALE_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<CLKSCALE_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<CLKSCALE_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<CLKSCALE_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `CLKSCALE` writer"]
|
||||
pub struct W(crate::W<CLKSCALE_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<CLKSCALE_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<CLKSCALE_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<CLKSCALE_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `FRAC` reader - Fractional Divide (64ths)"]
|
||||
pub struct FRAC_R(crate::FieldReader<u8, u8>);
|
||||
impl FRAC_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: u8) -> Self {
|
||||
FRAC_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for FRAC_R {
|
||||
type Target = crate::FieldReader<u8, u8>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `FRAC` writer - Fractional Divide (64ths)"]
|
||||
pub struct FRAC_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> FRAC_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u8) -> &'a mut W {
|
||||
self.w.bits = value as u32;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `INT` reader - Integer Divide"]
|
||||
pub struct INT_R(crate::FieldReader<u32, u32>);
|
||||
impl INT_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: u32) -> Self {
|
||||
INT_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for INT_R {
|
||||
type Target = crate::FieldReader<u32, u32>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `INT` writer - Integer Divide"]
|
||||
pub struct INT_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> INT_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u32) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x0003_ffff << 6)) | ((value as u32 & 0x0003_ffff) << 6);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RESET` writer - Reset Baud Counter"]
|
||||
pub struct RESET_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RESET_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x01 << 31)) | ((value as u32 & 0x01) << 31);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bits 0:5 - Fractional Divide (64ths)"]
|
||||
#[inline(always)]
|
||||
pub fn frac(&self) -> FRAC_R {
|
||||
FRAC_R::new(self.bits as u8)
|
||||
}
|
||||
#[doc = "Bits 6:23 - Integer Divide"]
|
||||
#[inline(always)]
|
||||
pub fn int(&self) -> INT_R {
|
||||
INT_R::new(((self.bits >> 6) & 0x0003_ffff) as u32)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bits 0:5 - Fractional Divide (64ths)"]
|
||||
#[inline(always)]
|
||||
pub fn frac(&mut self) -> FRAC_W {
|
||||
FRAC_W { w: self }
|
||||
}
|
||||
#[doc = "Bits 6:23 - Integer Divide"]
|
||||
#[inline(always)]
|
||||
pub fn int(&mut self) -> INT_W {
|
||||
INT_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 31 - Reset Baud Counter"]
|
||||
#[inline(always)]
|
||||
pub fn reset(&mut self) -> RESET_W {
|
||||
RESET_W { w: 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 = "Clock Scale Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [clkscale](index.html) module"]
|
||||
pub struct CLKSCALE_SPEC;
|
||||
impl crate::RegisterSpec for CLKSCALE_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [clkscale::R](R) reader structure"]
|
||||
impl crate::Readable for CLKSCALE_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [clkscale::W](W) writer structure"]
|
||||
impl crate::Writable for CLKSCALE_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets CLKSCALE to value 0"]
|
||||
impl crate::Resettable for CLKSCALE_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
573
src/uarta/ctrl.rs
Normal file
573
src/uarta/ctrl.rs
Normal file
@ -0,0 +1,573 @@
|
||||
#[doc = "Register `CTRL` reader"]
|
||||
pub struct R(crate::R<CTRL_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<CTRL_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<CTRL_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<CTRL_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `CTRL` writer"]
|
||||
pub struct W(crate::W<CTRL_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<CTRL_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<CTRL_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<CTRL_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `PAREN` reader - Parity Enable"]
|
||||
pub struct PAREN_R(crate::FieldReader<bool, bool>);
|
||||
impl PAREN_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
PAREN_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for PAREN_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `PAREN` writer - Parity Enable"]
|
||||
pub struct PAREN_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> PAREN_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = value as u32;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `PAREVEN` reader - Parity Even/Odd(1/0)"]
|
||||
pub struct PAREVEN_R(crate::FieldReader<bool, bool>);
|
||||
impl PAREVEN_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
PAREVEN_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for PAREVEN_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `PAREVEN` writer - Parity Even/Odd(1/0)"]
|
||||
pub struct PAREVEN_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> PAREVEN_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `PARSTK` reader - Parity Sticky"]
|
||||
pub struct PARSTK_R(crate::FieldReader<bool, bool>);
|
||||
impl PARSTK_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
PARSTK_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for PARSTK_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `PARSTK` writer - Parity Sticky"]
|
||||
pub struct PARSTK_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> PARSTK_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `STOPBITS` reader - Stop Bits 1/2(0/1)"]
|
||||
pub struct STOPBITS_R(crate::FieldReader<bool, bool>);
|
||||
impl STOPBITS_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
STOPBITS_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for STOPBITS_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `STOPBITS` writer - Stop Bits 1/2(0/1)"]
|
||||
pub struct STOPBITS_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> STOPBITS_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `WORDSIZE` reader - Word Size in Bits 5/6/7/8(00/01/10/11)"]
|
||||
pub struct WORDSIZE_R(crate::FieldReader<u8, u8>);
|
||||
impl WORDSIZE_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: u8) -> Self {
|
||||
WORDSIZE_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for WORDSIZE_R {
|
||||
type Target = crate::FieldReader<u8, u8>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `WORDSIZE` writer - Word Size in Bits 5/6/7/8(00/01/10/11)"]
|
||||
pub struct WORDSIZE_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> WORDSIZE_W<'a> {
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(self, value: u8) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x03 << 4)) | ((value as u32 & 0x03) << 4);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `LOOPBACK` reader - Loopback Enable"]
|
||||
pub struct LOOPBACK_R(crate::FieldReader<bool, bool>);
|
||||
impl LOOPBACK_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
LOOPBACK_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for LOOPBACK_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `LOOPBACK` writer - Loopback Enable"]
|
||||
pub struct LOOPBACK_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> LOOPBACK_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `LOOPBACKBLK` reader - Loopback Block"]
|
||||
pub struct LOOPBACKBLK_R(crate::FieldReader<bool, bool>);
|
||||
impl LOOPBACKBLK_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
LOOPBACKBLK_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for LOOPBACKBLK_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `LOOPBACKBLK` writer - Loopback Block"]
|
||||
pub struct LOOPBACKBLK_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> LOOPBACKBLK_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x01 << 7)) | ((value as u32 & 0x01) << 7);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `AUTOCTS` reader - Enable Auto CTS mode"]
|
||||
pub struct AUTOCTS_R(crate::FieldReader<bool, bool>);
|
||||
impl AUTOCTS_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
AUTOCTS_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for AUTOCTS_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `AUTOCTS` writer - Enable Auto CTS mode"]
|
||||
pub struct AUTOCTS_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> AUTOCTS_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DEFRTS` reader - Default RTSn value"]
|
||||
pub struct DEFRTS_R(crate::FieldReader<bool, bool>);
|
||||
impl DEFRTS_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
DEFRTS_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for DEFRTS_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `DEFRTS` writer - Default RTSn value"]
|
||||
pub struct DEFRTS_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> DEFRTS_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `AUTORTS` reader - Enable Auto RTS mode"]
|
||||
pub struct AUTORTS_R(crate::FieldReader<bool, bool>);
|
||||
impl AUTORTS_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
AUTORTS_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for AUTORTS_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `AUTORTS` writer - Enable Auto RTS mode"]
|
||||
pub struct AUTORTS_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> AUTORTS_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x01 << 10)) | ((value as u32 & 0x01) << 10);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `BAUD8` reader - Enable BAUD8 mode"]
|
||||
pub struct BAUD8_R(crate::FieldReader<bool, bool>);
|
||||
impl BAUD8_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
BAUD8_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for BAUD8_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `BAUD8` writer - Enable BAUD8 mode"]
|
||||
pub struct BAUD8_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> BAUD8_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x01 << 11)) | ((value as u32 & 0x01) << 11);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - Parity Enable"]
|
||||
#[inline(always)]
|
||||
pub fn paren(&self) -> PAREN_R {
|
||||
PAREN_R::new(self.bits != 0)
|
||||
}
|
||||
#[doc = "Bit 1 - Parity Even/Odd(1/0)"]
|
||||
#[inline(always)]
|
||||
pub fn pareven(&self) -> PAREVEN_R {
|
||||
PAREVEN_R::new(((self.bits >> 1) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - Parity Sticky"]
|
||||
#[inline(always)]
|
||||
pub fn parstk(&self) -> PARSTK_R {
|
||||
PARSTK_R::new(((self.bits >> 2) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 3 - Stop Bits 1/2(0/1)"]
|
||||
#[inline(always)]
|
||||
pub fn stopbits(&self) -> STOPBITS_R {
|
||||
STOPBITS_R::new(((self.bits >> 3) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bits 4:5 - Word Size in Bits 5/6/7/8(00/01/10/11)"]
|
||||
#[inline(always)]
|
||||
pub fn wordsize(&self) -> WORDSIZE_R {
|
||||
WORDSIZE_R::new(((self.bits >> 4) & 0x03) as u8)
|
||||
}
|
||||
#[doc = "Bit 6 - Loopback Enable"]
|
||||
#[inline(always)]
|
||||
pub fn loopback(&self) -> LOOPBACK_R {
|
||||
LOOPBACK_R::new(((self.bits >> 6) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 7 - Loopback Block"]
|
||||
#[inline(always)]
|
||||
pub fn loopbackblk(&self) -> LOOPBACKBLK_R {
|
||||
LOOPBACKBLK_R::new(((self.bits >> 7) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 8 - Enable Auto CTS mode"]
|
||||
#[inline(always)]
|
||||
pub fn autocts(&self) -> AUTOCTS_R {
|
||||
AUTOCTS_R::new(((self.bits >> 8) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 9 - Default RTSn value"]
|
||||
#[inline(always)]
|
||||
pub fn defrts(&self) -> DEFRTS_R {
|
||||
DEFRTS_R::new(((self.bits >> 9) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 10 - Enable Auto RTS mode"]
|
||||
#[inline(always)]
|
||||
pub fn autorts(&self) -> AUTORTS_R {
|
||||
AUTORTS_R::new(((self.bits >> 10) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 11 - Enable BAUD8 mode"]
|
||||
#[inline(always)]
|
||||
pub fn baud8(&self) -> BAUD8_R {
|
||||
BAUD8_R::new(((self.bits >> 11) & 0x01) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Parity Enable"]
|
||||
#[inline(always)]
|
||||
pub fn paren(&mut self) -> PAREN_W {
|
||||
PAREN_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 1 - Parity Even/Odd(1/0)"]
|
||||
#[inline(always)]
|
||||
pub fn pareven(&mut self) -> PAREVEN_W {
|
||||
PAREVEN_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 2 - Parity Sticky"]
|
||||
#[inline(always)]
|
||||
pub fn parstk(&mut self) -> PARSTK_W {
|
||||
PARSTK_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 3 - Stop Bits 1/2(0/1)"]
|
||||
#[inline(always)]
|
||||
pub fn stopbits(&mut self) -> STOPBITS_W {
|
||||
STOPBITS_W { w: self }
|
||||
}
|
||||
#[doc = "Bits 4:5 - Word Size in Bits 5/6/7/8(00/01/10/11)"]
|
||||
#[inline(always)]
|
||||
pub fn wordsize(&mut self) -> WORDSIZE_W {
|
||||
WORDSIZE_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 6 - Loopback Enable"]
|
||||
#[inline(always)]
|
||||
pub fn loopback(&mut self) -> LOOPBACK_W {
|
||||
LOOPBACK_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 7 - Loopback Block"]
|
||||
#[inline(always)]
|
||||
pub fn loopbackblk(&mut self) -> LOOPBACKBLK_W {
|
||||
LOOPBACKBLK_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 8 - Enable Auto CTS mode"]
|
||||
#[inline(always)]
|
||||
pub fn autocts(&mut self) -> AUTOCTS_W {
|
||||
AUTOCTS_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 9 - Default RTSn value"]
|
||||
#[inline(always)]
|
||||
pub fn defrts(&mut self) -> DEFRTS_W {
|
||||
DEFRTS_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 10 - Enable Auto RTS mode"]
|
||||
#[inline(always)]
|
||||
pub fn autorts(&mut self) -> AUTORTS_W {
|
||||
AUTORTS_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 11 - Enable BAUD8 mode"]
|
||||
#[inline(always)]
|
||||
pub fn baud8(&mut self) -> BAUD8_W {
|
||||
BAUD8_W { w: 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 = "Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [ctrl](index.html) module"]
|
||||
pub struct CTRL_SPEC;
|
||||
impl crate::RegisterSpec for CTRL_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [ctrl::R](R) reader structure"]
|
||||
impl crate::Readable for CTRL_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [ctrl::W](W) writer structure"]
|
||||
impl crate::Writable for CTRL_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets CTRL to value 0"]
|
||||
impl crate::Resettable for CTRL_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
64
src/uarta/data.rs
Normal file
64
src/uarta/data.rs
Normal file
@ -0,0 +1,64 @@
|
||||
#[doc = "Register `DATA` reader"]
|
||||
pub struct R(crate::R<DATA_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<DATA_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<DATA_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<DATA_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `DATA` writer"]
|
||||
pub struct W(crate::W<DATA_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<DATA_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<DATA_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<DATA_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Data In/Out Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [data](index.html) module"]
|
||||
pub struct DATA_SPEC;
|
||||
impl crate::RegisterSpec for DATA_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [data::R](R) reader structure"]
|
||||
impl crate::Readable for DATA_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [data::W](W) writer structure"]
|
||||
impl crate::Writable for DATA_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets DATA to value 0"]
|
||||
impl crate::Resettable for DATA_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
160
src/uarta/enable.rs
Normal file
160
src/uarta/enable.rs
Normal file
@ -0,0 +1,160 @@
|
||||
#[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 `RXENABLE` reader - Rx Enable"]
|
||||
pub struct RXENABLE_R(crate::FieldReader<bool, bool>);
|
||||
impl RXENABLE_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RXENABLE_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RXENABLE_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RXENABLE` writer - Rx Enable"]
|
||||
pub struct RXENABLE_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RXENABLE_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = value as u32;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TXENABLE` reader - Tx Enable"]
|
||||
pub struct TXENABLE_R(crate::FieldReader<bool, bool>);
|
||||
impl TXENABLE_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
TXENABLE_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for TXENABLE_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TXENABLE` writer - Tx Enable"]
|
||||
pub struct TXENABLE_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> TXENABLE_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - Rx Enable"]
|
||||
#[inline(always)]
|
||||
pub fn rxenable(&self) -> RXENABLE_R {
|
||||
RXENABLE_R::new(self.bits != 0)
|
||||
}
|
||||
#[doc = "Bit 1 - Tx Enable"]
|
||||
#[inline(always)]
|
||||
pub fn txenable(&self) -> TXENABLE_R {
|
||||
TXENABLE_R::new(((self.bits >> 1) & 0x01) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Rx Enable"]
|
||||
#[inline(always)]
|
||||
pub fn rxenable(&mut self) -> RXENABLE_W {
|
||||
RXENABLE_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 1 - Tx Enable"]
|
||||
#[inline(always)]
|
||||
pub fn txenable(&mut self) -> TXENABLE_W {
|
||||
TXENABLE_W { w: 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 Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [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
|
||||
}
|
||||
}
|
153
src/uarta/fifo_clr.rs
Normal file
153
src/uarta/fifo_clr.rs
Normal file
@ -0,0 +1,153 @@
|
||||
#[doc = "Register `FIFO_CLR` writer"]
|
||||
pub struct W(crate::W<FIFO_CLR_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<FIFO_CLR_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<FIFO_CLR_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<FIFO_CLR_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RXSTS` writer - Clear Rx Status"]
|
||||
pub struct RXSTS_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RXSTS_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = value as u32;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TXSTS` writer - Clear Tx Status"]
|
||||
pub struct TXSTS_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> TXSTS_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RXFIFO` writer - Clear Rx FIFO"]
|
||||
pub struct RXFIFO_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> RXFIFO_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TXFIFO` writer - Clear Tx FIFO"]
|
||||
pub struct TXFIFO_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> TXFIFO_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - Clear Rx Status"]
|
||||
#[inline(always)]
|
||||
pub fn rxsts(&mut self) -> RXSTS_W {
|
||||
RXSTS_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 1 - Clear Tx Status"]
|
||||
#[inline(always)]
|
||||
pub fn txsts(&mut self) -> TXSTS_W {
|
||||
TXSTS_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 2 - Clear Rx FIFO"]
|
||||
#[inline(always)]
|
||||
pub fn rxfifo(&mut self) -> RXFIFO_W {
|
||||
RXFIFO_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 3 - Clear Tx FIFO"]
|
||||
#[inline(always)]
|
||||
pub fn txfifo(&mut self) -> TXFIFO_W {
|
||||
TXFIFO_W { w: self }
|
||||
}
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Clear FIFO 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 [fifo_clr](index.html) module"]
|
||||
pub struct FIFO_CLR_SPEC;
|
||||
impl crate::RegisterSpec for FIFO_CLR_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [fifo_clr::W](W) writer structure"]
|
||||
impl crate::Writable for FIFO_CLR_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets FIFO_CLR to value 0"]
|
||||
impl crate::Resettable for FIFO_CLR_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
234
src/uarta/irq_clr.rs
Normal file
234
src/uarta/irq_clr.rs
Normal file
@ -0,0 +1,234 @@
|
||||
#[doc = "Register `IRQ_CLR` writer"]
|
||||
pub struct W(crate::W<IRQ_CLR_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<IRQ_CLR_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<IRQ_CLR_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<IRQ_CLR_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IRQ_RX` writer - RX Interrupt"]
|
||||
pub struct IRQ_RX_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> IRQ_RX_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = value as u32;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IRQ_RX_STATUS` writer - RX Status Interrupt"]
|
||||
pub struct IRQ_RX_STATUS_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> IRQ_RX_STATUS_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IRQ_RX_TO` writer - RX Timeout Interrupt"]
|
||||
pub struct IRQ_RX_TO_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> IRQ_RX_TO_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IRQ_TX` writer - TX Interrupt"]
|
||||
pub struct IRQ_TX_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> IRQ_TX_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IRQ_TX_STATUS` writer - TX Status Interrupt"]
|
||||
pub struct IRQ_TX_STATUS_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> IRQ_TX_STATUS_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IRQ_TX_EMPTY` writer - TX Empty Interrupt"]
|
||||
pub struct IRQ_TX_EMPTY_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> IRQ_TX_EMPTY_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IRQ_TX_CTS` writer - TX CTS Change Interrupt"]
|
||||
pub struct IRQ_TX_CTS_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> IRQ_TX_CTS_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x01 << 7)) | ((value as u32 & 0x01) << 7);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - RX Interrupt"]
|
||||
#[inline(always)]
|
||||
pub fn irq_rx(&mut self) -> IRQ_RX_W {
|
||||
IRQ_RX_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 1 - RX Status Interrupt"]
|
||||
#[inline(always)]
|
||||
pub fn irq_rx_status(&mut self) -> IRQ_RX_STATUS_W {
|
||||
IRQ_RX_STATUS_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 2 - RX Timeout Interrupt"]
|
||||
#[inline(always)]
|
||||
pub fn irq_rx_to(&mut self) -> IRQ_RX_TO_W {
|
||||
IRQ_RX_TO_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 4 - TX Interrupt"]
|
||||
#[inline(always)]
|
||||
pub fn irq_tx(&mut self) -> IRQ_TX_W {
|
||||
IRQ_TX_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 5 - TX Status Interrupt"]
|
||||
#[inline(always)]
|
||||
pub fn irq_tx_status(&mut self) -> IRQ_TX_STATUS_W {
|
||||
IRQ_TX_STATUS_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 6 - TX Empty Interrupt"]
|
||||
#[inline(always)]
|
||||
pub fn irq_tx_empty(&mut self) -> IRQ_TX_EMPTY_W {
|
||||
IRQ_TX_EMPTY_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 7 - TX CTS Change Interrupt"]
|
||||
#[inline(always)]
|
||||
pub fn irq_tx_cts(&mut self) -> IRQ_TX_CTS_W {
|
||||
IRQ_TX_CTS_W { w: 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 = "IRQ Clear Status 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 [irq_clr](index.html) module"]
|
||||
pub struct IRQ_CLR_SPEC;
|
||||
impl crate::RegisterSpec for IRQ_CLR_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [irq_clr::W](W) writer structure"]
|
||||
impl crate::Writable for IRQ_CLR_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets IRQ_CLR to value 0"]
|
||||
impl crate::Resettable for IRQ_CLR_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
395
src/uarta/irq_enb.rs
Normal file
395
src/uarta/irq_enb.rs
Normal file
@ -0,0 +1,395 @@
|
||||
#[doc = "Register `IRQ_ENB` reader"]
|
||||
pub struct R(crate::R<IRQ_ENB_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<IRQ_ENB_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<IRQ_ENB_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<IRQ_ENB_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `IRQ_ENB` writer"]
|
||||
pub struct W(crate::W<IRQ_ENB_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<IRQ_ENB_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<IRQ_ENB_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<IRQ_ENB_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IRQ_RX` reader - RX Interrupt"]
|
||||
pub struct IRQ_RX_R(crate::FieldReader<bool, bool>);
|
||||
impl IRQ_RX_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
IRQ_RX_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for IRQ_RX_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IRQ_RX` writer - RX Interrupt"]
|
||||
pub struct IRQ_RX_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> IRQ_RX_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = value as u32;
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IRQ_RX_STATUS` reader - RX Status Interrupt"]
|
||||
pub struct IRQ_RX_STATUS_R(crate::FieldReader<bool, bool>);
|
||||
impl IRQ_RX_STATUS_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
IRQ_RX_STATUS_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for IRQ_RX_STATUS_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IRQ_RX_STATUS` writer - RX Status Interrupt"]
|
||||
pub struct IRQ_RX_STATUS_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> IRQ_RX_STATUS_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IRQ_RX_TO` reader - RX Timeout Interrupt"]
|
||||
pub struct IRQ_RX_TO_R(crate::FieldReader<bool, bool>);
|
||||
impl IRQ_RX_TO_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
IRQ_RX_TO_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for IRQ_RX_TO_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IRQ_RX_TO` writer - RX Timeout Interrupt"]
|
||||
pub struct IRQ_RX_TO_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> IRQ_RX_TO_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IRQ_TX` reader - TX Interrupt"]
|
||||
pub struct IRQ_TX_R(crate::FieldReader<bool, bool>);
|
||||
impl IRQ_TX_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
IRQ_TX_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for IRQ_TX_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IRQ_TX` writer - TX Interrupt"]
|
||||
pub struct IRQ_TX_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> IRQ_TX_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IRQ_TX_STATUS` reader - TX Status Interrupt"]
|
||||
pub struct IRQ_TX_STATUS_R(crate::FieldReader<bool, bool>);
|
||||
impl IRQ_TX_STATUS_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
IRQ_TX_STATUS_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for IRQ_TX_STATUS_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IRQ_TX_STATUS` writer - TX Status Interrupt"]
|
||||
pub struct IRQ_TX_STATUS_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> IRQ_TX_STATUS_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IRQ_TX_EMPTY` reader - TX Empty Interrupt"]
|
||||
pub struct IRQ_TX_EMPTY_R(crate::FieldReader<bool, bool>);
|
||||
impl IRQ_TX_EMPTY_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
IRQ_TX_EMPTY_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for IRQ_TX_EMPTY_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IRQ_TX_EMPTY` writer - TX Empty Interrupt"]
|
||||
pub struct IRQ_TX_EMPTY_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> IRQ_TX_EMPTY_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IRQ_TX_CTS` reader - TX CTS Change Interrupt"]
|
||||
pub struct IRQ_TX_CTS_R(crate::FieldReader<bool, bool>);
|
||||
impl IRQ_TX_CTS_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
IRQ_TX_CTS_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for IRQ_TX_CTS_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IRQ_TX_CTS` writer - TX CTS Change Interrupt"]
|
||||
pub struct IRQ_TX_CTS_W<'a> {
|
||||
w: &'a mut W,
|
||||
}
|
||||
impl<'a> IRQ_TX_CTS_W<'a> {
|
||||
#[doc = r"Sets the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn set_bit(self) -> &'a mut W {
|
||||
self.bit(true)
|
||||
}
|
||||
#[doc = r"Clears the field bit"]
|
||||
#[inline(always)]
|
||||
pub fn clear_bit(self) -> &'a mut W {
|
||||
self.bit(false)
|
||||
}
|
||||
#[doc = r"Writes raw bits to the field"]
|
||||
#[inline(always)]
|
||||
pub fn bit(self, value: bool) -> &'a mut W {
|
||||
self.w.bits = (self.w.bits & !(0x01 << 7)) | ((value as u32 & 0x01) << 7);
|
||||
self.w
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - RX Interrupt"]
|
||||
#[inline(always)]
|
||||
pub fn irq_rx(&self) -> IRQ_RX_R {
|
||||
IRQ_RX_R::new(self.bits != 0)
|
||||
}
|
||||
#[doc = "Bit 1 - RX Status Interrupt"]
|
||||
#[inline(always)]
|
||||
pub fn irq_rx_status(&self) -> IRQ_RX_STATUS_R {
|
||||
IRQ_RX_STATUS_R::new(((self.bits >> 1) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - RX Timeout Interrupt"]
|
||||
#[inline(always)]
|
||||
pub fn irq_rx_to(&self) -> IRQ_RX_TO_R {
|
||||
IRQ_RX_TO_R::new(((self.bits >> 2) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 4 - TX Interrupt"]
|
||||
#[inline(always)]
|
||||
pub fn irq_tx(&self) -> IRQ_TX_R {
|
||||
IRQ_TX_R::new(((self.bits >> 4) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 5 - TX Status Interrupt"]
|
||||
#[inline(always)]
|
||||
pub fn irq_tx_status(&self) -> IRQ_TX_STATUS_R {
|
||||
IRQ_TX_STATUS_R::new(((self.bits >> 5) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 6 - TX Empty Interrupt"]
|
||||
#[inline(always)]
|
||||
pub fn irq_tx_empty(&self) -> IRQ_TX_EMPTY_R {
|
||||
IRQ_TX_EMPTY_R::new(((self.bits >> 6) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 7 - TX CTS Change Interrupt"]
|
||||
#[inline(always)]
|
||||
pub fn irq_tx_cts(&self) -> IRQ_TX_CTS_R {
|
||||
IRQ_TX_CTS_R::new(((self.bits >> 7) & 0x01) != 0)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Bit 0 - RX Interrupt"]
|
||||
#[inline(always)]
|
||||
pub fn irq_rx(&mut self) -> IRQ_RX_W {
|
||||
IRQ_RX_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 1 - RX Status Interrupt"]
|
||||
#[inline(always)]
|
||||
pub fn irq_rx_status(&mut self) -> IRQ_RX_STATUS_W {
|
||||
IRQ_RX_STATUS_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 2 - RX Timeout Interrupt"]
|
||||
#[inline(always)]
|
||||
pub fn irq_rx_to(&mut self) -> IRQ_RX_TO_W {
|
||||
IRQ_RX_TO_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 4 - TX Interrupt"]
|
||||
#[inline(always)]
|
||||
pub fn irq_tx(&mut self) -> IRQ_TX_W {
|
||||
IRQ_TX_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 5 - TX Status Interrupt"]
|
||||
#[inline(always)]
|
||||
pub fn irq_tx_status(&mut self) -> IRQ_TX_STATUS_W {
|
||||
IRQ_TX_STATUS_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 6 - TX Empty Interrupt"]
|
||||
#[inline(always)]
|
||||
pub fn irq_tx_empty(&mut self) -> IRQ_TX_EMPTY_W {
|
||||
IRQ_TX_EMPTY_W { w: self }
|
||||
}
|
||||
#[doc = "Bit 7 - TX CTS Change Interrupt"]
|
||||
#[inline(always)]
|
||||
pub fn irq_tx_cts(&mut self) -> IRQ_TX_CTS_W {
|
||||
IRQ_TX_CTS_W { w: 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 = "IRQ Enable Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [irq_enb](index.html) module"]
|
||||
pub struct IRQ_ENB_SPEC;
|
||||
impl crate::RegisterSpec for IRQ_ENB_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [irq_enb::R](R) reader structure"]
|
||||
impl crate::Readable for IRQ_ENB_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [irq_enb::W](W) writer structure"]
|
||||
impl crate::Writable for IRQ_ENB_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets IRQ_ENB to value 0"]
|
||||
impl crate::Resettable for IRQ_ENB_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
173
src/uarta/irq_end.rs
Normal file
173
src/uarta/irq_end.rs
Normal file
@ -0,0 +1,173 @@
|
||||
#[doc = "Register `IRQ_END` reader"]
|
||||
pub struct R(crate::R<IRQ_END_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<IRQ_END_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<IRQ_END_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<IRQ_END_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IRQ_RX` reader - RX Interrupt"]
|
||||
pub struct IRQ_RX_R(crate::FieldReader<bool, bool>);
|
||||
impl IRQ_RX_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
IRQ_RX_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for IRQ_RX_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IRQ_RX_STATUS` reader - RX Status Interrupt"]
|
||||
pub struct IRQ_RX_STATUS_R(crate::FieldReader<bool, bool>);
|
||||
impl IRQ_RX_STATUS_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
IRQ_RX_STATUS_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for IRQ_RX_STATUS_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IRQ_RX_TO` reader - RX Timeout Interrupt"]
|
||||
pub struct IRQ_RX_TO_R(crate::FieldReader<bool, bool>);
|
||||
impl IRQ_RX_TO_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
IRQ_RX_TO_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for IRQ_RX_TO_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IRQ_TX` reader - TX Interrupt"]
|
||||
pub struct IRQ_TX_R(crate::FieldReader<bool, bool>);
|
||||
impl IRQ_TX_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
IRQ_TX_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for IRQ_TX_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IRQ_TX_STATUS` reader - TX Status Interrupt"]
|
||||
pub struct IRQ_TX_STATUS_R(crate::FieldReader<bool, bool>);
|
||||
impl IRQ_TX_STATUS_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
IRQ_TX_STATUS_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for IRQ_TX_STATUS_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IRQ_TX_EMPTY` reader - TX Empty Interrupt"]
|
||||
pub struct IRQ_TX_EMPTY_R(crate::FieldReader<bool, bool>);
|
||||
impl IRQ_TX_EMPTY_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
IRQ_TX_EMPTY_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for IRQ_TX_EMPTY_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IRQ_TX_CTS` reader - TX CTS Change Interrupt"]
|
||||
pub struct IRQ_TX_CTS_R(crate::FieldReader<bool, bool>);
|
||||
impl IRQ_TX_CTS_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
IRQ_TX_CTS_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for IRQ_TX_CTS_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - RX Interrupt"]
|
||||
#[inline(always)]
|
||||
pub fn irq_rx(&self) -> IRQ_RX_R {
|
||||
IRQ_RX_R::new(self.bits != 0)
|
||||
}
|
||||
#[doc = "Bit 1 - RX Status Interrupt"]
|
||||
#[inline(always)]
|
||||
pub fn irq_rx_status(&self) -> IRQ_RX_STATUS_R {
|
||||
IRQ_RX_STATUS_R::new(((self.bits >> 1) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - RX Timeout Interrupt"]
|
||||
#[inline(always)]
|
||||
pub fn irq_rx_to(&self) -> IRQ_RX_TO_R {
|
||||
IRQ_RX_TO_R::new(((self.bits >> 2) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 4 - TX Interrupt"]
|
||||
#[inline(always)]
|
||||
pub fn irq_tx(&self) -> IRQ_TX_R {
|
||||
IRQ_TX_R::new(((self.bits >> 4) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 5 - TX Status Interrupt"]
|
||||
#[inline(always)]
|
||||
pub fn irq_tx_status(&self) -> IRQ_TX_STATUS_R {
|
||||
IRQ_TX_STATUS_R::new(((self.bits >> 5) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 6 - TX Empty Interrupt"]
|
||||
#[inline(always)]
|
||||
pub fn irq_tx_empty(&self) -> IRQ_TX_EMPTY_R {
|
||||
IRQ_TX_EMPTY_R::new(((self.bits >> 6) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 7 - TX CTS Change Interrupt"]
|
||||
#[inline(always)]
|
||||
pub fn irq_tx_cts(&self) -> IRQ_TX_CTS_R {
|
||||
IRQ_TX_CTS_R::new(((self.bits >> 7) & 0x01) != 0)
|
||||
}
|
||||
}
|
||||
#[doc = "IRQ Enabled Status 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 [irq_end](index.html) module"]
|
||||
pub struct IRQ_END_SPEC;
|
||||
impl crate::RegisterSpec for IRQ_END_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [irq_end::R](R) reader structure"]
|
||||
impl crate::Readable for IRQ_END_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`reset()` method sets IRQ_END to value 0"]
|
||||
impl crate::Resettable for IRQ_END_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
173
src/uarta/irq_raw.rs
Normal file
173
src/uarta/irq_raw.rs
Normal file
@ -0,0 +1,173 @@
|
||||
#[doc = "Register `IRQ_RAW` reader"]
|
||||
pub struct R(crate::R<IRQ_RAW_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<IRQ_RAW_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<IRQ_RAW_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<IRQ_RAW_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IRQ_RX` reader - RX Interrupt"]
|
||||
pub struct IRQ_RX_R(crate::FieldReader<bool, bool>);
|
||||
impl IRQ_RX_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
IRQ_RX_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for IRQ_RX_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IRQ_RX_STATUS` reader - RX Status Interrupt"]
|
||||
pub struct IRQ_RX_STATUS_R(crate::FieldReader<bool, bool>);
|
||||
impl IRQ_RX_STATUS_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
IRQ_RX_STATUS_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for IRQ_RX_STATUS_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IRQ_RX_TO` reader - RX Timeout Interrupt"]
|
||||
pub struct IRQ_RX_TO_R(crate::FieldReader<bool, bool>);
|
||||
impl IRQ_RX_TO_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
IRQ_RX_TO_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for IRQ_RX_TO_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IRQ_TX` reader - TX Interrupt"]
|
||||
pub struct IRQ_TX_R(crate::FieldReader<bool, bool>);
|
||||
impl IRQ_TX_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
IRQ_TX_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for IRQ_TX_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IRQ_TX_STATUS` reader - TX Status Interrupt"]
|
||||
pub struct IRQ_TX_STATUS_R(crate::FieldReader<bool, bool>);
|
||||
impl IRQ_TX_STATUS_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
IRQ_TX_STATUS_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for IRQ_TX_STATUS_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IRQ_TX_EMPTY` reader - TX Empty Interrupt"]
|
||||
pub struct IRQ_TX_EMPTY_R(crate::FieldReader<bool, bool>);
|
||||
impl IRQ_TX_EMPTY_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
IRQ_TX_EMPTY_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for IRQ_TX_EMPTY_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `IRQ_TX_CTS` reader - TX CTS Change Interrupt"]
|
||||
pub struct IRQ_TX_CTS_R(crate::FieldReader<bool, bool>);
|
||||
impl IRQ_TX_CTS_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
IRQ_TX_CTS_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for IRQ_TX_CTS_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - RX Interrupt"]
|
||||
#[inline(always)]
|
||||
pub fn irq_rx(&self) -> IRQ_RX_R {
|
||||
IRQ_RX_R::new(self.bits != 0)
|
||||
}
|
||||
#[doc = "Bit 1 - RX Status Interrupt"]
|
||||
#[inline(always)]
|
||||
pub fn irq_rx_status(&self) -> IRQ_RX_STATUS_R {
|
||||
IRQ_RX_STATUS_R::new(((self.bits >> 1) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - RX Timeout Interrupt"]
|
||||
#[inline(always)]
|
||||
pub fn irq_rx_to(&self) -> IRQ_RX_TO_R {
|
||||
IRQ_RX_TO_R::new(((self.bits >> 2) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 4 - TX Interrupt"]
|
||||
#[inline(always)]
|
||||
pub fn irq_tx(&self) -> IRQ_TX_R {
|
||||
IRQ_TX_R::new(((self.bits >> 4) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 5 - TX Status Interrupt"]
|
||||
#[inline(always)]
|
||||
pub fn irq_tx_status(&self) -> IRQ_TX_STATUS_R {
|
||||
IRQ_TX_STATUS_R::new(((self.bits >> 5) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 6 - TX Empty Interrupt"]
|
||||
#[inline(always)]
|
||||
pub fn irq_tx_empty(&self) -> IRQ_TX_EMPTY_R {
|
||||
IRQ_TX_EMPTY_R::new(((self.bits >> 6) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 7 - TX CTS Change Interrupt"]
|
||||
#[inline(always)]
|
||||
pub fn irq_tx_cts(&self) -> IRQ_TX_CTS_R {
|
||||
IRQ_TX_CTS_R::new(((self.bits >> 7) & 0x01) != 0)
|
||||
}
|
||||
}
|
||||
#[doc = "IRQ Raw Status 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 [irq_raw](index.html) module"]
|
||||
pub struct IRQ_RAW_SPEC;
|
||||
impl crate::RegisterSpec for IRQ_RAW_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [irq_raw::R](R) reader structure"]
|
||||
impl crate::Readable for IRQ_RAW_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`reset()` method sets IRQ_RAW to value 0"]
|
||||
impl crate::Resettable for IRQ_RAW_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
31
src/uarta/perid.rs
Normal file
31
src/uarta/perid.rs
Normal file
@ -0,0 +1,31 @@
|
||||
#[doc = "Register `PERID` reader"]
|
||||
pub struct R(crate::R<PERID_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<PERID_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<PERID_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<PERID_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Peripheral ID 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 [perid](index.html) module"]
|
||||
pub struct PERID_SPEC;
|
||||
impl crate::RegisterSpec for PERID_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [perid::R](R) reader structure"]
|
||||
impl crate::Readable for PERID_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`reset()` method sets PERID to value 0x0012_07e1"]
|
||||
impl crate::Resettable for PERID_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0x0012_07e1
|
||||
}
|
||||
}
|
64
src/uarta/rxfifoirqtrg.rs
Normal file
64
src/uarta/rxfifoirqtrg.rs
Normal file
@ -0,0 +1,64 @@
|
||||
#[doc = "Register `RXFIFOIRQTRG` reader"]
|
||||
pub struct R(crate::R<RXFIFOIRQTRG_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<RXFIFOIRQTRG_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<RXFIFOIRQTRG_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<RXFIFOIRQTRG_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `RXFIFOIRQTRG` writer"]
|
||||
pub struct W(crate::W<RXFIFOIRQTRG_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<RXFIFOIRQTRG_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<RXFIFOIRQTRG_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<RXFIFOIRQTRG_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Rx FIFO IRQ Trigger Level\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 [rxfifoirqtrg](index.html) module"]
|
||||
pub struct RXFIFOIRQTRG_SPEC;
|
||||
impl crate::RegisterSpec for RXFIFOIRQTRG_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [rxfifoirqtrg::R](R) reader structure"]
|
||||
impl crate::Readable for RXFIFOIRQTRG_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [rxfifoirqtrg::W](W) writer structure"]
|
||||
impl crate::Writable for RXFIFOIRQTRG_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets RXFIFOIRQTRG to value 0"]
|
||||
impl crate::Resettable for RXFIFOIRQTRG_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
64
src/uarta/rxfifortstrg.rs
Normal file
64
src/uarta/rxfifortstrg.rs
Normal file
@ -0,0 +1,64 @@
|
||||
#[doc = "Register `RXFIFORTSTRG` reader"]
|
||||
pub struct R(crate::R<RXFIFORTSTRG_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<RXFIFORTSTRG_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<RXFIFORTSTRG_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<RXFIFORTSTRG_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `RXFIFORTSTRG` writer"]
|
||||
pub struct W(crate::W<RXFIFORTSTRG_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<RXFIFORTSTRG_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<RXFIFORTSTRG_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<RXFIFORTSTRG_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Rx FIFO RTS Trigger Level\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 [rxfifortstrg](index.html) module"]
|
||||
pub struct RXFIFORTSTRG_SPEC;
|
||||
impl crate::RegisterSpec for RXFIFORTSTRG_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [rxfifortstrg::R](R) reader structure"]
|
||||
impl crate::Readable for RXFIFORTSTRG_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [rxfifortstrg::W](W) writer structure"]
|
||||
impl crate::Writable for RXFIFORTSTRG_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets RXFIFORTSTRG to value 0"]
|
||||
impl crate::Resettable for RXFIFORTSTRG_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
253
src/uarta/rxstatus.rs
Normal file
253
src/uarta/rxstatus.rs
Normal file
@ -0,0 +1,253 @@
|
||||
#[doc = "Register `RXSTATUS` reader"]
|
||||
pub struct R(crate::R<RXSTATUS_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<RXSTATUS_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<RXSTATUS_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<RXSTATUS_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RDAVL` reader - Read Data Available"]
|
||||
pub struct RDAVL_R(crate::FieldReader<bool, bool>);
|
||||
impl RDAVL_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RDAVL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RDAVL_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RDNFULL` reader - Read Fifo NOT Full"]
|
||||
pub struct RDNFULL_R(crate::FieldReader<bool, bool>);
|
||||
impl RDNFULL_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RDNFULL_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RDNFULL_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RXBUSY` reader - RX Busy Receiving"]
|
||||
pub struct RXBUSY_R(crate::FieldReader<bool, bool>);
|
||||
impl RXBUSY_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RXBUSY_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RXBUSY_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RXTO` reader - RX Receive Timeout"]
|
||||
pub struct RXTO_R(crate::FieldReader<bool, bool>);
|
||||
impl RXTO_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RXTO_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RXTO_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RXOVR` reader - Read Fifo Overflow"]
|
||||
pub struct RXOVR_R(crate::FieldReader<bool, bool>);
|
||||
impl RXOVR_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RXOVR_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RXOVR_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RXFRM` reader - RX Framing Error"]
|
||||
pub struct RXFRM_R(crate::FieldReader<bool, bool>);
|
||||
impl RXFRM_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RXFRM_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RXFRM_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RXPAR` reader - RX Parity Error"]
|
||||
pub struct RXPAR_R(crate::FieldReader<bool, bool>);
|
||||
impl RXPAR_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RXPAR_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RXPAR_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RXBRK` reader - RX Break Error"]
|
||||
pub struct RXBRK_R(crate::FieldReader<bool, bool>);
|
||||
impl RXBRK_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RXBRK_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RXBRK_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RXBUSYBRK` reader - RX Busy Receiving Break"]
|
||||
pub struct RXBUSYBRK_R(crate::FieldReader<bool, bool>);
|
||||
impl RXBUSYBRK_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RXBUSYBRK_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RXBUSYBRK_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RXADDR9` reader - Address Match for 9 bit mode"]
|
||||
pub struct RXADDR9_R(crate::FieldReader<bool, bool>);
|
||||
impl RXADDR9_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RXADDR9_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RXADDR9_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `RXRTSN` reader - RX RTSn Output Value"]
|
||||
pub struct RXRTSN_R(crate::FieldReader<bool, bool>);
|
||||
impl RXRTSN_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
RXRTSN_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for RXRTSN_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - Read Data Available"]
|
||||
#[inline(always)]
|
||||
pub fn rdavl(&self) -> RDAVL_R {
|
||||
RDAVL_R::new(self.bits != 0)
|
||||
}
|
||||
#[doc = "Bit 1 - Read Fifo NOT Full"]
|
||||
#[inline(always)]
|
||||
pub fn rdnfull(&self) -> RDNFULL_R {
|
||||
RDNFULL_R::new(((self.bits >> 1) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - RX Busy Receiving"]
|
||||
#[inline(always)]
|
||||
pub fn rxbusy(&self) -> RXBUSY_R {
|
||||
RXBUSY_R::new(((self.bits >> 2) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 3 - RX Receive Timeout"]
|
||||
#[inline(always)]
|
||||
pub fn rxto(&self) -> RXTO_R {
|
||||
RXTO_R::new(((self.bits >> 3) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 4 - Read Fifo Overflow"]
|
||||
#[inline(always)]
|
||||
pub fn rxovr(&self) -> RXOVR_R {
|
||||
RXOVR_R::new(((self.bits >> 4) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 5 - RX Framing Error"]
|
||||
#[inline(always)]
|
||||
pub fn rxfrm(&self) -> RXFRM_R {
|
||||
RXFRM_R::new(((self.bits >> 5) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 6 - RX Parity Error"]
|
||||
#[inline(always)]
|
||||
pub fn rxpar(&self) -> RXPAR_R {
|
||||
RXPAR_R::new(((self.bits >> 6) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 7 - RX Break Error"]
|
||||
#[inline(always)]
|
||||
pub fn rxbrk(&self) -> RXBRK_R {
|
||||
RXBRK_R::new(((self.bits >> 7) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 8 - RX Busy Receiving Break"]
|
||||
#[inline(always)]
|
||||
pub fn rxbusybrk(&self) -> RXBUSYBRK_R {
|
||||
RXBUSYBRK_R::new(((self.bits >> 8) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 9 - Address Match for 9 bit mode"]
|
||||
#[inline(always)]
|
||||
pub fn rxaddr9(&self) -> RXADDR9_R {
|
||||
RXADDR9_R::new(((self.bits >> 9) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 15 - RX RTSn Output Value"]
|
||||
#[inline(always)]
|
||||
pub fn rxrtsn(&self) -> RXRTSN_R {
|
||||
RXRTSN_R::new(((self.bits >> 15) & 0x01) != 0)
|
||||
}
|
||||
}
|
||||
#[doc = "Status 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 [rxstatus](index.html) module"]
|
||||
pub struct RXSTATUS_SPEC;
|
||||
impl crate::RegisterSpec for RXSTATUS_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [rxstatus::R](R) reader structure"]
|
||||
impl crate::Readable for RXSTATUS_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`reset()` method sets RXSTATUS to value 0"]
|
||||
impl crate::Resettable for RXSTATUS_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
31
src/uarta/state.rs
Normal file
31
src/uarta/state.rs
Normal file
@ -0,0 +1,31 @@
|
||||
#[doc = "Register `STATE` reader"]
|
||||
pub struct R(crate::R<STATE_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<STATE_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<STATE_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<STATE_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Internal STATE of UART Controller\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [state](index.html) module"]
|
||||
pub struct STATE_SPEC;
|
||||
impl crate::RegisterSpec for STATE_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [state::R](R) reader structure"]
|
||||
impl crate::Readable for STATE_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`reset()` method sets STATE to value 0"]
|
||||
impl crate::Resettable for STATE_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
45
src/uarta/txbreak.rs
Normal file
45
src/uarta/txbreak.rs
Normal file
@ -0,0 +1,45 @@
|
||||
#[doc = "Register `TXBREAK` writer"]
|
||||
pub struct W(crate::W<TXBREAK_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<TXBREAK_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<TXBREAK_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<TXBREAK_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Break Transmit 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 [txbreak](index.html) module"]
|
||||
pub struct TXBREAK_SPEC;
|
||||
impl crate::RegisterSpec for TXBREAK_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [txbreak::W](W) writer structure"]
|
||||
impl crate::Writable for TXBREAK_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets TXBREAK to value 0"]
|
||||
impl crate::Resettable for TXBREAK_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
64
src/uarta/txfifoirqtrg.rs
Normal file
64
src/uarta/txfifoirqtrg.rs
Normal file
@ -0,0 +1,64 @@
|
||||
#[doc = "Register `TXFIFOIRQTRG` reader"]
|
||||
pub struct R(crate::R<TXFIFOIRQTRG_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<TXFIFOIRQTRG_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<TXFIFOIRQTRG_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<TXFIFOIRQTRG_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Register `TXFIFOIRQTRG` writer"]
|
||||
pub struct W(crate::W<TXFIFOIRQTRG_SPEC>);
|
||||
impl core::ops::Deref for W {
|
||||
type Target = crate::W<TXFIFOIRQTRG_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<TXFIFOIRQTRG_SPEC>> for W {
|
||||
#[inline(always)]
|
||||
fn from(writer: crate::W<TXFIFOIRQTRG_SPEC>) -> Self {
|
||||
W(writer)
|
||||
}
|
||||
}
|
||||
impl W {
|
||||
#[doc = "Writes raw bits to the register."]
|
||||
#[inline(always)]
|
||||
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
|
||||
self.0.bits(bits);
|
||||
self
|
||||
}
|
||||
}
|
||||
#[doc = "Tx FIFO IRQ Trigger Level\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 [txfifoirqtrg](index.html) module"]
|
||||
pub struct TXFIFOIRQTRG_SPEC;
|
||||
impl crate::RegisterSpec for TXFIFOIRQTRG_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [txfifoirqtrg::R](R) reader structure"]
|
||||
impl crate::Readable for TXFIFOIRQTRG_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`write(|w| ..)` method takes [txfifoirqtrg::W](W) writer structure"]
|
||||
impl crate::Writable for TXFIFOIRQTRG_SPEC {
|
||||
type Writer = W;
|
||||
}
|
||||
#[doc = "`reset()` method sets TXFIFOIRQTRG to value 0"]
|
||||
impl crate::Resettable for TXFIFOIRQTRG_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
133
src/uarta/txstatus.rs
Normal file
133
src/uarta/txstatus.rs
Normal file
@ -0,0 +1,133 @@
|
||||
#[doc = "Register `TXSTATUS` reader"]
|
||||
pub struct R(crate::R<TXSTATUS_SPEC>);
|
||||
impl core::ops::Deref for R {
|
||||
type Target = crate::R<TXSTATUS_SPEC>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl From<crate::R<TXSTATUS_SPEC>> for R {
|
||||
#[inline(always)]
|
||||
fn from(reader: crate::R<TXSTATUS_SPEC>) -> Self {
|
||||
R(reader)
|
||||
}
|
||||
}
|
||||
#[doc = "Field `WRRDY` reader - Write Fifo NOT Full"]
|
||||
pub struct WRRDY_R(crate::FieldReader<bool, bool>);
|
||||
impl WRRDY_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
WRRDY_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for WRRDY_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `WRBUSY` reader - Write Fifo Full"]
|
||||
pub struct WRBUSY_R(crate::FieldReader<bool, bool>);
|
||||
impl WRBUSY_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
WRBUSY_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for WRBUSY_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TXBUSY` reader - TX Busy Transmitting"]
|
||||
pub struct TXBUSY_R(crate::FieldReader<bool, bool>);
|
||||
impl TXBUSY_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
TXBUSY_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for TXBUSY_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `WRLOST` reader - Write Data Lost (Fifo Overflow)"]
|
||||
pub struct WRLOST_R(crate::FieldReader<bool, bool>);
|
||||
impl WRLOST_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
WRLOST_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for WRLOST_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
#[doc = "Field `TXCTSN` reader - TX CTSn Input Value"]
|
||||
pub struct TXCTSN_R(crate::FieldReader<bool, bool>);
|
||||
impl TXCTSN_R {
|
||||
#[inline(always)]
|
||||
pub(crate) fn new(bits: bool) -> Self {
|
||||
TXCTSN_R(crate::FieldReader::new(bits))
|
||||
}
|
||||
}
|
||||
impl core::ops::Deref for TXCTSN_R {
|
||||
type Target = crate::FieldReader<bool, bool>;
|
||||
#[inline(always)]
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = "Bit 0 - Write Fifo NOT Full"]
|
||||
#[inline(always)]
|
||||
pub fn wrrdy(&self) -> WRRDY_R {
|
||||
WRRDY_R::new(self.bits != 0)
|
||||
}
|
||||
#[doc = "Bit 1 - Write Fifo Full"]
|
||||
#[inline(always)]
|
||||
pub fn wrbusy(&self) -> WRBUSY_R {
|
||||
WRBUSY_R::new(((self.bits >> 1) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - TX Busy Transmitting"]
|
||||
#[inline(always)]
|
||||
pub fn txbusy(&self) -> TXBUSY_R {
|
||||
TXBUSY_R::new(((self.bits >> 2) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 3 - Write Data Lost (Fifo Overflow)"]
|
||||
#[inline(always)]
|
||||
pub fn wrlost(&self) -> WRLOST_R {
|
||||
WRLOST_R::new(((self.bits >> 3) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 15 - TX CTSn Input Value"]
|
||||
#[inline(always)]
|
||||
pub fn txctsn(&self) -> TXCTSN_R {
|
||||
TXCTSN_R::new(((self.bits >> 15) & 0x01) != 0)
|
||||
}
|
||||
}
|
||||
#[doc = "Status 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 [txstatus](index.html) module"]
|
||||
pub struct TXSTATUS_SPEC;
|
||||
impl crate::RegisterSpec for TXSTATUS_SPEC {
|
||||
type Ux = u32;
|
||||
}
|
||||
#[doc = "`read()` method returns [txstatus::R](R) reader structure"]
|
||||
impl crate::Readable for TXSTATUS_SPEC {
|
||||
type Reader = R;
|
||||
}
|
||||
#[doc = "`reset()` method sets TXSTATUS to value 0"]
|
||||
impl crate::Resettable for TXSTATUS_SPEC {
|
||||
#[inline(always)]
|
||||
fn reset_value() -> Self::Ux {
|
||||
0
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user