pub type R = crate::R<CCFGrs>;
pub type W = crate::W<CCFGrs>;
pub type TQBT_R = crate::FieldReader;
pub type TQBT_W<'a, REG> = crate::FieldWriter<'a, REG, 5>;
pub type BCC_R = crate::BitReader;
pub type BCC_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type CFL_R = crate::BitReader;
pub type CFL_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type OCPM_R = crate::FieldReader;
pub type OCPM_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
pub type CDIV_R = crate::FieldReader;
pub type CDIV_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
pub type SWR_R = crate::BitReader;
pub type SWR_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn tqbt(&self) -> TQBT_R {
TQBT_R::new((self.bits & 0x1f) as u8)
}
#[inline(always)]
pub fn bcc(&self) -> BCC_R {
BCC_R::new(((self.bits >> 6) & 1) != 0)
}
#[inline(always)]
pub fn cfl(&self) -> CFL_R {
CFL_R::new(((self.bits >> 7) & 1) != 0)
}
#[inline(always)]
pub fn ocpm(&self) -> OCPM_R {
OCPM_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[inline(always)]
pub fn cdiv(&self) -> CDIV_R {
CDIV_R::new(((self.bits >> 16) & 0x0f) as u8)
}
#[inline(always)]
pub fn swr(&self) -> SWR_R {
SWR_R::new(((self.bits >> 31) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CCFG")
.field("tqbt", &self.tqbt())
.field("bcc", &self.bcc())
.field("cfl", &self.cfl())
.field("ocpm", &self.ocpm())
.field("cdiv", &self.cdiv())
.field("swr", &self.swr())
.finish()
}
}
impl W {
#[inline(always)]
pub fn tqbt(&mut self) -> TQBT_W<CCFGrs> {
TQBT_W::new(self, 0)
}
#[inline(always)]
pub fn bcc(&mut self) -> BCC_W<CCFGrs> {
BCC_W::new(self, 6)
}
#[inline(always)]
pub fn cfl(&mut self) -> CFL_W<CCFGrs> {
CFL_W::new(self, 7)
}
#[inline(always)]
pub fn ocpm(&mut self) -> OCPM_W<CCFGrs> {
OCPM_W::new(self, 8)
}
#[inline(always)]
pub fn cdiv(&mut self) -> CDIV_W<CCFGrs> {
CDIV_W::new(self, 16)
}
#[inline(always)]
pub fn swr(&mut self) -> SWR_W<CCFGrs> {
SWR_W::new(self, 31)
}
}
pub struct CCFGrs;
impl crate::RegisterSpec for CCFGrs {
type Ux = u32;
}
impl crate::Readable for CCFGrs {}
impl crate::Writable for CCFGrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for CCFGrs {}