pub type R = crate::R<BPCRrs>;
pub type W = crate::W<BPCRrs>;
pub type AVBP_R = crate::FieldReader<u16>;
pub type AVBP_W<'a, REG> = crate::FieldWriter<'a, REG, 11, u16, crate::Safe>;
pub type AHBP_R = crate::FieldReader<u16>;
pub type AHBP_W<'a, REG> = crate::FieldWriter<'a, REG, 12, u16, crate::Safe>;
impl R {
#[inline(always)]
pub fn avbp(&self) -> AVBP_R {
AVBP_R::new((self.bits & 0x07ff) as u16)
}
#[inline(always)]
pub fn ahbp(&self) -> AHBP_R {
AHBP_R::new(((self.bits >> 16) & 0x0fff) as u16)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("BPCR")
.field("ahbp", &self.ahbp())
.field("avbp", &self.avbp())
.finish()
}
}
impl W {
#[inline(always)]
pub fn avbp(&mut self) -> AVBP_W<BPCRrs> {
AVBP_W::new(self, 0)
}
#[inline(always)]
pub fn ahbp(&mut self) -> AHBP_W<BPCRrs> {
AHBP_W::new(self, 16)
}
}
pub struct BPCRrs;
impl crate::RegisterSpec for BPCRrs {
type Ux = u32;
}
impl crate::Readable for BPCRrs {}
impl crate::Writable for BPCRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for BPCRrs {}