#[doc = "Register `TIFR3` reader"]
pub struct R(crate::R<TIFR3_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<TIFR3_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::convert::From<crate::R<TIFR3_SPEC>> for R {
fn from(reader: crate::R<TIFR3_SPEC>) -> Self {
R(reader)
}
}
#[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 `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 `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 `OCF3C` reader - Output Compare Flag 3C"]
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 `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 0 - Timer/Counter3 Overflow Flag"]
#[inline(always)]
pub fn tov3(&self) -> TOV3_R {
TOV3_R::new((self.bits & 0x01) != 0)
}
#[doc = "Bit 1 - Output Compare Flag 3A"]
#[inline(always)]
pub fn ocf3a(&self) -> OCF3A_R {
OCF3A_R::new(((self.bits >> 1) & 0x01) != 0)
}
#[doc = "Bit 2 - Output Compare Flag 3B"]
#[inline(always)]
pub fn ocf3b(&self) -> OCF3B_R {
OCF3B_R::new(((self.bits >> 2) & 0x01) != 0)
}
#[doc = "Bit 3 - Output Compare Flag 3C"]
#[inline(always)]
pub fn ocf3c(&self) -> OCF3C_R {
OCF3C_R::new(((self.bits >> 3) & 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 = "Timer/Counter3 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 [tifr3](index.html) module"]
pub struct TIFR3_SPEC;
impl crate::RegisterSpec for TIFR3_SPEC {
type Ux = u8;
}
#[doc = "`read()` method returns [tifr3::R](R) reader structure"]
impl crate::Readable for TIFR3_SPEC {
type Reader = R;
}
#[doc = "`reset()` method sets TIFR3 to value 0"]
impl crate::Resettable for TIFR3_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}