atsamd21g/usb/host/
pstatus.rs
1#[doc = "Register `PSTATUS%s` reader"]
2pub type R = crate::R<PstatusSpec>;
3#[doc = "Field `DTGL` reader - Data Toggle"]
4pub type DtglR = crate::BitReader;
5#[doc = "Field `CURBK` reader - Current Bank"]
6pub type CurbkR = crate::BitReader;
7#[doc = "Field `PFREEZE` reader - Pipe Freeze"]
8pub type PfreezeR = crate::BitReader;
9#[doc = "Field `BK0RDY` reader - Bank 0 ready"]
10pub type Bk0rdyR = crate::BitReader;
11#[doc = "Field `BK1RDY` reader - Bank 1 ready"]
12pub type Bk1rdyR = crate::BitReader;
13impl R {
14 #[doc = "Bit 0 - Data Toggle"]
15 #[inline(always)]
16 pub fn dtgl(&self) -> DtglR {
17 DtglR::new((self.bits & 1) != 0)
18 }
19 #[doc = "Bit 2 - Current Bank"]
20 #[inline(always)]
21 pub fn curbk(&self) -> CurbkR {
22 CurbkR::new(((self.bits >> 2) & 1) != 0)
23 }
24 #[doc = "Bit 4 - Pipe Freeze"]
25 #[inline(always)]
26 pub fn pfreeze(&self) -> PfreezeR {
27 PfreezeR::new(((self.bits >> 4) & 1) != 0)
28 }
29 #[doc = "Bit 6 - Bank 0 ready"]
30 #[inline(always)]
31 pub fn bk0rdy(&self) -> Bk0rdyR {
32 Bk0rdyR::new(((self.bits >> 6) & 1) != 0)
33 }
34 #[doc = "Bit 7 - Bank 1 ready"]
35 #[inline(always)]
36 pub fn bk1rdy(&self) -> Bk1rdyR {
37 Bk1rdyR::new(((self.bits >> 7) & 1) != 0)
38 }
39}
40#[doc = "HOST End Point Pipe Status\n\nYou can [`read`](crate::Reg::read) this register and get [`pstatus::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
41pub struct PstatusSpec;
42impl crate::RegisterSpec for PstatusSpec {
43 type Ux = u8;
44}
45#[doc = "`read()` method returns [`pstatus::R`](R) reader structure"]
46impl crate::Readable for PstatusSpec {}
47#[doc = "`reset()` method sets PSTATUS%s to value 0"]
48impl crate::Resettable for PstatusSpec {
49 const RESET_VALUE: u8 = 0;
50}