pub type R = crate::R<_CCMR1_INPUTrs>;
pub type W = crate::W<_CCMR1_INPUTrs>;
pub type CC1S_R = crate::FieldReader;
pub type CC1S_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type IC1PSC_R = crate::FieldReader;
pub type IC1PSC_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type IC1F_R = crate::FieldReader;
pub type IC1F_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
pub type CC2S_R = crate::FieldReader;
pub type CC2S_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type IC2PSC_R = crate::FieldReader;
pub type IC2PSC_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type IC2F_R = crate::FieldReader;
pub type IC2F_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
impl R {
#[inline(always)]
pub fn cc1s(&self) -> CC1S_R {
CC1S_R::new((self.bits & 3) as u8)
}
#[inline(always)]
pub fn ic1psc(&self) -> IC1PSC_R {
IC1PSC_R::new(((self.bits >> 2) & 3) as u8)
}
#[inline(always)]
pub fn ic1f(&self) -> IC1F_R {
IC1F_R::new(((self.bits >> 4) & 0x0f) as u8)
}
#[inline(always)]
pub fn cc2s(&self) -> CC2S_R {
CC2S_R::new(((self.bits >> 8) & 3) as u8)
}
#[inline(always)]
pub fn ic2psc(&self) -> IC2PSC_R {
IC2PSC_R::new(((self.bits >> 10) & 3) as u8)
}
#[inline(always)]
pub fn ic2f(&self) -> IC2F_R {
IC2F_R::new(((self.bits >> 12) & 0x0f) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("_CCMR1_input")
.field("cc1s", &self.cc1s())
.field("ic1psc", &self.ic1psc())
.field("ic1f", &self.ic1f())
.field("cc2s", &self.cc2s())
.field("ic2psc", &self.ic2psc())
.field("ic2f", &self.ic2f())
.finish()
}
}
impl W {
#[inline(always)]
pub fn cc1s(&mut self) -> CC1S_W<_CCMR1_INPUTrs> {
CC1S_W::new(self, 0)
}
#[inline(always)]
pub fn ic1psc(&mut self) -> IC1PSC_W<_CCMR1_INPUTrs> {
IC1PSC_W::new(self, 2)
}
#[inline(always)]
pub fn ic1f(&mut self) -> IC1F_W<_CCMR1_INPUTrs> {
IC1F_W::new(self, 4)
}
#[inline(always)]
pub fn cc2s(&mut self) -> CC2S_W<_CCMR1_INPUTrs> {
CC2S_W::new(self, 8)
}
#[inline(always)]
pub fn ic2psc(&mut self) -> IC2PSC_W<_CCMR1_INPUTrs> {
IC2PSC_W::new(self, 10)
}
#[inline(always)]
pub fn ic2f(&mut self) -> IC2F_W<_CCMR1_INPUTrs> {
IC2F_W::new(self, 12)
}
}
pub struct _CCMR1_INPUTrs;
impl crate::RegisterSpec for _CCMR1_INPUTrs {
type Ux = u32;
}
impl crate::Readable for _CCMR1_INPUTrs {}
impl crate::Writable for _CCMR1_INPUTrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for _CCMR1_INPUTrs {}