pub type W = crate::W<RGCFRrs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum COF0W {
Clear = 1,
}
impl From<COF0W> for bool {
#[inline(always)]
fn from(variant: COF0W) -> Self {
variant as u8 != 0
}
}
pub type COF_W<'a, REG> = crate::BitWriter1C<'a, REG, COF0W>;
impl<'a, REG> COF_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn clear(self) -> &'a mut crate::W<REG> {
self.variant(COF0W::Clear)
}
}
impl core::fmt::Debug for crate::generic::Reg<RGCFRrs> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "(not readable)")
}
}
impl W {
#[inline(always)]
pub fn cof(&mut self, n: u8) -> COF_W<RGCFRrs> {
#[allow(clippy::no_effect)]
[(); 4][n as usize];
COF_W::new(self, n)
}
#[inline(always)]
pub fn cof0(&mut self) -> COF_W<RGCFRrs> {
COF_W::new(self, 0)
}
#[inline(always)]
pub fn cof1(&mut self) -> COF_W<RGCFRrs> {
COF_W::new(self, 1)
}
#[inline(always)]
pub fn cof2(&mut self) -> COF_W<RGCFRrs> {
COF_W::new(self, 2)
}
#[inline(always)]
pub fn cof3(&mut self) -> COF_W<RGCFRrs> {
COF_W::new(self, 3)
}
}
pub struct RGCFRrs;
impl crate::RegisterSpec for RGCFRrs {
type Ux = u32;
}
impl crate::Writable for RGCFRrs {
type Safety = crate::Unsafe;
const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0x0f;
}
impl crate::Resettable for RGCFRrs {}