bl702_pac/usb/
ep7_fifo_status.rs1#[doc = "Register `ep7_fifo_status` reader"]
2pub struct R(crate::R<EP7_FIFO_STATUS_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<EP7_FIFO_STATUS_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<EP7_FIFO_STATUS_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<EP7_FIFO_STATUS_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `ep7_fifo_status` writer"]
17pub struct W(crate::W<EP7_FIFO_STATUS_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<EP7_FIFO_STATUS_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<EP7_FIFO_STATUS_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<EP7_FIFO_STATUS_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `ep7_tx_fifo_cnt` reader - "]
38pub type EP7_TX_FIFO_CNT_R = crate::FieldReader<u8, u8>;
39#[doc = "Field `ep7_tx_fifo_cnt` writer - "]
40pub type EP7_TX_FIFO_CNT_W<'a, const O: u8> =
41 crate::FieldWriter<'a, u32, EP7_FIFO_STATUS_SPEC, u8, u8, 7, O>;
42#[doc = "Field `ep7_tx_fifo_empty` reader - "]
43pub type EP7_TX_FIFO_EMPTY_R = crate::BitReader<bool>;
44#[doc = "Field `ep7_tx_fifo_empty` writer - "]
45pub type EP7_TX_FIFO_EMPTY_W<'a, const O: u8> =
46 crate::BitWriter<'a, u32, EP7_FIFO_STATUS_SPEC, bool, O>;
47#[doc = "Field `ep7_tx_fifo_full` reader - "]
48pub type EP7_TX_FIFO_FULL_R = crate::BitReader<bool>;
49#[doc = "Field `ep7_tx_fifo_full` writer - "]
50pub type EP7_TX_FIFO_FULL_W<'a, const O: u8> =
51 crate::BitWriter<'a, u32, EP7_FIFO_STATUS_SPEC, bool, O>;
52#[doc = "Field `ep7_rx_fifo_cnt` reader - "]
53pub type EP7_RX_FIFO_CNT_R = crate::FieldReader<u8, u8>;
54#[doc = "Field `ep7_rx_fifo_cnt` writer - "]
55pub type EP7_RX_FIFO_CNT_W<'a, const O: u8> =
56 crate::FieldWriter<'a, u32, EP7_FIFO_STATUS_SPEC, u8, u8, 7, O>;
57#[doc = "Field `ep7_rx_fifo_empty` reader - "]
58pub type EP7_RX_FIFO_EMPTY_R = crate::BitReader<bool>;
59#[doc = "Field `ep7_rx_fifo_empty` writer - "]
60pub type EP7_RX_FIFO_EMPTY_W<'a, const O: u8> =
61 crate::BitWriter<'a, u32, EP7_FIFO_STATUS_SPEC, bool, O>;
62#[doc = "Field `ep7_rx_fifo_full` reader - "]
63pub type EP7_RX_FIFO_FULL_R = crate::BitReader<bool>;
64#[doc = "Field `ep7_rx_fifo_full` writer - "]
65pub type EP7_RX_FIFO_FULL_W<'a, const O: u8> =
66 crate::BitWriter<'a, u32, EP7_FIFO_STATUS_SPEC, bool, O>;
67impl R {
68 #[doc = "Bits 0:6"]
69 #[inline(always)]
70 pub fn ep7_tx_fifo_cnt(&self) -> EP7_TX_FIFO_CNT_R {
71 EP7_TX_FIFO_CNT_R::new((self.bits & 0x7f) as u8)
72 }
73 #[doc = "Bit 14"]
74 #[inline(always)]
75 pub fn ep7_tx_fifo_empty(&self) -> EP7_TX_FIFO_EMPTY_R {
76 EP7_TX_FIFO_EMPTY_R::new(((self.bits >> 14) & 1) != 0)
77 }
78 #[doc = "Bit 15"]
79 #[inline(always)]
80 pub fn ep7_tx_fifo_full(&self) -> EP7_TX_FIFO_FULL_R {
81 EP7_TX_FIFO_FULL_R::new(((self.bits >> 15) & 1) != 0)
82 }
83 #[doc = "Bits 16:22"]
84 #[inline(always)]
85 pub fn ep7_rx_fifo_cnt(&self) -> EP7_RX_FIFO_CNT_R {
86 EP7_RX_FIFO_CNT_R::new(((self.bits >> 16) & 0x7f) as u8)
87 }
88 #[doc = "Bit 30"]
89 #[inline(always)]
90 pub fn ep7_rx_fifo_empty(&self) -> EP7_RX_FIFO_EMPTY_R {
91 EP7_RX_FIFO_EMPTY_R::new(((self.bits >> 30) & 1) != 0)
92 }
93 #[doc = "Bit 31"]
94 #[inline(always)]
95 pub fn ep7_rx_fifo_full(&self) -> EP7_RX_FIFO_FULL_R {
96 EP7_RX_FIFO_FULL_R::new(((self.bits >> 31) & 1) != 0)
97 }
98}
99impl W {
100 #[doc = "Bits 0:6"]
101 #[inline(always)]
102 #[must_use]
103 pub fn ep7_tx_fifo_cnt(&mut self) -> EP7_TX_FIFO_CNT_W<0> {
104 EP7_TX_FIFO_CNT_W::new(self)
105 }
106 #[doc = "Bit 14"]
107 #[inline(always)]
108 #[must_use]
109 pub fn ep7_tx_fifo_empty(&mut self) -> EP7_TX_FIFO_EMPTY_W<14> {
110 EP7_TX_FIFO_EMPTY_W::new(self)
111 }
112 #[doc = "Bit 15"]
113 #[inline(always)]
114 #[must_use]
115 pub fn ep7_tx_fifo_full(&mut self) -> EP7_TX_FIFO_FULL_W<15> {
116 EP7_TX_FIFO_FULL_W::new(self)
117 }
118 #[doc = "Bits 16:22"]
119 #[inline(always)]
120 #[must_use]
121 pub fn ep7_rx_fifo_cnt(&mut self) -> EP7_RX_FIFO_CNT_W<16> {
122 EP7_RX_FIFO_CNT_W::new(self)
123 }
124 #[doc = "Bit 30"]
125 #[inline(always)]
126 #[must_use]
127 pub fn ep7_rx_fifo_empty(&mut self) -> EP7_RX_FIFO_EMPTY_W<30> {
128 EP7_RX_FIFO_EMPTY_W::new(self)
129 }
130 #[doc = "Bit 31"]
131 #[inline(always)]
132 #[must_use]
133 pub fn ep7_rx_fifo_full(&mut self) -> EP7_RX_FIFO_FULL_W<31> {
134 EP7_RX_FIFO_FULL_W::new(self)
135 }
136 #[doc = "Writes raw bits to the register."]
137 #[inline(always)]
138 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
139 self.0.bits(bits);
140 self
141 }
142}
143#[doc = "ep7_fifo_status.\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 [ep7_fifo_status](index.html) module"]
144pub struct EP7_FIFO_STATUS_SPEC;
145impl crate::RegisterSpec for EP7_FIFO_STATUS_SPEC {
146 type Ux = u32;
147}
148#[doc = "`read()` method returns [ep7_fifo_status::R](R) reader structure"]
149impl crate::Readable for EP7_FIFO_STATUS_SPEC {
150 type Reader = R;
151}
152#[doc = "`write(|w| ..)` method takes [ep7_fifo_status::W](W) writer structure"]
153impl crate::Writable for EP7_FIFO_STATUS_SPEC {
154 type Writer = W;
155 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
156 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
157}
158#[doc = "`reset()` method sets ep7_fifo_status to value 0"]
159impl crate::Resettable for EP7_FIFO_STATUS_SPEC {
160 const RESET_VALUE: Self::Ux = 0;
161}