pub type R = crate::R<GTPRrs>;
pub type W = crate::W<GTPRrs>;
pub type PSC_R = crate::FieldReader;
pub type PSC_W<'a, REG> = crate::FieldWriter<'a, REG, 8, u8, crate::Safe>;
pub type GT_R = crate::FieldReader;
pub type GT_W<'a, REG> = crate::FieldWriter<'a, REG, 8, u8, crate::Safe>;
impl R {
#[inline(always)]
pub fn psc(&self) -> PSC_R {
PSC_R::new((self.bits & 0xff) as u8)
}
#[inline(always)]
pub fn gt(&self) -> GT_R {
GT_R::new(((self.bits >> 8) & 0xff) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("GTPR")
.field("gt", &self.gt())
.field("psc", &self.psc())
.finish()
}
}
impl W {
#[inline(always)]
pub fn psc(&mut self) -> PSC_W<GTPRrs> {
PSC_W::new(self, 0)
}
#[inline(always)]
pub fn gt(&mut self) -> GT_W<GTPRrs> {
GT_W::new(self, 8)
}
}
pub struct GTPRrs;
impl crate::RegisterSpec for GTPRrs {
type Ux = u32;
}
impl crate::Readable for GTPRrs {}
impl crate::Writable for GTPRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for GTPRrs {}