pub type W = crate::W<ICRrs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum CMP1CW {
Clear = 1,
}
impl From<CMP1CW> for bool {
#[inline(always)]
fn from(variant: CMP1CW) -> Self {
variant as u8 != 0
}
}
pub type CMPC_W<'a, REG> = crate::BitWriter1C<'a, REG, CMP1CW>;
impl<'a, REG> CMPC_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn clear(self) -> &'a mut crate::W<REG> {
self.variant(CMP1CW::Clear)
}
}
pub use CMPC_W as REPC_W;
pub use CMPC_W as SYNCC_W;
pub use CMPC_W as UPDC_W;
impl core::fmt::Debug for crate::generic::Reg<ICRrs> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "(not readable)")
}
}
impl W {
#[inline(always)]
pub fn cmpc(&mut self, n: u8) -> CMPC_W<ICRrs> {
#[allow(clippy::no_effect)] [(); 4][n as usize];
CMPC_W::new(self, n)
}
#[inline(always)]
pub fn cmp1c(&mut self) -> CMPC_W<ICRrs> {
CMPC_W::new(self, 0)
}
#[inline(always)]
pub fn cmp2c(&mut self) -> CMPC_W<ICRrs> {
CMPC_W::new(self, 1)
}
#[inline(always)]
pub fn cmp3c(&mut self) -> CMPC_W<ICRrs> {
CMPC_W::new(self, 2)
}
#[inline(always)]
pub fn cmp4c(&mut self) -> CMPC_W<ICRrs> {
CMPC_W::new(self, 3)
}
#[inline(always)]
pub fn repc(&mut self) -> REPC_W<ICRrs> {
REPC_W::new(self, 4)
}
#[inline(always)]
pub fn syncc(&mut self) -> SYNCC_W<ICRrs> {
SYNCC_W::new(self, 5)
}
#[inline(always)]
pub fn updc(&mut self) -> UPDC_W<ICRrs> {
UPDC_W::new(self, 6)
}
}
pub struct ICRrs;
impl crate::RegisterSpec for ICRrs {
type Ux = u32;
}
impl crate::Writable for ICRrs {
type Safety = crate::Unsafe;
const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0x7f;
}
impl crate::Resettable for ICRrs {}