#[doc = "Register `ICR` writer"]
pub struct W(crate::W<ICR_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<ICR_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<ICR_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<ICR_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `WUCF` writer - Wakeup from Stop mode clear flag"]
pub struct WUCF_W<'a> {
w: &'a mut W,
}
impl<'a> WUCF_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 `CMCF` writer - Character match clear flag"]
pub struct CMCF_W<'a> {
w: &'a mut W,
}
impl<'a> CMCF_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 `UDRCF` writer - UDRCF"]
pub struct UDRCF_W<'a> {
w: &'a mut W,
}
impl<'a> UDRCF_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 `EOBCF` writer - End of block clear flag"]
pub struct EOBCF_W<'a> {
w: &'a mut W,
}
impl<'a> EOBCF_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 `RTOCF` writer - Receiver timeout clear flag"]
pub struct RTOCF_W<'a> {
w: &'a mut W,
}
impl<'a> RTOCF_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 `CTSCF` writer - CTS clear flag"]
pub struct CTSCF_W<'a> {
w: &'a mut W,
}
impl<'a> CTSCF_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 `LBDCF` writer - LIN break detection clear flag"]
pub struct LBDCF_W<'a> {
w: &'a mut W,
}
impl<'a> LBDCF_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 `TCBGTCF` writer - TCBGTCF"]
pub struct TCBGTCF_W<'a> {
w: &'a mut W,
}
impl<'a> TCBGTCF_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 `TCCF` writer - Transmission complete clear flag"]
pub struct TCCF_W<'a> {
w: &'a mut W,
}
impl<'a> TCCF_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 `TXFECF` writer - TXFECF"]
pub struct TXFECF_W<'a> {
w: &'a mut W,
}
impl<'a> TXFECF_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 `IDLECF` writer - Idle line detected clear flag"]
pub struct IDLECF_W<'a> {
w: &'a mut W,
}
impl<'a> IDLECF_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 `ORECF` writer - Overrun error clear flag"]
pub struct ORECF_W<'a> {
w: &'a mut W,
}
impl<'a> ORECF_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 `NCF` writer - Noise detected clear flag"]
pub struct NCF_W<'a> {
w: &'a mut W,
}
impl<'a> NCF_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 `FECF` writer - Framing error clear flag"]
pub struct FECF_W<'a> {
w: &'a mut W,
}
impl<'a> FECF_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 `PECF` writer - Parity error clear flag"]
pub struct PECF_W<'a> {
w: &'a mut W,
}
impl<'a> PECF_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 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 13 - UDRCF"]
#[inline(always)]
pub fn udrcf(&mut self) -> UDRCF_W {
UDRCF_W { w: self }
}
#[doc = "Bit 12 - End of block 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 7 - TCBGTCF"]
#[inline(always)]
pub fn tcbgtcf(&mut self) -> TCBGTCF_W {
TCBGTCF_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 5 - TXFECF"]
#[inline(always)]
pub fn txfecf(&mut self) -> TXFECF_W {
TXFECF_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 }
}
#[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 = "Interrupt flag clear register\n\nThis register you can [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [icr](index.html) module"]
pub struct ICR_SPEC;
impl crate::RegisterSpec for ICR_SPEC {
type Ux = u32;
}
#[doc = "`write(|w| ..)` method takes [icr::W](W) writer structure"]
impl crate::Writable for ICR_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets ICR to value 0"]
impl crate::Resettable for ICR_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}