va416xx/eth/mac_debug.rs
1#[doc = "Register `MAC_DEBUG` reader"]
2pub type R = crate::R<MacDebugSpec>;
3#[doc = "Field `RPESTS` reader - MAC GMII or MII Receive Protocol Engine Status"]
4pub type RpestsR = crate::BitReader;
5#[doc = "Field `RFCFCSTS` reader - MAC Receive Frame FIFO Controller Status"]
6pub type RfcfcstsR = crate::FieldReader;
7#[doc = "Field `RWCSTS` reader - MTL Rx FIFO Write Controller Active Status"]
8pub type RwcstsR = crate::BitReader;
9#[doc = "Field `RRCSTS` reader - MTL RxFIFO Read Controller State"]
10pub type RrcstsR = crate::FieldReader;
11#[doc = "Field `RXFSTS` reader - MTL RxFIFO Fill-Level Status"]
12pub type RxfstsR = crate::FieldReader;
13#[doc = "Field `TPESTS` reader - MAC GMII or MII Transmit Protocol Engine Status"]
14pub type TpestsR = crate::BitReader;
15#[doc = "Field `TFCSTS` reader - PAC Transmit Frame Controller Status"]
16pub type TfcstsR = crate::FieldReader;
17#[doc = "Field `TXPAUSED` reader - MAC Transmitter in Pause"]
18pub type TxpausedR = crate::BitReader;
19#[doc = "Field `TRCSTS` reader - MTL Tx FIFO Read Controller Status"]
20pub type TrcstsR = crate::FieldReader;
21#[doc = "Field `TWCSTS` reader - MTL Tx FIFO Write Controller Status"]
22pub type TwcstsR = crate::BitReader;
23#[doc = "Field `TXFSTS` reader - MTL Tx FIFO Not Empty Status"]
24pub type TxfstsR = crate::BitReader;
25#[doc = "Field `TXSTSFSTS` reader - MTL TxStatus FIFO Full Status"]
26pub type TxstsfstsR = crate::BitReader;
27impl R {
28 #[doc = "Bit 0 - MAC GMII or MII Receive Protocol Engine Status"]
29 #[inline(always)]
30 pub fn rpests(&self) -> RpestsR {
31 RpestsR::new((self.bits & 1) != 0)
32 }
33 #[doc = "Bits 1:2 - MAC Receive Frame FIFO Controller Status"]
34 #[inline(always)]
35 pub fn rfcfcsts(&self) -> RfcfcstsR {
36 RfcfcstsR::new(((self.bits >> 1) & 3) as u8)
37 }
38 #[doc = "Bit 4 - MTL Rx FIFO Write Controller Active Status"]
39 #[inline(always)]
40 pub fn rwcsts(&self) -> RwcstsR {
41 RwcstsR::new(((self.bits >> 4) & 1) != 0)
42 }
43 #[doc = "Bits 5:6 - MTL RxFIFO Read Controller State"]
44 #[inline(always)]
45 pub fn rrcsts(&self) -> RrcstsR {
46 RrcstsR::new(((self.bits >> 5) & 3) as u8)
47 }
48 #[doc = "Bits 8:9 - MTL RxFIFO Fill-Level Status"]
49 #[inline(always)]
50 pub fn rxfsts(&self) -> RxfstsR {
51 RxfstsR::new(((self.bits >> 8) & 3) as u8)
52 }
53 #[doc = "Bit 16 - MAC GMII or MII Transmit Protocol Engine Status"]
54 #[inline(always)]
55 pub fn tpests(&self) -> TpestsR {
56 TpestsR::new(((self.bits >> 16) & 1) != 0)
57 }
58 #[doc = "Bits 17:18 - PAC Transmit Frame Controller Status"]
59 #[inline(always)]
60 pub fn tfcsts(&self) -> TfcstsR {
61 TfcstsR::new(((self.bits >> 17) & 3) as u8)
62 }
63 #[doc = "Bit 19 - MAC Transmitter in Pause"]
64 #[inline(always)]
65 pub fn txpaused(&self) -> TxpausedR {
66 TxpausedR::new(((self.bits >> 19) & 1) != 0)
67 }
68 #[doc = "Bits 20:21 - MTL Tx FIFO Read Controller Status"]
69 #[inline(always)]
70 pub fn trcsts(&self) -> TrcstsR {
71 TrcstsR::new(((self.bits >> 20) & 3) as u8)
72 }
73 #[doc = "Bit 22 - MTL Tx FIFO Write Controller Status"]
74 #[inline(always)]
75 pub fn twcsts(&self) -> TwcstsR {
76 TwcstsR::new(((self.bits >> 22) & 1) != 0)
77 }
78 #[doc = "Bit 24 - MTL Tx FIFO Not Empty Status"]
79 #[inline(always)]
80 pub fn txfsts(&self) -> TxfstsR {
81 TxfstsR::new(((self.bits >> 24) & 1) != 0)
82 }
83 #[doc = "Bit 25 - MTL TxStatus FIFO Full Status"]
84 #[inline(always)]
85 pub fn txstsfsts(&self) -> TxstsfstsR {
86 TxstsfstsR::new(((self.bits >> 25) & 1) != 0)
87 }
88}
89#[doc = "Gives the status of the various internal blocks for debugging\n\nYou can [`read`](crate::Reg::read) this register and get [`mac_debug::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
90pub struct MacDebugSpec;
91impl crate::RegisterSpec for MacDebugSpec {
92 type Ux = u32;
93}
94#[doc = "`read()` method returns [`mac_debug::R`](R) reader structure"]
95impl crate::Readable for MacDebugSpec {}
96#[doc = "`reset()` method sets MAC_DEBUG to value 0"]
97impl crate::Resettable for MacDebugSpec {}