pub type R = crate::R<RISrs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum FRAME_RIS {
NoNewCapture = 0,
FrameCaptured = 1,
}
impl From<FRAME_RIS> for bool {
#[inline(always)]
fn from(variant: FRAME_RIS) -> Self {
variant as u8 != 0
}
}
pub type FRAME_RIS_R = crate::BitReader<FRAME_RIS>;
impl FRAME_RIS_R {
#[inline(always)]
pub const fn variant(&self) -> FRAME_RIS {
match self.bits {
false => FRAME_RIS::NoNewCapture,
true => FRAME_RIS::FrameCaptured,
}
}
#[inline(always)]
pub fn is_no_new_capture(&self) -> bool {
*self == FRAME_RIS::NoNewCapture
}
#[inline(always)]
pub fn is_frame_captured(&self) -> bool {
*self == FRAME_RIS::FrameCaptured
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum OVR_RIS {
NoOverrun = 0,
OverrunOccured = 1,
}
impl From<OVR_RIS> for bool {
#[inline(always)]
fn from(variant: OVR_RIS) -> Self {
variant as u8 != 0
}
}
pub type OVR_RIS_R = crate::BitReader<OVR_RIS>;
impl OVR_RIS_R {
#[inline(always)]
pub const fn variant(&self) -> OVR_RIS {
match self.bits {
false => OVR_RIS::NoOverrun,
true => OVR_RIS::OverrunOccured,
}
}
#[inline(always)]
pub fn is_no_overrun(&self) -> bool {
*self == OVR_RIS::NoOverrun
}
#[inline(always)]
pub fn is_overrun_occured(&self) -> bool {
*self == OVR_RIS::OverrunOccured
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum ERR_RIS {
NoError = 0,
SynchronizationError = 1,
}
impl From<ERR_RIS> for bool {
#[inline(always)]
fn from(variant: ERR_RIS) -> Self {
variant as u8 != 0
}
}
pub type ERR_RIS_R = crate::BitReader<ERR_RIS>;
impl ERR_RIS_R {
#[inline(always)]
pub const fn variant(&self) -> ERR_RIS {
match self.bits {
false => ERR_RIS::NoError,
true => ERR_RIS::SynchronizationError,
}
}
#[inline(always)]
pub fn is_no_error(&self) -> bool {
*self == ERR_RIS::NoError
}
#[inline(always)]
pub fn is_synchronization_error(&self) -> bool {
*self == ERR_RIS::SynchronizationError
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum VSYNC_RIS {
Cleared = 0,
Set = 1,
}
impl From<VSYNC_RIS> for bool {
#[inline(always)]
fn from(variant: VSYNC_RIS) -> Self {
variant as u8 != 0
}
}
pub type VSYNC_RIS_R = crate::BitReader<VSYNC_RIS>;
impl VSYNC_RIS_R {
#[inline(always)]
pub const fn variant(&self) -> VSYNC_RIS {
match self.bits {
false => VSYNC_RIS::Cleared,
true => VSYNC_RIS::Set,
}
}
#[inline(always)]
pub fn is_cleared(&self) -> bool {
*self == VSYNC_RIS::Cleared
}
#[inline(always)]
pub fn is_set(&self) -> bool {
*self == VSYNC_RIS::Set
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum LINE_RIS {
Cleared = 0,
Set = 1,
}
impl From<LINE_RIS> for bool {
#[inline(always)]
fn from(variant: LINE_RIS) -> Self {
variant as u8 != 0
}
}
pub type LINE_RIS_R = crate::BitReader<LINE_RIS>;
impl LINE_RIS_R {
#[inline(always)]
pub const fn variant(&self) -> LINE_RIS {
match self.bits {
false => LINE_RIS::Cleared,
true => LINE_RIS::Set,
}
}
#[inline(always)]
pub fn is_cleared(&self) -> bool {
*self == LINE_RIS::Cleared
}
#[inline(always)]
pub fn is_set(&self) -> bool {
*self == LINE_RIS::Set
}
}
impl R {
#[inline(always)]
pub fn frame_ris(&self) -> FRAME_RIS_R {
FRAME_RIS_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn ovr_ris(&self) -> OVR_RIS_R {
OVR_RIS_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn err_ris(&self) -> ERR_RIS_R {
ERR_RIS_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn vsync_ris(&self) -> VSYNC_RIS_R {
VSYNC_RIS_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn line_ris(&self) -> LINE_RIS_R {
LINE_RIS_R::new(((self.bits >> 4) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("RIS")
.field("line_ris", &self.line_ris())
.field("vsync_ris", &self.vsync_ris())
.field("err_ris", &self.err_ris())
.field("ovr_ris", &self.ovr_ris())
.field("frame_ris", &self.frame_ris())
.finish()
}
}
pub struct RISrs;
impl crate::RegisterSpec for RISrs {
type Ux = u32;
}
impl crate::Readable for RISrs {}
impl crate::Resettable for RISrs {}