pub type W = crate::W<EGRrs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum UG {
Update = 1,
}
impl From<UG> for bool {
#[inline(always)]
fn from(variant: UG) -> Self {
variant as u8 != 0
}
}
pub type UG_W<'a, REG> = crate::BitWriter<'a, REG, UG>;
impl<'a, REG> UG_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn update(self) -> &'a mut crate::W<REG> {
self.variant(UG::Update)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum CC1GW {
Trigger = 1,
}
impl From<CC1GW> for bool {
#[inline(always)]
fn from(variant: CC1GW) -> Self {
variant as u8 != 0
}
}
pub type CCG_W<'a, REG> = crate::BitWriter<'a, REG, CC1GW>;
impl<'a, REG> CCG_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn trigger(self) -> &'a mut crate::W<REG> {
self.variant(CC1GW::Trigger)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum TGW {
Trigger = 1,
}
impl From<TGW> for bool {
#[inline(always)]
fn from(variant: TGW) -> Self {
variant as u8 != 0
}
}
pub type TG_W<'a, REG> = crate::BitWriter<'a, REG, TGW>;
impl<'a, REG> TG_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn trigger(self) -> &'a mut crate::W<REG> {
self.variant(TGW::Trigger)
}
}
impl core::fmt::Debug for crate::generic::Reg<EGRrs> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
write!(f, "(not readable)")
}
}
impl W {
#[inline(always)]
pub fn ug(&mut self) -> UG_W<EGRrs> {
UG_W::new(self, 0)
}
#[inline(always)]
pub fn ccg(&mut self, n: u8) -> CCG_W<EGRrs> {
#[allow(clippy::no_effect)]
[(); 4][n as usize];
CCG_W::new(self, n + 1)
}
#[inline(always)]
pub fn cc1g(&mut self) -> CCG_W<EGRrs> {
CCG_W::new(self, 1)
}
#[inline(always)]
pub fn cc2g(&mut self) -> CCG_W<EGRrs> {
CCG_W::new(self, 2)
}
#[inline(always)]
pub fn cc3g(&mut self) -> CCG_W<EGRrs> {
CCG_W::new(self, 3)
}
#[inline(always)]
pub fn cc4g(&mut self) -> CCG_W<EGRrs> {
CCG_W::new(self, 4)
}
#[inline(always)]
pub fn tg(&mut self) -> TG_W<EGRrs> {
TG_W::new(self, 6)
}
}
pub struct EGRrs;
impl crate::RegisterSpec for EGRrs {
type Ux = u32;
}
impl crate::Writable for EGRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for EGRrs {}