pub type R = crate::R<OPTSR2_PRGrs>;
pub type W = crate::W<OPTSR2_PRGrs>;
pub type TCM_AXI_SHARED_R = crate::FieldReader;
pub type TCM_AXI_SHARED_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type CPUFREQ_BOOST_R = crate::BitReader;
pub type CPUFREQ_BOOST_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn tcm_axi_shared(&self) -> TCM_AXI_SHARED_R {
TCM_AXI_SHARED_R::new((self.bits & 3) as u8)
}
#[inline(always)]
pub fn cpufreq_boost(&self) -> CPUFREQ_BOOST_R {
CPUFREQ_BOOST_R::new(((self.bits >> 2) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("OPTSR2_PRG")
.field("tcm_axi_shared", &self.tcm_axi_shared())
.field("cpufreq_boost", &self.cpufreq_boost())
.finish()
}
}
impl W {
#[inline(always)]
pub fn tcm_axi_shared(&mut self) -> TCM_AXI_SHARED_W<OPTSR2_PRGrs> {
TCM_AXI_SHARED_W::new(self, 0)
}
#[inline(always)]
pub fn cpufreq_boost(&mut self) -> CPUFREQ_BOOST_W<OPTSR2_PRGrs> {
CPUFREQ_BOOST_W::new(self, 2)
}
}
pub struct OPTSR2_PRGrs;
impl crate::RegisterSpec for OPTSR2_PRGrs {
type Ux = u32;
}
impl crate::Readable for OPTSR2_PRGrs {}
impl crate::Writable for OPTSR2_PRGrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for OPTSR2_PRGrs {}