pub type R = crate::R<ISRrs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum GIF0 {
NoEvent = 0,
Event = 1,
}
impl From<GIF0> for bool {
#[inline(always)]
fn from(variant: GIF0) -> Self {
variant as u8 != 0
}
}
pub type GIF_R = crate::BitReader<GIF0>;
impl GIF_R {
#[inline(always)]
pub const fn variant(&self) -> GIF0 {
match self.bits {
false => GIF0::NoEvent,
true => GIF0::Event,
}
}
#[inline(always)]
pub fn is_no_event(&self) -> bool {
*self == GIF0::NoEvent
}
#[inline(always)]
pub fn is_event(&self) -> bool {
*self == GIF0::Event
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum TCIF0 {
NotComplete = 0,
Complete = 1,
}
impl From<TCIF0> for bool {
#[inline(always)]
fn from(variant: TCIF0) -> Self {
variant as u8 != 0
}
}
pub type TCIF_R = crate::BitReader<TCIF0>;
impl TCIF_R {
#[inline(always)]
pub const fn variant(&self) -> TCIF0 {
match self.bits {
false => TCIF0::NotComplete,
true => TCIF0::Complete,
}
}
#[inline(always)]
pub fn is_not_complete(&self) -> bool {
*self == TCIF0::NotComplete
}
#[inline(always)]
pub fn is_complete(&self) -> bool {
*self == TCIF0::Complete
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum HTIF0 {
NotHalf = 0,
Half = 1,
}
impl From<HTIF0> for bool {
#[inline(always)]
fn from(variant: HTIF0) -> Self {
variant as u8 != 0
}
}
pub type HTIF_R = crate::BitReader<HTIF0>;
impl HTIF_R {
#[inline(always)]
pub const fn variant(&self) -> HTIF0 {
match self.bits {
false => HTIF0::NotHalf,
true => HTIF0::Half,
}
}
#[inline(always)]
pub fn is_not_half(&self) -> bool {
*self == HTIF0::NotHalf
}
#[inline(always)]
pub fn is_half(&self) -> bool {
*self == HTIF0::Half
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum TEIF0 {
NoError = 0,
Error = 1,
}
impl From<TEIF0> for bool {
#[inline(always)]
fn from(variant: TEIF0) -> Self {
variant as u8 != 0
}
}
pub type TEIF_R = crate::BitReader<TEIF0>;
impl TEIF_R {
#[inline(always)]
pub const fn variant(&self) -> TEIF0 {
match self.bits {
false => TEIF0::NoError,
true => TEIF0::Error,
}
}
#[inline(always)]
pub fn is_no_error(&self) -> bool {
*self == TEIF0::NoError
}
#[inline(always)]
pub fn is_error(&self) -> bool {
*self == TEIF0::Error
}
}
impl R {
#[inline(always)]
pub fn gif(&self, n: u8) -> GIF_R {
#[allow(clippy::no_effect)] [(); 8][n as usize];
GIF_R::new(((self.bits >> (n * 4)) & 1) != 0)
}
#[inline(always)]
pub fn gif_iter(&self) -> impl Iterator<Item = GIF_R> + '_ {
(0..8).map(move |n| GIF_R::new(((self.bits >> (n * 4)) & 1) != 0))
}
#[inline(always)]
pub fn gif0(&self) -> GIF_R {
GIF_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn gif1(&self) -> GIF_R {
GIF_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn gif2(&self) -> GIF_R {
GIF_R::new(((self.bits >> 8) & 1) != 0)
}
#[inline(always)]
pub fn gif3(&self) -> GIF_R {
GIF_R::new(((self.bits >> 12) & 1) != 0)
}
#[inline(always)]
pub fn gif4(&self) -> GIF_R {
GIF_R::new(((self.bits >> 16) & 1) != 0)
}
#[inline(always)]
pub fn gif5(&self) -> GIF_R {
GIF_R::new(((self.bits >> 20) & 1) != 0)
}
#[inline(always)]
pub fn gif6(&self) -> GIF_R {
GIF_R::new(((self.bits >> 24) & 1) != 0)
}
#[inline(always)]
pub fn gif7(&self) -> GIF_R {
GIF_R::new(((self.bits >> 28) & 1) != 0)
}
#[inline(always)]
pub fn tcif(&self, n: u8) -> TCIF_R {
#[allow(clippy::no_effect)] [(); 8][n as usize];
TCIF_R::new(((self.bits >> (n * 4 + 1)) & 1) != 0)
}
#[inline(always)]
pub fn tcif_iter(&self) -> impl Iterator<Item = TCIF_R> + '_ {
(0..8).map(move |n| TCIF_R::new(((self.bits >> (n * 4 + 1)) & 1) != 0))
}
#[inline(always)]
pub fn tcif0(&self) -> TCIF_R {
TCIF_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn tcif1(&self) -> TCIF_R {
TCIF_R::new(((self.bits >> 5) & 1) != 0)
}
#[inline(always)]
pub fn tcif2(&self) -> TCIF_R {
TCIF_R::new(((self.bits >> 9) & 1) != 0)
}
#[inline(always)]
pub fn tcif3(&self) -> TCIF_R {
TCIF_R::new(((self.bits >> 13) & 1) != 0)
}
#[inline(always)]
pub fn tcif4(&self) -> TCIF_R {
TCIF_R::new(((self.bits >> 17) & 1) != 0)
}
#[inline(always)]
pub fn tcif5(&self) -> TCIF_R {
TCIF_R::new(((self.bits >> 21) & 1) != 0)
}
#[inline(always)]
pub fn tcif6(&self) -> TCIF_R {
TCIF_R::new(((self.bits >> 25) & 1) != 0)
}
#[inline(always)]
pub fn tcif7(&self) -> TCIF_R {
TCIF_R::new(((self.bits >> 29) & 1) != 0)
}
#[inline(always)]
pub fn htif(&self, n: u8) -> HTIF_R {
#[allow(clippy::no_effect)] [(); 8][n as usize];
HTIF_R::new(((self.bits >> (n * 4 + 2)) & 1) != 0)
}
#[inline(always)]
pub fn htif_iter(&self) -> impl Iterator<Item = HTIF_R> + '_ {
(0..8).map(move |n| HTIF_R::new(((self.bits >> (n * 4 + 2)) & 1) != 0))
}
#[inline(always)]
pub fn htif0(&self) -> HTIF_R {
HTIF_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn htif1(&self) -> HTIF_R {
HTIF_R::new(((self.bits >> 6) & 1) != 0)
}
#[inline(always)]
pub fn htif2(&self) -> HTIF_R {
HTIF_R::new(((self.bits >> 10) & 1) != 0)
}
#[inline(always)]
pub fn htif3(&self) -> HTIF_R {
HTIF_R::new(((self.bits >> 14) & 1) != 0)
}
#[inline(always)]
pub fn htif4(&self) -> HTIF_R {
HTIF_R::new(((self.bits >> 18) & 1) != 0)
}
#[inline(always)]
pub fn htif5(&self) -> HTIF_R {
HTIF_R::new(((self.bits >> 22) & 1) != 0)
}
#[inline(always)]
pub fn htif6(&self) -> HTIF_R {
HTIF_R::new(((self.bits >> 26) & 1) != 0)
}
#[inline(always)]
pub fn htif7(&self) -> HTIF_R {
HTIF_R::new(((self.bits >> 30) & 1) != 0)
}
#[inline(always)]
pub fn teif(&self, n: u8) -> TEIF_R {
#[allow(clippy::no_effect)] [(); 8][n as usize];
TEIF_R::new(((self.bits >> (n * 4 + 3)) & 1) != 0)
}
#[inline(always)]
pub fn teif_iter(&self) -> impl Iterator<Item = TEIF_R> + '_ {
(0..8).map(move |n| TEIF_R::new(((self.bits >> (n * 4 + 3)) & 1) != 0))
}
#[inline(always)]
pub fn teif0(&self) -> TEIF_R {
TEIF_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn teif1(&self) -> TEIF_R {
TEIF_R::new(((self.bits >> 7) & 1) != 0)
}
#[inline(always)]
pub fn teif2(&self) -> TEIF_R {
TEIF_R::new(((self.bits >> 11) & 1) != 0)
}
#[inline(always)]
pub fn teif3(&self) -> TEIF_R {
TEIF_R::new(((self.bits >> 15) & 1) != 0)
}
#[inline(always)]
pub fn teif4(&self) -> TEIF_R {
TEIF_R::new(((self.bits >> 19) & 1) != 0)
}
#[inline(always)]
pub fn teif5(&self) -> TEIF_R {
TEIF_R::new(((self.bits >> 23) & 1) != 0)
}
#[inline(always)]
pub fn teif6(&self) -> TEIF_R {
TEIF_R::new(((self.bits >> 27) & 1) != 0)
}
#[inline(always)]
pub fn teif7(&self) -> TEIF_R {
TEIF_R::new(((self.bits >> 31) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("ISR")
.field("gif0", &self.gif0())
.field("gif1", &self.gif1())
.field("gif2", &self.gif2())
.field("gif3", &self.gif3())
.field("gif4", &self.gif4())
.field("gif5", &self.gif5())
.field("gif6", &self.gif6())
.field("gif7", &self.gif7())
.field("tcif0", &self.tcif0())
.field("tcif1", &self.tcif1())
.field("tcif2", &self.tcif2())
.field("tcif3", &self.tcif3())
.field("tcif4", &self.tcif4())
.field("tcif5", &self.tcif5())
.field("tcif6", &self.tcif6())
.field("tcif7", &self.tcif7())
.field("htif0", &self.htif0())
.field("htif1", &self.htif1())
.field("htif2", &self.htif2())
.field("htif3", &self.htif3())
.field("htif4", &self.htif4())
.field("htif5", &self.htif5())
.field("htif6", &self.htif6())
.field("htif7", &self.htif7())
.field("teif0", &self.teif0())
.field("teif1", &self.teif1())
.field("teif2", &self.teif2())
.field("teif3", &self.teif3())
.field("teif4", &self.teif4())
.field("teif5", &self.teif5())
.field("teif6", &self.teif6())
.field("teif7", &self.teif7())
.finish()
}
}
pub struct ISRrs;
impl crate::RegisterSpec for ISRrs {
type Ux = u32;
}
impl crate::Readable for ISRrs {}
impl crate::Resettable for ISRrs {}