#[doc = "Writer for register SICR"]
pub type W = crate::W<u32, super::SICR>;
#[doc = "Register SICR `reset()`'s with value 0"]
impl crate::ResetValue for super::SICR {
type Type = u32;
#[inline(always)]
fn reset_value() -> Self::Type {
0
}
}
#[doc = "Write proxy for field `DATAIC`"]
pub struct DATAIC_W<'a> {
w: &'a mut W,
}
impl<'a> DATAIC_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 `STARTIC`"]
pub struct STARTIC_W<'a> {
w: &'a mut W,
}
impl<'a> STARTIC_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 = "Write proxy for field `STOPIC`"]
pub struct STOPIC_W<'a> {
w: &'a mut W,
}
impl<'a> STOPIC_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 = "Write proxy for field `DMARXIC`"]
pub struct DMARXIC_W<'a> {
w: &'a mut W,
}
impl<'a> DMARXIC_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 `DMATXIC`"]
pub struct DMATXIC_W<'a> {
w: &'a mut W,
}
impl<'a> DMATXIC_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 `TXIC`"]
pub struct TXIC_W<'a> {
w: &'a mut W,
}
impl<'a> TXIC_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 `RXIC`"]
pub struct RXIC_W<'a> {
w: &'a mut W,
}
impl<'a> RXIC_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 `TXFEIC`"]
pub struct TXFEIC_W<'a> {
w: &'a mut W,
}
impl<'a> TXFEIC_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 `RXFFIC`"]
pub struct RXFFIC_W<'a> {
w: &'a mut W,
}
impl<'a> RXFFIC_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
}
}
impl W {
#[doc = "Bit 0 - Data Interrupt Clear"]
#[inline(always)]
pub fn dataic(&mut self) -> DATAIC_W {
DATAIC_W { w: self }
}
#[doc = "Bit 1 - Start Condition Interrupt Clear"]
#[inline(always)]
pub fn startic(&mut self) -> STARTIC_W {
STARTIC_W { w: self }
}
#[doc = "Bit 2 - Stop Condition Interrupt Clear"]
#[inline(always)]
pub fn stopic(&mut self) -> STOPIC_W {
STOPIC_W { w: self }
}
#[doc = "Bit 3 - Receive DMA Interrupt Clear"]
#[inline(always)]
pub fn dmarxic(&mut self) -> DMARXIC_W {
DMARXIC_W { w: self }
}
#[doc = "Bit 4 - Transmit DMA Interrupt Clear"]
#[inline(always)]
pub fn dmatxic(&mut self) -> DMATXIC_W {
DMATXIC_W { w: self }
}
#[doc = "Bit 5 - Transmit Request Interrupt Mask"]
#[inline(always)]
pub fn txic(&mut self) -> TXIC_W {
TXIC_W { w: self }
}
#[doc = "Bit 6 - Receive Request Interrupt Mask"]
#[inline(always)]
pub fn rxic(&mut self) -> RXIC_W {
RXIC_W { w: self }
}
#[doc = "Bit 7 - Transmit FIFO Empty Interrupt Mask"]
#[inline(always)]
pub fn txfeic(&mut self) -> TXFEIC_W {
TXFEIC_W { w: self }
}
#[doc = "Bit 8 - Receive FIFO Full Interrupt Mask"]
#[inline(always)]
pub fn rxffic(&mut self) -> RXFFIC_W {
RXFFIC_W { w: self }
}
}