pub type R = crate::R<SRrs>;
pub type W = crate::W<SRrs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum EWIFR {
Finished = 0,
Pending = 1,
}
impl From<EWIFR> for bool {
#[inline(always)]
fn from(variant: EWIFR) -> Self {
variant as u8 != 0
}
}
pub type EWIF_R = crate::BitReader<EWIFR>;
impl EWIF_R {
#[inline(always)]
pub const fn variant(&self) -> EWIFR {
match self.bits {
false => EWIFR::Finished,
true => EWIFR::Pending,
}
}
#[inline(always)]
pub fn is_finished(&self) -> bool {
*self == EWIFR::Finished
}
#[inline(always)]
pub fn is_pending(&self) -> bool {
*self == EWIFR::Pending
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum EWIFW {
Finished = 0,
}
impl From<EWIFW> for bool {
#[inline(always)]
fn from(variant: EWIFW) -> Self {
variant as u8 != 0
}
}
pub type EWIF_W<'a, REG> = crate::BitWriter0C<'a, REG, EWIFW>;
impl<'a, REG> EWIF_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn finished(self) -> &'a mut crate::W<REG> {
self.variant(EWIFW::Finished)
}
}
impl R {
#[inline(always)]
pub fn ewif(&self) -> EWIF_R {
EWIF_R::new((self.bits & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("SR").field("ewif", &self.ewif()).finish()
}
}
impl W {
#[inline(always)]
pub fn ewif(&mut self) -> EWIF_W<SRrs> {
EWIF_W::new(self, 0)
}
}
pub struct SRrs;
impl crate::RegisterSpec for SRrs {
type Ux = u16;
}
impl crate::Readable for SRrs {}
impl crate::Writable for SRrs {
type Safety = crate::Unsafe;
const ZERO_TO_MODIFY_FIELDS_BITMAP: u16 = 0x01;
}
impl crate::Resettable for SRrs {}