stm32wb_pac/usb/
fnr.rs

1#[doc = "Reader of register FNR"]
2pub type R = crate::R<u16, super::FNR>;
3#[doc = "Reader of field `FN`"]
4pub type FN_R = crate::R<u16, u16>;
5#[doc = "Reader of field `LSOF`"]
6pub type LSOF_R = crate::R<u8, u8>;
7#[doc = "Reader of field `LCK`"]
8pub type LCK_R = crate::R<bool, bool>;
9#[doc = "Reader of field `RXDM`"]
10pub type RXDM_R = crate::R<bool, bool>;
11#[doc = "Reader of field `RXDP`"]
12pub type RXDP_R = crate::R<bool, bool>;
13impl R {
14    #[doc = "Bits 0:10 - Frame number"]
15    #[inline(always)]
16    pub fn fn_(&self) -> FN_R {
17        FN_R::new((self.bits & 0x07ff) as u16)
18    }
19    #[doc = "Bits 11:12 - Lost SOF"]
20    #[inline(always)]
21    pub fn lsof(&self) -> LSOF_R {
22        LSOF_R::new(((self.bits >> 11) & 0x03) as u8)
23    }
24    #[doc = "Bit 13 - Locked"]
25    #[inline(always)]
26    pub fn lck(&self) -> LCK_R {
27        LCK_R::new(((self.bits >> 13) & 0x01) != 0)
28    }
29    #[doc = "Bit 14 - Receive data - line status"]
30    #[inline(always)]
31    pub fn rxdm(&self) -> RXDM_R {
32        RXDM_R::new(((self.bits >> 14) & 0x01) != 0)
33    }
34    #[doc = "Bit 15 - Receive data + line status"]
35    #[inline(always)]
36    pub fn rxdp(&self) -> RXDP_R {
37        RXDP_R::new(((self.bits >> 15) & 0x01) != 0)
38    }
39}