#[doc = r" Value read from the register"]
pub struct R {
bits: u32,
}
#[doc = r" Value to write to the register"]
pub struct W {
bits: u32,
}
impl super::FCFG_WRAPPER {
#[doc = r" Modifies the contents of the register"]
#[inline]
pub fn modify<F>(&self, f: F)
where
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
{
let bits = self.register.get();
let r = R { bits: bits };
let mut w = W { bits: bits };
f(&r, &mut w);
self.register.set(w.bits);
}
#[doc = r" Reads the contents of the register"]
#[inline]
pub fn read(&self) -> R {
R {
bits: self.register.get(),
}
}
#[doc = r" Writes to the register"]
#[inline]
pub fn write<F>(&self, f: F)
where
F: FnOnce(&mut W) -> &mut W,
{
let mut w = W::reset_value();
f(&mut w);
self.register.set(w.bits);
}
#[doc = r" Writes the reset value to the register"]
#[inline]
pub fn reset(&self) {
self.write(|w| w)
}
}
#[doc = r" Value of the field"]
pub struct FAMILY_TYPER {
bits: u8,
}
impl FAMILY_TYPER {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bits(&self) -> u8 {
self.bits
}
}
#[doc = r" Value of the field"]
pub struct RESERVED21R {
bits: u8,
}
impl RESERVED21R {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bits(&self) -> u8 {
self.bits
}
}
#[doc = r" Value of the field"]
pub struct MEM_MAPR {
bits: bool,
}
impl MEM_MAPR {
#[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 CPU2R {
bits: u8,
}
impl CPU2R {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bits(&self) -> u8 {
self.bits
}
}
#[doc = r" Value of the field"]
pub struct EE_IN_MAINR {
bits: u8,
}
impl EE_IN_MAINR {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bits(&self) -> u8 {
self.bits
}
}
#[doc = r" Value of the field"]
pub struct ROMR {
bits: bool,
}
impl ROMR {
#[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 IFLUSHR {
bits: bool,
}
impl IFLUSHR {
#[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 SIL3R {
bits: bool,
}
impl SIL3R {
#[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 ECCAR {
bits: bool,
}
impl ECCAR {
#[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 AUTO_SUSPR {
bits: u8,
}
impl AUTO_SUSPR {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bits(&self) -> u8 {
self.bits
}
}
#[doc = r" Value of the field"]
pub struct UERRR {
bits: u8,
}
impl UERRR {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bits(&self) -> u8 {
self.bits
}
}
#[doc = r" Value of the field"]
pub struct CPU_TYPE1R {
bits: u8,
}
impl CPU_TYPE1R {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bits(&self) -> u8 {
self.bits
}
}
#[doc = r" Proxy"]
pub struct _FAMILY_TYPEW<'a> {
w: &'a mut W,
}
impl<'a> _FAMILY_TYPEW<'a> {
#[doc = r" Writes raw bits to the field"]
#[inline]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
const MASK: u8 = 255;
const OFFSET: u8 = 24;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = r" Proxy"]
pub struct _RESERVED21W<'a> {
w: &'a mut W,
}
impl<'a> _RESERVED21W<'a> {
#[doc = r" Writes raw bits to the field"]
#[inline]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
const MASK: u8 = 7;
const OFFSET: u8 = 21;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = r" Proxy"]
pub struct _MEM_MAPW<'a> {
w: &'a mut W,
}
impl<'a> _MEM_MAPW<'a> {
#[doc = r" Sets the field bit"]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r" Clears the field bit"]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub fn bit(self, value: bool) -> &'a mut W {
const MASK: bool = true;
const OFFSET: u8 = 20;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = r" Proxy"]
pub struct _CPU2W<'a> {
w: &'a mut W,
}
impl<'a> _CPU2W<'a> {
#[doc = r" Writes raw bits to the field"]
#[inline]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
const MASK: u8 = 15;
const OFFSET: u8 = 16;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = r" Proxy"]
pub struct _EE_IN_MAINW<'a> {
w: &'a mut W,
}
impl<'a> _EE_IN_MAINW<'a> {
#[doc = r" Writes raw bits to the field"]
#[inline]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
const MASK: u8 = 15;
const OFFSET: u8 = 12;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = r" Proxy"]
pub struct _ROMW<'a> {
w: &'a mut W,
}
impl<'a> _ROMW<'a> {
#[doc = r" Sets the field bit"]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r" Clears the field bit"]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub fn bit(self, value: bool) -> &'a mut W {
const MASK: bool = true;
const OFFSET: u8 = 11;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = r" Proxy"]
pub struct _IFLUSHW<'a> {
w: &'a mut W,
}
impl<'a> _IFLUSHW<'a> {
#[doc = r" Sets the field bit"]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r" Clears the field bit"]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub fn bit(self, value: bool) -> &'a mut W {
const MASK: bool = true;
const OFFSET: u8 = 10;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = r" Proxy"]
pub struct _SIL3W<'a> {
w: &'a mut W,
}
impl<'a> _SIL3W<'a> {
#[doc = r" Sets the field bit"]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r" Clears the field bit"]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub fn bit(self, value: bool) -> &'a mut W {
const MASK: bool = true;
const OFFSET: u8 = 9;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = r" Proxy"]
pub struct _ECCAW<'a> {
w: &'a mut W,
}
impl<'a> _ECCAW<'a> {
#[doc = r" Sets the field bit"]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r" Clears the field bit"]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub fn bit(self, value: bool) -> &'a mut W {
const MASK: bool = true;
const OFFSET: u8 = 8;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = r" Proxy"]
pub struct _AUTO_SUSPW<'a> {
w: &'a mut W,
}
impl<'a> _AUTO_SUSPW<'a> {
#[doc = r" Writes raw bits to the field"]
#[inline]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
const MASK: u8 = 3;
const OFFSET: u8 = 6;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = r" Proxy"]
pub struct _UERRW<'a> {
w: &'a mut W,
}
impl<'a> _UERRW<'a> {
#[doc = r" Writes raw bits to the field"]
#[inline]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
const MASK: u8 = 3;
const OFFSET: u8 = 4;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = r" Proxy"]
pub struct _CPU_TYPE1W<'a> {
w: &'a mut W,
}
impl<'a> _CPU_TYPE1W<'a> {
#[doc = r" Writes raw bits to the field"]
#[inline]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
const MASK: u8 = 15;
const OFFSET: u8 = 0;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
impl R {
#[doc = r" Value of the register as raw bits"]
#[inline]
pub fn bits(&self) -> u32 {
self.bits
}
#[doc = "Bits 24:31 - 31:24\\] Internal. Only to be used through TI provided API."]
#[inline]
pub fn family_type(&self) -> FAMILY_TYPER {
let bits = {
const MASK: u8 = 255;
const OFFSET: u8 = 24;
((self.bits >> OFFSET) & MASK as u32) as u8
};
FAMILY_TYPER { bits }
}
#[doc = "Bits 21:23 - 23:21\\] Internal. Only to be used through TI provided API."]
#[inline]
pub fn reserved21(&self) -> RESERVED21R {
let bits = {
const MASK: u8 = 7;
const OFFSET: u8 = 21;
((self.bits >> OFFSET) & MASK as u32) as u8
};
RESERVED21R { bits }
}
#[doc = "Bit 20 - 20:20\\] Internal. Only to be used through TI provided API."]
#[inline]
pub fn mem_map(&self) -> MEM_MAPR {
let bits = {
const MASK: bool = true;
const OFFSET: u8 = 20;
((self.bits >> OFFSET) & MASK as u32) != 0
};
MEM_MAPR { bits }
}
#[doc = "Bits 16:19 - 19:16\\] Internal. Only to be used through TI provided API."]
#[inline]
pub fn cpu2(&self) -> CPU2R {
let bits = {
const MASK: u8 = 15;
const OFFSET: u8 = 16;
((self.bits >> OFFSET) & MASK as u32) as u8
};
CPU2R { bits }
}
#[doc = "Bits 12:15 - 15:12\\] Internal. Only to be used through TI provided API."]
#[inline]
pub fn ee_in_main(&self) -> EE_IN_MAINR {
let bits = {
const MASK: u8 = 15;
const OFFSET: u8 = 12;
((self.bits >> OFFSET) & MASK as u32) as u8
};
EE_IN_MAINR { bits }
}
#[doc = "Bit 11 - 11:11\\] Internal. Only to be used through TI provided API."]
#[inline]
pub fn rom(&self) -> ROMR {
let bits = {
const MASK: bool = true;
const OFFSET: u8 = 11;
((self.bits >> OFFSET) & MASK as u32) != 0
};
ROMR { bits }
}
#[doc = "Bit 10 - 10:10\\] Internal. Only to be used through TI provided API."]
#[inline]
pub fn iflush(&self) -> IFLUSHR {
let bits = {
const MASK: bool = true;
const OFFSET: u8 = 10;
((self.bits >> OFFSET) & MASK as u32) != 0
};
IFLUSHR { bits }
}
#[doc = "Bit 9 - 9:9\\] Internal. Only to be used through TI provided API."]
#[inline]
pub fn sil3(&self) -> SIL3R {
let bits = {
const MASK: bool = true;
const OFFSET: u8 = 9;
((self.bits >> OFFSET) & MASK as u32) != 0
};
SIL3R { bits }
}
#[doc = "Bit 8 - 8:8\\] Internal. Only to be used through TI provided API."]
#[inline]
pub fn ecca(&self) -> ECCAR {
let bits = {
const MASK: bool = true;
const OFFSET: u8 = 8;
((self.bits >> OFFSET) & MASK as u32) != 0
};
ECCAR { bits }
}
#[doc = "Bits 6:7 - 7:6\\] Internal. Only to be used through TI provided API."]
#[inline]
pub fn auto_susp(&self) -> AUTO_SUSPR {
let bits = {
const MASK: u8 = 3;
const OFFSET: u8 = 6;
((self.bits >> OFFSET) & MASK as u32) as u8
};
AUTO_SUSPR { bits }
}
#[doc = "Bits 4:5 - 5:4\\] Internal. Only to be used through TI provided API."]
#[inline]
pub fn uerr(&self) -> UERRR {
let bits = {
const MASK: u8 = 3;
const OFFSET: u8 = 4;
((self.bits >> OFFSET) & MASK as u32) as u8
};
UERRR { bits }
}
#[doc = "Bits 0:3 - 3:0\\] Internal. Only to be used through TI provided API."]
#[inline]
pub fn cpu_type1(&self) -> CPU_TYPE1R {
let bits = {
const MASK: u8 = 15;
const OFFSET: u8 = 0;
((self.bits >> OFFSET) & MASK as u32) as u8
};
CPU_TYPE1R { bits }
}
}
impl W {
#[doc = r" Reset value of the register"]
#[inline]
pub fn reset_value() -> W {
W { bits: 1342214151 }
}
#[doc = r" Writes raw bits to the register"]
#[inline]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.bits = bits;
self
}
#[doc = "Bits 24:31 - 31:24\\] Internal. Only to be used through TI provided API."]
#[inline]
pub fn family_type(&mut self) -> _FAMILY_TYPEW {
_FAMILY_TYPEW { w: self }
}
#[doc = "Bits 21:23 - 23:21\\] Internal. Only to be used through TI provided API."]
#[inline]
pub fn reserved21(&mut self) -> _RESERVED21W {
_RESERVED21W { w: self }
}
#[doc = "Bit 20 - 20:20\\] Internal. Only to be used through TI provided API."]
#[inline]
pub fn mem_map(&mut self) -> _MEM_MAPW {
_MEM_MAPW { w: self }
}
#[doc = "Bits 16:19 - 19:16\\] Internal. Only to be used through TI provided API."]
#[inline]
pub fn cpu2(&mut self) -> _CPU2W {
_CPU2W { w: self }
}
#[doc = "Bits 12:15 - 15:12\\] Internal. Only to be used through TI provided API."]
#[inline]
pub fn ee_in_main(&mut self) -> _EE_IN_MAINW {
_EE_IN_MAINW { w: self }
}
#[doc = "Bit 11 - 11:11\\] Internal. Only to be used through TI provided API."]
#[inline]
pub fn rom(&mut self) -> _ROMW {
_ROMW { w: self }
}
#[doc = "Bit 10 - 10:10\\] Internal. Only to be used through TI provided API."]
#[inline]
pub fn iflush(&mut self) -> _IFLUSHW {
_IFLUSHW { w: self }
}
#[doc = "Bit 9 - 9:9\\] Internal. Only to be used through TI provided API."]
#[inline]
pub fn sil3(&mut self) -> _SIL3W {
_SIL3W { w: self }
}
#[doc = "Bit 8 - 8:8\\] Internal. Only to be used through TI provided API."]
#[inline]
pub fn ecca(&mut self) -> _ECCAW {
_ECCAW { w: self }
}
#[doc = "Bits 6:7 - 7:6\\] Internal. Only to be used through TI provided API."]
#[inline]
pub fn auto_susp(&mut self) -> _AUTO_SUSPW {
_AUTO_SUSPW { w: self }
}
#[doc = "Bits 4:5 - 5:4\\] Internal. Only to be used through TI provided API."]
#[inline]
pub fn uerr(&mut self) -> _UERRW {
_UERRW { w: self }
}
#[doc = "Bits 0:3 - 3:0\\] Internal. Only to be used through TI provided API."]
#[inline]
pub fn cpu_type1(&mut self) -> _CPU_TYPE1W {
_CPU_TYPE1W { w: self }
}
}