pub type R = crate::R<CCCSRrs>;
pub type W = crate::W<CCCSRrs>;
pub type EN_R = crate::BitReader;
pub type EN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type CS_R = crate::BitReader;
pub type CS_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type READY_R = crate::BitReader;
pub type READY_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type HSLV_R = crate::BitReader;
pub type HSLV_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn en(&self) -> EN_R {
EN_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn cs(&self) -> CS_R {
CS_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn ready(&self) -> READY_R {
READY_R::new(((self.bits >> 8) & 1) != 0)
}
#[inline(always)]
pub fn hslv(&self) -> HSLV_R {
HSLV_R::new(((self.bits >> 16) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CCCSR")
.field("en", &self.en())
.field("cs", &self.cs())
.field("ready", &self.ready())
.field("hslv", &self.hslv())
.finish()
}
}
impl W {
#[inline(always)]
pub fn en(&mut self) -> EN_W<CCCSRrs> {
EN_W::new(self, 0)
}
#[inline(always)]
pub fn cs(&mut self) -> CS_W<CCCSRrs> {
CS_W::new(self, 1)
}
#[inline(always)]
pub fn ready(&mut self) -> READY_W<CCCSRrs> {
READY_W::new(self, 8)
}
#[inline(always)]
pub fn hslv(&mut self) -> HSLV_W<CCCSRrs> {
HSLV_W::new(self, 16)
}
}
pub struct CCCSRrs;
impl crate::RegisterSpec for CCCSRrs {
type Ux = u32;
}
impl crate::Readable for CCCSRrs {}
impl crate::Writable for CCCSRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for CCCSRrs {}