#[doc = "Register `CR1` reader"]
pub struct R(crate::R<CR1_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<CR1_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<CR1_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<CR1_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `CR1` writer"]
pub struct W(crate::W<CR1_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<CR1_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<CR1_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<CR1_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `RXFFIE` reader - RXFFIE"]
pub struct RXFFIE_R(crate::FieldReader<bool, bool>);
impl RXFFIE_R {
pub(crate) fn new(bits: bool) -> Self {
RXFFIE_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for RXFFIE_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `RXFFIE` writer - RXFFIE"]
pub struct RXFFIE_W<'a> {
w: &'a mut W,
}
impl<'a> RXFFIE_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
}
}
#[doc = "Field `TXFEIE` reader - TXFEIE"]
pub struct TXFEIE_R(crate::FieldReader<bool, bool>);
impl TXFEIE_R {
pub(crate) fn new(bits: bool) -> Self {
TXFEIE_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for TXFEIE_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `TXFEIE` writer - TXFEIE"]
pub struct TXFEIE_W<'a> {
w: &'a mut W,
}
impl<'a> TXFEIE_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 << 30)) | ((value as u32 & 0x01) << 30);
self.w
}
}
#[doc = "Field `FIFOEN` reader - FIFOEN"]
pub struct FIFOEN_R(crate::FieldReader<bool, bool>);
impl FIFOEN_R {
pub(crate) fn new(bits: bool) -> Self {
FIFOEN_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for FIFOEN_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `FIFOEN` writer - FIFOEN"]
pub struct FIFOEN_W<'a> {
w: &'a mut W,
}
impl<'a> FIFOEN_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 << 29)) | ((value as u32 & 0x01) << 29);
self.w
}
}
#[doc = "Field `M1` reader - M1"]
pub struct M1_R(crate::FieldReader<bool, bool>);
impl M1_R {
pub(crate) fn new(bits: bool) -> Self {
M1_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for M1_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `M1` writer - M1"]
pub struct M1_W<'a> {
w: &'a mut W,
}
impl<'a> M1_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 << 28)) | ((value as u32 & 0x01) << 28);
self.w
}
}
#[doc = "Field `EOBIE` reader - End of Block interrupt enable"]
pub struct EOBIE_R(crate::FieldReader<bool, bool>);
impl EOBIE_R {
pub(crate) fn new(bits: bool) -> Self {
EOBIE_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for EOBIE_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `EOBIE` writer - End of Block interrupt enable"]
pub struct EOBIE_W<'a> {
w: &'a mut W,
}
impl<'a> EOBIE_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 << 27)) | ((value as u32 & 0x01) << 27);
self.w
}
}
#[doc = "Field `RTOIE` reader - Receiver timeout interrupt enable"]
pub struct RTOIE_R(crate::FieldReader<bool, bool>);
impl RTOIE_R {
pub(crate) fn new(bits: bool) -> Self {
RTOIE_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for RTOIE_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `RTOIE` writer - Receiver timeout interrupt enable"]
pub struct RTOIE_W<'a> {
w: &'a mut W,
}
impl<'a> RTOIE_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 << 26)) | ((value as u32 & 0x01) << 26);
self.w
}
}
#[doc = "Field `DEAT4` reader - Driver Enable assertion time"]
pub struct DEAT4_R(crate::FieldReader<bool, bool>);
impl DEAT4_R {
pub(crate) fn new(bits: bool) -> Self {
DEAT4_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for DEAT4_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `DEAT4` writer - Driver Enable assertion time"]
pub struct DEAT4_W<'a> {
w: &'a mut W,
}
impl<'a> DEAT4_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 << 25)) | ((value as u32 & 0x01) << 25);
self.w
}
}
#[doc = "Field `DEAT3` reader - DEAT3"]
pub struct DEAT3_R(crate::FieldReader<bool, bool>);
impl DEAT3_R {
pub(crate) fn new(bits: bool) -> Self {
DEAT3_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for DEAT3_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `DEAT3` writer - DEAT3"]
pub struct DEAT3_W<'a> {
w: &'a mut W,
}
impl<'a> DEAT3_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 << 24)) | ((value as u32 & 0x01) << 24);
self.w
}
}
#[doc = "Field `DEAT2` reader - DEAT2"]
pub struct DEAT2_R(crate::FieldReader<bool, bool>);
impl DEAT2_R {
pub(crate) fn new(bits: bool) -> Self {
DEAT2_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for DEAT2_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `DEAT2` writer - DEAT2"]
pub struct DEAT2_W<'a> {
w: &'a mut W,
}
impl<'a> DEAT2_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 << 23)) | ((value as u32 & 0x01) << 23);
self.w
}
}
#[doc = "Field `DEAT1` reader - DEAT1"]
pub struct DEAT1_R(crate::FieldReader<bool, bool>);
impl DEAT1_R {
pub(crate) fn new(bits: bool) -> Self {
DEAT1_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for DEAT1_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `DEAT1` writer - DEAT1"]
pub struct DEAT1_W<'a> {
w: &'a mut W,
}
impl<'a> DEAT1_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 << 22)) | ((value as u32 & 0x01) << 22);
self.w
}
}
#[doc = "Field `DEAT0` reader - DEAT0"]
pub struct DEAT0_R(crate::FieldReader<bool, bool>);
impl DEAT0_R {
pub(crate) fn new(bits: bool) -> Self {
DEAT0_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for DEAT0_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `DEAT0` writer - DEAT0"]
pub struct DEAT0_W<'a> {
w: &'a mut W,
}
impl<'a> DEAT0_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 << 21)) | ((value as u32 & 0x01) << 21);
self.w
}
}
#[doc = "Field `DEDT4` reader - Driver Enable de-assertion time"]
pub struct DEDT4_R(crate::FieldReader<bool, bool>);
impl DEDT4_R {
pub(crate) fn new(bits: bool) -> Self {
DEDT4_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for DEDT4_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `DEDT4` writer - Driver Enable de-assertion time"]
pub struct DEDT4_W<'a> {
w: &'a mut W,
}
impl<'a> DEDT4_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 << 20)) | ((value as u32 & 0x01) << 20);
self.w
}
}
#[doc = "Field `DEDT3` reader - DEDT3"]
pub struct DEDT3_R(crate::FieldReader<bool, bool>);
impl DEDT3_R {
pub(crate) fn new(bits: bool) -> Self {
DEDT3_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for DEDT3_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `DEDT3` writer - DEDT3"]
pub struct DEDT3_W<'a> {
w: &'a mut W,
}
impl<'a> DEDT3_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 << 19)) | ((value as u32 & 0x01) << 19);
self.w
}
}
#[doc = "Field `DEDT2` reader - DEDT2"]
pub struct DEDT2_R(crate::FieldReader<bool, bool>);
impl DEDT2_R {
pub(crate) fn new(bits: bool) -> Self {
DEDT2_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for DEDT2_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `DEDT2` writer - DEDT2"]
pub struct DEDT2_W<'a> {
w: &'a mut W,
}
impl<'a> DEDT2_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 << 18)) | ((value as u32 & 0x01) << 18);
self.w
}
}
#[doc = "Field `DEDT1` reader - DEDT1"]
pub struct DEDT1_R(crate::FieldReader<bool, bool>);
impl DEDT1_R {
pub(crate) fn new(bits: bool) -> Self {
DEDT1_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for DEDT1_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `DEDT1` writer - DEDT1"]
pub struct DEDT1_W<'a> {
w: &'a mut W,
}
impl<'a> DEDT1_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 << 17)) | ((value as u32 & 0x01) << 17);
self.w
}
}
#[doc = "Field `DEDT0` reader - DEDT0"]
pub struct DEDT0_R(crate::FieldReader<bool, bool>);
impl DEDT0_R {
pub(crate) fn new(bits: bool) -> Self {
DEDT0_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for DEDT0_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `DEDT0` writer - DEDT0"]
pub struct DEDT0_W<'a> {
w: &'a mut W,
}
impl<'a> DEDT0_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 << 16)) | ((value as u32 & 0x01) << 16);
self.w
}
}
#[doc = "Field `OVER8` reader - Oversampling mode"]
pub struct OVER8_R(crate::FieldReader<bool, bool>);
impl OVER8_R {
pub(crate) fn new(bits: bool) -> Self {
OVER8_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for OVER8_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `OVER8` writer - Oversampling mode"]
pub struct OVER8_W<'a> {
w: &'a mut W,
}
impl<'a> OVER8_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 << 15)) | ((value as u32 & 0x01) << 15);
self.w
}
}
#[doc = "Field `CMIE` reader - Character match interrupt enable"]
pub struct CMIE_R(crate::FieldReader<bool, bool>);
impl CMIE_R {
pub(crate) fn new(bits: bool) -> Self {
CMIE_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for CMIE_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `CMIE` writer - Character match interrupt enable"]
pub struct CMIE_W<'a> {
w: &'a mut W,
}
impl<'a> CMIE_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 << 14)) | ((value as u32 & 0x01) << 14);
self.w
}
}
#[doc = "Field `MME` reader - Mute mode enable"]
pub struct MME_R(crate::FieldReader<bool, bool>);
impl MME_R {
pub(crate) fn new(bits: bool) -> Self {
MME_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for MME_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `MME` writer - Mute mode enable"]
pub struct MME_W<'a> {
w: &'a mut W,
}
impl<'a> MME_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 << 13)) | ((value as u32 & 0x01) << 13);
self.w
}
}
#[doc = "Field `M0` reader - Word length"]
pub struct M0_R(crate::FieldReader<bool, bool>);
impl M0_R {
pub(crate) fn new(bits: bool) -> Self {
M0_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for M0_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `M0` writer - Word length"]
pub struct M0_W<'a> {
w: &'a mut W,
}
impl<'a> M0_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 << 12)) | ((value as u32 & 0x01) << 12);
self.w
}
}
#[doc = "Field `WAKE` reader - Receiver wakeup method"]
pub struct WAKE_R(crate::FieldReader<bool, bool>);
impl WAKE_R {
pub(crate) fn new(bits: bool) -> Self {
WAKE_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for WAKE_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `WAKE` writer - Receiver wakeup method"]
pub struct WAKE_W<'a> {
w: &'a mut W,
}
impl<'a> WAKE_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
}
}
#[doc = "Field `PCE` reader - Parity control enable"]
pub struct PCE_R(crate::FieldReader<bool, bool>);
impl PCE_R {
pub(crate) fn new(bits: bool) -> Self {
PCE_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for PCE_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `PCE` writer - Parity control enable"]
pub struct PCE_W<'a> {
w: &'a mut W,
}
impl<'a> PCE_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 `PS` reader - Parity selection"]
pub struct PS_R(crate::FieldReader<bool, bool>);
impl PS_R {
pub(crate) fn new(bits: bool) -> Self {
PS_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for PS_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `PS` writer - Parity selection"]
pub struct PS_W<'a> {
w: &'a mut W,
}
impl<'a> PS_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 `PEIE` reader - PE interrupt enable"]
pub struct PEIE_R(crate::FieldReader<bool, bool>);
impl PEIE_R {
pub(crate) fn new(bits: bool) -> Self {
PEIE_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for PEIE_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `PEIE` writer - PE interrupt enable"]
pub struct PEIE_W<'a> {
w: &'a mut W,
}
impl<'a> PEIE_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 `TXEIE` reader - interrupt enable"]
pub struct TXEIE_R(crate::FieldReader<bool, bool>);
impl TXEIE_R {
pub(crate) fn new(bits: bool) -> Self {
TXEIE_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for TXEIE_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `TXEIE` writer - interrupt enable"]
pub struct TXEIE_W<'a> {
w: &'a mut W,
}
impl<'a> TXEIE_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 `TCIE` reader - Transmission complete interrupt enable"]
pub struct TCIE_R(crate::FieldReader<bool, bool>);
impl TCIE_R {
pub(crate) fn new(bits: bool) -> Self {
TCIE_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for TCIE_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `TCIE` writer - Transmission complete interrupt enable"]
pub struct TCIE_W<'a> {
w: &'a mut W,
}
impl<'a> TCIE_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 `RXNEIE` reader - RXNE interrupt enable"]
pub struct RXNEIE_R(crate::FieldReader<bool, bool>);
impl RXNEIE_R {
pub(crate) fn new(bits: bool) -> Self {
RXNEIE_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for RXNEIE_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `RXNEIE` writer - RXNE interrupt enable"]
pub struct RXNEIE_W<'a> {
w: &'a mut W,
}
impl<'a> RXNEIE_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 `IDLEIE` reader - IDLE interrupt enable"]
pub struct IDLEIE_R(crate::FieldReader<bool, bool>);
impl IDLEIE_R {
pub(crate) fn new(bits: bool) -> Self {
IDLEIE_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for IDLEIE_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `IDLEIE` writer - IDLE interrupt enable"]
pub struct IDLEIE_W<'a> {
w: &'a mut W,
}
impl<'a> IDLEIE_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 `TE` reader - Transmitter enable"]
pub struct TE_R(crate::FieldReader<bool, bool>);
impl TE_R {
pub(crate) fn new(bits: bool) -> Self {
TE_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for TE_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `TE` writer - Transmitter enable"]
pub struct TE_W<'a> {
w: &'a mut W,
}
impl<'a> TE_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 `RE` reader - Receiver enable"]
pub struct RE_R(crate::FieldReader<bool, bool>);
impl RE_R {
pub(crate) fn new(bits: bool) -> Self {
RE_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for RE_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `RE` writer - Receiver enable"]
pub struct RE_W<'a> {
w: &'a mut W,
}
impl<'a> RE_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 `UESM` reader - USART enable in Stop mode"]
pub struct UESM_R(crate::FieldReader<bool, bool>);
impl UESM_R {
pub(crate) fn new(bits: bool) -> Self {
UESM_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for UESM_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `UESM` writer - USART enable in Stop mode"]
pub struct UESM_W<'a> {
w: &'a mut W,
}
impl<'a> UESM_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 `UE` reader - USART enable"]
pub struct UE_R(crate::FieldReader<bool, bool>);
impl UE_R {
pub(crate) fn new(bits: bool) -> Self {
UE_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for UE_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `UE` writer - USART enable"]
pub struct UE_W<'a> {
w: &'a mut W,
}
impl<'a> UE_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) | (value as u32 & 0x01);
self.w
}
}
impl R {
#[doc = "Bit 31 - RXFFIE"]
#[inline(always)]
pub fn rxffie(&self) -> RXFFIE_R {
RXFFIE_R::new(((self.bits >> 31) & 0x01) != 0)
}
#[doc = "Bit 30 - TXFEIE"]
#[inline(always)]
pub fn txfeie(&self) -> TXFEIE_R {
TXFEIE_R::new(((self.bits >> 30) & 0x01) != 0)
}
#[doc = "Bit 29 - FIFOEN"]
#[inline(always)]
pub fn fifoen(&self) -> FIFOEN_R {
FIFOEN_R::new(((self.bits >> 29) & 0x01) != 0)
}
#[doc = "Bit 28 - M1"]
#[inline(always)]
pub fn m1(&self) -> M1_R {
M1_R::new(((self.bits >> 28) & 0x01) != 0)
}
#[doc = "Bit 27 - End of Block interrupt enable"]
#[inline(always)]
pub fn eobie(&self) -> EOBIE_R {
EOBIE_R::new(((self.bits >> 27) & 0x01) != 0)
}
#[doc = "Bit 26 - Receiver timeout interrupt enable"]
#[inline(always)]
pub fn rtoie(&self) -> RTOIE_R {
RTOIE_R::new(((self.bits >> 26) & 0x01) != 0)
}
#[doc = "Bit 25 - Driver Enable assertion time"]
#[inline(always)]
pub fn deat4(&self) -> DEAT4_R {
DEAT4_R::new(((self.bits >> 25) & 0x01) != 0)
}
#[doc = "Bit 24 - DEAT3"]
#[inline(always)]
pub fn deat3(&self) -> DEAT3_R {
DEAT3_R::new(((self.bits >> 24) & 0x01) != 0)
}
#[doc = "Bit 23 - DEAT2"]
#[inline(always)]
pub fn deat2(&self) -> DEAT2_R {
DEAT2_R::new(((self.bits >> 23) & 0x01) != 0)
}
#[doc = "Bit 22 - DEAT1"]
#[inline(always)]
pub fn deat1(&self) -> DEAT1_R {
DEAT1_R::new(((self.bits >> 22) & 0x01) != 0)
}
#[doc = "Bit 21 - DEAT0"]
#[inline(always)]
pub fn deat0(&self) -> DEAT0_R {
DEAT0_R::new(((self.bits >> 21) & 0x01) != 0)
}
#[doc = "Bit 20 - Driver Enable de-assertion time"]
#[inline(always)]
pub fn dedt4(&self) -> DEDT4_R {
DEDT4_R::new(((self.bits >> 20) & 0x01) != 0)
}
#[doc = "Bit 19 - DEDT3"]
#[inline(always)]
pub fn dedt3(&self) -> DEDT3_R {
DEDT3_R::new(((self.bits >> 19) & 0x01) != 0)
}
#[doc = "Bit 18 - DEDT2"]
#[inline(always)]
pub fn dedt2(&self) -> DEDT2_R {
DEDT2_R::new(((self.bits >> 18) & 0x01) != 0)
}
#[doc = "Bit 17 - DEDT1"]
#[inline(always)]
pub fn dedt1(&self) -> DEDT1_R {
DEDT1_R::new(((self.bits >> 17) & 0x01) != 0)
}
#[doc = "Bit 16 - DEDT0"]
#[inline(always)]
pub fn dedt0(&self) -> DEDT0_R {
DEDT0_R::new(((self.bits >> 16) & 0x01) != 0)
}
#[doc = "Bit 15 - Oversampling mode"]
#[inline(always)]
pub fn over8(&self) -> OVER8_R {
OVER8_R::new(((self.bits >> 15) & 0x01) != 0)
}
#[doc = "Bit 14 - Character match interrupt enable"]
#[inline(always)]
pub fn cmie(&self) -> CMIE_R {
CMIE_R::new(((self.bits >> 14) & 0x01) != 0)
}
#[doc = "Bit 13 - Mute mode enable"]
#[inline(always)]
pub fn mme(&self) -> MME_R {
MME_R::new(((self.bits >> 13) & 0x01) != 0)
}
#[doc = "Bit 12 - Word length"]
#[inline(always)]
pub fn m0(&self) -> M0_R {
M0_R::new(((self.bits >> 12) & 0x01) != 0)
}
#[doc = "Bit 11 - Receiver wakeup method"]
#[inline(always)]
pub fn wake(&self) -> WAKE_R {
WAKE_R::new(((self.bits >> 11) & 0x01) != 0)
}
#[doc = "Bit 10 - Parity control enable"]
#[inline(always)]
pub fn pce(&self) -> PCE_R {
PCE_R::new(((self.bits >> 10) & 0x01) != 0)
}
#[doc = "Bit 9 - Parity selection"]
#[inline(always)]
pub fn ps(&self) -> PS_R {
PS_R::new(((self.bits >> 9) & 0x01) != 0)
}
#[doc = "Bit 8 - PE interrupt enable"]
#[inline(always)]
pub fn peie(&self) -> PEIE_R {
PEIE_R::new(((self.bits >> 8) & 0x01) != 0)
}
#[doc = "Bit 7 - interrupt enable"]
#[inline(always)]
pub fn txeie(&self) -> TXEIE_R {
TXEIE_R::new(((self.bits >> 7) & 0x01) != 0)
}
#[doc = "Bit 6 - Transmission complete interrupt enable"]
#[inline(always)]
pub fn tcie(&self) -> TCIE_R {
TCIE_R::new(((self.bits >> 6) & 0x01) != 0)
}
#[doc = "Bit 5 - RXNE interrupt enable"]
#[inline(always)]
pub fn rxneie(&self) -> RXNEIE_R {
RXNEIE_R::new(((self.bits >> 5) & 0x01) != 0)
}
#[doc = "Bit 4 - IDLE interrupt enable"]
#[inline(always)]
pub fn idleie(&self) -> IDLEIE_R {
IDLEIE_R::new(((self.bits >> 4) & 0x01) != 0)
}
#[doc = "Bit 3 - Transmitter enable"]
#[inline(always)]
pub fn te(&self) -> TE_R {
TE_R::new(((self.bits >> 3) & 0x01) != 0)
}
#[doc = "Bit 2 - Receiver enable"]
#[inline(always)]
pub fn re(&self) -> RE_R {
RE_R::new(((self.bits >> 2) & 0x01) != 0)
}
#[doc = "Bit 1 - USART enable in Stop mode"]
#[inline(always)]
pub fn uesm(&self) -> UESM_R {
UESM_R::new(((self.bits >> 1) & 0x01) != 0)
}
#[doc = "Bit 0 - USART enable"]
#[inline(always)]
pub fn ue(&self) -> UE_R {
UE_R::new((self.bits & 0x01) != 0)
}
}
impl W {
#[doc = "Bit 31 - RXFFIE"]
#[inline(always)]
pub fn rxffie(&mut self) -> RXFFIE_W {
RXFFIE_W { w: self }
}
#[doc = "Bit 30 - TXFEIE"]
#[inline(always)]
pub fn txfeie(&mut self) -> TXFEIE_W {
TXFEIE_W { w: self }
}
#[doc = "Bit 29 - FIFOEN"]
#[inline(always)]
pub fn fifoen(&mut self) -> FIFOEN_W {
FIFOEN_W { w: self }
}
#[doc = "Bit 28 - M1"]
#[inline(always)]
pub fn m1(&mut self) -> M1_W {
M1_W { w: self }
}
#[doc = "Bit 27 - End of Block interrupt enable"]
#[inline(always)]
pub fn eobie(&mut self) -> EOBIE_W {
EOBIE_W { w: self }
}
#[doc = "Bit 26 - Receiver timeout interrupt enable"]
#[inline(always)]
pub fn rtoie(&mut self) -> RTOIE_W {
RTOIE_W { w: self }
}
#[doc = "Bit 25 - Driver Enable assertion time"]
#[inline(always)]
pub fn deat4(&mut self) -> DEAT4_W {
DEAT4_W { w: self }
}
#[doc = "Bit 24 - DEAT3"]
#[inline(always)]
pub fn deat3(&mut self) -> DEAT3_W {
DEAT3_W { w: self }
}
#[doc = "Bit 23 - DEAT2"]
#[inline(always)]
pub fn deat2(&mut self) -> DEAT2_W {
DEAT2_W { w: self }
}
#[doc = "Bit 22 - DEAT1"]
#[inline(always)]
pub fn deat1(&mut self) -> DEAT1_W {
DEAT1_W { w: self }
}
#[doc = "Bit 21 - DEAT0"]
#[inline(always)]
pub fn deat0(&mut self) -> DEAT0_W {
DEAT0_W { w: self }
}
#[doc = "Bit 20 - Driver Enable de-assertion time"]
#[inline(always)]
pub fn dedt4(&mut self) -> DEDT4_W {
DEDT4_W { w: self }
}
#[doc = "Bit 19 - DEDT3"]
#[inline(always)]
pub fn dedt3(&mut self) -> DEDT3_W {
DEDT3_W { w: self }
}
#[doc = "Bit 18 - DEDT2"]
#[inline(always)]
pub fn dedt2(&mut self) -> DEDT2_W {
DEDT2_W { w: self }
}
#[doc = "Bit 17 - DEDT1"]
#[inline(always)]
pub fn dedt1(&mut self) -> DEDT1_W {
DEDT1_W { w: self }
}
#[doc = "Bit 16 - DEDT0"]
#[inline(always)]
pub fn dedt0(&mut self) -> DEDT0_W {
DEDT0_W { w: self }
}
#[doc = "Bit 15 - Oversampling mode"]
#[inline(always)]
pub fn over8(&mut self) -> OVER8_W {
OVER8_W { w: self }
}
#[doc = "Bit 14 - Character match interrupt enable"]
#[inline(always)]
pub fn cmie(&mut self) -> CMIE_W {
CMIE_W { w: self }
}
#[doc = "Bit 13 - Mute mode enable"]
#[inline(always)]
pub fn mme(&mut self) -> MME_W {
MME_W { w: self }
}
#[doc = "Bit 12 - Word length"]
#[inline(always)]
pub fn m0(&mut self) -> M0_W {
M0_W { w: self }
}
#[doc = "Bit 11 - Receiver wakeup method"]
#[inline(always)]
pub fn wake(&mut self) -> WAKE_W {
WAKE_W { w: self }
}
#[doc = "Bit 10 - Parity control enable"]
#[inline(always)]
pub fn pce(&mut self) -> PCE_W {
PCE_W { w: self }
}
#[doc = "Bit 9 - Parity selection"]
#[inline(always)]
pub fn ps(&mut self) -> PS_W {
PS_W { w: self }
}
#[doc = "Bit 8 - PE interrupt enable"]
#[inline(always)]
pub fn peie(&mut self) -> PEIE_W {
PEIE_W { w: self }
}
#[doc = "Bit 7 - interrupt enable"]
#[inline(always)]
pub fn txeie(&mut self) -> TXEIE_W {
TXEIE_W { w: self }
}
#[doc = "Bit 6 - Transmission complete interrupt enable"]
#[inline(always)]
pub fn tcie(&mut self) -> TCIE_W {
TCIE_W { w: self }
}
#[doc = "Bit 5 - RXNE interrupt enable"]
#[inline(always)]
pub fn rxneie(&mut self) -> RXNEIE_W {
RXNEIE_W { w: self }
}
#[doc = "Bit 4 - IDLE interrupt enable"]
#[inline(always)]
pub fn idleie(&mut self) -> IDLEIE_W {
IDLEIE_W { w: self }
}
#[doc = "Bit 3 - Transmitter enable"]
#[inline(always)]
pub fn te(&mut self) -> TE_W {
TE_W { w: self }
}
#[doc = "Bit 2 - Receiver enable"]
#[inline(always)]
pub fn re(&mut self) -> RE_W {
RE_W { w: self }
}
#[doc = "Bit 1 - USART enable in Stop mode"]
#[inline(always)]
pub fn uesm(&mut self) -> UESM_W {
UESM_W { w: self }
}
#[doc = "Bit 0 - USART enable"]
#[inline(always)]
pub fn ue(&mut self) -> UE_W {
UE_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 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [cr1](index.html) module"]
pub struct CR1_SPEC;
impl crate::RegisterSpec for CR1_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [cr1::R](R) reader structure"]
impl crate::Readable for CR1_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [cr1::W](W) writer structure"]
impl crate::Writable for CR1_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets CR1 to value 0"]
impl crate::Resettable for CR1_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}