pub type R = crate::R<CR4rs>;
pub type W = crate::W<CR4rs>;
pub type WP1_R = crate::BitReader;
pub type WP1_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type WP2_R = crate::BitReader;
pub type WP2_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type WP3_R = crate::BitReader;
pub type WP3_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type WP4_R = crate::BitReader;
pub type WP4_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type WP5_R = crate::BitReader;
pub type WP5_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type WP6_R = crate::BitReader;
pub type WP6_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type VBE_R = crate::BitReader;
pub type VBE_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type VBRS_R = crate::BitReader;
pub type VBRS_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn wp1(&self) -> WP1_R {
WP1_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn wp2(&self) -> WP2_R {
WP2_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn wp3(&self) -> WP3_R {
WP3_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn wp4(&self) -> WP4_R {
WP4_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn wp5(&self) -> WP5_R {
WP5_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn wp6(&self) -> WP6_R {
WP6_R::new(((self.bits >> 5) & 1) != 0)
}
#[inline(always)]
pub fn vbe(&self) -> VBE_R {
VBE_R::new(((self.bits >> 8) & 1) != 0)
}
#[inline(always)]
pub fn vbrs(&self) -> VBRS_R {
VBRS_R::new(((self.bits >> 9) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CR4")
.field("wp1", &self.wp1())
.field("wp2", &self.wp2())
.field("wp3", &self.wp3())
.field("wp4", &self.wp4())
.field("wp5", &self.wp5())
.field("wp6", &self.wp6())
.field("vbe", &self.vbe())
.field("vbrs", &self.vbrs())
.finish()
}
}
impl W {
#[inline(always)]
pub fn wp1(&mut self) -> WP1_W<CR4rs> {
WP1_W::new(self, 0)
}
#[inline(always)]
pub fn wp2(&mut self) -> WP2_W<CR4rs> {
WP2_W::new(self, 1)
}
#[inline(always)]
pub fn wp3(&mut self) -> WP3_W<CR4rs> {
WP3_W::new(self, 2)
}
#[inline(always)]
pub fn wp4(&mut self) -> WP4_W<CR4rs> {
WP4_W::new(self, 3)
}
#[inline(always)]
pub fn wp5(&mut self) -> WP5_W<CR4rs> {
WP5_W::new(self, 4)
}
#[inline(always)]
pub fn wp6(&mut self) -> WP6_W<CR4rs> {
WP6_W::new(self, 5)
}
#[inline(always)]
pub fn vbe(&mut self) -> VBE_W<CR4rs> {
VBE_W::new(self, 8)
}
#[inline(always)]
pub fn vbrs(&mut self) -> VBRS_W<CR4rs> {
VBRS_W::new(self, 9)
}
}
pub struct CR4rs;
impl crate::RegisterSpec for CR4rs {
type Ux = u32;
}
impl crate::Readable for CR4rs {}
impl crate::Writable for CR4rs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for CR4rs {}