pub type R = crate::R<GLPMCFGrs>;
pub type W = crate::W<GLPMCFGrs>;
pub type LPMEN_R = crate::BitReader;
pub type LPMEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type LPMACK_R = crate::BitReader;
pub type LPMACK_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type BESL_R = crate::FieldReader;
pub type BESL_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
pub type REMWAKE_R = crate::BitReader;
pub type REMWAKE_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type L1SSEN_R = crate::BitReader;
pub type L1SSEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type BESLTHRS_R = crate::FieldReader;
pub type BESLTHRS_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
pub type L1DSEN_R = crate::BitReader;
pub type L1DSEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type LPMRSP_R = crate::FieldReader;
pub type SLPSTS_R = crate::BitReader;
pub type L1RSMOK_R = crate::BitReader;
pub type LPMCHIDX_R = crate::FieldReader;
pub type LPMCHIDX_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
pub type LPMRCNT_R = crate::FieldReader;
pub type LPMRCNT_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
pub type SNDLPM_R = crate::BitReader;
pub type SNDLPM_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type LPMRCNTSTS_R = crate::FieldReader;
pub type ENBESL_R = crate::BitReader;
pub type ENBESL_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn lpmen(&self) -> LPMEN_R {
LPMEN_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn lpmack(&self) -> LPMACK_R {
LPMACK_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn besl(&self) -> BESL_R {
BESL_R::new(((self.bits >> 2) & 0x0f) as u8)
}
#[inline(always)]
pub fn remwake(&self) -> REMWAKE_R {
REMWAKE_R::new(((self.bits >> 6) & 1) != 0)
}
#[inline(always)]
pub fn l1ssen(&self) -> L1SSEN_R {
L1SSEN_R::new(((self.bits >> 7) & 1) != 0)
}
#[inline(always)]
pub fn beslthrs(&self) -> BESLTHRS_R {
BESLTHRS_R::new(((self.bits >> 8) & 0x0f) as u8)
}
#[inline(always)]
pub fn l1dsen(&self) -> L1DSEN_R {
L1DSEN_R::new(((self.bits >> 12) & 1) != 0)
}
#[inline(always)]
pub fn lpmrsp(&self) -> LPMRSP_R {
LPMRSP_R::new(((self.bits >> 13) & 3) as u8)
}
#[inline(always)]
pub fn slpsts(&self) -> SLPSTS_R {
SLPSTS_R::new(((self.bits >> 15) & 1) != 0)
}
#[inline(always)]
pub fn l1rsmok(&self) -> L1RSMOK_R {
L1RSMOK_R::new(((self.bits >> 16) & 1) != 0)
}
#[inline(always)]
pub fn lpmchidx(&self) -> LPMCHIDX_R {
LPMCHIDX_R::new(((self.bits >> 17) & 0x0f) as u8)
}
#[inline(always)]
pub fn lpmrcnt(&self) -> LPMRCNT_R {
LPMRCNT_R::new(((self.bits >> 21) & 7) as u8)
}
#[inline(always)]
pub fn sndlpm(&self) -> SNDLPM_R {
SNDLPM_R::new(((self.bits >> 24) & 1) != 0)
}
#[inline(always)]
pub fn lpmrcntsts(&self) -> LPMRCNTSTS_R {
LPMRCNTSTS_R::new(((self.bits >> 25) & 7) as u8)
}
#[inline(always)]
pub fn enbesl(&self) -> ENBESL_R {
ENBESL_R::new(((self.bits >> 28) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("GLPMCFG")
.field("lpmen", &self.lpmen())
.field("lpmack", &self.lpmack())
.field("besl", &self.besl())
.field("remwake", &self.remwake())
.field("l1ssen", &self.l1ssen())
.field("beslthrs", &self.beslthrs())
.field("l1dsen", &self.l1dsen())
.field("lpmrsp", &self.lpmrsp())
.field("slpsts", &self.slpsts())
.field("l1rsmok", &self.l1rsmok())
.field("lpmchidx", &self.lpmchidx())
.field("lpmrcnt", &self.lpmrcnt())
.field("sndlpm", &self.sndlpm())
.field("lpmrcntsts", &self.lpmrcntsts())
.field("enbesl", &self.enbesl())
.finish()
}
}
impl W {
#[inline(always)]
pub fn lpmen(&mut self) -> LPMEN_W<GLPMCFGrs> {
LPMEN_W::new(self, 0)
}
#[inline(always)]
pub fn lpmack(&mut self) -> LPMACK_W<GLPMCFGrs> {
LPMACK_W::new(self, 1)
}
#[inline(always)]
pub fn besl(&mut self) -> BESL_W<GLPMCFGrs> {
BESL_W::new(self, 2)
}
#[inline(always)]
pub fn remwake(&mut self) -> REMWAKE_W<GLPMCFGrs> {
REMWAKE_W::new(self, 6)
}
#[inline(always)]
pub fn l1ssen(&mut self) -> L1SSEN_W<GLPMCFGrs> {
L1SSEN_W::new(self, 7)
}
#[inline(always)]
pub fn beslthrs(&mut self) -> BESLTHRS_W<GLPMCFGrs> {
BESLTHRS_W::new(self, 8)
}
#[inline(always)]
pub fn l1dsen(&mut self) -> L1DSEN_W<GLPMCFGrs> {
L1DSEN_W::new(self, 12)
}
#[inline(always)]
pub fn lpmchidx(&mut self) -> LPMCHIDX_W<GLPMCFGrs> {
LPMCHIDX_W::new(self, 17)
}
#[inline(always)]
pub fn lpmrcnt(&mut self) -> LPMRCNT_W<GLPMCFGrs> {
LPMRCNT_W::new(self, 21)
}
#[inline(always)]
pub fn sndlpm(&mut self) -> SNDLPM_W<GLPMCFGrs> {
SNDLPM_W::new(self, 24)
}
#[inline(always)]
pub fn enbesl(&mut self) -> ENBESL_W<GLPMCFGrs> {
ENBESL_W::new(self, 28)
}
}
pub struct GLPMCFGrs;
impl crate::RegisterSpec for GLPMCFGrs {
type Ux = u32;
}
impl crate::Readable for GLPMCFGrs {}
impl crate::Writable for GLPMCFGrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for GLPMCFGrs {}