atsamd21g/usb/host/
pstatusset.rs
1#[doc = "Register `PSTATUSSET%s` writer"]
2pub type W = crate::W<PstatussetSpec>;
3#[doc = "Field `DTGL` writer - Data Toggle Set"]
4pub type DtglW<'a, REG> = crate::BitWriter<'a, REG>;
5#[doc = "Field `CURBK` writer - Current Bank Set"]
6pub type CurbkW<'a, REG> = crate::BitWriter<'a, REG>;
7#[doc = "Field `PFREEZE` writer - Pipe Freeze Set"]
8pub type PfreezeW<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `BK0RDY` writer - Bank 0 Ready Set"]
10pub type Bk0rdyW<'a, REG> = crate::BitWriter<'a, REG>;
11#[doc = "Field `BK1RDY` writer - Bank 1 Ready Set"]
12pub type Bk1rdyW<'a, REG> = crate::BitWriter<'a, REG>;
13impl W {
14 #[doc = "Bit 0 - Data Toggle Set"]
15 #[inline(always)]
16 #[must_use]
17 pub fn dtgl(&mut self) -> DtglW<PstatussetSpec> {
18 DtglW::new(self, 0)
19 }
20 #[doc = "Bit 2 - Current Bank Set"]
21 #[inline(always)]
22 #[must_use]
23 pub fn curbk(&mut self) -> CurbkW<PstatussetSpec> {
24 CurbkW::new(self, 2)
25 }
26 #[doc = "Bit 4 - Pipe Freeze Set"]
27 #[inline(always)]
28 #[must_use]
29 pub fn pfreeze(&mut self) -> PfreezeW<PstatussetSpec> {
30 PfreezeW::new(self, 4)
31 }
32 #[doc = "Bit 6 - Bank 0 Ready Set"]
33 #[inline(always)]
34 #[must_use]
35 pub fn bk0rdy(&mut self) -> Bk0rdyW<PstatussetSpec> {
36 Bk0rdyW::new(self, 6)
37 }
38 #[doc = "Bit 7 - Bank 1 Ready Set"]
39 #[inline(always)]
40 #[must_use]
41 pub fn bk1rdy(&mut self) -> Bk1rdyW<PstatussetSpec> {
42 Bk1rdyW::new(self, 7)
43 }
44}
45#[doc = "HOST End Point Pipe Status Set\n\nYou can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pstatusset::W`](W). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
46pub struct PstatussetSpec;
47impl crate::RegisterSpec for PstatussetSpec {
48 type Ux = u8;
49}
50#[doc = "`write(|w| ..)` method takes [`pstatusset::W`](W) writer structure"]
51impl crate::Writable for PstatussetSpec {
52 type Safety = crate::Unsafe;
53 const ZERO_TO_MODIFY_FIELDS_BITMAP: u8 = 0;
54 const ONE_TO_MODIFY_FIELDS_BITMAP: u8 = 0;
55}
56#[doc = "`reset()` method sets PSTATUSSET%s to value 0"]
57impl crate::Resettable for PstatussetSpec {
58 const RESET_VALUE: u8 = 0;
59}