pub type R = crate::R<CSRrs>;
pub type W = crate::W<CSRrs>;
pub type ENVR_R = crate::BitReader;
pub type ENVR_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type HIZ_R = crate::BitReader;
pub type HIZ_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type VRR_R = crate::BitReader;
pub type VRS_R = crate::FieldReader;
pub type VRS_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
impl R {
#[inline(always)]
pub fn envr(&self) -> ENVR_R {
ENVR_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn hiz(&self) -> HIZ_R {
HIZ_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn vrr(&self) -> VRR_R {
VRR_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn vrs(&self) -> VRS_R {
VRS_R::new(((self.bits >> 4) & 7) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CSR")
.field("envr", &self.envr())
.field("hiz", &self.hiz())
.field("vrr", &self.vrr())
.field("vrs", &self.vrs())
.finish()
}
}
impl W {
#[inline(always)]
pub fn envr(&mut self) -> ENVR_W<CSRrs> {
ENVR_W::new(self, 0)
}
#[inline(always)]
pub fn hiz(&mut self) -> HIZ_W<CSRrs> {
HIZ_W::new(self, 1)
}
#[inline(always)]
pub fn vrs(&mut self) -> VRS_W<CSRrs> {
VRS_W::new(self, 4)
}
}
pub struct CSRrs;
impl crate::RegisterSpec for CSRrs {
type Ux = u32;
}
impl crate::Readable for CSRrs {}
impl crate::Writable for CSRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for CSRrs {
const RESET_VALUE: u32 = 0x02;
}