#[doc = "Register `SR` reader"]
pub struct R(crate::R<SR_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<SR_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<SR_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<SR_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `SR` writer"]
pub struct W(crate::W<SR_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<SR_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 From<crate::W<SR_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<SR_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Capture/Compare 4 overcapture flag"]
pub type CC4OF_A = CC1OF_A;
#[doc = "Field `CC4OF` reader - Capture/Compare 4 overcapture flag"]
pub type CC4OF_R = CC1OF_R;
#[doc = "Capture/Compare 4 overcapture flag"]
pub type CC4OF_AW = CC1OF_AW;
#[doc = "Field `CC4OF` writer - Capture/Compare 4 overcapture flag"]
pub struct CC4OF_W<'a> {
w: &'a mut W,
}
impl<'a> CC4OF_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: CC4OF_AW) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Clear flag"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(CC4OF_AW::CLEAR)
}
#[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 << 12)) | ((value as u32 & 0x01) << 12);
self.w
}
}
#[doc = "Capture/Compare 3 overcapture flag"]
pub type CC3OF_A = CC1OF_A;
#[doc = "Field `CC3OF` reader - Capture/Compare 3 overcapture flag"]
pub type CC3OF_R = CC1OF_R;
#[doc = "Capture/Compare 3 overcapture flag"]
pub type CC3OF_AW = CC1OF_AW;
#[doc = "Field `CC3OF` writer - Capture/Compare 3 overcapture flag"]
pub struct CC3OF_W<'a> {
w: &'a mut W,
}
impl<'a> CC3OF_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: CC3OF_AW) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Clear flag"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(CC3OF_AW::CLEAR)
}
#[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 << 11)) | ((value as u32 & 0x01) << 11);
self.w
}
}
#[doc = "Capture/compare 2 overcapture flag"]
pub type CC2OF_A = CC1OF_A;
#[doc = "Field `CC2OF` reader - Capture/compare 2 overcapture flag"]
pub type CC2OF_R = CC1OF_R;
#[doc = "Capture/compare 2 overcapture flag"]
pub type CC2OF_AW = CC1OF_AW;
#[doc = "Field `CC2OF` writer - Capture/compare 2 overcapture flag"]
pub struct CC2OF_W<'a> {
w: &'a mut W,
}
impl<'a> CC2OF_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: CC2OF_AW) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Clear flag"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(CC2OF_AW::CLEAR)
}
#[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 << 10)) | ((value as u32 & 0x01) << 10);
self.w
}
}
#[doc = "Capture/Compare 1 overcapture flag\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CC1OF_A {
#[doc = "1: The counter value has been captured in TIMx_CCRx register while CCxIF flag was already set"]
OVERCAPTURE = 1,
}
impl From<CC1OF_A> for bool {
#[inline(always)]
fn from(variant: CC1OF_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `CC1OF` reader - Capture/Compare 1 overcapture flag"]
pub struct CC1OF_R(crate::FieldReader<bool, CC1OF_A>);
impl CC1OF_R {
pub(crate) fn new(bits: bool) -> Self {
CC1OF_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> Option<CC1OF_A> {
match self.bits {
true => Some(CC1OF_A::OVERCAPTURE),
_ => None,
}
}
#[doc = "Checks if the value of the field is `OVERCAPTURE`"]
#[inline(always)]
pub fn is_overcapture(&self) -> bool {
**self == CC1OF_A::OVERCAPTURE
}
}
impl core::ops::Deref for CC1OF_R {
type Target = crate::FieldReader<bool, CC1OF_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Capture/Compare 1 overcapture flag\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CC1OF_AW {
#[doc = "0: Clear flag"]
CLEAR = 0,
}
impl From<CC1OF_AW> for bool {
#[inline(always)]
fn from(variant: CC1OF_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `CC1OF` writer - Capture/Compare 1 overcapture flag"]
pub struct CC1OF_W<'a> {
w: &'a mut W,
}
impl<'a> CC1OF_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: CC1OF_AW) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Clear flag"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(CC1OF_AW::CLEAR)
}
#[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 << 9)) | ((value as u32 & 0x01) << 9);
self.w
}
}
#[doc = "Field `BIF` reader - Break interrupt flag"]
pub struct BIF_R(crate::FieldReader<bool, bool>);
impl BIF_R {
pub(crate) fn new(bits: bool) -> Self {
BIF_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for BIF_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `BIF` writer - Break interrupt flag"]
pub struct BIF_W<'a> {
w: &'a mut W,
}
impl<'a> BIF_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 << 7)) | ((value as u32 & 0x01) << 7);
self.w
}
}
#[doc = "Trigger interrupt flag\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TIF_A {
#[doc = "0: No trigger event occurred"]
NOTRIGGER = 0,
#[doc = "1: Trigger interrupt pending"]
TRIGGER = 1,
}
impl From<TIF_A> for bool {
#[inline(always)]
fn from(variant: TIF_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `TIF` reader - Trigger interrupt flag"]
pub struct TIF_R(crate::FieldReader<bool, TIF_A>);
impl TIF_R {
pub(crate) fn new(bits: bool) -> Self {
TIF_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> TIF_A {
match self.bits {
false => TIF_A::NOTRIGGER,
true => TIF_A::TRIGGER,
}
}
#[doc = "Checks if the value of the field is `NOTRIGGER`"]
#[inline(always)]
pub fn is_no_trigger(&self) -> bool {
**self == TIF_A::NOTRIGGER
}
#[doc = "Checks if the value of the field is `TRIGGER`"]
#[inline(always)]
pub fn is_trigger(&self) -> bool {
**self == TIF_A::TRIGGER
}
}
impl core::ops::Deref for TIF_R {
type Target = crate::FieldReader<bool, TIF_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Trigger interrupt flag\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum TIF_AW {
#[doc = "0: Clear flag"]
CLEAR = 0,
}
impl From<TIF_AW> for bool {
#[inline(always)]
fn from(variant: TIF_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `TIF` writer - Trigger interrupt flag"]
pub struct TIF_W<'a> {
w: &'a mut W,
}
impl<'a> TIF_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: TIF_AW) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Clear flag"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(TIF_AW::CLEAR)
}
#[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 << 6)) | ((value as u32 & 0x01) << 6);
self.w
}
}
#[doc = "Field `COMIF` reader - COM interrupt flag"]
pub struct COMIF_R(crate::FieldReader<bool, bool>);
impl COMIF_R {
pub(crate) fn new(bits: bool) -> Self {
COMIF_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for COMIF_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `COMIF` writer - COM interrupt flag"]
pub struct COMIF_W<'a> {
w: &'a mut W,
}
impl<'a> COMIF_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 u32 & 0x01) << 5);
self.w
}
}
#[doc = "Capture/Compare 4 interrupt flag"]
pub type CC4IF_A = CC1IF_A;
#[doc = "Field `CC4IF` reader - Capture/Compare 4 interrupt flag"]
pub type CC4IF_R = CC1IF_R;
#[doc = "Capture/Compare 4 interrupt flag"]
pub type CC4IF_AW = CC1IF_AW;
#[doc = "Field `CC4IF` writer - Capture/Compare 4 interrupt flag"]
pub struct CC4IF_W<'a> {
w: &'a mut W,
}
impl<'a> CC4IF_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: CC4IF_AW) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Clear flag"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(CC4IF_AW::CLEAR)
}
#[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 u32 & 0x01) << 4);
self.w
}
}
#[doc = "Capture/Compare 3 interrupt flag"]
pub type CC3IF_A = CC1IF_A;
#[doc = "Field `CC3IF` reader - Capture/Compare 3 interrupt flag"]
pub type CC3IF_R = CC1IF_R;
#[doc = "Capture/Compare 3 interrupt flag"]
pub type CC3IF_AW = CC1IF_AW;
#[doc = "Field `CC3IF` writer - Capture/Compare 3 interrupt flag"]
pub struct CC3IF_W<'a> {
w: &'a mut W,
}
impl<'a> CC3IF_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: CC3IF_AW) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Clear flag"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(CC3IF_AW::CLEAR)
}
#[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
}
}
#[doc = "Capture/Compare 2 interrupt flag"]
pub type CC2IF_A = CC1IF_A;
#[doc = "Field `CC2IF` reader - Capture/Compare 2 interrupt flag"]
pub type CC2IF_R = CC1IF_R;
#[doc = "Capture/Compare 2 interrupt flag"]
pub type CC2IF_AW = CC1IF_AW;
#[doc = "Field `CC2IF` writer - Capture/Compare 2 interrupt flag"]
pub struct CC2IF_W<'a> {
w: &'a mut W,
}
impl<'a> CC2IF_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: CC2IF_AW) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Clear flag"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(CC2IF_AW::CLEAR)
}
#[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 = "Capture/compare 1 interrupt flag\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CC1IF_A {
#[doc = "1: If CC1 is an output: The content of the counter TIMx_CNT matches the content of the TIMx_CCR1 register. If CC1 is an input: The counter value has been captured in TIMx_CCR1 register."]
MATCH = 1,
}
impl From<CC1IF_A> for bool {
#[inline(always)]
fn from(variant: CC1IF_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `CC1IF` reader - Capture/compare 1 interrupt flag"]
pub struct CC1IF_R(crate::FieldReader<bool, CC1IF_A>);
impl CC1IF_R {
pub(crate) fn new(bits: bool) -> Self {
CC1IF_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> Option<CC1IF_A> {
match self.bits {
true => Some(CC1IF_A::MATCH),
_ => None,
}
}
#[doc = "Checks if the value of the field is `MATCH`"]
#[inline(always)]
pub fn is_match(&self) -> bool {
**self == CC1IF_A::MATCH
}
}
impl core::ops::Deref for CC1IF_R {
type Target = crate::FieldReader<bool, CC1IF_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Capture/compare 1 interrupt flag\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CC1IF_AW {
#[doc = "0: Clear flag"]
CLEAR = 0,
}
impl From<CC1IF_AW> for bool {
#[inline(always)]
fn from(variant: CC1IF_AW) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `CC1IF` writer - Capture/compare 1 interrupt flag"]
pub struct CC1IF_W<'a> {
w: &'a mut W,
}
impl<'a> CC1IF_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: CC1IF_AW) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "Clear flag"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(CC1IF_AW::CLEAR)
}
#[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 = "Update interrupt flag\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum UIF_A {
#[doc = "0: No update occurred"]
CLEAR = 0,
#[doc = "1: Update interrupt pending."]
UPDATEPENDING = 1,
}
impl From<UIF_A> for bool {
#[inline(always)]
fn from(variant: UIF_A) -> Self {
variant as u8 != 0
}
}
#[doc = "Field `UIF` reader - Update interrupt flag"]
pub struct UIF_R(crate::FieldReader<bool, UIF_A>);
impl UIF_R {
pub(crate) fn new(bits: bool) -> Self {
UIF_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> UIF_A {
match self.bits {
false => UIF_A::CLEAR,
true => UIF_A::UPDATEPENDING,
}
}
#[doc = "Checks if the value of the field is `CLEAR`"]
#[inline(always)]
pub fn is_clear(&self) -> bool {
**self == UIF_A::CLEAR
}
#[doc = "Checks if the value of the field is `UPDATEPENDING`"]
#[inline(always)]
pub fn is_update_pending(&self) -> bool {
**self == UIF_A::UPDATEPENDING
}
}
impl core::ops::Deref for UIF_R {
type Target = crate::FieldReader<bool, UIF_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `UIF` writer - Update interrupt flag"]
pub struct UIF_W<'a> {
w: &'a mut W,
}
impl<'a> UIF_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: UIF_A) -> &'a mut W {
self.bit(variant.into())
}
#[doc = "No update occurred"]
#[inline(always)]
pub fn clear(self) -> &'a mut W {
self.variant(UIF_A::CLEAR)
}
#[doc = "Update interrupt pending."]
#[inline(always)]
pub fn update_pending(self) -> &'a mut W {
self.variant(UIF_A::UPDATEPENDING)
}
#[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
}
}
impl R {
#[doc = "Bit 12 - Capture/Compare 4 overcapture flag"]
#[inline(always)]
pub fn cc4of(&self) -> CC4OF_R {
CC4OF_R::new(((self.bits >> 12) & 0x01) != 0)
}
#[doc = "Bit 11 - Capture/Compare 3 overcapture flag"]
#[inline(always)]
pub fn cc3of(&self) -> CC3OF_R {
CC3OF_R::new(((self.bits >> 11) & 0x01) != 0)
}
#[doc = "Bit 10 - Capture/compare 2 overcapture flag"]
#[inline(always)]
pub fn cc2of(&self) -> CC2OF_R {
CC2OF_R::new(((self.bits >> 10) & 0x01) != 0)
}
#[doc = "Bit 9 - Capture/Compare 1 overcapture flag"]
#[inline(always)]
pub fn cc1of(&self) -> CC1OF_R {
CC1OF_R::new(((self.bits >> 9) & 0x01) != 0)
}
#[doc = "Bit 7 - Break interrupt flag"]
#[inline(always)]
pub fn bif(&self) -> BIF_R {
BIF_R::new(((self.bits >> 7) & 0x01) != 0)
}
#[doc = "Bit 6 - Trigger interrupt flag"]
#[inline(always)]
pub fn tif(&self) -> TIF_R {
TIF_R::new(((self.bits >> 6) & 0x01) != 0)
}
#[doc = "Bit 5 - COM interrupt flag"]
#[inline(always)]
pub fn comif(&self) -> COMIF_R {
COMIF_R::new(((self.bits >> 5) & 0x01) != 0)
}
#[doc = "Bit 4 - Capture/Compare 4 interrupt flag"]
#[inline(always)]
pub fn cc4if(&self) -> CC4IF_R {
CC4IF_R::new(((self.bits >> 4) & 0x01) != 0)
}
#[doc = "Bit 3 - Capture/Compare 3 interrupt flag"]
#[inline(always)]
pub fn cc3if(&self) -> CC3IF_R {
CC3IF_R::new(((self.bits >> 3) & 0x01) != 0)
}
#[doc = "Bit 2 - Capture/Compare 2 interrupt flag"]
#[inline(always)]
pub fn cc2if(&self) -> CC2IF_R {
CC2IF_R::new(((self.bits >> 2) & 0x01) != 0)
}
#[doc = "Bit 1 - Capture/compare 1 interrupt flag"]
#[inline(always)]
pub fn cc1if(&self) -> CC1IF_R {
CC1IF_R::new(((self.bits >> 1) & 0x01) != 0)
}
#[doc = "Bit 0 - Update interrupt flag"]
#[inline(always)]
pub fn uif(&self) -> UIF_R {
UIF_R::new((self.bits & 0x01) != 0)
}
}
impl W {
#[doc = "Bit 12 - Capture/Compare 4 overcapture flag"]
#[inline(always)]
pub fn cc4of(&mut self) -> CC4OF_W {
CC4OF_W { w: self }
}
#[doc = "Bit 11 - Capture/Compare 3 overcapture flag"]
#[inline(always)]
pub fn cc3of(&mut self) -> CC3OF_W {
CC3OF_W { w: self }
}
#[doc = "Bit 10 - Capture/compare 2 overcapture flag"]
#[inline(always)]
pub fn cc2of(&mut self) -> CC2OF_W {
CC2OF_W { w: self }
}
#[doc = "Bit 9 - Capture/Compare 1 overcapture flag"]
#[inline(always)]
pub fn cc1of(&mut self) -> CC1OF_W {
CC1OF_W { w: self }
}
#[doc = "Bit 7 - Break interrupt flag"]
#[inline(always)]
pub fn bif(&mut self) -> BIF_W {
BIF_W { w: self }
}
#[doc = "Bit 6 - Trigger interrupt flag"]
#[inline(always)]
pub fn tif(&mut self) -> TIF_W {
TIF_W { w: self }
}
#[doc = "Bit 5 - COM interrupt flag"]
#[inline(always)]
pub fn comif(&mut self) -> COMIF_W {
COMIF_W { w: self }
}
#[doc = "Bit 4 - Capture/Compare 4 interrupt flag"]
#[inline(always)]
pub fn cc4if(&mut self) -> CC4IF_W {
CC4IF_W { w: self }
}
#[doc = "Bit 3 - Capture/Compare 3 interrupt flag"]
#[inline(always)]
pub fn cc3if(&mut self) -> CC3IF_W {
CC3IF_W { w: self }
}
#[doc = "Bit 2 - Capture/Compare 2 interrupt flag"]
#[inline(always)]
pub fn cc2if(&mut self) -> CC2IF_W {
CC2IF_W { w: self }
}
#[doc = "Bit 1 - Capture/compare 1 interrupt flag"]
#[inline(always)]
pub fn cc1if(&mut self) -> CC1IF_W {
CC1IF_W { w: self }
}
#[doc = "Bit 0 - Update interrupt flag"]
#[inline(always)]
pub fn uif(&mut self) -> UIF_W {
UIF_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "status register\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 [sr](index.html) module"]
pub struct SR_SPEC;
impl crate::RegisterSpec for SR_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [sr::R](R) reader structure"]
impl crate::Readable for SR_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [sr::W](W) writer structure"]
impl crate::Writable for SR_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets SR to value 0"]
impl crate::Resettable for SR_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}