1#[doc = "Register `DSTS` reader"]
2pub type R = crate::R<DSTS_SPEC>;
3#[doc = "Field `SUSPSTS` reader - "]
4pub type SUSPSTS_R = crate::BitReader;
5#[doc = "Field `ENUMSPD` reader - "]
6pub type ENUMSPD_R = crate::FieldReader;
7#[doc = "Field `ERRTICERR` reader - "]
8pub type ERRTICERR_R = crate::BitReader;
9#[doc = "Field `SOFFN` reader - "]
10pub type SOFFN_R = crate::FieldReader<u16>;
11#[doc = "Field `DEVLNSTS` reader - "]
12pub type DEVLNSTS_R = crate::FieldReader;
13impl R {
14 #[doc = "Bit 0"]
15 #[inline(always)]
16 pub fn suspsts(&self) -> SUSPSTS_R {
17 SUSPSTS_R::new((self.bits & 1) != 0)
18 }
19 #[doc = "Bits 1:2"]
20 #[inline(always)]
21 pub fn enumspd(&self) -> ENUMSPD_R {
22 ENUMSPD_R::new(((self.bits >> 1) & 3) as u8)
23 }
24 #[doc = "Bit 3"]
25 #[inline(always)]
26 pub fn errticerr(&self) -> ERRTICERR_R {
27 ERRTICERR_R::new(((self.bits >> 3) & 1) != 0)
28 }
29 #[doc = "Bits 8:21"]
30 #[inline(always)]
31 pub fn soffn(&self) -> SOFFN_R {
32 SOFFN_R::new(((self.bits >> 8) & 0x3fff) as u16)
33 }
34 #[doc = "Bits 22:23"]
35 #[inline(always)]
36 pub fn devlnsts(&self) -> DEVLNSTS_R {
37 DEVLNSTS_R::new(((self.bits >> 22) & 3) as u8)
38 }
39}
40#[cfg(feature = "impl-register-debug")]
41impl core::fmt::Debug for R {
42 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
43 f.debug_struct("DSTS")
44 .field("suspsts", &self.suspsts())
45 .field("enumspd", &self.enumspd())
46 .field("errticerr", &self.errticerr())
47 .field("soffn", &self.soffn())
48 .field("devlnsts", &self.devlnsts())
49 .finish()
50 }
51}
52#[doc = "\n\nYou can [`read`](crate::Reg::read) this register and get [`dsts::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
53pub struct DSTS_SPEC;
54impl crate::RegisterSpec for DSTS_SPEC {
55 type Ux = u32;
56}
57#[doc = "`read()` method returns [`dsts::R`](R) reader structure"]
58impl crate::Readable for DSTS_SPEC {}
59#[doc = "`reset()` method sets DSTS to value 0x02"]
60impl crate::Resettable for DSTS_SPEC {
61 const RESET_VALUE: u32 = 0x02;
62}