pub type R = crate::R<IERrs>;
pub type W = crate::W<IERrs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum FRAME_IE {
Disabled = 0,
Enabled = 1,
}
impl From<FRAME_IE> for bool {
#[inline(always)]
fn from(variant: FRAME_IE) -> Self {
variant as u8 != 0
}
}
pub type FRAME_IE_R = crate::BitReader<FRAME_IE>;
impl FRAME_IE_R {
#[inline(always)]
pub const fn variant(&self) -> FRAME_IE {
match self.bits {
false => FRAME_IE::Disabled,
true => FRAME_IE::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == FRAME_IE::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == FRAME_IE::Enabled
}
}
pub type FRAME_IE_W<'a, REG> = crate::BitWriter<'a, REG, FRAME_IE>;
impl<'a, REG> FRAME_IE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(FRAME_IE::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(FRAME_IE::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum OVR_IE {
Disabled = 0,
Enabled = 1,
}
impl From<OVR_IE> for bool {
#[inline(always)]
fn from(variant: OVR_IE) -> Self {
variant as u8 != 0
}
}
pub type OVR_IE_R = crate::BitReader<OVR_IE>;
impl OVR_IE_R {
#[inline(always)]
pub const fn variant(&self) -> OVR_IE {
match self.bits {
false => OVR_IE::Disabled,
true => OVR_IE::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == OVR_IE::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == OVR_IE::Enabled
}
}
pub type OVR_IE_W<'a, REG> = crate::BitWriter<'a, REG, OVR_IE>;
impl<'a, REG> OVR_IE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(OVR_IE::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(OVR_IE::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum ERR_IE {
Disabled = 0,
Enabled = 1,
}
impl From<ERR_IE> for bool {
#[inline(always)]
fn from(variant: ERR_IE) -> Self {
variant as u8 != 0
}
}
pub type ERR_IE_R = crate::BitReader<ERR_IE>;
impl ERR_IE_R {
#[inline(always)]
pub const fn variant(&self) -> ERR_IE {
match self.bits {
false => ERR_IE::Disabled,
true => ERR_IE::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == ERR_IE::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == ERR_IE::Enabled
}
}
pub type ERR_IE_W<'a, REG> = crate::BitWriter<'a, REG, ERR_IE>;
impl<'a, REG> ERR_IE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(ERR_IE::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(ERR_IE::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum VSYNC_IE {
Disabled = 0,
Enabled = 1,
}
impl From<VSYNC_IE> for bool {
#[inline(always)]
fn from(variant: VSYNC_IE) -> Self {
variant as u8 != 0
}
}
pub type VSYNC_IE_R = crate::BitReader<VSYNC_IE>;
impl VSYNC_IE_R {
#[inline(always)]
pub const fn variant(&self) -> VSYNC_IE {
match self.bits {
false => VSYNC_IE::Disabled,
true => VSYNC_IE::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == VSYNC_IE::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == VSYNC_IE::Enabled
}
}
pub type VSYNC_IE_W<'a, REG> = crate::BitWriter<'a, REG, VSYNC_IE>;
impl<'a, REG> VSYNC_IE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(VSYNC_IE::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(VSYNC_IE::Enabled)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum LINE_IE {
Disabled = 0,
Enabled = 1,
}
impl From<LINE_IE> for bool {
#[inline(always)]
fn from(variant: LINE_IE) -> Self {
variant as u8 != 0
}
}
pub type LINE_IE_R = crate::BitReader<LINE_IE>;
impl LINE_IE_R {
#[inline(always)]
pub const fn variant(&self) -> LINE_IE {
match self.bits {
false => LINE_IE::Disabled,
true => LINE_IE::Enabled,
}
}
#[inline(always)]
pub fn is_disabled(&self) -> bool {
*self == LINE_IE::Disabled
}
#[inline(always)]
pub fn is_enabled(&self) -> bool {
*self == LINE_IE::Enabled
}
}
pub type LINE_IE_W<'a, REG> = crate::BitWriter<'a, REG, LINE_IE>;
impl<'a, REG> LINE_IE_W<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
{
#[inline(always)]
pub fn disabled(self) -> &'a mut crate::W<REG> {
self.variant(LINE_IE::Disabled)
}
#[inline(always)]
pub fn enabled(self) -> &'a mut crate::W<REG> {
self.variant(LINE_IE::Enabled)
}
}
impl R {
#[inline(always)]
pub fn frame_ie(&self) -> FRAME_IE_R {
FRAME_IE_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn ovr_ie(&self) -> OVR_IE_R {
OVR_IE_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn err_ie(&self) -> ERR_IE_R {
ERR_IE_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn vsync_ie(&self) -> VSYNC_IE_R {
VSYNC_IE_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn line_ie(&self) -> LINE_IE_R {
LINE_IE_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("IER")
.field("line_ie", &self.line_ie())
.field("vsync_ie", &self.vsync_ie())
.field("err_ie", &self.err_ie())
.field("ovr_ie", &self.ovr_ie())
.field("frame_ie", &self.frame_ie())
.finish()
}
}
impl W {
#[inline(always)]
pub fn frame_ie(&mut self) -> FRAME_IE_W<IERrs> {
FRAME_IE_W::new(self, 0)
}
#[inline(always)]
pub fn ovr_ie(&mut self) -> OVR_IE_W<IERrs> {
OVR_IE_W::new(self, 1)
}
#[inline(always)]
pub fn err_ie(&mut self) -> ERR_IE_W<IERrs> {
ERR_IE_W::new(self, 2)
}
#[inline(always)]
pub fn vsync_ie(&mut self) -> VSYNC_IE_W<IERrs> {
VSYNC_IE_W::new(self, 3)
}
#[inline(always)]
pub fn line_ie(&mut self) -> LINE_IE_W<IERrs> {
LINE_IE_W::new(self, 4)
}
}
pub struct IERrs;
impl crate::RegisterSpec for IERrs {
type Ux = u32;
}
impl crate::Readable for IERrs {}
impl crate::Writable for IERrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for IERrs {}