pub type W = crate::W<WPRrs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum KEY {
Activate = 0,
Deactivate2 = 83,
Deactivate1 = 202,
}
impl From<KEY> for u8 {
#[inline(always)]
fn from(variant: KEY) -> Self {
variant as _
}
}
impl crate::FieldSpec for KEY {
type Ux = u8;
}
impl crate::IsEnum for KEY {}
pub type KEY_W<'a, REG> = crate::FieldWriter<'a, REG, 8, KEY>;
impl<'a, REG> KEY_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
REG::Ux: From<u8>,
{
#[inline(always)]
pub fn activate(self) -> &'a mut crate::W<REG> {
self.variant(KEY::Activate)
}
#[inline(always)]
pub fn deactivate2(self) -> &'a mut crate::W<REG> {
self.variant(KEY::Deactivate2)
}
#[inline(always)]
pub fn deactivate1(self) -> &'a mut crate::W<REG> {
self.variant(KEY::Deactivate1)
}
}
impl core::fmt::Debug for crate::generic::Reg<WPRrs> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "(not readable)")
}
}
impl W {
#[inline(always)]
pub fn key(&mut self) -> KEY_W<WPRrs> {
KEY_W::new(self, 0)
}
}
pub struct WPRrs;
impl crate::RegisterSpec for WPRrs {
type Ux = u32;
}
impl crate::Writable for WPRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for WPRrs {}