s32k118: rewrite everything for s32k118
Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
@ -1,431 +1,298 @@
|
||||
#[doc = r" Value read from the register"]
|
||||
pub struct R {
|
||||
bits: u32,
|
||||
}
|
||||
impl super::CPXCFG3 {
|
||||
#[doc = r" Reads the contents of the register"]
|
||||
#[inline]
|
||||
pub fn read(&self) -> R {
|
||||
R { bits: self.register.get() }
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `FPU`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum FPUR {
|
||||
#[doc = "FPU support is not included."]
|
||||
_0,
|
||||
#[doc = "FPU support is included."]
|
||||
_1,
|
||||
}
|
||||
impl FPUR {
|
||||
#[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 as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
FPUR::_0 => false,
|
||||
FPUR::_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> FPUR {
|
||||
match value {
|
||||
false => FPUR::_0,
|
||||
true => FPUR::_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `_0`"]
|
||||
#[inline]
|
||||
pub fn is_0(&self) -> bool {
|
||||
*self == FPUR::_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `_1`"]
|
||||
#[inline]
|
||||
pub fn is_1(&self) -> bool {
|
||||
*self == FPUR::_1
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `SIMD`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum SIMDR {
|
||||
#[doc = "SIMD/NEON support is not included."]
|
||||
_0,
|
||||
#[doc = "SIMD/NEON support is included."]
|
||||
_1,
|
||||
}
|
||||
impl SIMDR {
|
||||
#[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 as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
SIMDR::_0 => false,
|
||||
SIMDR::_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> SIMDR {
|
||||
match value {
|
||||
false => SIMDR::_0,
|
||||
true => SIMDR::_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `_0`"]
|
||||
#[inline]
|
||||
pub fn is_0(&self) -> bool {
|
||||
*self == SIMDR::_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `_1`"]
|
||||
#[inline]
|
||||
pub fn is_1(&self) -> bool {
|
||||
*self == SIMDR::_1
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `JAZ`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum JAZR {
|
||||
#[doc = "Jazelle support is not included."]
|
||||
_0,
|
||||
#[doc = "Jazelle support is included."]
|
||||
_1,
|
||||
}
|
||||
impl JAZR {
|
||||
#[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 as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
JAZR::_0 => false,
|
||||
JAZR::_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> JAZR {
|
||||
match value {
|
||||
false => JAZR::_0,
|
||||
true => JAZR::_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `_0`"]
|
||||
#[inline]
|
||||
pub fn is_0(&self) -> bool {
|
||||
*self == JAZR::_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `_1`"]
|
||||
#[inline]
|
||||
pub fn is_1(&self) -> bool {
|
||||
*self == JAZR::_1
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `MMU`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum MMUR {
|
||||
#[doc = "MMU support is not included."]
|
||||
_0,
|
||||
#[doc = "MMU support is included."]
|
||||
_1,
|
||||
}
|
||||
impl MMUR {
|
||||
#[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 as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
MMUR::_0 => false,
|
||||
MMUR::_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> MMUR {
|
||||
match value {
|
||||
false => MMUR::_0,
|
||||
true => MMUR::_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `_0`"]
|
||||
#[inline]
|
||||
pub fn is_0(&self) -> bool {
|
||||
*self == MMUR::_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `_1`"]
|
||||
#[inline]
|
||||
pub fn is_1(&self) -> bool {
|
||||
*self == MMUR::_1
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `TZ`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum TZR {
|
||||
#[doc = "Trust Zone support is not included."]
|
||||
_0,
|
||||
#[doc = "Trust Zone support is included."]
|
||||
_1,
|
||||
}
|
||||
impl TZR {
|
||||
#[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 as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
TZR::_0 => false,
|
||||
TZR::_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> TZR {
|
||||
match value {
|
||||
false => TZR::_0,
|
||||
true => TZR::_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `_0`"]
|
||||
#[inline]
|
||||
pub fn is_0(&self) -> bool {
|
||||
*self == TZR::_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `_1`"]
|
||||
#[inline]
|
||||
pub fn is_1(&self) -> bool {
|
||||
*self == TZR::_1
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `CMP`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum CMPR {
|
||||
#[doc = "Core Memory Protection is not included."]
|
||||
_0,
|
||||
#[doc = "Core Memory Protection is included."]
|
||||
_1,
|
||||
}
|
||||
impl CMPR {
|
||||
#[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 as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
CMPR::_0 => false,
|
||||
CMPR::_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> CMPR {
|
||||
match value {
|
||||
false => CMPR::_0,
|
||||
true => CMPR::_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `_0`"]
|
||||
#[inline]
|
||||
pub fn is_0(&self) -> bool {
|
||||
*self == CMPR::_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `_1`"]
|
||||
#[inline]
|
||||
pub fn is_1(&self) -> bool {
|
||||
*self == CMPR::_1
|
||||
}
|
||||
}
|
||||
#[doc = "Possible values of the field `BB`"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum BBR {
|
||||
#[doc = "Bit Banding is not supported."]
|
||||
_0,
|
||||
#[doc = "Bit Banding is supported."]
|
||||
_1,
|
||||
}
|
||||
impl BBR {
|
||||
#[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 as raw bits"]
|
||||
#[inline]
|
||||
pub fn bit(&self) -> bool {
|
||||
match *self {
|
||||
BBR::_0 => false,
|
||||
BBR::_1 => true,
|
||||
}
|
||||
}
|
||||
#[allow(missing_docs)]
|
||||
#[doc(hidden)]
|
||||
#[inline]
|
||||
pub fn _from(value: bool) -> BBR {
|
||||
match value {
|
||||
false => BBR::_0,
|
||||
true => BBR::_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `_0`"]
|
||||
#[inline]
|
||||
pub fn is_0(&self) -> bool {
|
||||
*self == BBR::_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `_1`"]
|
||||
#[inline]
|
||||
pub fn is_1(&self) -> bool {
|
||||
*self == BBR::_1
|
||||
}
|
||||
}
|
||||
#[doc = r" Value of the field"]
|
||||
pub struct SBPR {
|
||||
bits: u8,
|
||||
}
|
||||
impl SBPR {
|
||||
#[doc = r" Value of the field as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u8 {
|
||||
self.bits
|
||||
}
|
||||
}
|
||||
impl R {
|
||||
#[doc = r" Value of the register as raw bits"]
|
||||
#[inline]
|
||||
pub fn bits(&self) -> u32 {
|
||||
self.bits
|
||||
}
|
||||
#[doc = "Bit 0 - Floating Point Unit"]
|
||||
#[inline]
|
||||
pub fn fpu(&self) -> FPUR {
|
||||
FPUR::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 0;
|
||||
((self.bits >> OFFSET) & MASK as u32) != 0
|
||||
})
|
||||
}
|
||||
#[doc = "Bit 1 - SIMD/NEON instruction support"]
|
||||
#[inline]
|
||||
pub fn simd(&self) -> SIMDR {
|
||||
SIMDR::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 1;
|
||||
((self.bits >> OFFSET) & MASK as u32) != 0
|
||||
})
|
||||
}
|
||||
#[doc = "Bit 2 - Jazelle support"]
|
||||
#[inline]
|
||||
pub fn jaz(&self) -> JAZR {
|
||||
JAZR::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 2;
|
||||
((self.bits >> OFFSET) & MASK as u32) != 0
|
||||
})
|
||||
}
|
||||
#[doc = "Bit 3 - Memory Management Unit"]
|
||||
#[inline]
|
||||
pub fn mmu(&self) -> MMUR {
|
||||
MMUR::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 3;
|
||||
((self.bits >> OFFSET) & MASK as u32) != 0
|
||||
})
|
||||
}
|
||||
#[doc = "Bit 4 - Trust Zone"]
|
||||
#[inline]
|
||||
pub fn tz(&self) -> TZR {
|
||||
TZR::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 4;
|
||||
((self.bits >> OFFSET) & MASK as u32) != 0
|
||||
})
|
||||
}
|
||||
#[doc = "Bit 5 - Core Memory Protection unit"]
|
||||
#[inline]
|
||||
pub fn cmp(&self) -> CMPR {
|
||||
CMPR::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 5;
|
||||
((self.bits >> OFFSET) & MASK as u32) != 0
|
||||
})
|
||||
}
|
||||
#[doc = "Bit 6 - Bit Banding"]
|
||||
#[inline]
|
||||
pub fn bb(&self) -> BBR {
|
||||
BBR::_from({
|
||||
const MASK: bool = true;
|
||||
const OFFSET: u8 = 6;
|
||||
((self.bits >> OFFSET) & MASK as u32) != 0
|
||||
})
|
||||
}
|
||||
#[doc = "Bits 8:9 - System Bus Ports"]
|
||||
#[inline]
|
||||
pub fn sbp(&self) -> SBPR {
|
||||
let bits = {
|
||||
const MASK: u8 = 3;
|
||||
const OFFSET: u8 = 8;
|
||||
((self.bits >> OFFSET) & MASK as u32) as u8
|
||||
};
|
||||
SBPR { bits }
|
||||
}
|
||||
}
|
||||
#[doc = "Reader of register CPxCFG3"]
|
||||
pub type R = crate::R<u32, super::CPXCFG3>;
|
||||
#[doc = "Floating Point Unit\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum FPU_A {
|
||||
#[doc = "0: FPU support is not included."]
|
||||
_0 = 0,
|
||||
#[doc = "1: FPU support is included."]
|
||||
_1 = 1,
|
||||
}
|
||||
impl From<FPU_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: FPU_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Reader of field `FPU`"]
|
||||
pub type FPU_R = crate::R<bool, FPU_A>;
|
||||
impl FPU_R {
|
||||
#[doc = r"Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> FPU_A {
|
||||
match self.bits {
|
||||
false => FPU_A::_0,
|
||||
true => FPU_A::_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `_0`"]
|
||||
#[inline(always)]
|
||||
pub fn is_0(&self) -> bool {
|
||||
*self == FPU_A::_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `_1`"]
|
||||
#[inline(always)]
|
||||
pub fn is_1(&self) -> bool {
|
||||
*self == FPU_A::_1
|
||||
}
|
||||
}
|
||||
#[doc = "SIMD/NEON instruction support\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum SIMD_A {
|
||||
#[doc = "0: SIMD/NEON support is not included."]
|
||||
_0 = 0,
|
||||
#[doc = "1: SIMD/NEON support is included."]
|
||||
_1 = 1,
|
||||
}
|
||||
impl From<SIMD_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: SIMD_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Reader of field `SIMD`"]
|
||||
pub type SIMD_R = crate::R<bool, SIMD_A>;
|
||||
impl SIMD_R {
|
||||
#[doc = r"Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> SIMD_A {
|
||||
match self.bits {
|
||||
false => SIMD_A::_0,
|
||||
true => SIMD_A::_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `_0`"]
|
||||
#[inline(always)]
|
||||
pub fn is_0(&self) -> bool {
|
||||
*self == SIMD_A::_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `_1`"]
|
||||
#[inline(always)]
|
||||
pub fn is_1(&self) -> bool {
|
||||
*self == SIMD_A::_1
|
||||
}
|
||||
}
|
||||
#[doc = "Jazelle support\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum JAZ_A {
|
||||
#[doc = "0: Jazelle support is not included."]
|
||||
_0 = 0,
|
||||
#[doc = "1: Jazelle support is included."]
|
||||
_1 = 1,
|
||||
}
|
||||
impl From<JAZ_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: JAZ_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Reader of field `JAZ`"]
|
||||
pub type JAZ_R = crate::R<bool, JAZ_A>;
|
||||
impl JAZ_R {
|
||||
#[doc = r"Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> JAZ_A {
|
||||
match self.bits {
|
||||
false => JAZ_A::_0,
|
||||
true => JAZ_A::_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `_0`"]
|
||||
#[inline(always)]
|
||||
pub fn is_0(&self) -> bool {
|
||||
*self == JAZ_A::_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `_1`"]
|
||||
#[inline(always)]
|
||||
pub fn is_1(&self) -> bool {
|
||||
*self == JAZ_A::_1
|
||||
}
|
||||
}
|
||||
#[doc = "Memory Management Unit\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum MMU_A {
|
||||
#[doc = "0: MMU support is not included."]
|
||||
_0 = 0,
|
||||
#[doc = "1: MMU support is included."]
|
||||
_1 = 1,
|
||||
}
|
||||
impl From<MMU_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: MMU_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Reader of field `MMU`"]
|
||||
pub type MMU_R = crate::R<bool, MMU_A>;
|
||||
impl MMU_R {
|
||||
#[doc = r"Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> MMU_A {
|
||||
match self.bits {
|
||||
false => MMU_A::_0,
|
||||
true => MMU_A::_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `_0`"]
|
||||
#[inline(always)]
|
||||
pub fn is_0(&self) -> bool {
|
||||
*self == MMU_A::_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `_1`"]
|
||||
#[inline(always)]
|
||||
pub fn is_1(&self) -> bool {
|
||||
*self == MMU_A::_1
|
||||
}
|
||||
}
|
||||
#[doc = "Trust Zone\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum TZ_A {
|
||||
#[doc = "0: Trust Zone support is not included."]
|
||||
_0 = 0,
|
||||
#[doc = "1: Trust Zone support is included."]
|
||||
_1 = 1,
|
||||
}
|
||||
impl From<TZ_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: TZ_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Reader of field `TZ`"]
|
||||
pub type TZ_R = crate::R<bool, TZ_A>;
|
||||
impl TZ_R {
|
||||
#[doc = r"Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> TZ_A {
|
||||
match self.bits {
|
||||
false => TZ_A::_0,
|
||||
true => TZ_A::_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `_0`"]
|
||||
#[inline(always)]
|
||||
pub fn is_0(&self) -> bool {
|
||||
*self == TZ_A::_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `_1`"]
|
||||
#[inline(always)]
|
||||
pub fn is_1(&self) -> bool {
|
||||
*self == TZ_A::_1
|
||||
}
|
||||
}
|
||||
#[doc = "Core Memory Protection unit\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum CMP_A {
|
||||
#[doc = "0: Core Memory Protection is not included."]
|
||||
_0 = 0,
|
||||
#[doc = "1: Core Memory Protection is included."]
|
||||
_1 = 1,
|
||||
}
|
||||
impl From<CMP_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: CMP_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Reader of field `CMP`"]
|
||||
pub type CMP_R = crate::R<bool, CMP_A>;
|
||||
impl CMP_R {
|
||||
#[doc = r"Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> CMP_A {
|
||||
match self.bits {
|
||||
false => CMP_A::_0,
|
||||
true => CMP_A::_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `_0`"]
|
||||
#[inline(always)]
|
||||
pub fn is_0(&self) -> bool {
|
||||
*self == CMP_A::_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `_1`"]
|
||||
#[inline(always)]
|
||||
pub fn is_1(&self) -> bool {
|
||||
*self == CMP_A::_1
|
||||
}
|
||||
}
|
||||
#[doc = "Bit Banding\n\nValue on reset: 0"]
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub enum BB_A {
|
||||
#[doc = "0: Bit Banding is not supported."]
|
||||
_0 = 0,
|
||||
#[doc = "1: Bit Banding is supported."]
|
||||
_1 = 1,
|
||||
}
|
||||
impl From<BB_A> for bool {
|
||||
#[inline(always)]
|
||||
fn from(variant: BB_A) -> Self {
|
||||
variant as u8 != 0
|
||||
}
|
||||
}
|
||||
#[doc = "Reader of field `BB`"]
|
||||
pub type BB_R = crate::R<bool, BB_A>;
|
||||
impl BB_R {
|
||||
#[doc = r"Get enumerated values variant"]
|
||||
#[inline(always)]
|
||||
pub fn variant(&self) -> BB_A {
|
||||
match self.bits {
|
||||
false => BB_A::_0,
|
||||
true => BB_A::_1,
|
||||
}
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `_0`"]
|
||||
#[inline(always)]
|
||||
pub fn is_0(&self) -> bool {
|
||||
*self == BB_A::_0
|
||||
}
|
||||
#[doc = "Checks if the value of the field is `_1`"]
|
||||
#[inline(always)]
|
||||
pub fn is_1(&self) -> bool {
|
||||
*self == BB_A::_1
|
||||
}
|
||||
}
|
||||
#[doc = "Reader of field `SBP`"]
|
||||
pub type SBP_R = crate::R<u8, u8>;
|
||||
impl R {
|
||||
#[doc = "Bit 0 - Floating Point Unit"]
|
||||
#[inline(always)]
|
||||
pub fn fpu(&self) -> FPU_R {
|
||||
FPU_R::new((self.bits & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 1 - SIMD/NEON instruction support"]
|
||||
#[inline(always)]
|
||||
pub fn simd(&self) -> SIMD_R {
|
||||
SIMD_R::new(((self.bits >> 1) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 2 - Jazelle support"]
|
||||
#[inline(always)]
|
||||
pub fn jaz(&self) -> JAZ_R {
|
||||
JAZ_R::new(((self.bits >> 2) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 3 - Memory Management Unit"]
|
||||
#[inline(always)]
|
||||
pub fn mmu(&self) -> MMU_R {
|
||||
MMU_R::new(((self.bits >> 3) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 4 - Trust Zone"]
|
||||
#[inline(always)]
|
||||
pub fn tz(&self) -> TZ_R {
|
||||
TZ_R::new(((self.bits >> 4) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 5 - Core Memory Protection unit"]
|
||||
#[inline(always)]
|
||||
pub fn cmp(&self) -> CMP_R {
|
||||
CMP_R::new(((self.bits >> 5) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bit 6 - Bit Banding"]
|
||||
#[inline(always)]
|
||||
pub fn bb(&self) -> BB_R {
|
||||
BB_R::new(((self.bits >> 6) & 0x01) != 0)
|
||||
}
|
||||
#[doc = "Bits 8:9 - System Bus Ports"]
|
||||
#[inline(always)]
|
||||
pub fn sbp(&self) -> SBP_R {
|
||||
SBP_R::new(((self.bits >> 8) & 0x03) as u8)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user