pub type R = crate::R<AFRLrs>;
pub type W = crate::W<AFRLrs>;
pub type AFR0_R = crate::FieldReader;
pub type AFR0_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
pub type AFR1_R = crate::FieldReader;
pub type AFR1_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
pub type AFR2_R = crate::FieldReader;
pub type AFR2_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
pub type AFR3_R = crate::FieldReader;
pub type AFR3_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
pub type AFR4_R = crate::FieldReader;
pub type AFR4_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
pub type AFR5_R = crate::FieldReader;
pub type AFR5_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
pub type AFR6_R = crate::FieldReader;
pub type AFR6_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
pub type AFR7_R = crate::FieldReader;
pub type AFR7_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
impl R {
#[inline(always)]
pub fn afr0(&self) -> AFR0_R {
AFR0_R::new((self.bits & 0x0f) as u8)
}
#[inline(always)]
pub fn afr1(&self) -> AFR1_R {
AFR1_R::new(((self.bits >> 4) & 0x0f) as u8)
}
#[inline(always)]
pub fn afr2(&self) -> AFR2_R {
AFR2_R::new(((self.bits >> 8) & 0x0f) as u8)
}
#[inline(always)]
pub fn afr3(&self) -> AFR3_R {
AFR3_R::new(((self.bits >> 12) & 0x0f) as u8)
}
#[inline(always)]
pub fn afr4(&self) -> AFR4_R {
AFR4_R::new(((self.bits >> 16) & 0x0f) as u8)
}
#[inline(always)]
pub fn afr5(&self) -> AFR5_R {
AFR5_R::new(((self.bits >> 20) & 0x0f) as u8)
}
#[inline(always)]
pub fn afr6(&self) -> AFR6_R {
AFR6_R::new(((self.bits >> 24) & 0x0f) as u8)
}
#[inline(always)]
pub fn afr7(&self) -> AFR7_R {
AFR7_R::new(((self.bits >> 28) & 0x0f) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("AFRL")
.field("afr0", &self.afr0())
.field("afr1", &self.afr1())
.field("afr2", &self.afr2())
.field("afr3", &self.afr3())
.field("afr4", &self.afr4())
.field("afr5", &self.afr5())
.field("afr6", &self.afr6())
.field("afr7", &self.afr7())
.finish()
}
}
impl W {
#[inline(always)]
pub fn afr0(&mut self) -> AFR0_W<AFRLrs> {
AFR0_W::new(self, 0)
}
#[inline(always)]
pub fn afr1(&mut self) -> AFR1_W<AFRLrs> {
AFR1_W::new(self, 4)
}
#[inline(always)]
pub fn afr2(&mut self) -> AFR2_W<AFRLrs> {
AFR2_W::new(self, 8)
}
#[inline(always)]
pub fn afr3(&mut self) -> AFR3_W<AFRLrs> {
AFR3_W::new(self, 12)
}
#[inline(always)]
pub fn afr4(&mut self) -> AFR4_W<AFRLrs> {
AFR4_W::new(self, 16)
}
#[inline(always)]
pub fn afr5(&mut self) -> AFR5_W<AFRLrs> {
AFR5_W::new(self, 20)
}
#[inline(always)]
pub fn afr6(&mut self) -> AFR6_W<AFRLrs> {
AFR6_W::new(self, 24)
}
#[inline(always)]
pub fn afr7(&mut self) -> AFR7_W<AFRLrs> {
AFR7_W::new(self, 28)
}
}
pub struct AFRLrs;
impl crate::RegisterSpec for AFRLrs {
type Ux = u32;
}
impl crate::Readable for AFRLrs {}
impl crate::Writable for AFRLrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for AFRLrs {}