#[doc = "Reader of register EXTICR3"]
pub type R = crate::R<u32, super::EXTICR3>;
#[doc = "Writer for register EXTICR3"]
pub type W = crate::W<u32, super::EXTICR3>;
#[doc = "Register EXTICR3 `reset()`'s with value 0"]
impl crate::ResetValue for super::EXTICR3 {
type Type = u32;
#[inline(always)]
fn reset_value() -> Self::Type {
0
}
}
#[doc = "Reader of field `EXTI11`"]
pub type EXTI11_R = crate::R<u8, u8>;
#[doc = "Write proxy for field `EXTI11`"]
pub struct EXTI11_W<'a> {
w: &'a mut W,
}
impl<'a> EXTI11_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x07 << 12)) | (((value as u32) & 0x07) << 12);
self.w
}
}
#[doc = "Reader of field `EXTI10`"]
pub type EXTI10_R = crate::R<u8, u8>;
#[doc = "Write proxy for field `EXTI10`"]
pub struct EXTI10_W<'a> {
w: &'a mut W,
}
impl<'a> EXTI10_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x07 << 8)) | (((value as u32) & 0x07) << 8);
self.w
}
}
#[doc = "Reader of field `EXTI9`"]
pub type EXTI9_R = crate::R<u8, u8>;
#[doc = "Write proxy for field `EXTI9`"]
pub struct EXTI9_W<'a> {
w: &'a mut W,
}
impl<'a> EXTI9_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x07 << 4)) | (((value as u32) & 0x07) << 4);
self.w
}
}
#[doc = "Reader of field `EXTI8`"]
pub type EXTI8_R = crate::R<u8, u8>;
#[doc = "Write proxy for field `EXTI8`"]
pub struct EXTI8_W<'a> {
w: &'a mut W,
}
impl<'a> EXTI8_W<'a> {
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0x07) | ((value as u32) & 0x07);
self.w
}
}
impl R {
#[doc = "Bits 12:14 - EXTI 11 configuration bits"]
#[inline(always)]
pub fn exti11(&self) -> EXTI11_R {
EXTI11_R::new(((self.bits >> 12) & 0x07) as u8)
}
#[doc = "Bits 8:10 - EXTI 10 configuration bits"]
#[inline(always)]
pub fn exti10(&self) -> EXTI10_R {
EXTI10_R::new(((self.bits >> 8) & 0x07) as u8)
}
#[doc = "Bits 4:6 - EXTI 9 configuration bits"]
#[inline(always)]
pub fn exti9(&self) -> EXTI9_R {
EXTI9_R::new(((self.bits >> 4) & 0x07) as u8)
}
#[doc = "Bits 0:2 - EXTI 8 configuration bits"]
#[inline(always)]
pub fn exti8(&self) -> EXTI8_R {
EXTI8_R::new((self.bits & 0x07) as u8)
}
}
impl W {
#[doc = "Bits 12:14 - EXTI 11 configuration bits"]
#[inline(always)]
pub fn exti11(&mut self) -> EXTI11_W {
EXTI11_W { w: self }
}
#[doc = "Bits 8:10 - EXTI 10 configuration bits"]
#[inline(always)]
pub fn exti10(&mut self) -> EXTI10_W {
EXTI10_W { w: self }
}
#[doc = "Bits 4:6 - EXTI 9 configuration bits"]
#[inline(always)]
pub fn exti9(&mut self) -> EXTI9_W {
EXTI9_W { w: self }
}
#[doc = "Bits 0:2 - EXTI 8 configuration bits"]
#[inline(always)]
pub fn exti8(&mut self) -> EXTI8_W {
EXTI8_W { w: self }
}
}