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 HSI16RDYIE_R;
pub use LSIRDYIE_R as HSERDYIE_R;
pub use LSIRDYIE_R as PLLRDYIE_R;
pub use LSIRDYIE_R as MSIRDYIE_R;
pub use LSIRDYIE_R as HSI48RDYIE_R;
pub use LSIRDYIE_W as LSERDYIE_W;
pub use LSIRDYIE_W as HSI16RDYIE_W;
pub use LSIRDYIE_W as HSERDYIE_W;
pub use LSIRDYIE_W as PLLRDYIE_W;
pub use LSIRDYIE_W as MSIRDYIE_W;
pub use LSIRDYIE_W as HSI48RDYIE_W;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum CSSLSE {
Disabled = 0,
Enabled = 1,
}
impl From<CSSLSE> for bool {
#[inline(always)]
fn from(variant: CSSLSE) -> Self {
variant as u8 != 0
}
}
pub type CSSLSE_R = crate::BitReader<CSSLSE>;
impl CSSLSE_R {
#[inline(always)]
pub const fn variant(&self) -> CSSLSE {
match self.bits {
false => CSSLSE::Disabled,
true => CSSLSE::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == CSSLSE::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == CSSLSE::Enabled
}
}
pub type CSSLSE_W<'a, REG> = crate::BitWriter<'a, REG, CSSLSE>;
impl<'a, REG> CSSLSE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(CSSLSE::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(CSSLSE::Enabled)
}
}
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 hsi16rdyie(&self) -> HSI16RDYIE_R {
HSI16RDYIE_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 pllrdyie(&self) -> PLLRDYIE_R {
PLLRDYIE_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn msirdyie(&self) -> MSIRDYIE_R {
MSIRDYIE_R::new(((self.bits >> 5) & 1) != 0)
}
#[inline(always)]
pub fn hsi48rdyie(&self) -> HSI48RDYIE_R {
HSI48RDYIE_R::new(((self.bits >> 6) & 1) != 0)
}
#[inline(always)]
pub fn csslse(&self) -> CSSLSE_R {
CSSLSE_R::new(((self.bits >> 7) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CIER")
.field("csslse", &self.csslse())
.field("lsirdyie", &self.lsirdyie())
.field("hsi48rdyie", &self.hsi48rdyie())
.field("msirdyie", &self.msirdyie())
.field("pllrdyie", &self.pllrdyie())
.field("hserdyie", &self.hserdyie())
.field("hsi16rdyie", &self.hsi16rdyie())
.field("lserdyie", &self.lserdyie())
.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 hsi16rdyie(&mut self) -> HSI16RDYIE_W<CIERrs> {
HSI16RDYIE_W::new(self, 2)
}
#[inline(always)]
pub fn hserdyie(&mut self) -> HSERDYIE_W<CIERrs> {
HSERDYIE_W::new(self, 3)
}
#[inline(always)]
pub fn pllrdyie(&mut self) -> PLLRDYIE_W<CIERrs> {
PLLRDYIE_W::new(self, 4)
}
#[inline(always)]
pub fn msirdyie(&mut self) -> MSIRDYIE_W<CIERrs> {
MSIRDYIE_W::new(self, 5)
}
#[inline(always)]
pub fn hsi48rdyie(&mut self) -> HSI48RDYIE_W<CIERrs> {
HSI48RDYIE_W::new(self, 6)
}
#[inline(always)]
pub fn csslse(&mut self) -> CSSLSE_W<CIERrs> {
CSSLSE_W::new(self, 7)
}
}
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 {}