pub type R = crate::R<CFGR2rs>;
pub type W = crate::W<CFGR2rs>;
pub type IN1SEL_R = crate::FieldReader;
pub type IN1SEL_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type IN2SEL_R = crate::FieldReader;
pub type IN2SEL_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
impl R {
#[inline(always)]
pub fn in1sel(&self) -> IN1SEL_R {
IN1SEL_R::new((self.bits & 3) as u8)
}
#[inline(always)]
pub fn in2sel(&self) -> IN2SEL_R {
IN2SEL_R::new(((self.bits >> 4) & 3) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CFGR2")
.field("in1sel", &self.in1sel())
.field("in2sel", &self.in2sel())
.finish()
}
}
impl W {
#[inline(always)]
pub fn in1sel(&mut self) -> IN1SEL_W<CFGR2rs> {
IN1SEL_W::new(self, 0)
}
#[inline(always)]
pub fn in2sel(&mut self) -> IN2SEL_W<CFGR2rs> {
IN2SEL_W::new(self, 4)
}
}
pub struct CFGR2rs;
impl crate::RegisterSpec for CFGR2rs {
type Ux = u32;
}
impl crate::Readable for CFGR2rs {}
impl crate::Writable for CFGR2rs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for CFGR2rs {}