pub type R = crate::R<GRXSTSP_HOSTrs>;
pub type CHNUM_R = crate::FieldReader;
pub type BCNT_R = crate::FieldReader<u16>;
pub type DPID_R = crate::FieldReader;
pub type PKTSTS_R = crate::FieldReader;
pub type STSPHST_R = crate::BitReader;
impl R {
#[inline(always)]
pub fn chnum(&self) -> CHNUM_R {
CHNUM_R::new((self.bits & 0x0f) as u8)
}
#[inline(always)]
pub fn bcnt(&self) -> BCNT_R {
BCNT_R::new(((self.bits >> 4) & 0x07ff) as u16)
}
#[inline(always)]
pub fn dpid(&self) -> DPID_R {
DPID_R::new(((self.bits >> 15) & 3) as u8)
}
#[inline(always)]
pub fn pktsts(&self) -> PKTSTS_R {
PKTSTS_R::new(((self.bits >> 17) & 0x0f) as u8)
}
#[inline(always)]
pub fn stsphst(&self) -> STSPHST_R {
STSPHST_R::new(((self.bits >> 27) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("GRXSTSP_Host")
.field("chnum", &self.chnum())
.field("bcnt", &self.bcnt())
.field("dpid", &self.dpid())
.field("pktsts", &self.pktsts())
.field("stsphst", &self.stsphst())
.finish()
}
}
pub struct GRXSTSP_HOSTrs;
impl crate::RegisterSpec for GRXSTSP_HOSTrs {
type Ux = u32;
}
impl crate::Readable for GRXSTSP_HOSTrs {}
impl crate::Resettable for GRXSTSP_HOSTrs {
const RESET_VALUE: u32 = 0x0200_0400;
}