pub type R = crate::R<AFRCRrs>;
pub type W = crate::W<AFRCRrs>;
pub type FRL_R = crate::FieldReader;
pub type FRL_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
pub type FSALL_R = crate::FieldReader;
pub type FSALL_W<'a, REG> = crate::FieldWriter<'a, REG, 7>;
pub type FSDEF_R = crate::BitReader;
pub type FSDEF_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type FSPOL_R = crate::BitReader;
pub type FSPOL_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type FSOFF_R = crate::BitReader;
pub type FSOFF_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn frl(&self) -> FRL_R {
FRL_R::new((self.bits & 0xff) as u8)
}
#[inline(always)]
pub fn fsall(&self) -> FSALL_R {
FSALL_R::new(((self.bits >> 8) & 0x7f) as u8)
}
#[inline(always)]
pub fn fsdef(&self) -> FSDEF_R {
FSDEF_R::new(((self.bits >> 16) & 1) != 0)
}
#[inline(always)]
pub fn fspol(&self) -> FSPOL_R {
FSPOL_R::new(((self.bits >> 17) & 1) != 0)
}
#[inline(always)]
pub fn fsoff(&self) -> FSOFF_R {
FSOFF_R::new(((self.bits >> 18) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("AFRCR")
.field("frl", &self.frl())
.field("fsall", &self.fsall())
.field("fsdef", &self.fsdef())
.field("fspol", &self.fspol())
.field("fsoff", &self.fsoff())
.finish()
}
}
impl W {
#[inline(always)]
pub fn frl(&mut self) -> FRL_W<AFRCRrs> {
FRL_W::new(self, 0)
}
#[inline(always)]
pub fn fsall(&mut self) -> FSALL_W<AFRCRrs> {
FSALL_W::new(self, 8)
}
#[inline(always)]
pub fn fsdef(&mut self) -> FSDEF_W<AFRCRrs> {
FSDEF_W::new(self, 16)
}
#[inline(always)]
pub fn fspol(&mut self) -> FSPOL_W<AFRCRrs> {
FSPOL_W::new(self, 17)
}
#[inline(always)]
pub fn fsoff(&mut self) -> FSOFF_W<AFRCRrs> {
FSOFF_W::new(self, 18)
}
}
pub struct AFRCRrs;
impl crate::RegisterSpec for AFRCRrs {
type Ux = u32;
}
impl crate::Readable for AFRCRrs {}
impl crate::Writable for AFRCRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for AFRCRrs {
const RESET_VALUE: u32 = 0x07;
}