pub type R = crate::R<ECRrs>;
pub type W = crate::W<ECRrs>;
pub type TEC_R = crate::FieldReader;
pub type REC_R = crate::FieldReader;
pub type RP_R = crate::BitReader;
pub type CEL_R = crate::FieldReader;
pub type CEL_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
impl R {
#[inline(always)]
pub fn tec(&self) -> TEC_R {
TEC_R::new((self.bits & 0xff) as u8)
}
#[inline(always)]
pub fn rec(&self) -> REC_R {
REC_R::new(((self.bits >> 8) & 0x7f) as u8)
}
#[inline(always)]
pub fn rp(&self) -> RP_R {
RP_R::new(((self.bits >> 15) & 1) != 0)
}
#[inline(always)]
pub fn cel(&self) -> CEL_R {
CEL_R::new(((self.bits >> 16) & 0xff) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("ECR")
.field("tec", &self.tec())
.field("rec", &self.rec())
.field("rp", &self.rp())
.field("cel", &self.cel())
.finish()
}
}
impl W {
#[inline(always)]
pub fn cel(&mut self) -> CEL_W<ECRrs> {
CEL_W::new(self, 16)
}
}
pub struct ECRrs;
impl crate::RegisterSpec for ECRrs {
type Ux = u32;
}
impl crate::Readable for ECRrs {}
impl crate::Writable for ECRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for ECRrs {}