pub type R = crate::R<MISRrs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum ALRAMF {
Match = 1,
}
impl From<ALRAMF> for bool {
#[inline(always)]
fn from(variant: ALRAMF) -> Self {
variant as u8 != 0
}
}
pub type ALRMF_R = crate::BitReader<ALRAMF>;
impl ALRMF_R {
#[inline(always)]
pub const fn variant(&self) -> Option<ALRAMF> {
match self.bits {
true => Some(ALRAMF::Match),
_ => None,
}
}
#[inline(always)]
pub fn is_match(&self) -> bool {
*self == ALRAMF::Match
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum WUTMF {
Zero = 1,
}
impl From<WUTMF> for bool {
#[inline(always)]
fn from(variant: WUTMF) -> Self {
variant as u8 != 0
}
}
pub type WUTMF_R = crate::BitReader<WUTMF>;
impl WUTMF_R {
#[inline(always)]
pub const fn variant(&self) -> Option<WUTMF> {
match self.bits {
true => Some(WUTMF::Zero),
_ => None,
}
}
#[inline(always)]
pub fn is_zero(&self) -> bool {
*self == WUTMF::Zero
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum TSMF {
TimestampEvent = 1,
}
impl From<TSMF> for bool {
#[inline(always)]
fn from(variant: TSMF) -> Self {
variant as u8 != 0
}
}
pub type TSMF_R = crate::BitReader<TSMF>;
impl TSMF_R {
#[inline(always)]
pub const fn variant(&self) -> Option<TSMF> {
match self.bits {
true => Some(TSMF::TimestampEvent),
_ => None,
}
}
#[inline(always)]
pub fn is_timestamp_event(&self) -> bool {
*self == TSMF::TimestampEvent
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum TSOVMF {
Overflow = 1,
}
impl From<TSOVMF> for bool {
#[inline(always)]
fn from(variant: TSOVMF) -> Self {
variant as u8 != 0
}
}
pub type TSOVMF_R = crate::BitReader<TSOVMF>;
impl TSOVMF_R {
#[inline(always)]
pub const fn variant(&self) -> Option<TSOVMF> {
match self.bits {
true => Some(TSOVMF::Overflow),
_ => None,
}
}
#[inline(always)]
pub fn is_overflow(&self) -> bool {
*self == TSOVMF::Overflow
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum ITSMF {
TimestampEvent = 1,
}
impl From<ITSMF> for bool {
#[inline(always)]
fn from(variant: ITSMF) -> Self {
variant as u8 != 0
}
}
pub type ITSMF_R = crate::BitReader<ITSMF>;
impl ITSMF_R {
#[inline(always)]
pub const fn variant(&self) -> Option<ITSMF> {
match self.bits {
true => Some(ITSMF::TimestampEvent),
_ => None,
}
}
#[inline(always)]
pub fn is_timestamp_event(&self) -> bool {
*self == ITSMF::TimestampEvent
}
}
impl R {
#[inline(always)]
pub fn alrmf(&self, n: u8) -> ALRMF_R {
#[allow(clippy::no_effect)] [(); 2][n as usize];
ALRMF_R::new(((self.bits >> n) & 1) != 0)
}
#[inline(always)]
pub fn alrmf_iter(&self) -> impl Iterator<Item = ALRMF_R> + '_ {
(0..2).map(move |n| ALRMF_R::new(((self.bits >> n) & 1) != 0))
}
#[inline(always)]
pub fn alramf(&self) -> ALRMF_R {
ALRMF_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn alrbmf(&self) -> ALRMF_R {
ALRMF_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn wutmf(&self) -> WUTMF_R {
WUTMF_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn tsmf(&self) -> TSMF_R {
TSMF_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn tsovmf(&self) -> TSOVMF_R {
TSOVMF_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn itsmf(&self) -> ITSMF_R {
ITSMF_R::new(((self.bits >> 5) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("MISR")
.field("alramf", &self.alramf())
.field("alrbmf", &self.alrbmf())
.field("wutmf", &self.wutmf())
.field("tsmf", &self.tsmf())
.field("tsovmf", &self.tsovmf())
.field("itsmf", &self.itsmf())
.finish()
}
}
pub struct MISRrs;
impl crate::RegisterSpec for MISRrs {
type Ux = u32;
}
impl crate::Readable for MISRrs {}
impl crate::Resettable for MISRrs {}