1#[doc = "Register `PIPEPERI` reader"]
2pub struct R(crate::R<PIPEPERI_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<PIPEPERI_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<PIPEPERI_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<PIPEPERI_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `PIPEPERI` writer"]
17pub struct W(crate::W<PIPEPERI_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<PIPEPERI_SPEC>;
20 #[inline(always)]
21 fn deref(&self) -> &Self::Target {
22 &self.0
23 }
24}
25impl core::ops::DerefMut for W {
26 #[inline(always)]
27 fn deref_mut(&mut self) -> &mut Self::Target {
28 &mut self.0
29 }
30}
31impl From<crate::W<PIPEPERI_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<PIPEPERI_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `IITV` reader - Interval Error Detection Interval"]
38pub type IITV_R = crate::FieldReader<u8, u8>;
39#[doc = "Field `IITV` writer - Interval Error Detection Interval"]
40pub type IITV_W<'a, const O: u8> = crate::FieldWriter<'a, u16, PIPEPERI_SPEC, u8, u8, 3, O>;
41#[doc = "Field `IFIS` reader - Isochronous IN Buffer Flush"]
42pub type IFIS_R = crate::BitReader<IFIS_A>;
43#[doc = "Isochronous IN Buffer Flush\n\nValue on reset: 0"]
44#[derive(Clone, Copy, Debug, PartialEq, Eq)]
45pub enum IFIS_A {
46 #[doc = "0: Do not flush buffer"]
47 _0 = 0,
48 #[doc = "1: Flush buffer"]
49 _1 = 1,
50}
51impl From<IFIS_A> for bool {
52 #[inline(always)]
53 fn from(variant: IFIS_A) -> Self {
54 variant as u8 != 0
55 }
56}
57impl IFIS_R {
58 #[doc = "Get enumerated values variant"]
59 #[inline(always)]
60 pub fn variant(&self) -> IFIS_A {
61 match self.bits {
62 false => IFIS_A::_0,
63 true => IFIS_A::_1,
64 }
65 }
66 #[doc = "Checks if the value of the field is `_0`"]
67 #[inline(always)]
68 pub fn is_0(&self) -> bool {
69 *self == IFIS_A::_0
70 }
71 #[doc = "Checks if the value of the field is `_1`"]
72 #[inline(always)]
73 pub fn is_1(&self) -> bool {
74 *self == IFIS_A::_1
75 }
76}
77#[doc = "Field `IFIS` writer - Isochronous IN Buffer Flush"]
78pub type IFIS_W<'a, const O: u8> = crate::BitWriter<'a, u16, PIPEPERI_SPEC, IFIS_A, O>;
79impl<'a, const O: u8> IFIS_W<'a, O> {
80 #[doc = "Do not flush buffer"]
81 #[inline(always)]
82 pub fn _0(self) -> &'a mut W {
83 self.variant(IFIS_A::_0)
84 }
85 #[doc = "Flush buffer"]
86 #[inline(always)]
87 pub fn _1(self) -> &'a mut W {
88 self.variant(IFIS_A::_1)
89 }
90}
91impl R {
92 #[doc = "Bits 0:2 - Interval Error Detection Interval"]
93 #[inline(always)]
94 pub fn iitv(&self) -> IITV_R {
95 IITV_R::new((self.bits & 7) as u8)
96 }
97 #[doc = "Bit 12 - Isochronous IN Buffer Flush"]
98 #[inline(always)]
99 pub fn ifis(&self) -> IFIS_R {
100 IFIS_R::new(((self.bits >> 12) & 1) != 0)
101 }
102}
103impl W {
104 #[doc = "Bits 0:2 - Interval Error Detection Interval"]
105 #[inline(always)]
106 #[must_use]
107 pub fn iitv(&mut self) -> IITV_W<0> {
108 IITV_W::new(self)
109 }
110 #[doc = "Bit 12 - Isochronous IN Buffer Flush"]
111 #[inline(always)]
112 #[must_use]
113 pub fn ifis(&mut self) -> IFIS_W<12> {
114 IFIS_W::new(self)
115 }
116 #[doc = "Writes raw bits to the register."]
117 #[inline(always)]
118 pub unsafe fn bits(&mut self, bits: u16) -> &mut Self {
119 self.0.bits(bits);
120 self
121 }
122}
123#[doc = "Pipe Cycle Control Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [pipeperi](index.html) module"]
124pub struct PIPEPERI_SPEC;
125impl crate::RegisterSpec for PIPEPERI_SPEC {
126 type Ux = u16;
127}
128#[doc = "`read()` method returns [pipeperi::R](R) reader structure"]
129impl crate::Readable for PIPEPERI_SPEC {
130 type Reader = R;
131}
132#[doc = "`write(|w| ..)` method takes [pipeperi::W](W) writer structure"]
133impl crate::Writable for PIPEPERI_SPEC {
134 type Writer = W;
135 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
136 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
137}
138#[doc = "`reset()` method sets PIPEPERI to value 0"]
139impl crate::Resettable for PIPEPERI_SPEC {
140 const RESET_VALUE: Self::Ux = 0;
141}