1#[doc = "Register `FDEBUG` reader"]
2pub type R = crate::R<FDEBUG_SPEC>;
3#[doc = "Register `FDEBUG` writer"]
4pub type W = crate::W<FDEBUG_SPEC>;
5#[doc = "Field `RXSTALL` reader - State machine has stalled on full RX FIFO during a blocking PUSH, or an IN with autopush enabled. This flag is also set when a nonblocking PUSH to a full FIFO took place, in which case the state machine has dropped data. Write 1 to clear."]
6pub type RXSTALL_R = crate::FieldReader;
7#[doc = "Field `RXSTALL` writer - State machine has stalled on full RX FIFO during a blocking PUSH, or an IN with autopush enabled. This flag is also set when a nonblocking PUSH to a full FIFO took place, in which case the state machine has dropped data. Write 1 to clear."]
8pub type RXSTALL_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
9#[doc = "Field `RXUNDER` reader - RX FIFO underflow (i.e. read-on-empty by the system) has occurred. Write 1 to clear. Note that read-on-empty does not perturb the state of the FIFO in any way, but the data returned by reading from an empty FIFO is undefined, so this flag generally only becomes set due to some kind of software error."]
10pub type RXUNDER_R = crate::FieldReader;
11#[doc = "Field `RXUNDER` writer - RX FIFO underflow (i.e. read-on-empty by the system) has occurred. Write 1 to clear. Note that read-on-empty does not perturb the state of the FIFO in any way, but the data returned by reading from an empty FIFO is undefined, so this flag generally only becomes set due to some kind of software error."]
12pub type RXUNDER_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
13#[doc = "Field `TXOVER` reader - TX FIFO overflow (i.e. write-on-full by the system) has occurred. Write 1 to clear. Note that write-on-full does not alter the state or contents of the FIFO in any way, but the data that the system attempted to write is dropped, so if this flag is set, your software has quite likely dropped some data on the floor."]
14pub type TXOVER_R = crate::FieldReader;
15#[doc = "Field `TXOVER` writer - TX FIFO overflow (i.e. write-on-full by the system) has occurred. Write 1 to clear. Note that write-on-full does not alter the state or contents of the FIFO in any way, but the data that the system attempted to write is dropped, so if this flag is set, your software has quite likely dropped some data on the floor."]
16pub type TXOVER_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
17#[doc = "Field `TXSTALL` reader - State machine has stalled on empty TX FIFO during a blocking PULL, or an OUT with autopull enabled. Write 1 to clear."]
18pub type TXSTALL_R = crate::FieldReader;
19#[doc = "Field `TXSTALL` writer - State machine has stalled on empty TX FIFO during a blocking PULL, or an OUT with autopull enabled. Write 1 to clear."]
20pub type TXSTALL_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
21impl R {
22#[doc = "Bits 0:3 - State machine has stalled on full RX FIFO during a blocking PUSH, or an IN with autopush enabled. This flag is also set when a nonblocking PUSH to a full FIFO took place, in which case the state machine has dropped data. Write 1 to clear."]
23 #[inline(always)]
24pub fn rxstall(&self) -> RXSTALL_R {
25 RXSTALL_R::new((self.bits & 0x0f) as u8)
26 }
27#[doc = "Bits 8:11 - RX FIFO underflow (i.e. read-on-empty by the system) has occurred. Write 1 to clear. Note that read-on-empty does not perturb the state of the FIFO in any way, but the data returned by reading from an empty FIFO is undefined, so this flag generally only becomes set due to some kind of software error."]
28 #[inline(always)]
29pub fn rxunder(&self) -> RXUNDER_R {
30 RXUNDER_R::new(((self.bits >> 8) & 0x0f) as u8)
31 }
32#[doc = "Bits 16:19 - TX FIFO overflow (i.e. write-on-full by the system) has occurred. Write 1 to clear. Note that write-on-full does not alter the state or contents of the FIFO in any way, but the data that the system attempted to write is dropped, so if this flag is set, your software has quite likely dropped some data on the floor."]
33 #[inline(always)]
34pub fn txover(&self) -> TXOVER_R {
35 TXOVER_R::new(((self.bits >> 16) & 0x0f) as u8)
36 }
37#[doc = "Bits 24:27 - State machine has stalled on empty TX FIFO during a blocking PULL, or an OUT with autopull enabled. Write 1 to clear."]
38 #[inline(always)]
39pub fn txstall(&self) -> TXSTALL_R {
40 TXSTALL_R::new(((self.bits >> 24) & 0x0f) as u8)
41 }
42}
43impl W {
44#[doc = "Bits 0:3 - State machine has stalled on full RX FIFO during a blocking PUSH, or an IN with autopush enabled. This flag is also set when a nonblocking PUSH to a full FIFO took place, in which case the state machine has dropped data. Write 1 to clear."]
45 #[inline(always)]
46 #[must_use]
47pub fn rxstall(&mut self) -> RXSTALL_W<FDEBUG_SPEC> {
48 RXSTALL_W::new(self, 0)
49 }
50#[doc = "Bits 8:11 - RX FIFO underflow (i.e. read-on-empty by the system) has occurred. Write 1 to clear. Note that read-on-empty does not perturb the state of the FIFO in any way, but the data returned by reading from an empty FIFO is undefined, so this flag generally only becomes set due to some kind of software error."]
51 #[inline(always)]
52 #[must_use]
53pub fn rxunder(&mut self) -> RXUNDER_W<FDEBUG_SPEC> {
54 RXUNDER_W::new(self, 8)
55 }
56#[doc = "Bits 16:19 - TX FIFO overflow (i.e. write-on-full by the system) has occurred. Write 1 to clear. Note that write-on-full does not alter the state or contents of the FIFO in any way, but the data that the system attempted to write is dropped, so if this flag is set, your software has quite likely dropped some data on the floor."]
57 #[inline(always)]
58 #[must_use]
59pub fn txover(&mut self) -> TXOVER_W<FDEBUG_SPEC> {
60 TXOVER_W::new(self, 16)
61 }
62#[doc = "Bits 24:27 - State machine has stalled on empty TX FIFO during a blocking PULL, or an OUT with autopull enabled. Write 1 to clear."]
63 #[inline(always)]
64 #[must_use]
65pub fn txstall(&mut self) -> TXSTALL_W<FDEBUG_SPEC> {
66 TXSTALL_W::new(self, 24)
67 }
68#[doc = r" Writes raw bits to the register."]
69 #[doc = r""]
70 #[doc = r" # Safety"]
71 #[doc = r""]
72 #[doc = r" Passing incorrect value can cause undefined behaviour. See reference manual"]
73 #[inline(always)]
74pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
75self.bits = bits;
76self
77}
78}
79#[doc = "FIFO debug register
8081You can [`read`](crate::generic::Reg::read) this register and get [`fdebug::R`](R). You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`fdebug::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
82pub struct FDEBUG_SPEC;
83impl crate::RegisterSpec for FDEBUG_SPEC {
84type Ux = u32;
85}
86#[doc = "`read()` method returns [`fdebug::R`](R) reader structure"]
87impl crate::Readable for FDEBUG_SPEC {}
88#[doc = "`write(|w| ..)` method takes [`fdebug::W`](W) writer structure"]
89impl crate::Writable for FDEBUG_SPEC {
90const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
91const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0x0f0f_0f0f;
92}
93#[doc = "`reset()` method sets FDEBUG to value 0"]
94impl crate::Resettable for FDEBUG_SPEC {
95const RESET_VALUE: u32 = 0;
96}