#[doc = "Register `TIFR` reader"]
pub struct R(crate::R<TIFR_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<TIFR_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::convert::From<crate::R<TIFR_SPEC>> for R {
fn from(reader: crate::R<TIFR_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Field `TOV2` reader - Timer/Counter2 Overflow Flag"]
pub struct TOV2_R(crate::FieldReader<bool, bool>);
impl TOV2_R {
pub(crate) fn new(bits: bool) -> Self {
TOV2_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for TOV2_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `OCF2` reader - Output Compare Flag 2"]
pub struct OCF2_R(crate::FieldReader<bool, bool>);
impl OCF2_R {
pub(crate) fn new(bits: bool) -> Self {
OCF2_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for OCF2_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl R {
#[doc = "Bit 6 - Timer/Counter2 Overflow Flag"]
#[inline(always)]
pub fn tov2(&self) -> TOV2_R {
TOV2_R::new(((self.bits >> 6) & 0x01) != 0)
}
#[doc = "Bit 7 - Output Compare Flag 2"]
#[inline(always)]
pub fn ocf2(&self) -> OCF2_R {
OCF2_R::new(((self.bits >> 7) & 0x01) != 0)
}
}
#[doc = "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 [tifr](index.html) module"]
pub struct TIFR_SPEC;
impl crate::RegisterSpec for TIFR_SPEC {
type Ux = u8;
}
#[doc = "`read()` method returns [tifr::R](R) reader structure"]
impl crate::Readable for TIFR_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets TIFR to value 0"]
impl crate::Resettable for TIFR_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}