#[doc = "Reader of register UARTCR"]
pub type R = crate::R<u32, super::UARTCR>;
#[doc = "Writer for register UARTCR"]
pub type W = crate::W<u32, super::UARTCR>;
#[doc = "Register UARTCR `reset()`'s with value 0x0300"]
impl crate::ResetValue for super::UARTCR {
type Type = u32;
#[inline(always)]
fn reset_value() -> Self::Type {
0x0300
}
}
#[doc = "Possible values of the field `UARTEN`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum UARTEN_A {
#[doc = "UART is disabled"]
DISABLE,
#[doc = "UART is enabled"]
ENABLE,
}
impl From<UARTEN_A> for bool {
#[inline(always)]
fn from(variant: UARTEN_A) -> Self {
match variant {
UARTEN_A::DISABLE => false,
UARTEN_A::ENABLE => true,
}
}
}
#[doc = "Reader of field `UARTEN`"]
pub type UARTEN_R = crate::R<bool, UARTEN_A>;
impl UARTEN_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> UARTEN_A {
match self.bits {
false => UARTEN_A::DISABLE,
true => UARTEN_A::ENABLE,
}
}
#[doc = "Checks if the value of the field is `DISABLE`"]
#[inline(always)]
pub fn is_disable(&self) -> bool {
*self == UARTEN_A::DISABLE
}
#[doc = "Checks if the value of the field is `ENABLE`"]
#[inline(always)]
pub fn is_enable(&self) -> bool {
*self == UARTEN_A::ENABLE
}
}
#[doc = "Write proxy for field `UARTEN`"]
pub struct UARTEN_W<'a> {
w: &'a mut W,
}
impl<'a> UARTEN_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: UARTEN_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "UART is disabled"]
#[inline(always)]
pub fn disable(self) -> &'a mut W {
self.variant(UARTEN_A::DISABLE)
}
#[doc = "UART is enabled"]
#[inline(always)]
pub fn enable(self) -> &'a mut W {
self.variant(UARTEN_A::ENABLE)
}
#[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
}
}
#[doc = "Possible values of the field `SIREN`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SIREN_A {
#[doc = "SIR is disabled"]
DISABLE,
#[doc = "SIR is enabled"]
ENABLE,
}
impl From<SIREN_A> for bool {
#[inline(always)]
fn from(variant: SIREN_A) -> Self {
match variant {
SIREN_A::DISABLE => false,
SIREN_A::ENABLE => true,
}
}
}
#[doc = "Reader of field `SIREN`"]
pub type SIREN_R = crate::R<bool, SIREN_A>;
impl SIREN_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> SIREN_A {
match self.bits {
false => SIREN_A::DISABLE,
true => SIREN_A::ENABLE,
}
}
#[doc = "Checks if the value of the field is `DISABLE`"]
#[inline(always)]
pub fn is_disable(&self) -> bool {
*self == SIREN_A::DISABLE
}
#[doc = "Checks if the value of the field is `ENABLE`"]
#[inline(always)]
pub fn is_enable(&self) -> bool {
*self == SIREN_A::ENABLE
}
}
#[doc = "Write proxy for field `SIREN`"]
pub struct SIREN_W<'a> {
w: &'a mut W,
}
impl<'a> SIREN_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: SIREN_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "SIR is disabled"]
#[inline(always)]
pub fn disable(self) -> &'a mut W {
self.variant(SIREN_A::DISABLE)
}
#[doc = "SIR is enabled"]
#[inline(always)]
pub fn enable(self) -> &'a mut W {
self.variant(SIREN_A::ENABLE)
}
#[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 = "Possible values of the field `SIRLP`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SIRLP_A {
#[doc = "SIR low power mode is disabled"]
DISABLE,
#[doc = "SIR low power mode is enabled"]
ENABLE,
}
impl From<SIRLP_A> for bool {
#[inline(always)]
fn from(variant: SIRLP_A) -> Self {
match variant {
SIRLP_A::DISABLE => false,
SIRLP_A::ENABLE => true,
}
}
}
#[doc = "Reader of field `SIRLP`"]
pub type SIRLP_R = crate::R<bool, SIRLP_A>;
impl SIRLP_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> SIRLP_A {
match self.bits {
false => SIRLP_A::DISABLE,
true => SIRLP_A::ENABLE,
}
}
#[doc = "Checks if the value of the field is `DISABLE`"]
#[inline(always)]
pub fn is_disable(&self) -> bool {
*self == SIRLP_A::DISABLE
}
#[doc = "Checks if the value of the field is `ENABLE`"]
#[inline(always)]
pub fn is_enable(&self) -> bool {
*self == SIRLP_A::ENABLE
}
}
#[doc = "Write proxy for field `SIRLP`"]
pub struct SIRLP_W<'a> {
w: &'a mut W,
}
impl<'a> SIRLP_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: SIRLP_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "SIR low power mode is disabled"]
#[inline(always)]
pub fn disable(self) -> &'a mut W {
self.variant(SIRLP_A::DISABLE)
}
#[doc = "SIR low power mode is enabled"]
#[inline(always)]
pub fn enable(self) -> &'a mut W {
self.variant(SIRLP_A::ENABLE)
}
#[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 = "Possible values of the field `LBE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum LBE_A {
#[doc = "Loop back mode is disabled"]
DISABLE,
#[doc = "Loop back mode is enabled"]
ENABLE,
}
impl From<LBE_A> for bool {
#[inline(always)]
fn from(variant: LBE_A) -> Self {
match variant {
LBE_A::DISABLE => false,
LBE_A::ENABLE => true,
}
}
}
#[doc = "Reader of field `LBE`"]
pub type LBE_R = crate::R<bool, LBE_A>;
impl LBE_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> LBE_A {
match self.bits {
false => LBE_A::DISABLE,
true => LBE_A::ENABLE,
}
}
#[doc = "Checks if the value of the field is `DISABLE`"]
#[inline(always)]
pub fn is_disable(&self) -> bool {
*self == LBE_A::DISABLE
}
#[doc = "Checks if the value of the field is `ENABLE`"]
#[inline(always)]
pub fn is_enable(&self) -> bool {
*self == LBE_A::ENABLE
}
}
#[doc = "Write proxy for field `LBE`"]
pub struct LBE_W<'a> {
w: &'a mut W,
}
impl<'a> LBE_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: LBE_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Loop back mode is disabled"]
#[inline(always)]
pub fn disable(self) -> &'a mut W {
self.variant(LBE_A::DISABLE)
}
#[doc = "Loop back mode is enabled"]
#[inline(always)]
pub fn enable(self) -> &'a mut W {
self.variant(LBE_A::ENABLE)
}
#[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 = "Possible values of the field `TXE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TXE_A {
#[doc = "Transmission is disabled."]
DISABLE,
#[doc = "Transmission is enabled."]
ENABLE,
}
impl From<TXE_A> for bool {
#[inline(always)]
fn from(variant: TXE_A) -> Self {
match variant {
TXE_A::DISABLE => false,
TXE_A::ENABLE => true,
}
}
}
#[doc = "Reader of field `TXE`"]
pub type TXE_R = crate::R<bool, TXE_A>;
impl TXE_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> TXE_A {
match self.bits {
false => TXE_A::DISABLE,
true => TXE_A::ENABLE,
}
}
#[doc = "Checks if the value of the field is `DISABLE`"]
#[inline(always)]
pub fn is_disable(&self) -> bool {
*self == TXE_A::DISABLE
}
#[doc = "Checks if the value of the field is `ENABLE`"]
#[inline(always)]
pub fn is_enable(&self) -> bool {
*self == TXE_A::ENABLE
}
}
#[doc = "Write proxy for field `TXE`"]
pub struct TXE_W<'a> {
w: &'a mut W,
}
impl<'a> TXE_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: TXE_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Transmission is disabled."]
#[inline(always)]
pub fn disable(self) -> &'a mut W {
self.variant(TXE_A::DISABLE)
}
#[doc = "Transmission is enabled."]
#[inline(always)]
pub fn enable(self) -> &'a mut W {
self.variant(TXE_A::ENABLE)
}
#[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 = "Possible values of the field `RXE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RXE_A {
#[doc = " Reception is disabled"]
DISABLE,
#[doc = "Reception is enabled"]
ENABLE,
}
impl From<RXE_A> for bool {
#[inline(always)]
fn from(variant: RXE_A) -> Self {
match variant {
RXE_A::DISABLE => false,
RXE_A::ENABLE => true,
}
}
}
#[doc = "Reader of field `RXE`"]
pub type RXE_R = crate::R<bool, RXE_A>;
impl RXE_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RXE_A {
match self.bits {
false => RXE_A::DISABLE,
true => RXE_A::ENABLE,
}
}
#[doc = "Checks if the value of the field is `DISABLE`"]
#[inline(always)]
pub fn is_disable(&self) -> bool {
*self == RXE_A::DISABLE
}
#[doc = "Checks if the value of the field is `ENABLE`"]
#[inline(always)]
pub fn is_enable(&self) -> bool {
*self == RXE_A::ENABLE
}
}
#[doc = "Write proxy for field `RXE`"]
pub struct RXE_W<'a> {
w: &'a mut W,
}
impl<'a> RXE_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: RXE_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Reception is disabled"]
#[inline(always)]
pub fn disable(self) -> &'a mut W {
self.variant(RXE_A::DISABLE)
}
#[doc = "Reception is enabled"]
#[inline(always)]
pub fn enable(self) -> &'a mut W {
self.variant(RXE_A::ENABLE)
}
#[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 = "Reader of field `DTR`"]
pub type DTR_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `DTR`"]
pub struct DTR_W<'a> {
w: &'a mut W,
}
impl<'a> DTR_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 = "Reader of field `RTS`"]
pub type RTS_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `RTS`"]
pub struct RTS_W<'a> {
w: &'a mut W,
}
impl<'a> RTS_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 = "Reader of field `Out1`"]
pub type OUT1_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `Out1`"]
pub struct OUT1_W<'a> {
w: &'a mut W,
}
impl<'a> OUT1_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 = "Reader of field `Out2`"]
pub type OUT2_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `Out2`"]
pub struct OUT2_W<'a> {
w: &'a mut W,
}
impl<'a> OUT2_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 = "Possible values of the field `RTSEn`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RTSEN_A {
#[doc = "RTS hardware flow control is disabled"]
DISABLE,
#[doc = "RTS hardware flow control is enabled"]
ENABLE,
}
impl From<RTSEN_A> for bool {
#[inline(always)]
fn from(variant: RTSEN_A) -> Self {
match variant {
RTSEN_A::DISABLE => false,
RTSEN_A::ENABLE => true,
}
}
}
#[doc = "Reader of field `RTSEn`"]
pub type RTSEN_R = crate::R<bool, RTSEN_A>;
impl RTSEN_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> RTSEN_A {
match self.bits {
false => RTSEN_A::DISABLE,
true => RTSEN_A::ENABLE,
}
}
#[doc = "Checks if the value of the field is `DISABLE`"]
#[inline(always)]
pub fn is_disable(&self) -> bool {
*self == RTSEN_A::DISABLE
}
#[doc = "Checks if the value of the field is `ENABLE`"]
#[inline(always)]
pub fn is_enable(&self) -> bool {
*self == RTSEN_A::ENABLE
}
}
#[doc = "Write proxy for field `RTSEn`"]
pub struct RTSEN_W<'a> {
w: &'a mut W,
}
impl<'a> RTSEN_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: RTSEN_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "RTS hardware flow control is disabled"]
#[inline(always)]
pub fn disable(self) -> &'a mut W {
self.variant(RTSEN_A::DISABLE)
}
#[doc = "RTS hardware flow control is enabled"]
#[inline(always)]
pub fn enable(self) -> &'a mut W {
self.variant(RTSEN_A::ENABLE)
}
#[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 = "Possible values of the field `CTSEn`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CTSEN_A {
#[doc = "CTS hardware flow control is disabled"]
DISABLE,
#[doc = "CTS hardware flow control is enabled"]
ENABLE,
}
impl From<CTSEN_A> for bool {
#[inline(always)]
fn from(variant: CTSEN_A) -> Self {
match variant {
CTSEN_A::DISABLE => false,
CTSEN_A::ENABLE => true,
}
}
}
#[doc = "Reader of field `CTSEn`"]
pub type CTSEN_R = crate::R<bool, CTSEN_A>;
impl CTSEN_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> CTSEN_A {
match self.bits {
false => CTSEN_A::DISABLE,
true => CTSEN_A::ENABLE,
}
}
#[doc = "Checks if the value of the field is `DISABLE`"]
#[inline(always)]
pub fn is_disable(&self) -> bool {
*self == CTSEN_A::DISABLE
}
#[doc = "Checks if the value of the field is `ENABLE`"]
#[inline(always)]
pub fn is_enable(&self) -> bool {
*self == CTSEN_A::ENABLE
}
}
#[doc = "Write proxy for field `CTSEn`"]
pub struct CTSEN_W<'a> {
w: &'a mut W,
}
impl<'a> CTSEN_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: CTSEN_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "CTS hardware flow control is disabled"]
#[inline(always)]
pub fn disable(self) -> &'a mut W {
self.variant(CTSEN_A::DISABLE)
}
#[doc = "CTS hardware flow control is enabled"]
#[inline(always)]
pub fn enable(self) -> &'a mut W {
self.variant(CTSEN_A::ENABLE)
}
#[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
}
}
impl R {
#[doc = "Bit 0 - UART enable"]
#[inline(always)]
pub fn uarten(&self) -> UARTEN_R {
UARTEN_R::new((self.bits & 0x01) != 0)
}
#[doc = "Bit 1 - SIR enable"]
#[inline(always)]
pub fn siren(&self) -> SIREN_R {
SIREN_R::new(((self.bits >> 1) & 0x01) != 0)
}
#[doc = "Bit 2 - IrDA SIR low power mode"]
#[inline(always)]
pub fn sirlp(&self) -> SIRLP_R {
SIRLP_R::new(((self.bits >> 2) & 0x01) != 0)
}
#[doc = "Bit 7 - Loop back enable"]
#[inline(always)]
pub fn lbe(&self) -> LBE_R {
LBE_R::new(((self.bits >> 7) & 0x01) != 0)
}
#[doc = "Bit 8 - Transmit enable"]
#[inline(always)]
pub fn txe(&self) -> TXE_R {
TXE_R::new(((self.bits >> 8) & 0x01) != 0)
}
#[doc = "Bit 9 - Receive enable"]
#[inline(always)]
pub fn rxe(&self) -> RXE_R {
RXE_R::new(((self.bits >> 9) & 0x01) != 0)
}
#[doc = "Bit 10 - Data transmit ready"]
#[inline(always)]
pub fn dtr(&self) -> DTR_R {
DTR_R::new(((self.bits >> 10) & 0x01) != 0)
}
#[doc = "Bit 11 - Request to send"]
#[inline(always)]
pub fn rts(&self) -> RTS_R {
RTS_R::new(((self.bits >> 11) & 0x01) != 0)
}
#[doc = "Bit 12 - Complement of the UART Out1"]
#[inline(always)]
pub fn out1(&self) -> OUT1_R {
OUT1_R::new(((self.bits >> 12) & 0x01) != 0)
}
#[doc = "Bit 13 - Complement of the UART Out2"]
#[inline(always)]
pub fn out2(&self) -> OUT2_R {
OUT2_R::new(((self.bits >> 13) & 0x01) != 0)
}
#[doc = "Bit 14 - RTS hardware flow control enable"]
#[inline(always)]
pub fn rtsen(&self) -> RTSEN_R {
RTSEN_R::new(((self.bits >> 14) & 0x01) != 0)
}
#[doc = "Bit 15 - CTS hardware flow control enable"]
#[inline(always)]
pub fn ctsen(&self) -> CTSEN_R {
CTSEN_R::new(((self.bits >> 15) & 0x01) != 0)
}
}
impl W {
#[doc = "Bit 0 - UART enable"]
#[inline(always)]
pub fn uarten(&mut self) -> UARTEN_W {
UARTEN_W { w: self }
}
#[doc = "Bit 1 - SIR enable"]
#[inline(always)]
pub fn siren(&mut self) -> SIREN_W {
SIREN_W { w: self }
}
#[doc = "Bit 2 - IrDA SIR low power mode"]
#[inline(always)]
pub fn sirlp(&mut self) -> SIRLP_W {
SIRLP_W { w: self }
}
#[doc = "Bit 7 - Loop back enable"]
#[inline(always)]
pub fn lbe(&mut self) -> LBE_W {
LBE_W { w: self }
}
#[doc = "Bit 8 - Transmit enable"]
#[inline(always)]
pub fn txe(&mut self) -> TXE_W {
TXE_W { w: self }
}
#[doc = "Bit 9 - Receive enable"]
#[inline(always)]
pub fn rxe(&mut self) -> RXE_W {
RXE_W { w: self }
}
#[doc = "Bit 10 - Data transmit ready"]
#[inline(always)]
pub fn dtr(&mut self) -> DTR_W {
DTR_W { w: self }
}
#[doc = "Bit 11 - Request to send"]
#[inline(always)]
pub fn rts(&mut self) -> RTS_W {
RTS_W { w: self }
}
#[doc = "Bit 12 - Complement of the UART Out1"]
#[inline(always)]
pub fn out1(&mut self) -> OUT1_W {
OUT1_W { w: self }
}
#[doc = "Bit 13 - Complement of the UART Out2"]
#[inline(always)]
pub fn out2(&mut self) -> OUT2_W {
OUT2_W { w: self }
}
#[doc = "Bit 14 - RTS hardware flow control enable"]
#[inline(always)]
pub fn rtsen(&mut self) -> RTSEN_W {
RTSEN_W { w: self }
}
#[doc = "Bit 15 - CTS hardware flow control enable"]
#[inline(always)]
pub fn ctsen(&mut self) -> CTSEN_W {
CTSEN_W { w: self }
}
}