pub type R = crate::R<CSRrs>;
pub type W = crate::W<CSRrs>;
pub type LSION_R = crate::BitReader;
pub type LSION_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type LSIRDY_R = crate::BitReader;
pub type MSISRANGE_R = crate::FieldReader;
pub type MSISRANGE_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
pub type RMVF_R = crate::BitReader;
pub type RMVF_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type FIREWALLRSTF_R = crate::BitReader;
pub type OBLRSTF_R = crate::BitReader;
pub type PINRSTF_R = crate::BitReader;
pub type BORRSTF_R = crate::BitReader;
pub type SFTRSTF_R = crate::BitReader;
pub type IWDGRSTF_R = crate::BitReader;
pub type WWDGRSTF_R = crate::BitReader;
pub type LPWRSTF_R = crate::BitReader;
impl R {
#[inline(always)]
pub fn lsion(&self) -> LSION_R {
LSION_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn lsirdy(&self) -> LSIRDY_R {
LSIRDY_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn msisrange(&self) -> MSISRANGE_R {
MSISRANGE_R::new(((self.bits >> 8) & 0x0f) as u8)
}
#[inline(always)]
pub fn rmvf(&self) -> RMVF_R {
RMVF_R::new(((self.bits >> 23) & 1) != 0)
}
#[inline(always)]
pub fn firewallrstf(&self) -> FIREWALLRSTF_R {
FIREWALLRSTF_R::new(((self.bits >> 24) & 1) != 0)
}
#[inline(always)]
pub fn oblrstf(&self) -> OBLRSTF_R {
OBLRSTF_R::new(((self.bits >> 25) & 1) != 0)
}
#[inline(always)]
pub fn pinrstf(&self) -> PINRSTF_R {
PINRSTF_R::new(((self.bits >> 26) & 1) != 0)
}
#[inline(always)]
pub fn borrstf(&self) -> BORRSTF_R {
BORRSTF_R::new(((self.bits >> 27) & 1) != 0)
}
#[inline(always)]
pub fn sftrstf(&self) -> SFTRSTF_R {
SFTRSTF_R::new(((self.bits >> 28) & 1) != 0)
}
#[inline(always)]
pub fn iwdgrstf(&self) -> IWDGRSTF_R {
IWDGRSTF_R::new(((self.bits >> 29) & 1) != 0)
}
#[inline(always)]
pub fn wwdgrstf(&self) -> WWDGRSTF_R {
WWDGRSTF_R::new(((self.bits >> 30) & 1) != 0)
}
#[inline(always)]
pub fn lpwrstf(&self) -> LPWRSTF_R {
LPWRSTF_R::new(((self.bits >> 31) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CSR")
.field("lpwrstf", &self.lpwrstf())
.field("wwdgrstf", &self.wwdgrstf())
.field("iwdgrstf", &self.iwdgrstf())
.field("sftrstf", &self.sftrstf())
.field("borrstf", &self.borrstf())
.field("pinrstf", &self.pinrstf())
.field("oblrstf", &self.oblrstf())
.field("firewallrstf", &self.firewallrstf())
.field("rmvf", &self.rmvf())
.field("msisrange", &self.msisrange())
.field("lsirdy", &self.lsirdy())
.field("lsion", &self.lsion())
.finish()
}
}
impl W {
#[inline(always)]
pub fn lsion(&mut self) -> LSION_W<CSRrs> {
LSION_W::new(self, 0)
}
#[inline(always)]
pub fn msisrange(&mut self) -> MSISRANGE_W<CSRrs> {
MSISRANGE_W::new(self, 8)
}
#[inline(always)]
pub fn rmvf(&mut self) -> RMVF_W<CSRrs> {
RMVF_W::new(self, 23)
}
}
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 = 0x0c00_0600;
}