pub type R = crate::R<EXTICR2rs>;
pub type W = crate::W<EXTICR2rs>;
pub type EXTI4_R = crate::FieldReader;
pub type EXTI4_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
pub type EXTI5_R = crate::FieldReader;
pub type EXTI5_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
pub type EXTI6_R = crate::FieldReader;
pub type EXTI6_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
pub type EXTI7_R = crate::FieldReader;
pub type EXTI7_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
impl R {
#[inline(always)]
pub fn exti4(&self) -> EXTI4_R {
EXTI4_R::new((self.bits & 0xff) as u8)
}
#[inline(always)]
pub fn exti5(&self) -> EXTI5_R {
EXTI5_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[inline(always)]
pub fn exti6(&self) -> EXTI6_R {
EXTI6_R::new(((self.bits >> 16) & 0xff) as u8)
}
#[inline(always)]
pub fn exti7(&self) -> EXTI7_R {
EXTI7_R::new(((self.bits >> 24) & 0xff) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("EXTICR2")
.field("exti4", &self.exti4())
.field("exti5", &self.exti5())
.field("exti6", &self.exti6())
.field("exti7", &self.exti7())
.finish()
}
}
impl W {
#[inline(always)]
pub fn exti4(&mut self) -> EXTI4_W<EXTICR2rs> {
EXTI4_W::new(self, 0)
}
#[inline(always)]
pub fn exti5(&mut self) -> EXTI5_W<EXTICR2rs> {
EXTI5_W::new(self, 8)
}
#[inline(always)]
pub fn exti6(&mut self) -> EXTI6_W<EXTICR2rs> {
EXTI6_W::new(self, 16)
}
#[inline(always)]
pub fn exti7(&mut self) -> EXTI7_W<EXTICR2rs> {
EXTI7_W::new(self, 24)
}
}
pub struct EXTICR2rs;
impl crate::RegisterSpec for EXTICR2rs {
type Ux = u32;
}
impl crate::Readable for EXTICR2rs {}
impl crate::Writable for EXTICR2rs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for EXTICR2rs {}