#[doc = r"Value to write to the register"]
pub struct W {
bits: u32,
}
impl super::ICR {
#[doc = r"Writes to the register"]
#[inline(always)]
pub fn write<F>(&self, f: F)
where
F: FnOnce(&mut W) -> &mut W,
{
self.register.set(
f(&mut W {
bits: Self::reset_value(),
})
.bits,
);
}
#[doc = r"Reset value of the register"]
#[inline(always)]
pub const fn reset_value() -> u32 {
0
}
#[doc = r"Writes the reset value to the register"]
#[inline(always)]
pub fn reset(&self) {
self.register.set(Self::reset_value())
}
}
#[doc = "Values that can be written to the field `WUCF`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum WUCFW {
#[doc = "Clears the WUF flag in the ISR register"]
CLEAR,
}
impl WUCFW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
WUCFW::CLEAR => true,
}
}
}
#[doc = r"Proxy"]
pub struct _WUCFW<'a> {
w: &'a mut W,
}
impl<'a> _WUCFW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: WUCFW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Clears the WUF flag in the ISR register"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(WUCFW::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 &= !(0x01 << 20);
self.w.bits |= ((value as u32) & 0x01) << 20;
self.w
}
}
#[doc = "Values that can be written to the field `CMCF`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CMCFW {
#[doc = "Clears the CMF flag in the ISR register"]
CLEAR,
}
impl CMCFW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
CMCFW::CLEAR => true,
}
}
}
#[doc = r"Proxy"]
pub struct _CMCFW<'a> {
w: &'a mut W,
}
impl<'a> _CMCFW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: CMCFW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Clears the CMF flag in the ISR register"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(CMCFW::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 &= !(0x01 << 17);
self.w.bits |= ((value as u32) & 0x01) << 17;
self.w
}
}
#[doc = r"Proxy"]
pub struct _UDRCFW<'a> {
w: &'a mut W,
}
impl<'a> _UDRCFW<'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 &= !(0x01 << 13);
self.w.bits |= ((value as u32) & 0x01) << 13;
self.w
}
}
#[doc = "Values that can be written to the field `EOBCF`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum EOBCFW {
#[doc = "Clears the EOBF flag in the ISR register"]
CLEAR,
}
impl EOBCFW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
EOBCFW::CLEAR => true,
}
}
}
#[doc = r"Proxy"]
pub struct _EOBCFW<'a> {
w: &'a mut W,
}
impl<'a> _EOBCFW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: EOBCFW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Clears the EOBF flag in the ISR register"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(EOBCFW::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 &= !(0x01 << 12);
self.w.bits |= ((value as u32) & 0x01) << 12;
self.w
}
}
#[doc = "Values that can be written to the field `RTOCF`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum RTOCFW {
#[doc = "Clears the RTOF flag in the ISR register"]
CLEAR,
}
impl RTOCFW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
RTOCFW::CLEAR => true,
}
}
}
#[doc = r"Proxy"]
pub struct _RTOCFW<'a> {
w: &'a mut W,
}
impl<'a> _RTOCFW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: RTOCFW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Clears the RTOF flag in the ISR register"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(RTOCFW::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 &= !(0x01 << 11);
self.w.bits |= ((value as u32) & 0x01) << 11;
self.w
}
}
#[doc = "Values that can be written to the field `CTSCF`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CTSCFW {
#[doc = "Clears the CTSIF flag in the ISR register"]
CLEAR,
}
impl CTSCFW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
CTSCFW::CLEAR => true,
}
}
}
#[doc = r"Proxy"]
pub struct _CTSCFW<'a> {
w: &'a mut W,
}
impl<'a> _CTSCFW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: CTSCFW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Clears the CTSIF flag in the ISR register"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(CTSCFW::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 &= !(0x01 << 9);
self.w.bits |= ((value as u32) & 0x01) << 9;
self.w
}
}
#[doc = "Values that can be written to the field `LBDCF`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum LBDCFW {
#[doc = "Clears the LBDF flag in the ISR register"]
CLEAR,
}
impl LBDCFW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
LBDCFW::CLEAR => true,
}
}
}
#[doc = r"Proxy"]
pub struct _LBDCFW<'a> {
w: &'a mut W,
}
impl<'a> _LBDCFW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: LBDCFW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Clears the LBDF flag in the ISR register"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(LBDCFW::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 &= !(0x01 << 8);
self.w.bits |= ((value as u32) & 0x01) << 8;
self.w
}
}
#[doc = r"Proxy"]
pub struct _TCBGTCW<'a> {
w: &'a mut W,
}
impl<'a> _TCBGTCW<'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 &= !(0x01 << 7);
self.w.bits |= ((value as u32) & 0x01) << 7;
self.w
}
}
#[doc = "Values that can be written to the field `TCCF`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TCCFW {
#[doc = "Clears the TC flag in the ISR register"]
CLEAR,
}
impl TCCFW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
TCCFW::CLEAR => true,
}
}
}
#[doc = r"Proxy"]
pub struct _TCCFW<'a> {
w: &'a mut W,
}
impl<'a> _TCCFW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: TCCFW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Clears the TC flag in the ISR register"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(TCCFW::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 &= !(0x01 << 6);
self.w.bits |= ((value as u32) & 0x01) << 6;
self.w
}
}
#[doc = r"Proxy"]
pub struct _TXFECFW<'a> {
w: &'a mut W,
}
impl<'a> _TXFECFW<'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 &= !(0x01 << 5);
self.w.bits |= ((value as u32) & 0x01) << 5;
self.w
}
}
#[doc = "Values that can be written to the field `IDLECF`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum IDLECFW {
#[doc = "Clears the IDLE flag in the ISR register"]
CLEAR,
}
impl IDLECFW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
IDLECFW::CLEAR => true,
}
}
}
#[doc = r"Proxy"]
pub struct _IDLECFW<'a> {
w: &'a mut W,
}
impl<'a> _IDLECFW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: IDLECFW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Clears the IDLE flag in the ISR register"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(IDLECFW::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 &= !(0x01 << 4);
self.w.bits |= ((value as u32) & 0x01) << 4;
self.w
}
}
#[doc = "Values that can be written to the field `ORECF`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ORECFW {
#[doc = "Clears the ORE flag in the ISR register"]
CLEAR,
}
impl ORECFW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
ORECFW::CLEAR => true,
}
}
}
#[doc = r"Proxy"]
pub struct _ORECFW<'a> {
w: &'a mut W,
}
impl<'a> _ORECFW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: ORECFW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Clears the ORE flag in the ISR register"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(ORECFW::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 &= !(0x01 << 3);
self.w.bits |= ((value as u32) & 0x01) << 3;
self.w
}
}
#[doc = "Values that can be written to the field `NCF`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum NCFW {
#[doc = "Clears the NF flag in the ISR register"]
CLEAR,
}
impl NCFW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
NCFW::CLEAR => true,
}
}
}
#[doc = r"Proxy"]
pub struct _NCFW<'a> {
w: &'a mut W,
}
impl<'a> _NCFW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: NCFW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Clears the NF flag in the ISR register"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(NCFW::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 &= !(0x01 << 2);
self.w.bits |= ((value as u32) & 0x01) << 2;
self.w
}
}
#[doc = "Values that can be written to the field `FECF`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum FECFW {
#[doc = "Clears the FE flag in the ISR register"]
CLEAR,
}
impl FECFW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
FECFW::CLEAR => true,
}
}
}
#[doc = r"Proxy"]
pub struct _FECFW<'a> {
w: &'a mut W,
}
impl<'a> _FECFW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: FECFW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Clears the FE flag in the ISR register"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(FECFW::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 &= !(0x01 << 1);
self.w.bits |= ((value as u32) & 0x01) << 1;
self.w
}
}
#[doc = "Values that can be written to the field `PECF`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum PECFW {
#[doc = "Clears the PE flag in the ISR register"]
CLEAR,
}
impl PECFW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> bool {
match *self {
PECFW::CLEAR => true,
}
}
}
#[doc = r"Proxy"]
pub struct _PECFW<'a> {
w: &'a mut W,
}
impl<'a> _PECFW<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: PECFW) -> &'a mut W {
{
self.bit(variant._bits())
}
}
#[doc = "Clears the PE flag in the ISR register"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(PECFW::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 &= !(0x01 << 0);
self.w.bits |= ((value as u32) & 0x01) << 0;
self.w
}
}
impl W {
#[doc = r"Writes raw bits to the register"]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.bits = bits;
self
}
#[doc = "Bit 20 - Wakeup from Stop mode clear flag"]
#[inline(always)]
pub fn wucf(&mut self) -> _WUCFW {
_WUCFW { w: self }
}
#[doc = "Bit 17 - Character match clear flag"]
#[inline(always)]
pub fn cmcf(&mut self) -> _CMCFW {
_CMCFW { w: self }
}
#[doc = "Bit 13 - SPI slave underrun clear flag"]
#[inline(always)]
pub fn udrcf(&mut self) -> _UDRCFW {
_UDRCFW { w: self }
}
#[doc = "Bit 12 - End of block clear flag"]
#[inline(always)]
pub fn eobcf(&mut self) -> _EOBCFW {
_EOBCFW { w: self }
}
#[doc = "Bit 11 - Receiver timeout clear flag"]
#[inline(always)]
pub fn rtocf(&mut self) -> _RTOCFW {
_RTOCFW { w: self }
}
#[doc = "Bit 9 - CTS clear flag"]
#[inline(always)]
pub fn ctscf(&mut self) -> _CTSCFW {
_CTSCFW { w: self }
}
#[doc = "Bit 8 - LIN break detection clear flag"]
#[inline(always)]
pub fn lbdcf(&mut self) -> _LBDCFW {
_LBDCFW { w: self }
}
#[doc = "Bit 7 - Transmission complete before Guard time clear flag"]
#[inline(always)]
pub fn tcbgtc(&mut self) -> _TCBGTCW {
_TCBGTCW { w: self }
}
#[doc = "Bit 6 - Transmission complete clear flag"]
#[inline(always)]
pub fn tccf(&mut self) -> _TCCFW {
_TCCFW { w: self }
}
#[doc = "Bit 5 - TXFIFO empty clear flag"]
#[inline(always)]
pub fn txfecf(&mut self) -> _TXFECFW {
_TXFECFW { w: self }
}
#[doc = "Bit 4 - Idle line detected clear flag"]
#[inline(always)]
pub fn idlecf(&mut self) -> _IDLECFW {
_IDLECFW { w: self }
}
#[doc = "Bit 3 - Overrun error clear flag"]
#[inline(always)]
pub fn orecf(&mut self) -> _ORECFW {
_ORECFW { w: self }
}
#[doc = "Bit 2 - Noise detected clear flag"]
#[inline(always)]
pub fn ncf(&mut self) -> _NCFW {
_NCFW { w: self }
}
#[doc = "Bit 1 - Framing error clear flag"]
#[inline(always)]
pub fn fecf(&mut self) -> _FECFW {
_FECFW { w: self }
}
#[doc = "Bit 0 - Parity error clear flag"]
#[inline(always)]
pub fn pecf(&mut self) -> _PECFW {
_PECFW { w: self }
}
}