tm4c123x/usb0/
is.rs

1#[doc = "Reader of register IS"]
2pub type R = crate::R<u8, super::IS>;
3#[doc = "Reader of field `SUSPEND`"]
4pub type SUSPEND_R = crate::R<bool, bool>;
5#[doc = "Reader of field `RESUME`"]
6pub type RESUME_R = crate::R<bool, bool>;
7#[doc = "Reader of field `BABBLE`"]
8pub type BABBLE_R = crate::R<bool, bool>;
9#[doc = "Reader of field `RESET`"]
10pub type RESET_R = crate::R<bool, bool>;
11#[doc = "Reader of field `SOF`"]
12pub type SOF_R = crate::R<bool, bool>;
13#[doc = "Reader of field `CONN`"]
14pub type CONN_R = crate::R<bool, bool>;
15#[doc = "Reader of field `DISCON`"]
16pub type DISCON_R = crate::R<bool, bool>;
17#[doc = "Reader of field `SESREQ`"]
18pub type SESREQ_R = crate::R<bool, bool>;
19#[doc = "Reader of field `VBUSERR`"]
20pub type VBUSERR_R = crate::R<bool, bool>;
21impl R {
22    #[doc = "Bit 0 - SUSPEND Signaling Detected"]
23    #[inline(always)]
24    pub fn suspend(&self) -> SUSPEND_R {
25        SUSPEND_R::new((self.bits & 0x01) != 0)
26    }
27    #[doc = "Bit 1 - RESUME Signaling Detected"]
28    #[inline(always)]
29    pub fn resume(&self) -> RESUME_R {
30        RESUME_R::new(((self.bits >> 1) & 0x01) != 0)
31    }
32    #[doc = "Bit 2 - Babble Detected"]
33    #[inline(always)]
34    pub fn babble(&self) -> BABBLE_R {
35        BABBLE_R::new(((self.bits >> 2) & 0x01) != 0)
36    }
37    #[doc = "Bit 2 - RESET Signaling Detected"]
38    #[inline(always)]
39    pub fn reset(&self) -> RESET_R {
40        RESET_R::new(((self.bits >> 2) & 0x01) != 0)
41    }
42    #[doc = "Bit 3 - Start of Frame"]
43    #[inline(always)]
44    pub fn sof(&self) -> SOF_R {
45        SOF_R::new(((self.bits >> 3) & 0x01) != 0)
46    }
47    #[doc = "Bit 4 - Session Connect"]
48    #[inline(always)]
49    pub fn conn(&self) -> CONN_R {
50        CONN_R::new(((self.bits >> 4) & 0x01) != 0)
51    }
52    #[doc = "Bit 5 - Session Disconnect (OTG only)"]
53    #[inline(always)]
54    pub fn discon(&self) -> DISCON_R {
55        DISCON_R::new(((self.bits >> 5) & 0x01) != 0)
56    }
57    #[doc = "Bit 6 - SESSION REQUEST (OTG only)"]
58    #[inline(always)]
59    pub fn sesreq(&self) -> SESREQ_R {
60        SESREQ_R::new(((self.bits >> 6) & 0x01) != 0)
61    }
62    #[doc = "Bit 7 - VBUS Error (OTG only)"]
63    #[inline(always)]
64    pub fn vbuserr(&self) -> VBUSERR_R {
65        VBUSERR_R::new(((self.bits >> 7) & 0x01) != 0)
66    }
67}