Skip to main content

max3263x/usb/
buf_ovr_int.rs

1#[doc = "Register `BUF_OVR_INT` reader"]
2pub struct R(crate::R<BUF_OVR_INT_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<BUF_OVR_INT_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<BUF_OVR_INT_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<BUF_OVR_INT_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Register `BUF_OVR_INT` writer"]
17pub struct W(crate::W<BUF_OVR_INT_SPEC>);
18impl core::ops::Deref for W {
19    type Target = crate::W<BUF_OVR_INT_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<BUF_OVR_INT_SPEC>> for W {
32    #[inline(always)]
33    fn from(writer: crate::W<BUF_OVR_INT_SPEC>) -> Self {
34        W(writer)
35    }
36}
37#[doc = "Field `buf_ovr0` reader - Endpoint 0 Buffer Overflow Interrupt Flag"]
38pub type BUF_OVR0_R = crate::BitReader<bool>;
39#[doc = "Field `buf_ovr0` writer - Endpoint 0 Buffer Overflow Interrupt Flag"]
40pub type BUF_OVR0_W<'a> = crate::BitWriter1C<'a, u32, BUF_OVR_INT_SPEC, bool, 0>;
41#[doc = "Field `buf_ovr1` reader - Endpoint 1 Buffer Overflow Interrupt Flag"]
42pub type BUF_OVR1_R = crate::BitReader<bool>;
43#[doc = "Field `buf_ovr1` writer - Endpoint 1 Buffer Overflow Interrupt Flag"]
44pub type BUF_OVR1_W<'a> = crate::BitWriter1C<'a, u32, BUF_OVR_INT_SPEC, bool, 1>;
45#[doc = "Field `buf_ovr2` reader - Endpoint 2 Buffer Overflow Interrupt Flag"]
46pub type BUF_OVR2_R = crate::BitReader<bool>;
47#[doc = "Field `buf_ovr2` writer - Endpoint 2 Buffer Overflow Interrupt Flag"]
48pub type BUF_OVR2_W<'a> = crate::BitWriter1C<'a, u32, BUF_OVR_INT_SPEC, bool, 2>;
49#[doc = "Field `buf_ovr3` reader - Endpoint 3 Buffer Overflow Interrupt Flag"]
50pub type BUF_OVR3_R = crate::BitReader<bool>;
51#[doc = "Field `buf_ovr3` writer - Endpoint 3 Buffer Overflow Interrupt Flag"]
52pub type BUF_OVR3_W<'a> = crate::BitWriter1C<'a, u32, BUF_OVR_INT_SPEC, bool, 3>;
53#[doc = "Field `buf_ovr4` reader - Endpoint 4 Buffer Overflow Interrupt Flag"]
54pub type BUF_OVR4_R = crate::BitReader<bool>;
55#[doc = "Field `buf_ovr4` writer - Endpoint 4 Buffer Overflow Interrupt Flag"]
56pub type BUF_OVR4_W<'a> = crate::BitWriter1C<'a, u32, BUF_OVR_INT_SPEC, bool, 4>;
57#[doc = "Field `buf_ovr5` reader - Endpoint 5 Buffer Overflow Interrupt Flag"]
58pub type BUF_OVR5_R = crate::BitReader<bool>;
59#[doc = "Field `buf_ovr5` writer - Endpoint 5 Buffer Overflow Interrupt Flag"]
60pub type BUF_OVR5_W<'a> = crate::BitWriter1C<'a, u32, BUF_OVR_INT_SPEC, bool, 5>;
61#[doc = "Field `buf_ovr6` reader - Endpoint 6 Buffer Overflow Interrupt Flag"]
62pub type BUF_OVR6_R = crate::BitReader<bool>;
63#[doc = "Field `buf_ovr6` writer - Endpoint 6 Buffer Overflow Interrupt Flag"]
64pub type BUF_OVR6_W<'a> = crate::BitWriter1C<'a, u32, BUF_OVR_INT_SPEC, bool, 6>;
65#[doc = "Field `buf_ovr7` reader - Endpoint 7 Buffer Overflow Interrupt Flag"]
66pub type BUF_OVR7_R = crate::BitReader<bool>;
67#[doc = "Field `buf_ovr7` writer - Endpoint 7 Buffer Overflow Interrupt Flag"]
68pub type BUF_OVR7_W<'a> = crate::BitWriter1C<'a, u32, BUF_OVR_INT_SPEC, bool, 7>;
69impl R {
70    #[doc = "Bit 0 - Endpoint 0 Buffer Overflow Interrupt Flag"]
71    #[inline(always)]
72    pub fn buf_ovr0(&self) -> BUF_OVR0_R {
73        BUF_OVR0_R::new((self.bits & 1) != 0)
74    }
75    #[doc = "Bit 1 - Endpoint 1 Buffer Overflow Interrupt Flag"]
76    #[inline(always)]
77    pub fn buf_ovr1(&self) -> BUF_OVR1_R {
78        BUF_OVR1_R::new(((self.bits >> 1) & 1) != 0)
79    }
80    #[doc = "Bit 2 - Endpoint 2 Buffer Overflow Interrupt Flag"]
81    #[inline(always)]
82    pub fn buf_ovr2(&self) -> BUF_OVR2_R {
83        BUF_OVR2_R::new(((self.bits >> 2) & 1) != 0)
84    }
85    #[doc = "Bit 3 - Endpoint 3 Buffer Overflow Interrupt Flag"]
86    #[inline(always)]
87    pub fn buf_ovr3(&self) -> BUF_OVR3_R {
88        BUF_OVR3_R::new(((self.bits >> 3) & 1) != 0)
89    }
90    #[doc = "Bit 4 - Endpoint 4 Buffer Overflow Interrupt Flag"]
91    #[inline(always)]
92    pub fn buf_ovr4(&self) -> BUF_OVR4_R {
93        BUF_OVR4_R::new(((self.bits >> 4) & 1) != 0)
94    }
95    #[doc = "Bit 5 - Endpoint 5 Buffer Overflow Interrupt Flag"]
96    #[inline(always)]
97    pub fn buf_ovr5(&self) -> BUF_OVR5_R {
98        BUF_OVR5_R::new(((self.bits >> 5) & 1) != 0)
99    }
100    #[doc = "Bit 6 - Endpoint 6 Buffer Overflow Interrupt Flag"]
101    #[inline(always)]
102    pub fn buf_ovr6(&self) -> BUF_OVR6_R {
103        BUF_OVR6_R::new(((self.bits >> 6) & 1) != 0)
104    }
105    #[doc = "Bit 7 - Endpoint 7 Buffer Overflow Interrupt Flag"]
106    #[inline(always)]
107    pub fn buf_ovr7(&self) -> BUF_OVR7_R {
108        BUF_OVR7_R::new(((self.bits >> 7) & 1) != 0)
109    }
110}
111impl W {
112    #[doc = "Bit 0 - Endpoint 0 Buffer Overflow Interrupt Flag"]
113    #[inline(always)]
114    pub fn buf_ovr0(&mut self) -> BUF_OVR0_W {
115        BUF_OVR0_W::new(self)
116    }
117    #[doc = "Bit 1 - Endpoint 1 Buffer Overflow Interrupt Flag"]
118    #[inline(always)]
119    pub fn buf_ovr1(&mut self) -> BUF_OVR1_W {
120        BUF_OVR1_W::new(self)
121    }
122    #[doc = "Bit 2 - Endpoint 2 Buffer Overflow Interrupt Flag"]
123    #[inline(always)]
124    pub fn buf_ovr2(&mut self) -> BUF_OVR2_W {
125        BUF_OVR2_W::new(self)
126    }
127    #[doc = "Bit 3 - Endpoint 3 Buffer Overflow Interrupt Flag"]
128    #[inline(always)]
129    pub fn buf_ovr3(&mut self) -> BUF_OVR3_W {
130        BUF_OVR3_W::new(self)
131    }
132    #[doc = "Bit 4 - Endpoint 4 Buffer Overflow Interrupt Flag"]
133    #[inline(always)]
134    pub fn buf_ovr4(&mut self) -> BUF_OVR4_W {
135        BUF_OVR4_W::new(self)
136    }
137    #[doc = "Bit 5 - Endpoint 5 Buffer Overflow Interrupt Flag"]
138    #[inline(always)]
139    pub fn buf_ovr5(&mut self) -> BUF_OVR5_W {
140        BUF_OVR5_W::new(self)
141    }
142    #[doc = "Bit 6 - Endpoint 6 Buffer Overflow Interrupt Flag"]
143    #[inline(always)]
144    pub fn buf_ovr6(&mut self) -> BUF_OVR6_W {
145        BUF_OVR6_W::new(self)
146    }
147    #[doc = "Bit 7 - Endpoint 7 Buffer Overflow Interrupt Flag"]
148    #[inline(always)]
149    pub fn buf_ovr7(&mut self) -> BUF_OVR7_W {
150        BUF_OVR7_W::new(self)
151    }
152    #[doc = "Writes raw bits to the register."]
153    #[inline(always)]
154    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
155        self.0.bits(bits);
156        self
157    }
158}
159#[doc = "USB Buffer Overflow Interrupt\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 [buf_ovr_int](index.html) module"]
160pub struct BUF_OVR_INT_SPEC;
161impl crate::RegisterSpec for BUF_OVR_INT_SPEC {
162    type Ux = u32;
163}
164#[doc = "`read()` method returns [buf_ovr_int::R](R) reader structure"]
165impl crate::Readable for BUF_OVR_INT_SPEC {
166    type Reader = R;
167}
168#[doc = "`write(|w| ..)` method takes [buf_ovr_int::W](W) writer structure"]
169impl crate::Writable for BUF_OVR_INT_SPEC {
170    type Writer = W;
171}
172#[doc = "`reset()` method sets BUF_OVR_INT to value 0"]
173impl crate::Resettable for BUF_OVR_INT_SPEC {
174    #[inline(always)]
175    fn reset_value() -> Self::Ux {
176        0
177    }
178}