1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
#[doc = "Reader of register OTG_FS_GRXSTSR_Host"] pub type R = crate::R<u32, super::OTG_FS_GRXSTSR_HOST>; #[doc = "Reader of field `CHNUM`"] pub type CHNUM_R = crate::R<u8, u8>; #[doc = "Reader of field `BCNT`"] pub type BCNT_R = crate::R<u16, u16>; #[doc = "Reader of field `DPID`"] pub type DPID_R = crate::R<u8, u8>; #[doc = "Reader of field `PKTSTS`"] pub type PKTSTS_R = crate::R<u8, u8>; impl R { #[doc = "Bits 0:3 - Endpoint number"] #[inline(always)] pub fn chnum(&self) -> CHNUM_R { CHNUM_R::new((self.bits & 0x0f) as u8) } #[doc = "Bits 4:14 - Byte count"] #[inline(always)] pub fn bcnt(&self) -> BCNT_R { BCNT_R::new(((self.bits >> 4) & 0x07ff) as u16) } #[doc = "Bits 15:16 - Data PID"] #[inline(always)] pub fn dpid(&self) -> DPID_R { DPID_R::new(((self.bits >> 15) & 0x03) as u8) } #[doc = "Bits 17:20 - Packet status"] #[inline(always)] pub fn pktsts(&self) -> PKTSTS_R { PKTSTS_R::new(((self.bits >> 17) & 0x0f) as u8) } }