pub type R = crate::R<ISRrs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum CMPMR {
Set = 1,
}
impl From<CMPMR> for bool {
#[inline(always)]
fn from(variant: CMPMR) -> Self {
variant as u8 != 0
}
}
pub type CMPM_R = crate::BitReader<CMPMR>;
impl CMPM_R {
#[inline(always)]
pub const fn variant(&self) -> Option<CMPMR> {
match self.bits {
true => Some(CMPMR::Set),
_ => None,
}
}
#[inline(always)]
pub fn is_set(&self) -> bool {
*self == CMPMR::Set
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum ARRMR {
Set = 1,
}
impl From<ARRMR> for bool {
#[inline(always)]
fn from(variant: ARRMR) -> Self {
variant as u8 != 0
}
}
pub type ARRM_R = crate::BitReader<ARRMR>;
impl ARRM_R {
#[inline(always)]
pub const fn variant(&self) -> Option<ARRMR> {
match self.bits {
true => Some(ARRMR::Set),
_ => None,
}
}
#[inline(always)]
pub fn is_set(&self) -> bool {
*self == ARRMR::Set
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum EXTTRIGR {
Set = 1,
}
impl From<EXTTRIGR> for bool {
#[inline(always)]
fn from(variant: EXTTRIGR) -> Self {
variant as u8 != 0
}
}
pub type EXTTRIG_R = crate::BitReader<EXTTRIGR>;
impl EXTTRIG_R {
#[inline(always)]
pub const fn variant(&self) -> Option<EXTTRIGR> {
match self.bits {
true => Some(EXTTRIGR::Set),
_ => None,
}
}
#[inline(always)]
pub fn is_set(&self) -> bool {
*self == EXTTRIGR::Set
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum CMPOKR {
Set = 1,
}
impl From<CMPOKR> for bool {
#[inline(always)]
fn from(variant: CMPOKR) -> Self {
variant as u8 != 0
}
}
pub type CMPOK_R = crate::BitReader<CMPOKR>;
impl CMPOK_R {
#[inline(always)]
pub const fn variant(&self) -> Option<CMPOKR> {
match self.bits {
true => Some(CMPOKR::Set),
_ => None,
}
}
#[inline(always)]
pub fn is_set(&self) -> bool {
*self == CMPOKR::Set
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum ARROKR {
Set = 1,
}
impl From<ARROKR> for bool {
#[inline(always)]
fn from(variant: ARROKR) -> Self {
variant as u8 != 0
}
}
pub type ARROK_R = crate::BitReader<ARROKR>;
impl ARROK_R {
#[inline(always)]
pub const fn variant(&self) -> Option<ARROKR> {
match self.bits {
true => Some(ARROKR::Set),
_ => None,
}
}
#[inline(always)]
pub fn is_set(&self) -> bool {
*self == ARROKR::Set
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum UPR {
Set = 1,
}
impl From<UPR> for bool {
#[inline(always)]
fn from(variant: UPR) -> Self {
variant as u8 != 0
}
}
pub type UP_R = crate::BitReader<UPR>;
impl UP_R {
#[inline(always)]
pub const fn variant(&self) -> Option<UPR> {
match self.bits {
true => Some(UPR::Set),
_ => None,
}
}
#[inline(always)]
pub fn is_set(&self) -> bool {
*self == UPR::Set
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum DOWNR {
Set = 1,
}
impl From<DOWNR> for bool {
#[inline(always)]
fn from(variant: DOWNR) -> Self {
variant as u8 != 0
}
}
pub type DOWN_R = crate::BitReader<DOWNR>;
impl DOWN_R {
#[inline(always)]
pub const fn variant(&self) -> Option<DOWNR> {
match self.bits {
true => Some(DOWNR::Set),
_ => None,
}
}
#[inline(always)]
pub fn is_set(&self) -> bool {
*self == DOWNR::Set
}
}
impl R {
#[inline(always)]
pub fn cmpm(&self) -> CMPM_R {
CMPM_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn arrm(&self) -> ARRM_R {
ARRM_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn exttrig(&self) -> EXTTRIG_R {
EXTTRIG_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn cmpok(&self) -> CMPOK_R {
CMPOK_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn arrok(&self) -> ARROK_R {
ARROK_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn up(&self) -> UP_R {
UP_R::new(((self.bits >> 5) & 1) != 0)
}
#[inline(always)]
pub fn down(&self) -> DOWN_R {
DOWN_R::new(((self.bits >> 6) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("ISR")
.field("down", &self.down())
.field("up", &self.up())
.field("arrok", &self.arrok())
.field("cmpok", &self.cmpok())
.field("exttrig", &self.exttrig())
.field("arrm", &self.arrm())
.field("cmpm", &self.cmpm())
.finish()
}
}
pub struct ISRrs;
impl crate::RegisterSpec for ISRrs {
type Ux = u32;
}
impl crate::Readable for ISRrs {}
impl crate::Resettable for ISRrs {}