efm32gg_pac/efm32gg995/usb/
hptxsts.rs

1#[doc = "Register `HPTXSTS` reader"]
2pub struct R(crate::R<HPTXSTS_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<HPTXSTS_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<HPTXSTS_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<HPTXSTS_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Field `PTXFSPCAVAIL` reader - Periodic Transmit Data FIFO Space Available"]
17pub type PTXFSPCAVAIL_R = crate::FieldReader<u16, u16>;
18#[doc = "Field `PTXQSPCAVAIL` reader - Periodic Transmit Request Queue Space Available"]
19pub type PTXQSPCAVAIL_R = crate::FieldReader<u8, u8>;
20#[doc = "Field `PTXQTOP` reader - Top of the Periodic Transmit Request Queue"]
21pub type PTXQTOP_R = crate::FieldReader<u8, u8>;
22impl R {
23    #[doc = "Bits 0:15 - Periodic Transmit Data FIFO Space Available"]
24    #[inline(always)]
25    pub fn ptxfspcavail(&self) -> PTXFSPCAVAIL_R {
26        PTXFSPCAVAIL_R::new((self.bits & 0xffff) as u16)
27    }
28    #[doc = "Bits 16:23 - Periodic Transmit Request Queue Space Available"]
29    #[inline(always)]
30    pub fn ptxqspcavail(&self) -> PTXQSPCAVAIL_R {
31        PTXQSPCAVAIL_R::new(((self.bits >> 16) & 0xff) as u8)
32    }
33    #[doc = "Bits 24:31 - Top of the Periodic Transmit Request Queue"]
34    #[inline(always)]
35    pub fn ptxqtop(&self) -> PTXQTOP_R {
36        PTXQTOP_R::new(((self.bits >> 24) & 0xff) as u8)
37    }
38}
39#[doc = "Host Periodic Transmit FIFO/Queue Status Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [hptxsts](index.html) module"]
40pub struct HPTXSTS_SPEC;
41impl crate::RegisterSpec for HPTXSTS_SPEC {
42    type Ux = u32;
43}
44#[doc = "`read()` method returns [hptxsts::R](R) reader structure"]
45impl crate::Readable for HPTXSTS_SPEC {
46    type Reader = R;
47}
48#[doc = "`reset()` method sets HPTXSTS to value 0x0008_0200"]
49impl crate::Resettable for HPTXSTS_SPEC {
50    const RESET_VALUE: Self::Ux = 0x0008_0200;
51}