pub type R = crate::R<PSRrs>;
pub type W = crate::W<PSRrs>;
pub type LEC_R = crate::FieldReader;
pub type LEC_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
pub type ACT_R = crate::FieldReader;
pub type EP_R = crate::BitReader;
pub type EW_R = crate::BitReader;
pub type BO_R = crate::BitReader;
pub type DLEC_R = crate::FieldReader;
pub type DLEC_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
pub type RESI_R = crate::BitReader;
pub type RESI_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type RBRS_R = crate::BitReader;
pub type RBRS_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type REDL_R = crate::BitReader;
pub type REDL_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type PXE_R = crate::BitReader;
pub type PXE_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type TDCV_R = crate::FieldReader;
impl R {
#[inline(always)]
pub fn lec(&self) -> LEC_R {
LEC_R::new((self.bits & 7) as u8)
}
#[inline(always)]
pub fn act(&self) -> ACT_R {
ACT_R::new(((self.bits >> 3) & 3) as u8)
}
#[inline(always)]
pub fn ep(&self) -> EP_R {
EP_R::new(((self.bits >> 5) & 1) != 0)
}
#[inline(always)]
pub fn ew(&self) -> EW_R {
EW_R::new(((self.bits >> 6) & 1) != 0)
}
#[inline(always)]
pub fn bo(&self) -> BO_R {
BO_R::new(((self.bits >> 7) & 1) != 0)
}
#[inline(always)]
pub fn dlec(&self) -> DLEC_R {
DLEC_R::new(((self.bits >> 8) & 7) as u8)
}
#[inline(always)]
pub fn resi(&self) -> RESI_R {
RESI_R::new(((self.bits >> 11) & 1) != 0)
}
#[inline(always)]
pub fn rbrs(&self) -> RBRS_R {
RBRS_R::new(((self.bits >> 12) & 1) != 0)
}
#[inline(always)]
pub fn redl(&self) -> REDL_R {
REDL_R::new(((self.bits >> 13) & 1) != 0)
}
#[inline(always)]
pub fn pxe(&self) -> PXE_R {
PXE_R::new(((self.bits >> 14) & 1) != 0)
}
#[inline(always)]
pub fn tdcv(&self) -> TDCV_R {
TDCV_R::new(((self.bits >> 16) & 0x7f) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("PSR")
.field("lec", &self.lec())
.field("act", &self.act())
.field("ep", &self.ep())
.field("ew", &self.ew())
.field("bo", &self.bo())
.field("dlec", &self.dlec())
.field("resi", &self.resi())
.field("rbrs", &self.rbrs())
.field("redl", &self.redl())
.field("pxe", &self.pxe())
.field("tdcv", &self.tdcv())
.finish()
}
}
impl W {
#[inline(always)]
pub fn lec(&mut self) -> LEC_W<PSRrs> {
LEC_W::new(self, 0)
}
#[inline(always)]
pub fn dlec(&mut self) -> DLEC_W<PSRrs> {
DLEC_W::new(self, 8)
}
#[inline(always)]
pub fn resi(&mut self) -> RESI_W<PSRrs> {
RESI_W::new(self, 11)
}
#[inline(always)]
pub fn rbrs(&mut self) -> RBRS_W<PSRrs> {
RBRS_W::new(self, 12)
}
#[inline(always)]
pub fn redl(&mut self) -> REDL_W<PSRrs> {
REDL_W::new(self, 13)
}
#[inline(always)]
pub fn pxe(&mut self) -> PXE_W<PSRrs> {
PXE_W::new(self, 14)
}
}
pub struct PSRrs;
impl crate::RegisterSpec for PSRrs {
type Ux = u32;
}
impl crate::Readable for PSRrs {}
impl crate::Writable for PSRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for PSRrs {
const RESET_VALUE: u32 = 0x0707;
}