avr-device 0.2.3

Register access crate for AVR microcontrollers
Documentation
#[doc = "Register `ETIFR` reader"]
pub struct R(crate::R<ETIFR_SPEC>);
impl core::ops::Deref for R {
    type Target = crate::R<ETIFR_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl core::convert::From<crate::R<ETIFR_SPEC>> for R {
    fn from(reader: crate::R<ETIFR_SPEC>) -> Self {
        R(reader)
    }
}
#[doc = "Field `OCF3C` reader - Timer/Counter3 Output Compare C Match Flag"]
pub struct OCF3C_R(crate::FieldReader<bool, bool>);
impl OCF3C_R {
    pub(crate) fn new(bits: bool) -> Self {
        OCF3C_R(crate::FieldReader::new(bits))
    }
}
impl core::ops::Deref for OCF3C_R {
    type Target = crate::FieldReader<bool, bool>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `TOV3` reader - Timer/Counter3 Overflow Flag"]
pub struct TOV3_R(crate::FieldReader<bool, bool>);
impl TOV3_R {
    pub(crate) fn new(bits: bool) -> Self {
        TOV3_R(crate::FieldReader::new(bits))
    }
}
impl core::ops::Deref for TOV3_R {
    type Target = crate::FieldReader<bool, bool>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `OCF3B` reader - Output Compare Flag 3B"]
pub struct OCF3B_R(crate::FieldReader<bool, bool>);
impl OCF3B_R {
    pub(crate) fn new(bits: bool) -> Self {
        OCF3B_R(crate::FieldReader::new(bits))
    }
}
impl core::ops::Deref for OCF3B_R {
    type Target = crate::FieldReader<bool, bool>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `OCF3A` reader - Output Compare Flag 3A"]
pub struct OCF3A_R(crate::FieldReader<bool, bool>);
impl OCF3A_R {
    pub(crate) fn new(bits: bool) -> Self {
        OCF3A_R(crate::FieldReader::new(bits))
    }
}
impl core::ops::Deref for OCF3A_R {
    type Target = crate::FieldReader<bool, bool>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
#[doc = "Field `ICF3` reader - Input Capture Flag 3"]
pub struct ICF3_R(crate::FieldReader<bool, bool>);
impl ICF3_R {
    pub(crate) fn new(bits: bool) -> Self {
        ICF3_R(crate::FieldReader::new(bits))
    }
}
impl core::ops::Deref for ICF3_R {
    type Target = crate::FieldReader<bool, bool>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl R {
    #[doc = "Bit 1 - Timer/Counter3 Output Compare C Match Flag"]
    #[inline(always)]
    pub fn ocf3c(&self) -> OCF3C_R {
        OCF3C_R::new(((self.bits >> 1) & 0x01) != 0)
    }
    #[doc = "Bit 2 - Timer/Counter3 Overflow Flag"]
    #[inline(always)]
    pub fn tov3(&self) -> TOV3_R {
        TOV3_R::new(((self.bits >> 2) & 0x01) != 0)
    }
    #[doc = "Bit 3 - Output Compare Flag 3B"]
    #[inline(always)]
    pub fn ocf3b(&self) -> OCF3B_R {
        OCF3B_R::new(((self.bits >> 3) & 0x01) != 0)
    }
    #[doc = "Bit 4 - Output Compare Flag 3A"]
    #[inline(always)]
    pub fn ocf3a(&self) -> OCF3A_R {
        OCF3A_R::new(((self.bits >> 4) & 0x01) != 0)
    }
    #[doc = "Bit 5 - Input Capture Flag 3"]
    #[inline(always)]
    pub fn icf3(&self) -> ICF3_R {
        ICF3_R::new(((self.bits >> 5) & 0x01) != 0)
    }
}
#[doc = "Extended Timer/Counter Interrupt Flag register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [etifr](index.html) module"]
pub struct ETIFR_SPEC;
impl crate::RegisterSpec for ETIFR_SPEC {
    type Ux = u8;
}
#[doc = "`read()` method returns [etifr::R](R) reader structure"]
impl crate::Readable for ETIFR_SPEC {
    type Reader = R;
}
#[doc = "`reset()` method sets ETIFR to value 0"]
impl crate::Resettable for ETIFR_SPEC {
    #[inline(always)]
    fn reset_value() -> Self::Ux {
        0
    }
}