pub type R = crate::R<HCSPLT0rs>;
pub type W = crate::W<HCSPLT0rs>;
pub type PRTADDR_R = crate::FieldReader;
pub type PRTADDR_W<'a, REG> = crate::FieldWriter<'a, REG, 7>;
pub type HUBADDR_R = crate::FieldReader;
pub type HUBADDR_W<'a, REG> = crate::FieldWriter<'a, REG, 7>;
pub type XACTPOS_R = crate::FieldReader;
pub type XACTPOS_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type COMPLSPLT_R = crate::BitReader;
pub type COMPLSPLT_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type SPLITEN_R = crate::BitReader;
pub type SPLITEN_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn prtaddr(&self) -> PRTADDR_R {
PRTADDR_R::new((self.bits & 0x7f) as u8)
}
#[inline(always)]
pub fn hubaddr(&self) -> HUBADDR_R {
HUBADDR_R::new(((self.bits >> 7) & 0x7f) as u8)
}
#[inline(always)]
pub fn xactpos(&self) -> XACTPOS_R {
XACTPOS_R::new(((self.bits >> 14) & 3) as u8)
}
#[inline(always)]
pub fn complsplt(&self) -> COMPLSPLT_R {
COMPLSPLT_R::new(((self.bits >> 16) & 1) != 0)
}
#[inline(always)]
pub fn spliten(&self) -> SPLITEN_R {
SPLITEN_R::new(((self.bits >> 31) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("HCSPLT0")
.field("prtaddr", &self.prtaddr())
.field("hubaddr", &self.hubaddr())
.field("xactpos", &self.xactpos())
.field("complsplt", &self.complsplt())
.field("spliten", &self.spliten())
.finish()
}
}
impl W {
#[inline(always)]
pub fn prtaddr(&mut self) -> PRTADDR_W<HCSPLT0rs> {
PRTADDR_W::new(self, 0)
}
#[inline(always)]
pub fn hubaddr(&mut self) -> HUBADDR_W<HCSPLT0rs> {
HUBADDR_W::new(self, 7)
}
#[inline(always)]
pub fn xactpos(&mut self) -> XACTPOS_W<HCSPLT0rs> {
XACTPOS_W::new(self, 14)
}
#[inline(always)]
pub fn complsplt(&mut self) -> COMPLSPLT_W<HCSPLT0rs> {
COMPLSPLT_W::new(self, 16)
}
#[inline(always)]
pub fn spliten(&mut self) -> SPLITEN_W<HCSPLT0rs> {
SPLITEN_W::new(self, 31)
}
}
pub struct HCSPLT0rs;
impl crate::RegisterSpec for HCSPLT0rs {
type Ux = u32;
}
impl crate::Readable for HCSPLT0rs {}
impl crate::Writable for HCSPLT0rs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for HCSPLT0rs {}