pub type R = crate::R<EXTICR1rs>;
pub type W = crate::W<EXTICR1rs>;
pub type EXTI0_R = crate::FieldReader;
pub type EXTI0_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
pub type EXTI1_R = crate::FieldReader;
pub type EXTI1_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
pub type EXTI2_R = crate::FieldReader;
pub type EXTI2_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
pub type EXTI3_R = crate::FieldReader;
pub type EXTI3_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
impl R {
#[inline(always)]
pub fn exti0(&self) -> EXTI0_R {
EXTI0_R::new((self.bits & 0xff) as u8)
}
#[inline(always)]
pub fn exti1(&self) -> EXTI1_R {
EXTI1_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[inline(always)]
pub fn exti2(&self) -> EXTI2_R {
EXTI2_R::new(((self.bits >> 16) & 0xff) as u8)
}
#[inline(always)]
pub fn exti3(&self) -> EXTI3_R {
EXTI3_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("EXTICR1")
.field("exti0", &self.exti0())
.field("exti1", &self.exti1())
.field("exti2", &self.exti2())
.field("exti3", &self.exti3())
.finish()
}
}
impl W {
#[inline(always)]
pub fn exti0(&mut self) -> EXTI0_W<EXTICR1rs> {
EXTI0_W::new(self, 0)
}
#[inline(always)]
pub fn exti1(&mut self) -> EXTI1_W<EXTICR1rs> {
EXTI1_W::new(self, 8)
}
#[inline(always)]
pub fn exti2(&mut self) -> EXTI2_W<EXTICR1rs> {
EXTI2_W::new(self, 16)
}
#[inline(always)]
pub fn exti3(&mut self) -> EXTI3_W<EXTICR1rs> {
EXTI3_W::new(self, 24)
}
}
pub struct EXTICR1rs;
impl crate::RegisterSpec for EXTICR1rs {
type Ux = u32;
}
impl crate::Readable for EXTICR1rs {}
impl crate::Writable for EXTICR1rs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for EXTICR1rs {}