pub type R = crate::R<SRrs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum RTT4B {
NotReady = 0,
Ready = 1,
}
impl From<RTT4B> for bool {
#[inline(always)]
fn from(variant: RTT4B) -> Self {
variant as u8 != 0
}
}
pub type RTT4B_R = crate::BitReader<RTT4B>;
impl RTT4B_R {
#[inline(always)]
pub const fn variant(&self) -> RTT4B {
match self.bits {
false => RTT4B::NotReady,
true => RTT4B::Ready,
}
}
#[inline(always)]
pub fn is_not_ready(&self) -> bool {
*self == RTT4B::NotReady
}
#[inline(always)]
pub fn is_ready(&self) -> bool {
*self == RTT4B::Ready
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum RTT1B {
NotReady = 0,
Ready = 1,
}
impl From<RTT1B> for bool {
#[inline(always)]
fn from(variant: RTT1B) -> Self {
variant as u8 != 0
}
}
pub type RTT1B_R = crate::BitReader<RTT1B>;
impl RTT1B_R {
#[inline(always)]
pub const fn variant(&self) -> RTT1B {
match self.bits {
false => RTT1B::NotReady,
true => RTT1B::Ready,
}
}
#[inline(always)]
pub fn is_not_ready(&self) -> bool {
*self == RTT1B::NotReady
}
#[inline(always)]
pub fn is_ready(&self) -> bool {
*self == RTT1B::Ready
}
}
impl R {
#[inline(always)]
pub fn rtt4b(&self) -> RTT4B_R {
RTT4B_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn rtt1b(&self) -> RTT1B_R {
RTT1B_R::new(((self.bits >> 3) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("SR")
.field("rtt4b", &self.rtt4b())
.field("rtt1b", &self.rtt1b())
.finish()
}
}
pub struct SRrs;
impl crate::RegisterSpec for SRrs {
type Ux = u32;
}
impl crate::Readable for SRrs {}
impl crate::Resettable for SRrs {}