efm32lg990_pac/usb/
gnptxsts.rs

1#[doc = "Register `GNPTXSTS` reader"]
2pub struct R(crate::R<GNPTXSTS_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<GNPTXSTS_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<GNPTXSTS_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<GNPTXSTS_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Field `NPTXFSPCAVAIL` reader - Non-periodic TxFIFO Space Available"]
17pub type NPTXFSPCAVAIL_R = crate::FieldReader<u16, u16>;
18#[doc = "Field `NPTXQSPCAVAIL` reader - Non-periodic Transmit Request Queue Space Available"]
19pub type NPTXQSPCAVAIL_R = crate::FieldReader<u8, u8>;
20#[doc = "Field `NPTXQTOP` reader - Top of the Non-periodic Transmit Request Queue"]
21pub type NPTXQTOP_R = crate::FieldReader<u8, u8>;
22impl R {
23    #[doc = "Bits 0:15 - Non-periodic TxFIFO Space Available"]
24    #[inline(always)]
25    pub fn nptxfspcavail(&self) -> NPTXFSPCAVAIL_R {
26        NPTXFSPCAVAIL_R::new((self.bits & 0xffff) as u16)
27    }
28    #[doc = "Bits 16:23 - Non-periodic Transmit Request Queue Space Available"]
29    #[inline(always)]
30    pub fn nptxqspcavail(&self) -> NPTXQSPCAVAIL_R {
31        NPTXQSPCAVAIL_R::new(((self.bits >> 16) & 0xff) as u8)
32    }
33    #[doc = "Bits 24:30 - Top of the Non-periodic Transmit Request Queue"]
34    #[inline(always)]
35    pub fn nptxqtop(&self) -> NPTXQTOP_R {
36        NPTXQTOP_R::new(((self.bits >> 24) & 0x7f) as u8)
37    }
38}
39#[doc = "Non-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 [gnptxsts](index.html) module"]
40pub struct GNPTXSTS_SPEC;
41impl crate::RegisterSpec for GNPTXSTS_SPEC {
42    type Ux = u32;
43}
44#[doc = "`read()` method returns [gnptxsts::R](R) reader structure"]
45impl crate::Readable for GNPTXSTS_SPEC {
46    type Reader = R;
47}
48#[doc = "`reset()` method sets GNPTXSTS to value 0x0008_0200"]
49impl crate::Resettable for GNPTXSTS_SPEC {
50    #[inline(always)]
51    fn reset_value() -> Self::Ux {
52        0x0008_0200
53    }
54}