#[doc = r" Value read from the register"]
pub struct R {
bits: u32,
}
impl super::PRAR_CUR1 {
#[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 PROT_AREA_START1R {
bits: u16,
}
impl PROT_AREA_START1R {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bits(&self) -> u16 {
self.bits
}
}
#[doc = r" Value of the field"]
pub struct PROT_AREA_END1R {
bits: u16,
}
impl PROT_AREA_END1R {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bits(&self) -> u16 {
self.bits
}
}
#[doc = r" Value of the field"]
pub struct DMEP1R {
bits: bool,
}
impl DMEP1R {
#[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()
}
}
impl R {
#[doc = r" Value of the register as raw bits"]
#[inline]
pub fn bits(&self) -> u32 {
self.bits
}
#[doc = "Bits 0:11 - Bank 1 lowest PCROP protected address"]
#[inline]
pub fn prot_area_start1(&self) -> PROT_AREA_START1R {
let bits = {
const MASK: u16 = 4095;
const OFFSET: u8 = 0;
((self.bits >> OFFSET) & MASK as u32) as u16
};
PROT_AREA_START1R { bits }
}
#[doc = "Bits 16:27 - Bank 1 highest PCROP protected address"]
#[inline]
pub fn prot_area_end1(&self) -> PROT_AREA_END1R {
let bits = {
const MASK: u16 = 4095;
const OFFSET: u8 = 16;
((self.bits >> OFFSET) & MASK as u32) as u16
};
PROT_AREA_END1R { bits }
}
#[doc = "Bit 31 - Bank 1 PCROP protected erase enable option status bit"]
#[inline]
pub fn dmep1(&self) -> DMEP1R {
let bits = {
const MASK: bool = true;
const OFFSET: u8 = 31;
((self.bits >> OFFSET) & MASK as u32) != 0
};
DMEP1R { bits }
}
}