#[doc = "Register `DIE_SORT` reader"]
pub struct R(crate::R<DIE_SORT_SPEC>);
impl core::ops::Deref for R {
    type Target = crate::R<DIE_SORT_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl core::convert::From<crate::R<DIE_SORT_SPEC>> for R {
    fn from(reader: crate::R<DIE_SORT_SPEC>) -> Self {
        R(reader)
    }
}
#[doc = "Register `DIE_SORT` writer"]
pub struct W(crate::W<DIE_SORT_SPEC>);
impl core::ops::Deref for W {
    type Target = crate::W<DIE_SORT_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 core::convert::From<crate::W<DIE_SORT_SPEC>> for W {
    fn from(writer: crate::W<DIE_SORT_SPEC>) -> Self {
        W(writer)
    }
}
#[doc = "Field `S1_PASS` reader - SORT1 Pass Bin (1) or 0 (Fail Bin)"]
pub struct S1_PASS_R(crate::FieldReader<bool, bool>);
impl S1_PASS_R {
    pub(crate) fn new(bits: bool) -> Self {
        S1_PASS_R(crate::FieldReader::new(bits))
    }
}
impl core::ops::Deref for S1_PASS_R {
    type Target = crate::FieldReader<bool, bool>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `S1_PASS` writer - SORT1 Pass Bin (1) or 0 (Fail Bin)"]
pub struct S1_PASS_W<'a> {
    w: &'a mut W,
}
impl<'a> S1_PASS_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 u8 & 0x01);
        self.w
    }
}
#[doc = "Field `S2_PASS` reader - SORT2 Pass Bin (1) or 0 (Fail Bin)"]
pub struct S2_PASS_R(crate::FieldReader<bool, bool>);
impl S2_PASS_R {
    pub(crate) fn new(bits: bool) -> Self {
        S2_PASS_R(crate::FieldReader::new(bits))
    }
}
impl core::ops::Deref for S2_PASS_R {
    type Target = crate::FieldReader<bool, bool>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `S2_PASS` writer - SORT2 Pass Bin (1) or 0 (Fail Bin)"]
pub struct S2_PASS_W<'a> {
    w: &'a mut W,
}
impl<'a> S2_PASS_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 u8 & 0x01) << 1);
        self.w
    }
}
#[doc = "Field `S3_PASS` reader - SORT3 Pass Bin (1) or 0 (Fail Bin)"]
pub struct S3_PASS_R(crate::FieldReader<bool, bool>);
impl S3_PASS_R {
    pub(crate) fn new(bits: bool) -> Self {
        S3_PASS_R(crate::FieldReader::new(bits))
    }
}
impl core::ops::Deref for S3_PASS_R {
    type Target = crate::FieldReader<bool, bool>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `S3_PASS` writer - SORT3 Pass Bin (1) or 0 (Fail Bin)"]
pub struct S3_PASS_W<'a> {
    w: &'a mut W,
}
impl<'a> S3_PASS_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 u8 & 0x01) << 2);
        self.w
    }
}
#[doc = "Field `CRI_PASS` reader - CRI Pass Bin (1) or 0 (Fail Bin)"]
pub struct CRI_PASS_R(crate::FieldReader<bool, bool>);
impl CRI_PASS_R {
    pub(crate) fn new(bits: bool) -> Self {
        CRI_PASS_R(crate::FieldReader::new(bits))
    }
}
impl core::ops::Deref for CRI_PASS_R {
    type Target = crate::FieldReader<bool, bool>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `CRI_PASS` writer - CRI Pass Bin (1) or 0 (Fail Bin)"]
pub struct CRI_PASS_W<'a> {
    w: &'a mut W,
}
impl<'a> CRI_PASS_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 u8 & 0x01) << 3);
        self.w
    }
}
#[doc = "Field `CHI_PASS` reader - CHI Pass Bin (1) or 0 (Fail Bin)"]
pub struct CHI_PASS_R(crate::FieldReader<bool, bool>);
impl CHI_PASS_R {
    pub(crate) fn new(bits: bool) -> Self {
        CHI_PASS_R(crate::FieldReader::new(bits))
    }
}
impl core::ops::Deref for CHI_PASS_R {
    type Target = crate::FieldReader<bool, bool>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `CHI_PASS` writer - CHI Pass Bin (1) or 0 (Fail Bin)"]
pub struct CHI_PASS_W<'a> {
    w: &'a mut W,
}
impl<'a> CHI_PASS_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 u8 & 0x01) << 4);
        self.w
    }
}
#[doc = "Field `ENG_PASS` reader - ENG Pass Bin"]
pub struct ENG_PASS_R(crate::FieldReader<bool, bool>);
impl ENG_PASS_R {
    pub(crate) fn new(bits: bool) -> Self {
        ENG_PASS_R(crate::FieldReader::new(bits))
    }
}
impl core::ops::Deref for ENG_PASS_R {
    type Target = crate::FieldReader<bool, bool>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `ENG_PASS` writer - ENG Pass Bin"]
pub struct ENG_PASS_W<'a> {
    w: &'a mut W,
}
impl<'a> ENG_PASS_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 u8 & 0x01) << 5);
        self.w
    }
}
impl R {
    #[doc = "Bit 0 - SORT1 Pass Bin (1) or 0 (Fail Bin)"]
    #[inline(always)]
    pub fn s1_pass(&self) -> S1_PASS_R {
        S1_PASS_R::new((self.bits & 0x01) != 0)
    }
    #[doc = "Bit 1 - SORT2 Pass Bin (1) or 0 (Fail Bin)"]
    #[inline(always)]
    pub fn s2_pass(&self) -> S2_PASS_R {
        S2_PASS_R::new(((self.bits >> 1) & 0x01) != 0)
    }
    #[doc = "Bit 2 - SORT3 Pass Bin (1) or 0 (Fail Bin)"]
    #[inline(always)]
    pub fn s3_pass(&self) -> S3_PASS_R {
        S3_PASS_R::new(((self.bits >> 2) & 0x01) != 0)
    }
    #[doc = "Bit 3 - CRI Pass Bin (1) or 0 (Fail Bin)"]
    #[inline(always)]
    pub fn cri_pass(&self) -> CRI_PASS_R {
        CRI_PASS_R::new(((self.bits >> 3) & 0x01) != 0)
    }
    #[doc = "Bit 4 - CHI Pass Bin (1) or 0 (Fail Bin)"]
    #[inline(always)]
    pub fn chi_pass(&self) -> CHI_PASS_R {
        CHI_PASS_R::new(((self.bits >> 4) & 0x01) != 0)
    }
    #[doc = "Bit 5 - ENG Pass Bin"]
    #[inline(always)]
    pub fn eng_pass(&self) -> ENG_PASS_R {
        ENG_PASS_R::new(((self.bits >> 5) & 0x01) != 0)
    }
}
impl W {
    #[doc = "Bit 0 - SORT1 Pass Bin (1) or 0 (Fail Bin)"]
    #[inline(always)]
    pub fn s1_pass(&mut self) -> S1_PASS_W {
        S1_PASS_W { w: self }
    }
    #[doc = "Bit 1 - SORT2 Pass Bin (1) or 0 (Fail Bin)"]
    #[inline(always)]
    pub fn s2_pass(&mut self) -> S2_PASS_W {
        S2_PASS_W { w: self }
    }
    #[doc = "Bit 2 - SORT3 Pass Bin (1) or 0 (Fail Bin)"]
    #[inline(always)]
    pub fn s3_pass(&mut self) -> S3_PASS_W {
        S3_PASS_W { w: self }
    }
    #[doc = "Bit 3 - CRI Pass Bin (1) or 0 (Fail Bin)"]
    #[inline(always)]
    pub fn cri_pass(&mut self) -> CRI_PASS_W {
        CRI_PASS_W { w: self }
    }
    #[doc = "Bit 4 - CHI Pass Bin (1) or 0 (Fail Bin)"]
    #[inline(always)]
    pub fn chi_pass(&mut self) -> CHI_PASS_W {
        CHI_PASS_W { w: self }
    }
    #[doc = "Bit 5 - ENG Pass Bin"]
    #[inline(always)]
    pub fn eng_pass(&mut self) -> ENG_PASS_W {
        ENG_PASS_W { w: self }
    }
    #[doc = "Writes raw bits to the register."]
    pub unsafe fn bits(&mut self, bits: u8) -> &mut Self {
        self.0.bits(bits);
        self
    }
}
#[doc = "Sort1/2/3 Pass/Fail Bin\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [die_sort](index.html) module"]
pub struct DIE_SORT_SPEC;
impl crate::RegisterSpec for DIE_SORT_SPEC {
    type Ux = u8;
}
#[doc = "`read()` method returns [die_sort::R](R) reader structure"]
impl crate::Readable for DIE_SORT_SPEC {
    type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [die_sort::W](W) writer structure"]
impl crate::Writable for DIE_SORT_SPEC {
    type Writer = W;
}
#[doc = "`reset()` method sets DIE_SORT to value 0"]
impl crate::Resettable for DIE_SORT_SPEC {
    #[inline(always)]
    fn reset_value() -> Self::Ux {
        0
    }
}
