pub type R = crate::R<CSTATrs>;
pub type W = crate::W<CSTATrs>;
pub type OCPC_R = crate::FieldReader<u32>;
pub type OCPC_W<'a, REG> = crate::FieldWriter<'a, REG, 18, u32>;
pub type TQC_R = crate::FieldReader<u16>;
pub type TQC_W<'a, REG> = crate::FieldWriter<'a, REG, 11, u16>;
pub type CALS_R = crate::FieldReader;
pub type CALS_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
impl R {
#[inline(always)]
pub fn ocpc(&self) -> OCPC_R {
OCPC_R::new(self.bits & 0x0003_ffff)
}
#[inline(always)]
pub fn tqc(&self) -> TQC_R {
TQC_R::new(((self.bits >> 18) & 0x07ff) as u16)
}
#[inline(always)]
pub fn cals(&self) -> CALS_R {
CALS_R::new(((self.bits >> 30) & 3) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CSTAT")
.field("ocpc", &self.ocpc())
.field("tqc", &self.tqc())
.field("cals", &self.cals())
.finish()
}
}
impl W {
#[inline(always)]
pub fn ocpc(&mut self) -> OCPC_W<CSTATrs> {
OCPC_W::new(self, 0)
}
#[inline(always)]
pub fn tqc(&mut self) -> TQC_W<CSTATrs> {
TQC_W::new(self, 18)
}
#[inline(always)]
pub fn cals(&mut self) -> CALS_W<CSTATrs> {
CALS_W::new(self, 30)
}
}
pub struct CSTATrs;
impl crate::RegisterSpec for CSTATrs {
type Ux = u32;
}
impl crate::Readable for CSTATrs {}
impl crate::Writable for CSTATrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for CSTATrs {}