moondancer_pac/generated/usb2/
status.rs1#[doc = "Register `status` reader"]
2pub type R = crate::R<STATUS_SPEC>;
3#[doc = "Register `status` writer"]
4pub type W = crate::W<STATUS_SPEC>;
5#[doc = "Field `speed` reader - speed field"]
6pub type SPEED_R = crate::FieldReader;
7#[doc = "Field `_0` reader - _0 field"]
8pub type _0_R = crate::FieldReader;
9#[doc = "Field `_0` writer - _0 field"]
10pub type _0_W<'a, REG> = crate::FieldWriter<'a, REG, 6>;
11impl R {
12 #[doc = "Bits 0:1 - speed field"]
13 #[inline(always)]
14 pub fn speed(&self) -> SPEED_R {
15 SPEED_R::new(self.bits & 3)
16 }
17 #[doc = "Bits 2:7 - _0 field"]
18 #[inline(always)]
19 pub fn _0(&self) -> _0_R {
20 _0_R::new((self.bits >> 2) & 0x3f)
21 }
22}
23impl W {
24 #[doc = "Bits 2:7 - _0 field"]
25 #[inline(always)]
26 pub fn _0(&mut self) -> _0_W<STATUS_SPEC> {
27 _0_W::new(self, 2)
28 }
29}
30#[doc = "Status register speed: Indicates the current speed of the USB device. 0 indicates High; 1 => Full, 2 => Low, and 3 => SuperSpeed (incl SuperSpeed+).\n\nYou can [`read`](crate::Reg::read) this register and get [`status::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`status::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
31pub struct STATUS_SPEC;
32impl crate::RegisterSpec for STATUS_SPEC {
33 type Ux = u8;
34}
35#[doc = "`read()` method returns [`status::R`](R) reader structure"]
36impl crate::Readable for STATUS_SPEC {}
37#[doc = "`write(|w| ..)` method takes [`status::W`](W) writer structure"]
38impl crate::Writable for STATUS_SPEC {
39 type Safety = crate::Unsafe;
40 const ZERO_TO_MODIFY_FIELDS_BITMAP: u8 = 0;
41 const ONE_TO_MODIFY_FIELDS_BITMAP: u8 = 0;
42}
43#[doc = "`reset()` method sets status to value 0"]
44impl crate::Resettable for STATUS_SPEC {
45 const RESET_VALUE: u8 = 0;
46}