pub type R = crate::R<ESCRrs>;
pub type W = crate::W<ESCRrs>;
pub type FSC_R = crate::FieldReader;
pub type FSC_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
pub type LSC_R = crate::FieldReader;
pub type LSC_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
pub type LEC_R = crate::FieldReader;
pub type LEC_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
pub type FEC_R = crate::FieldReader;
pub type FEC_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
impl R {
#[inline(always)]
pub fn fsc(&self) -> FSC_R {
FSC_R::new((self.bits & 0xff) as u8)
}
#[inline(always)]
pub fn lsc(&self) -> LSC_R {
LSC_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[inline(always)]
pub fn lec(&self) -> LEC_R {
LEC_R::new(((self.bits >> 16) & 0xff) as u8)
}
#[inline(always)]
pub fn fec(&self) -> FEC_R {
FEC_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("ESCR")
.field("fec", &self.fec())
.field("lec", &self.lec())
.field("lsc", &self.lsc())
.field("fsc", &self.fsc())
.finish()
}
}
impl W {
#[inline(always)]
pub fn fsc(&mut self) -> FSC_W<ESCRrs> {
FSC_W::new(self, 0)
}
#[inline(always)]
pub fn lsc(&mut self) -> LSC_W<ESCRrs> {
LSC_W::new(self, 8)
}
#[inline(always)]
pub fn lec(&mut self) -> LEC_W<ESCRrs> {
LEC_W::new(self, 16)
}
#[inline(always)]
pub fn fec(&mut self) -> FEC_W<ESCRrs> {
FEC_W::new(self, 24)
}
}
pub struct ESCRrs;
impl crate::RegisterSpec for ESCRrs {
type Ux = u32;
}
impl crate::Readable for ESCRrs {}
impl crate::Writable for ESCRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for ESCRrs {}