pub type R = crate::R<AFRHrs>;
pub type W = crate::W<AFRHrs>;
pub type AFR8_R = crate::FieldReader;
pub type AFR8_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
pub type AFR9_R = crate::FieldReader;
pub type AFR9_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
pub type AFR10_R = crate::FieldReader;
pub type AFR10_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
pub type AFR11_R = crate::FieldReader;
pub type AFR11_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
pub type AFR12_R = crate::FieldReader;
pub type AFR12_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
pub type AFR13_R = crate::FieldReader;
pub type AFR13_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
pub type AFR14_R = crate::FieldReader;
pub type AFR14_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
pub type AFR15_R = crate::FieldReader;
pub type AFR15_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
impl R {
#[inline(always)]
pub fn afr8(&self) -> AFR8_R {
AFR8_R::new((self.bits & 0x0f) as u8)
}
#[inline(always)]
pub fn afr9(&self) -> AFR9_R {
AFR9_R::new(((self.bits >> 4) & 0x0f) as u8)
}
#[inline(always)]
pub fn afr10(&self) -> AFR10_R {
AFR10_R::new(((self.bits >> 8) & 0x0f) as u8)
}
#[inline(always)]
pub fn afr11(&self) -> AFR11_R {
AFR11_R::new(((self.bits >> 12) & 0x0f) as u8)
}
#[inline(always)]
pub fn afr12(&self) -> AFR12_R {
AFR12_R::new(((self.bits >> 16) & 0x0f) as u8)
}
#[inline(always)]
pub fn afr13(&self) -> AFR13_R {
AFR13_R::new(((self.bits >> 20) & 0x0f) as u8)
}
#[inline(always)]
pub fn afr14(&self) -> AFR14_R {
AFR14_R::new(((self.bits >> 24) & 0x0f) as u8)
}
#[inline(always)]
pub fn afr15(&self) -> AFR15_R {
AFR15_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("AFRH")
.field("afr8", &self.afr8())
.field("afr9", &self.afr9())
.field("afr10", &self.afr10())
.field("afr11", &self.afr11())
.field("afr12", &self.afr12())
.field("afr13", &self.afr13())
.field("afr14", &self.afr14())
.field("afr15", &self.afr15())
.finish()
}
}
impl W {
#[inline(always)]
pub fn afr8(&mut self) -> AFR8_W<AFRHrs> {
AFR8_W::new(self, 0)
}
#[inline(always)]
pub fn afr9(&mut self) -> AFR9_W<AFRHrs> {
AFR9_W::new(self, 4)
}
#[inline(always)]
pub fn afr10(&mut self) -> AFR10_W<AFRHrs> {
AFR10_W::new(self, 8)
}
#[inline(always)]
pub fn afr11(&mut self) -> AFR11_W<AFRHrs> {
AFR11_W::new(self, 12)
}
#[inline(always)]
pub fn afr12(&mut self) -> AFR12_W<AFRHrs> {
AFR12_W::new(self, 16)
}
#[inline(always)]
pub fn afr13(&mut self) -> AFR13_W<AFRHrs> {
AFR13_W::new(self, 20)
}
#[inline(always)]
pub fn afr14(&mut self) -> AFR14_W<AFRHrs> {
AFR14_W::new(self, 24)
}
#[inline(always)]
pub fn afr15(&mut self) -> AFR15_W<AFRHrs> {
AFR15_W::new(self, 28)
}
}
pub struct AFRHrs;
impl crate::RegisterSpec for AFRHrs {
type Ux = u32;
}
impl crate::Readable for AFRHrs {}
impl crate::Writable for AFRHrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for AFRHrs {}