pub type R = crate::R<CHPRrs>;
pub type W = crate::W<CHPRrs>;
pub type CARFRQ_R = crate::FieldReader;
pub type CARFRQ_W<'a, REG> = crate::FieldWriter<'a, REG, 4, u8, crate::Safe>;
pub type CARDTY_R = crate::FieldReader;
pub type CARDTY_W<'a, REG> = crate::FieldWriter<'a, REG, 3, u8, crate::Safe>;
pub type STRTPW_R = crate::FieldReader;
pub type STRTPW_W<'a, REG> = crate::FieldWriter<'a, REG, 4, u8, crate::Safe>;
impl R {
#[inline(always)]
pub fn carfrq(&self) -> CARFRQ_R {
CARFRQ_R::new((self.bits & 0x0f) as u8)
}
#[inline(always)]
pub fn cardty(&self) -> CARDTY_R {
CARDTY_R::new(((self.bits >> 4) & 7) as u8)
}
#[inline(always)]
pub fn strtpw(&self) -> STRTPW_R {
STRTPW_R::new(((self.bits >> 7) & 0x0f) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CHPR")
.field("strtpw", &self.strtpw())
.field("cardty", &self.cardty())
.field("carfrq", &self.carfrq())
.finish()
}
}
impl W {
#[inline(always)]
pub fn carfrq(&mut self) -> CARFRQ_W<CHPRrs> {
CARFRQ_W::new(self, 0)
}
#[inline(always)]
pub fn cardty(&mut self) -> CARDTY_W<CHPRrs> {
CARDTY_W::new(self, 4)
}
#[inline(always)]
pub fn strtpw(&mut self) -> STRTPW_W<CHPRrs> {
STRTPW_W::new(self, 7)
}
}
pub struct CHPRrs;
impl crate::RegisterSpec for CHPRrs {
type Ux = u32;
}
impl crate::Readable for CHPRrs {}
impl crate::Writable for CHPRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for CHPRrs {}