#[doc = r" Value read from the register"]
pub struct R {
bits: u32,
}
impl super::STAT {
#[doc = r" Reads the contents of the register"]
#[inline]
pub fn read(&self) -> R {
R { bits: self.register.get() }
}
}
#[doc = r" Value of the field"]
pub struct RESERVED6R {
bits: u32,
}
impl RESERVED6R {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bits(&self) -> u32 {
self.bits
}
}
#[doc = r" Value of the field"]
pub struct IDCODE_LB_DISR {
bits: bool,
}
impl IDCODE_LB_DISR {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r" Returns `true` if the bit is clear (0)"]
#[inline]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r" Returns `true` if the bit is set (1)"]
#[inline]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r" Value of the field"]
pub struct SYSBUS_LB_DISR {
bits: bool,
}
impl SYSBUS_LB_DISR {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r" Returns `true` if the bit is clear (0)"]
#[inline]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r" Returns `true` if the bit is set (1)"]
#[inline]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r" Value of the field"]
pub struct MODE_CHANGINGR {
bits: bool,
}
impl MODE_CHANGINGR {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r" Returns `true` if the bit is clear (0)"]
#[inline]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r" Returns `true` if the bit is set (1)"]
#[inline]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = r" Value of the field"]
pub struct INVR {
bits: bool,
}
impl INVR {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bit(&self) -> bool {
self.bits
}
#[doc = r" Returns `true` if the bit is clear (0)"]
#[inline]
pub fn bit_is_clear(&self) -> bool {
!self.bit()
}
#[doc = r" Returns `true` if the bit is set (1)"]
#[inline]
pub fn bit_is_set(&self) -> bool {
self.bit()
}
}
#[doc = "Possible values of the field `MODE`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum MODER {
#[doc = "VIMS Off mode"]
OFF,
#[doc = "VIMS Cache mode"]
CACHE,
#[doc = "VIMS GPRAM mode"]
GPRAM,
#[doc = r" Reserved"]
_Reserved(u8),
}
impl MODER {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bits(&self) -> u8 {
match *self {
MODER::OFF => 3,
MODER::CACHE => 1,
MODER::GPRAM => 0,
MODER::_Reserved(bits) => bits,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: u8) -> MODER {
match value {
3 => MODER::OFF,
1 => MODER::CACHE,
0 => MODER::GPRAM,
i => MODER::_Reserved(i),
}
}
#[doc = "Checks if the value of the field is `OFF`"]
#[inline]
pub fn is_off(&self) -> bool {
*self == MODER::OFF
}
#[doc = "Checks if the value of the field is `CACHE`"]
#[inline]
pub fn is_cache(&self) -> bool {
*self == MODER::CACHE
}
#[doc = "Checks if the value of the field is `GPRAM`"]
#[inline]
pub fn is_gpram(&self) -> bool {
*self == MODER::GPRAM
}
}
impl R {
#[doc = r" Value of the register as raw bits"]
#[inline]
pub fn bits(&self) -> u32 {
self.bits
}
#[doc = "Bits 6:31 - Software should not rely on the value of a reserved. Writing any other value than the reset value may result in undefined behavior."]
#[inline]
pub fn reserved6(&self) -> RESERVED6R {
let bits = {
const MASK: u32 = 67108863;
const OFFSET: u8 = 6;
((self.bits >> OFFSET) & MASK as u32) as u32
};
RESERVED6R { bits }
}
#[doc = "Bit 5 - Icode/Dcode flash line buffer status 0: Enabled or in transition to disabled 1: Disabled and flushed"]
#[inline]
pub fn idcode_lb_dis(&self) -> IDCODE_LB_DISR {
let bits = {
const MASK: bool = true;
const OFFSET: u8 = 5;
((self.bits >> OFFSET) & MASK as u32) != 0
};
IDCODE_LB_DISR { bits }
}
#[doc = "Bit 4 - Sysbus flash line buffer control 0: Enabled or in transition to disabled 1: Disabled and flushed"]
#[inline]
pub fn sysbus_lb_dis(&self) -> SYSBUS_LB_DISR {
let bits = {
const MASK: bool = true;
const OFFSET: u8 = 4;
((self.bits >> OFFSET) & MASK as u32) != 0
};
SYSBUS_LB_DISR { bits }
}
#[doc = "Bit 3 - VIMS mode change status 0: VIMS is in the mode defined by MODE 1: VIMS is in the process of changing to the mode given in CTL.MODE"]
#[inline]
pub fn mode_changing(&self) -> MODE_CHANGINGR {
let bits = {
const MASK: bool = true;
const OFFSET: u8 = 3;
((self.bits >> OFFSET) & MASK as u32) != 0
};
MODE_CHANGINGR { bits }
}
#[doc = "Bit 2 - This bit is set when invalidation of the cache memory is active / ongoing"]
#[inline]
pub fn inv(&self) -> INVR {
let bits = {
const MASK: bool = true;
const OFFSET: u8 = 2;
((self.bits >> OFFSET) & MASK as u32) != 0
};
INVR { bits }
}
#[doc = "Bits 0:1 - Current VIMS mode"]
#[inline]
pub fn mode(&self) -> MODER {
MODER::_from({
const MASK: u8 = 3;
const OFFSET: u8 = 0;
((self.bits >> OFFSET) & MASK as u32) as u8
})
}
}