#[doc = "Reader of register ICR"]
pub type R = crate::R<u32, super::ICR>;
#[doc = "Writer for register ICR"]
pub type W = crate::W<u32, super::ICR>;
#[doc = "Register ICR `reset()`'s with value 0"]
impl crate::ResetValue for super::ICR {
type Type = u32;
#[inline(always)]
fn reset_value() -> Self::Type {
0
}
}
#[doc = "Wakeup from Stop mode clear flag\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum WUCF_A {
#[doc = "1: Clears the WUF flag in the ISR register"]
CLEAR,
}
impl From<WUCF_A> for bool {
#[inline(always)]
fn from(variant: WUCF_A) -> Self {
match variant {
WUCF_A::CLEAR => true,
}
}
}
#[doc = "Reader of field `WUCF`"]
pub type WUCF_R = crate::R<bool, WUCF_A>;
impl WUCF_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> crate::Variant<bool, WUCF_A> {
use crate::Variant::*;
match self.bits {
true => Val(WUCF_A::CLEAR),
i => Res(i),
}
}
#[doc = "Checks if the value of the field is `CLEAR`"]
#[inline(always)]
pub fn is_clear(&self) -> bool {
*self == WUCF_A::CLEAR
}
}
#[doc = "Write proxy for field `WUCF`"]
pub struct WUCF_W<'a> {
w: &'a mut W,
}
impl<'a> WUCF_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: WUCF_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Clears the WUF flag in the ISR register"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(WUCF_A::CLEAR)
}
#[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 = "Character match clear flag\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CMCF_A {
#[doc = "1: Clears the CMF flag in the ISR register"]
CLEAR,
}
impl From<CMCF_A> for bool {
#[inline(always)]
fn from(variant: CMCF_A) -> Self {
match variant {
CMCF_A::CLEAR => true,
}
}
}
#[doc = "Reader of field `CMCF`"]
pub type CMCF_R = crate::R<bool, CMCF_A>;
impl CMCF_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> crate::Variant<bool, CMCF_A> {
use crate::Variant::*;
match self.bits {
true => Val(CMCF_A::CLEAR),
i => Res(i),
}
}
#[doc = "Checks if the value of the field is `CLEAR`"]
#[inline(always)]
pub fn is_clear(&self) -> bool {
*self == CMCF_A::CLEAR
}
}
#[doc = "Write proxy for field `CMCF`"]
pub struct CMCF_W<'a> {
w: &'a mut W,
}
impl<'a> CMCF_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: CMCF_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Clears the CMF flag in the ISR register"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(CMCF_A::CLEAR)
}
#[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 = "End of timeout clear flag\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EOBCF_A {
#[doc = "1: Clears the EOBF flag in the ISR register"]
CLEAR,
}
impl From<EOBCF_A> for bool {
#[inline(always)]
fn from(variant: EOBCF_A) -> Self {
match variant {
EOBCF_A::CLEAR => true,
}
}
}
#[doc = "Reader of field `EOBCF`"]
pub type EOBCF_R = crate::R<bool, EOBCF_A>;
impl EOBCF_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> crate::Variant<bool, EOBCF_A> {
use crate::Variant::*;
match self.bits {
true => Val(EOBCF_A::CLEAR),
i => Res(i),
}
}
#[doc = "Checks if the value of the field is `CLEAR`"]
#[inline(always)]
pub fn is_clear(&self) -> bool {
*self == EOBCF_A::CLEAR
}
}
#[doc = "Write proxy for field `EOBCF`"]
pub struct EOBCF_W<'a> {
w: &'a mut W,
}
impl<'a> EOBCF_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: EOBCF_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Clears the EOBF flag in the ISR register"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(EOBCF_A::CLEAR)
}
#[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 = "Receiver timeout clear flag\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RTOCF_A {
#[doc = "1: Clears the RTOF flag in the ISR register"]
CLEAR,
}
impl From<RTOCF_A> for bool {
#[inline(always)]
fn from(variant: RTOCF_A) -> Self {
match variant {
RTOCF_A::CLEAR => true,
}
}
}
#[doc = "Reader of field `RTOCF`"]
pub type RTOCF_R = crate::R<bool, RTOCF_A>;
impl RTOCF_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> crate::Variant<bool, RTOCF_A> {
use crate::Variant::*;
match self.bits {
true => Val(RTOCF_A::CLEAR),
i => Res(i),
}
}
#[doc = "Checks if the value of the field is `CLEAR`"]
#[inline(always)]
pub fn is_clear(&self) -> bool {
*self == RTOCF_A::CLEAR
}
}
#[doc = "Write proxy for field `RTOCF`"]
pub struct RTOCF_W<'a> {
w: &'a mut W,
}
impl<'a> RTOCF_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: RTOCF_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Clears the RTOF flag in the ISR register"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(RTOCF_A::CLEAR)
}
#[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 = "CTS clear flag\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CTSCF_A {
#[doc = "1: Clears the CTSIF flag in the ISR register"]
CLEAR,
}
impl From<CTSCF_A> for bool {
#[inline(always)]
fn from(variant: CTSCF_A) -> Self {
match variant {
CTSCF_A::CLEAR => true,
}
}
}
#[doc = "Reader of field `CTSCF`"]
pub type CTSCF_R = crate::R<bool, CTSCF_A>;
impl CTSCF_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> crate::Variant<bool, CTSCF_A> {
use crate::Variant::*;
match self.bits {
true => Val(CTSCF_A::CLEAR),
i => Res(i),
}
}
#[doc = "Checks if the value of the field is `CLEAR`"]
#[inline(always)]
pub fn is_clear(&self) -> bool {
*self == CTSCF_A::CLEAR
}
}
#[doc = "Write proxy for field `CTSCF`"]
pub struct CTSCF_W<'a> {
w: &'a mut W,
}
impl<'a> CTSCF_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: CTSCF_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Clears the CTSIF flag in the ISR register"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(CTSCF_A::CLEAR)
}
#[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 = "LIN break detection clear flag\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum LBDCF_A {
#[doc = "1: Clears the LBDF flag in the ISR register"]
CLEAR,
}
impl From<LBDCF_A> for bool {
#[inline(always)]
fn from(variant: LBDCF_A) -> Self {
match variant {
LBDCF_A::CLEAR => true,
}
}
}
#[doc = "Reader of field `LBDCF`"]
pub type LBDCF_R = crate::R<bool, LBDCF_A>;
impl LBDCF_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> crate::Variant<bool, LBDCF_A> {
use crate::Variant::*;
match self.bits {
true => Val(LBDCF_A::CLEAR),
i => Res(i),
}
}
#[doc = "Checks if the value of the field is `CLEAR`"]
#[inline(always)]
pub fn is_clear(&self) -> bool {
*self == LBDCF_A::CLEAR
}
}
#[doc = "Write proxy for field `LBDCF`"]
pub struct LBDCF_W<'a> {
w: &'a mut W,
}
impl<'a> LBDCF_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: LBDCF_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Clears the LBDF flag in the ISR register"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(LBDCF_A::CLEAR)
}
#[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 = "Transmission complete clear flag\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TCCF_A {
#[doc = "1: Clears the TC flag in the ISR register"]
CLEAR,
}
impl From<TCCF_A> for bool {
#[inline(always)]
fn from(variant: TCCF_A) -> Self {
match variant {
TCCF_A::CLEAR => true,
}
}
}
#[doc = "Reader of field `TCCF`"]
pub type TCCF_R = crate::R<bool, TCCF_A>;
impl TCCF_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> crate::Variant<bool, TCCF_A> {
use crate::Variant::*;
match self.bits {
true => Val(TCCF_A::CLEAR),
i => Res(i),
}
}
#[doc = "Checks if the value of the field is `CLEAR`"]
#[inline(always)]
pub fn is_clear(&self) -> bool {
*self == TCCF_A::CLEAR
}
}
#[doc = "Write proxy for field `TCCF`"]
pub struct TCCF_W<'a> {
w: &'a mut W,
}
impl<'a> TCCF_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: TCCF_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Clears the TC flag in the ISR register"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(TCCF_A::CLEAR)
}
#[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 = "Idle line detected clear flag\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum IDLECF_A {
#[doc = "1: Clears the IDLE flag in the ISR register"]
CLEAR,
}
impl From<IDLECF_A> for bool {
#[inline(always)]
fn from(variant: IDLECF_A) -> Self {
match variant {
IDLECF_A::CLEAR => true,
}
}
}
#[doc = "Reader of field `IDLECF`"]
pub type IDLECF_R = crate::R<bool, IDLECF_A>;
impl IDLECF_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> crate::Variant<bool, IDLECF_A> {
use crate::Variant::*;
match self.bits {
true => Val(IDLECF_A::CLEAR),
i => Res(i),
}
}
#[doc = "Checks if the value of the field is `CLEAR`"]
#[inline(always)]
pub fn is_clear(&self) -> bool {
*self == IDLECF_A::CLEAR
}
}
#[doc = "Write proxy for field `IDLECF`"]
pub struct IDLECF_W<'a> {
w: &'a mut W,
}
impl<'a> IDLECF_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: IDLECF_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Clears the IDLE flag in the ISR register"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(IDLECF_A::CLEAR)
}
#[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 = "Overrun error clear flag\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ORECF_A {
#[doc = "1: Clears the ORE flag in the ISR register"]
CLEAR,
}
impl From<ORECF_A> for bool {
#[inline(always)]
fn from(variant: ORECF_A) -> Self {
match variant {
ORECF_A::CLEAR => true,
}
}
}
#[doc = "Reader of field `ORECF`"]
pub type ORECF_R = crate::R<bool, ORECF_A>;
impl ORECF_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> crate::Variant<bool, ORECF_A> {
use crate::Variant::*;
match self.bits {
true => Val(ORECF_A::CLEAR),
i => Res(i),
}
}
#[doc = "Checks if the value of the field is `CLEAR`"]
#[inline(always)]
pub fn is_clear(&self) -> bool {
*self == ORECF_A::CLEAR
}
}
#[doc = "Write proxy for field `ORECF`"]
pub struct ORECF_W<'a> {
w: &'a mut W,
}
impl<'a> ORECF_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: ORECF_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Clears the ORE flag in the ISR register"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(ORECF_A::CLEAR)
}
#[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 = "Noise detected clear flag\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum NCF_A {
#[doc = "1: Clears the NF flag in the ISR register"]
CLEAR,
}
impl From<NCF_A> for bool {
#[inline(always)]
fn from(variant: NCF_A) -> Self {
match variant {
NCF_A::CLEAR => true,
}
}
}
#[doc = "Reader of field `NCF`"]
pub type NCF_R = crate::R<bool, NCF_A>;
impl NCF_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> crate::Variant<bool, NCF_A> {
use crate::Variant::*;
match self.bits {
true => Val(NCF_A::CLEAR),
i => Res(i),
}
}
#[doc = "Checks if the value of the field is `CLEAR`"]
#[inline(always)]
pub fn is_clear(&self) -> bool {
*self == NCF_A::CLEAR
}
}
#[doc = "Write proxy for field `NCF`"]
pub struct NCF_W<'a> {
w: &'a mut W,
}
impl<'a> NCF_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: NCF_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Clears the NF flag in the ISR register"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(NCF_A::CLEAR)
}
#[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 = "Framing error clear flag\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum FECF_A {
#[doc = "1: Clears the FE flag in the ISR register"]
CLEAR,
}
impl From<FECF_A> for bool {
#[inline(always)]
fn from(variant: FECF_A) -> Self {
match variant {
FECF_A::CLEAR => true,
}
}
}
#[doc = "Reader of field `FECF`"]
pub type FECF_R = crate::R<bool, FECF_A>;
impl FECF_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> crate::Variant<bool, FECF_A> {
use crate::Variant::*;
match self.bits {
true => Val(FECF_A::CLEAR),
i => Res(i),
}
}
#[doc = "Checks if the value of the field is `CLEAR`"]
#[inline(always)]
pub fn is_clear(&self) -> bool {
*self == FECF_A::CLEAR
}
}
#[doc = "Write proxy for field `FECF`"]
pub struct FECF_W<'a> {
w: &'a mut W,
}
impl<'a> FECF_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: FECF_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Clears the FE flag in the ISR register"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(FECF_A::CLEAR)
}
#[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 = "Parity error clear flag\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum PECF_A {
#[doc = "1: Clears the PE flag in the ISR register"]
CLEAR,
}
impl From<PECF_A> for bool {
#[inline(always)]
fn from(variant: PECF_A) -> Self {
match variant {
PECF_A::CLEAR => true,
}
}
}
#[doc = "Reader of field `PECF`"]
pub type PECF_R = crate::R<bool, PECF_A>;
impl PECF_R {
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> crate::Variant<bool, PECF_A> {
use crate::Variant::*;
match self.bits {
true => Val(PECF_A::CLEAR),
i => Res(i),
}
}
#[doc = "Checks if the value of the field is `CLEAR`"]
#[inline(always)]
pub fn is_clear(&self) -> bool {
*self == PECF_A::CLEAR
}
}
#[doc = "Write proxy for field `PECF`"]
pub struct PECF_W<'a> {
w: &'a mut W,
}
impl<'a> PECF_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: PECF_A) -> &'a mut W {
{
self.bit(variant.into())
}
}
#[doc = "Clears the PE flag in the ISR register"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(PECF_A::CLEAR)
}
#[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 20 - Wakeup from Stop mode clear flag"]
#[inline(always)]
pub fn wucf(&self) -> WUCF_R {
WUCF_R::new(((self.bits >> 20) & 0x01) != 0)
}
#[doc = "Bit 17 - Character match clear flag"]
#[inline(always)]
pub fn cmcf(&self) -> CMCF_R {
CMCF_R::new(((self.bits >> 17) & 0x01) != 0)
}
#[doc = "Bit 12 - End of timeout clear flag"]
#[inline(always)]
pub fn eobcf(&self) -> EOBCF_R {
EOBCF_R::new(((self.bits >> 12) & 0x01) != 0)
}
#[doc = "Bit 11 - Receiver timeout clear flag"]
#[inline(always)]
pub fn rtocf(&self) -> RTOCF_R {
RTOCF_R::new(((self.bits >> 11) & 0x01) != 0)
}
#[doc = "Bit 9 - CTS clear flag"]
#[inline(always)]
pub fn ctscf(&self) -> CTSCF_R {
CTSCF_R::new(((self.bits >> 9) & 0x01) != 0)
}
#[doc = "Bit 8 - LIN break detection clear flag"]
#[inline(always)]
pub fn lbdcf(&self) -> LBDCF_R {
LBDCF_R::new(((self.bits >> 8) & 0x01) != 0)
}
#[doc = "Bit 6 - Transmission complete clear flag"]
#[inline(always)]
pub fn tccf(&self) -> TCCF_R {
TCCF_R::new(((self.bits >> 6) & 0x01) != 0)
}
#[doc = "Bit 4 - Idle line detected clear flag"]
#[inline(always)]
pub fn idlecf(&self) -> IDLECF_R {
IDLECF_R::new(((self.bits >> 4) & 0x01) != 0)
}
#[doc = "Bit 3 - Overrun error clear flag"]
#[inline(always)]
pub fn orecf(&self) -> ORECF_R {
ORECF_R::new(((self.bits >> 3) & 0x01) != 0)
}
#[doc = "Bit 2 - Noise detected clear flag"]
#[inline(always)]
pub fn ncf(&self) -> NCF_R {
NCF_R::new(((self.bits >> 2) & 0x01) != 0)
}
#[doc = "Bit 1 - Framing error clear flag"]
#[inline(always)]
pub fn fecf(&self) -> FECF_R {
FECF_R::new(((self.bits >> 1) & 0x01) != 0)
}
#[doc = "Bit 0 - Parity error clear flag"]
#[inline(always)]
pub fn pecf(&self) -> PECF_R {
PECF_R::new((self.bits & 0x01) != 0)
}
}
impl W {
#[doc = "Bit 20 - Wakeup from Stop mode clear flag"]
#[inline(always)]
pub fn wucf(&mut self) -> WUCF_W {
WUCF_W { w: self }
}
#[doc = "Bit 17 - Character match clear flag"]
#[inline(always)]
pub fn cmcf(&mut self) -> CMCF_W {
CMCF_W { w: self }
}
#[doc = "Bit 12 - End of timeout clear flag"]
#[inline(always)]
pub fn eobcf(&mut self) -> EOBCF_W {
EOBCF_W { w: self }
}
#[doc = "Bit 11 - Receiver timeout clear flag"]
#[inline(always)]
pub fn rtocf(&mut self) -> RTOCF_W {
RTOCF_W { w: self }
}
#[doc = "Bit 9 - CTS clear flag"]
#[inline(always)]
pub fn ctscf(&mut self) -> CTSCF_W {
CTSCF_W { w: self }
}
#[doc = "Bit 8 - LIN break detection clear flag"]
#[inline(always)]
pub fn lbdcf(&mut self) -> LBDCF_W {
LBDCF_W { w: self }
}
#[doc = "Bit 6 - Transmission complete clear flag"]
#[inline(always)]
pub fn tccf(&mut self) -> TCCF_W {
TCCF_W { w: self }
}
#[doc = "Bit 4 - Idle line detected clear flag"]
#[inline(always)]
pub fn idlecf(&mut self) -> IDLECF_W {
IDLECF_W { w: self }
}
#[doc = "Bit 3 - Overrun error clear flag"]
#[inline(always)]
pub fn orecf(&mut self) -> ORECF_W {
ORECF_W { w: self }
}
#[doc = "Bit 2 - Noise detected clear flag"]
#[inline(always)]
pub fn ncf(&mut self) -> NCF_W {
NCF_W { w: self }
}
#[doc = "Bit 1 - Framing error clear flag"]
#[inline(always)]
pub fn fecf(&mut self) -> FECF_W {
FECF_W { w: self }
}
#[doc = "Bit 0 - Parity error clear flag"]
#[inline(always)]
pub fn pecf(&mut self) -> PECF_W {
PECF_W { w: self }
}
}