pub type R = crate::R<L2WHPCRrs>;
pub type W = crate::W<L2WHPCRrs>;
pub type WHSTPOS_R = crate::FieldReader<u16>;
pub type WHSTPOS_W<'a, REG> = crate::FieldWriter<'a, REG, 12, u16>;
pub type WHSPPOS_R = crate::FieldReader<u16>;
pub type WHSPPOS_W<'a, REG> = crate::FieldWriter<'a, REG, 12, u16>;
impl R {
#[inline(always)]
pub fn whstpos(&self) -> WHSTPOS_R {
WHSTPOS_R::new((self.bits & 0x0fff) as u16)
}
#[inline(always)]
pub fn whsppos(&self) -> WHSPPOS_R {
WHSPPOS_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("L2WHPCR")
.field("whstpos", &self.whstpos())
.field("whsppos", &self.whsppos())
.finish()
}
}
impl W {
#[inline(always)]
pub fn whstpos(&mut self) -> WHSTPOS_W<L2WHPCRrs> {
WHSTPOS_W::new(self, 0)
}
#[inline(always)]
pub fn whsppos(&mut self) -> WHSPPOS_W<L2WHPCRrs> {
WHSPPOS_W::new(self, 16)
}
}
pub struct L2WHPCRrs;
impl crate::RegisterSpec for L2WHPCRrs {
type Ux = u32;
}
impl crate::Readable for L2WHPCRrs {}
impl crate::Writable for L2WHPCRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for L2WHPCRrs {}