#[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 = "Field `UIF` reader - desc UIF"]
pub type UIF_R = crate::BitReader<bool>;
#[doc = "Field `UIF` writer - desc UIF"]
pub type UIF_W<'a, const O: u8> = crate::BitWriter<'a, u32, SR_SPEC, bool, O>;
#[doc = "Field `CC1IF` reader - desc CC1IF"]
pub type CC1IF_R = crate::BitReader<bool>;
#[doc = "Field `CC1IF` writer - desc CC1IF"]
pub type CC1IF_W<'a, const O: u8> = crate::BitWriter<'a, u32, SR_SPEC, bool, O>;
#[doc = "Field `CC1OF` reader - desc CC1OF"]
pub type CC1OF_R = crate::BitReader<bool>;
#[doc = "Field `CC1OF` writer - desc CC1OF"]
pub type CC1OF_W<'a, const O: u8> = crate::BitWriter<'a, u32, SR_SPEC, bool, O>;
#[doc = "Field `IC1IR` reader - desc IC1IR"]
pub type IC1IR_R = crate::BitReader<bool>;
#[doc = "Field `IC1IR` writer - desc IC1IR"]
pub type IC1IR_W<'a, const O: u8> = crate::BitWriter<'a, u32, SR_SPEC, bool, O>;
#[doc = "Field `IC1IF` reader - desc IC1IF"]
pub type IC1IF_R = crate::BitReader<bool>;
#[doc = "Field `IC1IF` writer - desc IC1IF"]
pub type IC1IF_W<'a, const O: u8> = crate::BitWriter<'a, u32, SR_SPEC, bool, O>;
impl R {
#[doc = "Bit 0 - desc UIF"]
#[inline(always)]
pub fn uif(&self) -> UIF_R {
UIF_R::new((self.bits & 1) != 0)
}
#[doc = "Bit 1 - desc CC1IF"]
#[inline(always)]
pub fn cc1if(&self) -> CC1IF_R {
CC1IF_R::new(((self.bits >> 1) & 1) != 0)
}
#[doc = "Bit 9 - desc CC1OF"]
#[inline(always)]
pub fn cc1of(&self) -> CC1OF_R {
CC1OF_R::new(((self.bits >> 9) & 1) != 0)
}
#[doc = "Bit 16 - desc IC1IR"]
#[inline(always)]
pub fn ic1ir(&self) -> IC1IR_R {
IC1IR_R::new(((self.bits >> 16) & 1) != 0)
}
#[doc = "Bit 20 - desc IC1IF"]
#[inline(always)]
pub fn ic1if(&self) -> IC1IF_R {
IC1IF_R::new(((self.bits >> 20) & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - desc UIF"]
#[inline(always)]
pub fn uif(&mut self) -> UIF_W<0> {
UIF_W::new(self)
}
#[doc = "Bit 1 - desc CC1IF"]
#[inline(always)]
pub fn cc1if(&mut self) -> CC1IF_W<1> {
CC1IF_W::new(self)
}
#[doc = "Bit 9 - desc CC1OF"]
#[inline(always)]
pub fn cc1of(&mut self) -> CC1OF_W<9> {
CC1OF_W::new(self)
}
#[doc = "Bit 16 - desc IC1IR"]
#[inline(always)]
pub fn ic1ir(&mut self) -> IC1IR_W<16> {
IC1IR_W::new(self)
}
#[doc = "Bit 20 - desc IC1IF"]
#[inline(always)]
pub fn ic1if(&mut self) -> IC1IF_W<20> {
IC1IF_W::new(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 = "desc SR\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
}
}