pub type R = crate::R<CIERrs>;
pub type W = crate::W<CIERrs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum LSIRDYIE {
Disabled = 0,
Enabled = 1,
}
impl From<LSIRDYIE> for bool {
#[inline(always)]
fn from(variant: LSIRDYIE) -> Self {
variant as u8 != 0
}
}
pub type LSIRDYIE_R = crate::BitReader<LSIRDYIE>;
impl LSIRDYIE_R {
#[inline(always)]
pub const fn variant(&self) -> LSIRDYIE {
match self.bits {
false => LSIRDYIE::Disabled,
true => LSIRDYIE::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == LSIRDYIE::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == LSIRDYIE::Enabled
}
}
pub type LSIRDYIE_W<'a, REG> = crate::BitWriter<'a, REG, LSIRDYIE>;
impl<'a, REG> LSIRDYIE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(LSIRDYIE::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(LSIRDYIE::Enabled)
}
}
pub use LSIRDYIE_R as LSERDYIE_R;
pub use LSIRDYIE_R as HSIRDYIE_R;
pub use LSIRDYIE_R as HSERDYIE_R;
pub use LSIRDYIE_R as CSIRDYIE_R;
pub use LSIRDYIE_R as HSI48RDYIE_R;
pub use LSIRDYIE_R as PLL1RDYIE_R;
pub use LSIRDYIE_R as PLL2RDYIE_R;
pub use LSIRDYIE_R as PLL3RDYIE_R;
pub use LSIRDYIE_R as LSECSSIE_R;
pub use LSIRDYIE_W as LSERDYIE_W;
pub use LSIRDYIE_W as HSIRDYIE_W;
pub use LSIRDYIE_W as HSERDYIE_W;
pub use LSIRDYIE_W as CSIRDYIE_W;
pub use LSIRDYIE_W as HSI48RDYIE_W;
pub use LSIRDYIE_W as PLL1RDYIE_W;
pub use LSIRDYIE_W as PLL2RDYIE_W;
pub use LSIRDYIE_W as PLL3RDYIE_W;
pub use LSIRDYIE_W as LSECSSIE_W;
impl R {
#[inline(always)]
pub fn lsirdyie(&self) -> LSIRDYIE_R {
LSIRDYIE_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn lserdyie(&self) -> LSERDYIE_R {
LSERDYIE_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn hsirdyie(&self) -> HSIRDYIE_R {
HSIRDYIE_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn hserdyie(&self) -> HSERDYIE_R {
HSERDYIE_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn csirdyie(&self) -> CSIRDYIE_R {
CSIRDYIE_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn hsi48rdyie(&self) -> HSI48RDYIE_R {
HSI48RDYIE_R::new(((self.bits >> 5) & 1) != 0)
}
#[inline(always)]
pub fn pll1rdyie(&self) -> PLL1RDYIE_R {
PLL1RDYIE_R::new(((self.bits >> 6) & 1) != 0)
}
#[inline(always)]
pub fn pll2rdyie(&self) -> PLL2RDYIE_R {
PLL2RDYIE_R::new(((self.bits >> 7) & 1) != 0)
}
#[inline(always)]
pub fn pll3rdyie(&self) -> PLL3RDYIE_R {
PLL3RDYIE_R::new(((self.bits >> 8) & 1) != 0)
}
#[inline(always)]
pub fn lsecssie(&self) -> LSECSSIE_R {
LSECSSIE_R::new(((self.bits >> 9) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CIER")
.field("lsirdyie", &self.lsirdyie())
.field("lserdyie", &self.lserdyie())
.field("hsirdyie", &self.hsirdyie())
.field("hserdyie", &self.hserdyie())
.field("csirdyie", &self.csirdyie())
.field("hsi48rdyie", &self.hsi48rdyie())
.field("pll1rdyie", &self.pll1rdyie())
.field("pll2rdyie", &self.pll2rdyie())
.field("pll3rdyie", &self.pll3rdyie())
.field("lsecssie", &self.lsecssie())
.finish()
}
}
impl W {
#[inline(always)]
pub fn lsirdyie(&mut self) -> LSIRDYIE_W<CIERrs> {
LSIRDYIE_W::new(self, 0)
}
#[inline(always)]
pub fn lserdyie(&mut self) -> LSERDYIE_W<CIERrs> {
LSERDYIE_W::new(self, 1)
}
#[inline(always)]
pub fn hsirdyie(&mut self) -> HSIRDYIE_W<CIERrs> {
HSIRDYIE_W::new(self, 2)
}
#[inline(always)]
pub fn hserdyie(&mut self) -> HSERDYIE_W<CIERrs> {
HSERDYIE_W::new(self, 3)
}
#[inline(always)]
pub fn csirdyie(&mut self) -> CSIRDYIE_W<CIERrs> {
CSIRDYIE_W::new(self, 4)
}
#[inline(always)]
pub fn hsi48rdyie(&mut self) -> HSI48RDYIE_W<CIERrs> {
HSI48RDYIE_W::new(self, 5)
}
#[inline(always)]
pub fn pll1rdyie(&mut self) -> PLL1RDYIE_W<CIERrs> {
PLL1RDYIE_W::new(self, 6)
}
#[inline(always)]
pub fn pll2rdyie(&mut self) -> PLL2RDYIE_W<CIERrs> {
PLL2RDYIE_W::new(self, 7)
}
#[inline(always)]
pub fn pll3rdyie(&mut self) -> PLL3RDYIE_W<CIERrs> {
PLL3RDYIE_W::new(self, 8)
}
#[inline(always)]
pub fn lsecssie(&mut self) -> LSECSSIE_W<CIERrs> {
LSECSSIE_W::new(self, 9)
}
}
pub struct CIERrs;
impl crate::RegisterSpec for CIERrs {
type Ux = u32;
}
impl crate::Readable for CIERrs {}
impl crate::Writable for CIERrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for CIERrs {}