#[doc = "Writer for register INT_CLR_STATUS"]
pub type W = crate::W<u32, super::INT_CLR_STATUS>;
#[doc = "Register INT_CLR_STATUS `reset()`'s with value 0"]
impl crate::ResetValue for super::INT_CLR_STATUS {
type Type = u32;
#[inline(always)]
fn reset_value() -> Self::Type {
0
}
}
#[doc = "Write proxy for field `FAIL`"]
pub struct FAIL_W<'a> {
w: &'a mut W,
}
impl<'a> FAIL_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 `ERR`"]
pub struct ERR_W<'a> {
w: &'a mut W,
}
impl<'a> ERR_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 `DONE`"]
pub struct DONE_W<'a> {
w: &'a mut W,
}
impl<'a> DONE_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 `ECC_ERR`"]
pub struct ECC_ERR_W<'a> {
w: &'a mut W,
}
impl<'a> ECC_ERR_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
}
}
impl W {
#[doc = "Bit 0 - When a CLR_STATUS bit is written to 1, the corresponding INT_STATUS bit is cleared."]
#[inline(always)]
pub fn fail(&mut self) -> FAIL_W {
FAIL_W { w: self }
}
#[doc = "Bit 1 - When a CLR_STATUS bit is written to 1, the corresponding INT_STATUS bit is cleared."]
#[inline(always)]
pub fn err(&mut self) -> ERR_W {
ERR_W { w: self }
}
#[doc = "Bit 2 - When a CLR_STATUS bit is written to 1, the corresponding INT_STATUS bit is cleared."]
#[inline(always)]
pub fn done(&mut self) -> DONE_W {
DONE_W { w: self }
}
#[doc = "Bit 3 - When a CLR_STATUS bit is written to 1, the corresponding INT_STATUS bit is cleared."]
#[inline(always)]
pub fn ecc_err(&mut self) -> ECC_ERR_W {
ECC_ERR_W { w: self }
}
}