#[doc = "Writer for register IFC"]
pub type W = crate::W<u32, super::IFC>;
#[doc = "Register IFC `reset()`'s with value 0"]
impl crate::ResetValue for super::IFC {
type Type = u32;
#[inline(always)]
fn reset_value() -> Self::Type {
0
}
}
#[doc = "Write proxy for field `TXC`"]
pub struct TXC_W<'a> {
w: &'a mut W,
}
impl<'a> TXC_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
}
}
#[doc = "Write proxy for field `RXOF`"]
pub struct RXOF_W<'a> {
w: &'a mut W,
}
impl<'a> RXOF_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 = "Write proxy for field `RXUF`"]
pub struct RXUF_W<'a> {
w: &'a mut W,
}
impl<'a> RXUF_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 = "Write proxy for field `TXOF`"]
pub struct TXOF_W<'a> {
w: &'a mut W,
}
impl<'a> TXOF_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 = "Write proxy for field `PERR`"]
pub struct PERR_W<'a> {
w: &'a mut W,
}
impl<'a> PERR_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 = "Write proxy for field `FERR`"]
pub struct FERR_W<'a> {
w: &'a mut W,
}
impl<'a> FERR_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 = "Write proxy for field `MPAF`"]
pub struct MPAF_W<'a> {
w: &'a mut W,
}
impl<'a> MPAF_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 = "Write proxy for field `STARTF`"]
pub struct STARTF_W<'a> {
w: &'a mut W,
}
impl<'a> STARTF_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 = "Write proxy for field `SIGF`"]
pub struct SIGF_W<'a> {
w: &'a mut W,
}
impl<'a> SIGF_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
}
}
impl W {
#[doc = "Bit 0 - Clear TXC Interrupt Flag"]
#[inline(always)]
pub fn txc(&mut self) -> TXC_W {
TXC_W { w: self }
}
#[doc = "Bit 3 - Clear RXOF Interrupt Flag"]
#[inline(always)]
pub fn rxof(&mut self) -> RXOF_W {
RXOF_W { w: self }
}
#[doc = "Bit 4 - Clear RXUF Interrupt Flag"]
#[inline(always)]
pub fn rxuf(&mut self) -> RXUF_W {
RXUF_W { w: self }
}
#[doc = "Bit 5 - Clear TXOF Interrupt Flag"]
#[inline(always)]
pub fn txof(&mut self) -> TXOF_W {
TXOF_W { w: self }
}
#[doc = "Bit 6 - Clear PERR Interrupt Flag"]
#[inline(always)]
pub fn perr(&mut self) -> PERR_W {
PERR_W { w: self }
}
#[doc = "Bit 7 - Clear FERR Interrupt Flag"]
#[inline(always)]
pub fn ferr(&mut self) -> FERR_W {
FERR_W { w: self }
}
#[doc = "Bit 8 - Clear MPAF Interrupt Flag"]
#[inline(always)]
pub fn mpaf(&mut self) -> MPAF_W {
MPAF_W { w: self }
}
#[doc = "Bit 9 - Clear STARTF Interrupt Flag"]
#[inline(always)]
pub fn startf(&mut self) -> STARTF_W {
STARTF_W { w: self }
}
#[doc = "Bit 10 - Clear SIGF Interrupt Flag"]
#[inline(always)]
pub fn sigf(&mut self) -> SIGF_W {
SIGF_W { w: self }
}
}