pub type R = crate::R<OBW1SRPrs>;
pub type W = crate::W<OBW1SRPrs>;
pub type BOR_LEV_R = crate::FieldReader;
pub type BOR_LEV_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type IWDG_HW_R = crate::BitReader;
pub type IWDG_HW_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type NRST_STOP_R = crate::BitReader;
pub type NRST_STOP_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type NRST_STBY_R = crate::BitReader;
pub type NRST_STBY_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type OCTO1_HSLV_R = crate::BitReader;
pub type OCTO1_HSLV_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type OCTO2_HSLV_R = crate::BitReader;
pub type OCTO2_HSLV_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type IWDG_FZ_STOP_R = crate::BitReader;
pub type IWDG_FZ_STOP_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type IWDG_FZ_SDBY_R = crate::BitReader;
pub type IWDG_FZ_SDBY_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type VDDIO_HSLV_R = crate::BitReader;
pub type VDDIO_HSLV_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn bor_lev(&self) -> BOR_LEV_R {
BOR_LEV_R::new(((self.bits >> 2) & 3) as u8)
}
#[inline(always)]
pub fn iwdg_hw(&self) -> IWDG_HW_R {
IWDG_HW_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn nrst_stop(&self) -> NRST_STOP_R {
NRST_STOP_R::new(((self.bits >> 6) & 1) != 0)
}
#[inline(always)]
pub fn nrst_stby(&self) -> NRST_STBY_R {
NRST_STBY_R::new(((self.bits >> 7) & 1) != 0)
}
#[inline(always)]
pub fn octo1_hslv(&self) -> OCTO1_HSLV_R {
OCTO1_HSLV_R::new(((self.bits >> 8) & 1) != 0)
}
#[inline(always)]
pub fn octo2_hslv(&self) -> OCTO2_HSLV_R {
OCTO2_HSLV_R::new(((self.bits >> 9) & 1) != 0)
}
#[inline(always)]
pub fn iwdg_fz_stop(&self) -> IWDG_FZ_STOP_R {
IWDG_FZ_STOP_R::new(((self.bits >> 17) & 1) != 0)
}
#[inline(always)]
pub fn iwdg_fz_sdby(&self) -> IWDG_FZ_SDBY_R {
IWDG_FZ_SDBY_R::new(((self.bits >> 18) & 1) != 0)
}
#[inline(always)]
pub fn vddio_hslv(&self) -> VDDIO_HSLV_R {
VDDIO_HSLV_R::new(((self.bits >> 29) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("OBW1SRP")
.field("bor_lev", &self.bor_lev())
.field("iwdg_hw", &self.iwdg_hw())
.field("nrst_stop", &self.nrst_stop())
.field("nrst_stby", &self.nrst_stby())
.field("octo1_hslv", &self.octo1_hslv())
.field("octo2_hslv", &self.octo2_hslv())
.field("iwdg_fz_stop", &self.iwdg_fz_stop())
.field("iwdg_fz_sdby", &self.iwdg_fz_sdby())
.field("vddio_hslv", &self.vddio_hslv())
.finish()
}
}
impl W {
#[inline(always)]
pub fn bor_lev(&mut self) -> BOR_LEV_W<OBW1SRPrs> {
BOR_LEV_W::new(self, 2)
}
#[inline(always)]
pub fn iwdg_hw(&mut self) -> IWDG_HW_W<OBW1SRPrs> {
IWDG_HW_W::new(self, 4)
}
#[inline(always)]
pub fn nrst_stop(&mut self) -> NRST_STOP_W<OBW1SRPrs> {
NRST_STOP_W::new(self, 6)
}
#[inline(always)]
pub fn nrst_stby(&mut self) -> NRST_STBY_W<OBW1SRPrs> {
NRST_STBY_W::new(self, 7)
}
#[inline(always)]
pub fn octo1_hslv(&mut self) -> OCTO1_HSLV_W<OBW1SRPrs> {
OCTO1_HSLV_W::new(self, 8)
}
#[inline(always)]
pub fn octo2_hslv(&mut self) -> OCTO2_HSLV_W<OBW1SRPrs> {
OCTO2_HSLV_W::new(self, 9)
}
#[inline(always)]
pub fn iwdg_fz_stop(&mut self) -> IWDG_FZ_STOP_W<OBW1SRPrs> {
IWDG_FZ_STOP_W::new(self, 17)
}
#[inline(always)]
pub fn iwdg_fz_sdby(&mut self) -> IWDG_FZ_SDBY_W<OBW1SRPrs> {
IWDG_FZ_SDBY_W::new(self, 18)
}
#[inline(always)]
pub fn vddio_hslv(&mut self) -> VDDIO_HSLV_W<OBW1SRPrs> {
VDDIO_HSLV_W::new(self, 29)
}
}
pub struct OBW1SRPrs;
impl crate::RegisterSpec for OBW1SRPrs {
type Ux = u32;
}
impl crate::Readable for OBW1SRPrs {}
impl crate::Writable for OBW1SRPrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for OBW1SRPrs {}