1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#[doc = "Register `ISOOUT` reader"]
pub struct R(crate::R<ISOOUT_SPEC>);
impl core::ops::Deref for R {
    type Target = crate::R<ISOOUT_SPEC>;
    #[inline(always)]
    fn deref(&self) -> &Self::Target {
        &self.0
    }
}
impl From<crate::R<ISOOUT_SPEC>> for R {
    #[inline(always)]
    fn from(reader: crate::R<ISOOUT_SPEC>) -> Self {
        R(reader)
    }
}
#[doc = "Field `SIZE` reader - Number of bytes received last on this ISO OUT data endpoint"]
pub type SIZE_R = crate::FieldReader<u16, u16>;
#[doc = "Field `ZERO` reader - Zero-length data packet received"]
pub type ZERO_R = crate::BitReader<ZERO_A>;
#[doc = "Zero-length data packet received\n\nValue on reset: 1"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ZERO_A {
    #[doc = "0: No zero-length data received, use value in SIZE"]
    NORMAL = 0,
    #[doc = "1: Zero-length data received, ignore value in SIZE"]
    ZERO_DATA = 1,
}
impl From<ZERO_A> for bool {
    #[inline(always)]
    fn from(variant: ZERO_A) -> Self {
        variant as u8 != 0
    }
}
impl ZERO_R {
    #[doc = "Get enumerated values variant"]
    #[inline(always)]
    pub fn variant(&self) -> ZERO_A {
        match self.bits {
            false => ZERO_A::NORMAL,
            true => ZERO_A::ZERO_DATA,
        }
    }
    #[doc = "Checks if the value of the field is `NORMAL`"]
    #[inline(always)]
    pub fn is_normal(&self) -> bool {
        *self == ZERO_A::NORMAL
    }
    #[doc = "Checks if the value of the field is `ZERO_DATA`"]
    #[inline(always)]
    pub fn is_zero_data(&self) -> bool {
        *self == ZERO_A::ZERO_DATA
    }
}
impl R {
    #[doc = "Bits 0:9 - Number of bytes received last on this ISO OUT data endpoint"]
    #[inline(always)]
    pub fn size(&self) -> SIZE_R {
        SIZE_R::new((self.bits & 0x03ff) as u16)
    }
    #[doc = "Bit 16 - Zero-length data packet received"]
    #[inline(always)]
    pub fn zero(&self) -> ZERO_R {
        ZERO_R::new(((self.bits >> 16) & 1) != 0)
    }
}
#[doc = "Number of bytes received last on this ISO OUT data endpoint\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [isoout](index.html) module"]
pub struct ISOOUT_SPEC;
impl crate::RegisterSpec for ISOOUT_SPEC {
    type Ux = u32;
}
#[doc = "`read()` method returns [isoout::R](R) reader structure"]
impl crate::Readable for ISOOUT_SPEC {
    type Reader = R;
}
#[doc = "`reset()` method sets ISOOUT to value 0x0001_0000"]
impl crate::Resettable for ISOOUT_SPEC {
    #[inline(always)]
    fn reset_value() -> Self::Ux {
        0x0001_0000
    }
}