pub type R = crate::R<CICRrs>;
pub type W = crate::W<CICRrs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum LSIRDYC {
Clear = 1,
}
impl From<LSIRDYC> for bool {
#[inline(always)]
fn from(variant: LSIRDYC) -> Self {
variant as u8 != 0
}
}
pub type LSIRDYC_R = crate::BitReader<LSIRDYC>;
impl LSIRDYC_R {
#[inline(always)]
pub const fn variant(&self) -> Option<LSIRDYC> {
match self.bits {
true => Some(LSIRDYC::Clear),
_ => None,
}
}
#[inline(always)]
pub fn is_clear(&self) -> bool {
*self == LSIRDYC::Clear
}
}
pub type LSIRDYC_W<'a, REG> = crate::BitWriter<'a, REG, LSIRDYC>;
impl<'a, REG> LSIRDYC_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn clear(self) -> &'a mut crate::W<REG> {
self.variant(LSIRDYC::Clear)
}
}
pub use LSIRDYC_R as LSERDYC_R;
pub use LSIRDYC_R as HSIRDYC_R;
pub use LSIRDYC_R as HSERDYC_R;
pub use LSIRDYC_W as LSERDYC_W;
pub use LSIRDYC_W as HSIRDYC_W;
pub use LSIRDYC_W as HSERDYC_W;
pub type HSE_READY_INTERRUPT_CLEAR_R = crate::BitReader;
pub type HSE_READY_INTERRUPT_CLEAR_W<'a, REG> = crate::BitWriter<'a, REG>;
pub use LSIRDYC_R as HSI48RDYC_R;
pub use LSIRDYC_R as PLL1RDYC_R;
pub use LSIRDYC_R as PLL2RDYC_R;
pub use LSIRDYC_R as PLL3RDYC_R;
pub use LSIRDYC_R as LSECSSC_R;
pub use LSIRDYC_R as HSECSSC_R;
pub use LSIRDYC_W as HSI48RDYC_W;
pub use LSIRDYC_W as PLL1RDYC_W;
pub use LSIRDYC_W as PLL2RDYC_W;
pub use LSIRDYC_W as PLL3RDYC_W;
pub use LSIRDYC_W as LSECSSC_W;
pub use LSIRDYC_W as HSECSSC_W;
impl R {
#[inline(always)]
pub fn lsirdyc(&self) -> LSIRDYC_R {
LSIRDYC_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn lserdyc(&self) -> LSERDYC_R {
LSERDYC_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn hsirdyc(&self) -> HSIRDYC_R {
HSIRDYC_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn hserdyc(&self) -> HSERDYC_R {
HSERDYC_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn hse_ready_interrupt_clear(&self) -> HSE_READY_INTERRUPT_CLEAR_R {
HSE_READY_INTERRUPT_CLEAR_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn hsi48rdyc(&self) -> HSI48RDYC_R {
HSI48RDYC_R::new(((self.bits >> 5) & 1) != 0)
}
#[inline(always)]
pub fn pll1rdyc(&self) -> PLL1RDYC_R {
PLL1RDYC_R::new(((self.bits >> 6) & 1) != 0)
}
#[inline(always)]
pub fn pll2rdyc(&self) -> PLL2RDYC_R {
PLL2RDYC_R::new(((self.bits >> 7) & 1) != 0)
}
#[inline(always)]
pub fn pll3rdyc(&self) -> PLL3RDYC_R {
PLL3RDYC_R::new(((self.bits >> 8) & 1) != 0)
}
#[inline(always)]
pub fn lsecssc(&self) -> LSECSSC_R {
LSECSSC_R::new(((self.bits >> 9) & 1) != 0)
}
#[inline(always)]
pub fn hsecssc(&self) -> HSECSSC_R {
HSECSSC_R::new(((self.bits >> 10) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("CICR")
.field("lsirdyc", &self.lsirdyc())
.field("lserdyc", &self.lserdyc())
.field("hsirdyc", &self.hsirdyc())
.field("hserdyc", &self.hserdyc())
.field("hse_ready_interrupt_clear", &self.hse_ready_interrupt_clear())
.field("hsi48rdyc", &self.hsi48rdyc())
.field("pll1rdyc", &self.pll1rdyc())
.field("pll2rdyc", &self.pll2rdyc())
.field("pll3rdyc", &self.pll3rdyc())
.field("lsecssc", &self.lsecssc())
.field("hsecssc", &self.hsecssc())
.finish()
}
}
impl W {
#[inline(always)]
pub fn lsirdyc(&mut self) -> LSIRDYC_W<CICRrs> {
LSIRDYC_W::new(self, 0)
}
#[inline(always)]
pub fn lserdyc(&mut self) -> LSERDYC_W<CICRrs> {
LSERDYC_W::new(self, 1)
}
#[inline(always)]
pub fn hsirdyc(&mut self) -> HSIRDYC_W<CICRrs> {
HSIRDYC_W::new(self, 2)
}
#[inline(always)]
pub fn hserdyc(&mut self) -> HSERDYC_W<CICRrs> {
HSERDYC_W::new(self, 3)
}
#[inline(always)]
pub fn hse_ready_interrupt_clear(&mut self) -> HSE_READY_INTERRUPT_CLEAR_W<CICRrs> {
HSE_READY_INTERRUPT_CLEAR_W::new(self, 4)
}
#[inline(always)]
pub fn hsi48rdyc(&mut self) -> HSI48RDYC_W<CICRrs> {
HSI48RDYC_W::new(self, 5)
}
#[inline(always)]
pub fn pll1rdyc(&mut self) -> PLL1RDYC_W<CICRrs> {
PLL1RDYC_W::new(self, 6)
}
#[inline(always)]
pub fn pll2rdyc(&mut self) -> PLL2RDYC_W<CICRrs> {
PLL2RDYC_W::new(self, 7)
}
#[inline(always)]
pub fn pll3rdyc(&mut self) -> PLL3RDYC_W<CICRrs> {
PLL3RDYC_W::new(self, 8)
}
#[inline(always)]
pub fn lsecssc(&mut self) -> LSECSSC_W<CICRrs> {
LSECSSC_W::new(self, 9)
}
#[inline(always)]
pub fn hsecssc(&mut self) -> HSECSSC_W<CICRrs> {
HSECSSC_W::new(self, 10)
}
}
pub struct CICRrs;
impl crate::RegisterSpec for CICRrs {
type Ux = u32;
}
impl crate::Readable for CICRrs {}
impl crate::Writable for CICRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for CICRrs {}