187 lines
5.4 KiB
Rust
187 lines
5.4 KiB
Rust
#[doc = "Reader of register CR0"]
|
|
pub type R = crate::R<u32, super::CR0>;
|
|
#[doc = "Writer for register CR0"]
|
|
pub type W = crate::W<u32, super::CR0>;
|
|
#[doc = "Register CR0 `reset()`'s with value 0"]
|
|
impl crate::ResetValue for super::CR0 {
|
|
type Type = u32;
|
|
#[inline(always)]
|
|
fn reset_value() -> Self::Type {
|
|
0
|
|
}
|
|
}
|
|
#[doc = "ENCIE0\n\nValue on reset: 0"]
|
|
#[derive(Clone, Copy, Debug, PartialEq)]
|
|
pub enum ENCIE0_A {
|
|
#[doc = "0: Interrupt notification of Memory 0 non-correctable error events is disabled."]
|
|
_0 = 0,
|
|
#[doc = "1: Interrupt notification of Memory 0 non-correctable error events is enabled."]
|
|
_1 = 1,
|
|
}
|
|
impl From<ENCIE0_A> for bool {
|
|
#[inline(always)]
|
|
fn from(variant: ENCIE0_A) -> Self {
|
|
variant as u8 != 0
|
|
}
|
|
}
|
|
#[doc = "Reader of field `ENCIE0`"]
|
|
pub type ENCIE0_R = crate::R<bool, ENCIE0_A>;
|
|
impl ENCIE0_R {
|
|
#[doc = r"Get enumerated values variant"]
|
|
#[inline(always)]
|
|
pub fn variant(&self) -> ENCIE0_A {
|
|
match self.bits {
|
|
false => ENCIE0_A::_0,
|
|
true => ENCIE0_A::_1,
|
|
}
|
|
}
|
|
#[doc = "Checks if the value of the field is `_0`"]
|
|
#[inline(always)]
|
|
pub fn is_0(&self) -> bool {
|
|
*self == ENCIE0_A::_0
|
|
}
|
|
#[doc = "Checks if the value of the field is `_1`"]
|
|
#[inline(always)]
|
|
pub fn is_1(&self) -> bool {
|
|
*self == ENCIE0_A::_1
|
|
}
|
|
}
|
|
#[doc = "Write proxy for field `ENCIE0`"]
|
|
pub struct ENCIE0_W<'a> {
|
|
w: &'a mut W,
|
|
}
|
|
impl<'a> ENCIE0_W<'a> {
|
|
#[doc = r"Writes `variant` to the field"]
|
|
#[inline(always)]
|
|
pub fn variant(self, variant: ENCIE0_A) -> &'a mut W {
|
|
{
|
|
self.bit(variant.into())
|
|
}
|
|
}
|
|
#[doc = "Interrupt notification of Memory 0 non-correctable error events is disabled."]
|
|
#[inline(always)]
|
|
pub fn _0(self) -> &'a mut W {
|
|
self.variant(ENCIE0_A::_0)
|
|
}
|
|
#[doc = "Interrupt notification of Memory 0 non-correctable error events is enabled."]
|
|
#[inline(always)]
|
|
pub fn _1(self) -> &'a mut W {
|
|
self.variant(ENCIE0_A::_1)
|
|
}
|
|
#[doc = r"Sets the field bit"]
|
|
#[inline(always)]
|
|
pub fn set_bit(self) -> &'a mut W {
|
|
self.bit(true)
|
|
}
|
|
#[doc = r"Clears the field bit"]
|
|
#[inline(always)]
|
|
pub fn clear_bit(self) -> &'a mut W {
|
|
self.bit(false)
|
|
}
|
|
#[doc = r"Writes raw bits to the field"]
|
|
#[inline(always)]
|
|
pub fn bit(self, value: bool) -> &'a mut W {
|
|
self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30);
|
|
self.w
|
|
}
|
|
}
|
|
#[doc = "ESCIE0\n\nValue on reset: 0"]
|
|
#[derive(Clone, Copy, Debug, PartialEq)]
|
|
pub enum ESCIE0_A {
|
|
#[doc = "0: Interrupt notification of Memory 0 single-bit correction events is disabled."]
|
|
_0 = 0,
|
|
#[doc = "1: Interrupt notification of Memory 0 single-bit correction events is enabled."]
|
|
_1 = 1,
|
|
}
|
|
impl From<ESCIE0_A> for bool {
|
|
#[inline(always)]
|
|
fn from(variant: ESCIE0_A) -> Self {
|
|
variant as u8 != 0
|
|
}
|
|
}
|
|
#[doc = "Reader of field `ESCIE0`"]
|
|
pub type ESCIE0_R = crate::R<bool, ESCIE0_A>;
|
|
impl ESCIE0_R {
|
|
#[doc = r"Get enumerated values variant"]
|
|
#[inline(always)]
|
|
pub fn variant(&self) -> ESCIE0_A {
|
|
match self.bits {
|
|
false => ESCIE0_A::_0,
|
|
true => ESCIE0_A::_1,
|
|
}
|
|
}
|
|
#[doc = "Checks if the value of the field is `_0`"]
|
|
#[inline(always)]
|
|
pub fn is_0(&self) -> bool {
|
|
*self == ESCIE0_A::_0
|
|
}
|
|
#[doc = "Checks if the value of the field is `_1`"]
|
|
#[inline(always)]
|
|
pub fn is_1(&self) -> bool {
|
|
*self == ESCIE0_A::_1
|
|
}
|
|
}
|
|
#[doc = "Write proxy for field `ESCIE0`"]
|
|
pub struct ESCIE0_W<'a> {
|
|
w: &'a mut W,
|
|
}
|
|
impl<'a> ESCIE0_W<'a> {
|
|
#[doc = r"Writes `variant` to the field"]
|
|
#[inline(always)]
|
|
pub fn variant(self, variant: ESCIE0_A) -> &'a mut W {
|
|
{
|
|
self.bit(variant.into())
|
|
}
|
|
}
|
|
#[doc = "Interrupt notification of Memory 0 single-bit correction events is disabled."]
|
|
#[inline(always)]
|
|
pub fn _0(self) -> &'a mut W {
|
|
self.variant(ESCIE0_A::_0)
|
|
}
|
|
#[doc = "Interrupt notification of Memory 0 single-bit correction events is enabled."]
|
|
#[inline(always)]
|
|
pub fn _1(self) -> &'a mut W {
|
|
self.variant(ESCIE0_A::_1)
|
|
}
|
|
#[doc = r"Sets the field bit"]
|
|
#[inline(always)]
|
|
pub fn set_bit(self) -> &'a mut W {
|
|
self.bit(true)
|
|
}
|
|
#[doc = r"Clears the field bit"]
|
|
#[inline(always)]
|
|
pub fn clear_bit(self) -> &'a mut W {
|
|
self.bit(false)
|
|
}
|
|
#[doc = r"Writes raw bits to the field"]
|
|
#[inline(always)]
|
|
pub fn bit(self, value: bool) -> &'a mut W {
|
|
self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31);
|
|
self.w
|
|
}
|
|
}
|
|
impl R {
|
|
#[doc = "Bit 30 - ENCIE0"]
|
|
#[inline(always)]
|
|
pub fn encie0(&self) -> ENCIE0_R {
|
|
ENCIE0_R::new(((self.bits >> 30) & 0x01) != 0)
|
|
}
|
|
#[doc = "Bit 31 - ESCIE0"]
|
|
#[inline(always)]
|
|
pub fn escie0(&self) -> ESCIE0_R {
|
|
ESCIE0_R::new(((self.bits >> 31) & 0x01) != 0)
|
|
}
|
|
}
|
|
impl W {
|
|
#[doc = "Bit 30 - ENCIE0"]
|
|
#[inline(always)]
|
|
pub fn encie0(&mut self) -> ENCIE0_W {
|
|
ENCIE0_W { w: self }
|
|
}
|
|
#[doc = "Bit 31 - ESCIE0"]
|
|
#[inline(always)]
|
|
pub fn escie0(&mut self) -> ESCIE0_W {
|
|
ESCIE0_W { w: self }
|
|
}
|
|
}
|