pub type W = crate::W<HFCLKSELrs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum HF {
Hfrco = 1,
Hfxo = 2,
Lfrco = 3,
Lfxo = 4,
}
impl From<HF> for u8 {
#[inline(always)]
fn from(variant: HF) -> Self {
variant as _
}
}
impl crate::FieldSpec for HF {
type Ux = u8;
}
impl crate::IsEnum for HF {}
pub type HfW<'a, REG> = crate::FieldWriter<'a, REG, 3, HF>;
impl<'a, REG> HfW<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
REG::Ux: From<u8>,
{
#[inline(always)]
pub fn hfrco(self) -> &'a mut crate::W<REG> {
self.variant(HF::Hfrco)
}
#[inline(always)]
pub fn hfxo(self) -> &'a mut crate::W<REG> {
self.variant(HF::Hfxo)
}
#[inline(always)]
pub fn lfrco(self) -> &'a mut crate::W<REG> {
self.variant(HF::Lfrco)
}
#[inline(always)]
pub fn lfxo(self) -> &'a mut crate::W<REG> {
self.variant(HF::Lfxo)
}
}
impl core::fmt::Debug for crate::generic::Reg<HFCLKSELrs> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "(not readable)")
}
}
impl W {
#[inline(always)]
pub fn hf(&mut self) -> HfW<'_, HFCLKSELrs> {
HfW::new(self, 0)
}
}
pub struct HFCLKSELrs;
impl crate::RegisterSpec for HFCLKSELrs {
type Ux = u32;
}
impl crate::Writable for HFCLKSELrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for HFCLKSELrs {}