corstone300_pac/ethernet/
tx_fifo_inf.rs1#[doc = "Register `TX_FIFO_INF` reader"]
6pub struct R(crate::R<TX_FIFO_INF_SPEC>);
7impl core::ops::Deref for R {
8 type Target = crate::R<TX_FIFO_INF_SPEC>;
9 #[inline(always)]
10 fn deref(&self) -> &Self::Target {
11 &self.0
12 }
13}
14impl From<crate::R<TX_FIFO_INF_SPEC>> for R {
15 #[inline(always)]
16 fn from(reader: crate::R<TX_FIFO_INF_SPEC>) -> Self {
17 R(reader)
18 }
19}
20#[doc = "Register `TX_FIFO_INF` writer"]
21pub struct W(crate::W<TX_FIFO_INF_SPEC>);
22impl core::ops::Deref for W {
23 type Target = crate::W<TX_FIFO_INF_SPEC>;
24 #[inline(always)]
25 fn deref(&self) -> &Self::Target {
26 &self.0
27 }
28}
29impl core::ops::DerefMut for W {
30 #[inline(always)]
31 fn deref_mut(&mut self) -> &mut Self::Target {
32 &mut self.0
33 }
34}
35impl From<crate::W<TX_FIFO_INF_SPEC>> for W {
36 #[inline(always)]
37 fn from(writer: crate::W<TX_FIFO_INF_SPEC>) -> Self {
38 W(writer)
39 }
40}
41#[doc = "Field `TDFREE` reader - TX Data FIFO Free Space"]
42pub type TDFREE_R = crate::FieldReader<u16, u16>;
43#[doc = "Field `TDFREE` writer - TX Data FIFO Free Space"]
44pub type TDFREE_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TX_FIFO_INF_SPEC, u16, u16, 16, O>;
45#[doc = "Field `TXSUSED` reader - TX Status FIFO Used Space"]
46pub type TXSUSED_R = crate::FieldReader<u8, u8>;
47#[doc = "Field `TXSUSED` writer - TX Status FIFO Used Space"]
48pub type TXSUSED_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TX_FIFO_INF_SPEC, u8, u8, 8, O>;
49impl R {
50 #[doc = "Bits 0:15 - TX Data FIFO Free Space"]
51 #[inline(always)]
52 pub fn tdfree(&self) -> TDFREE_R {
53 TDFREE_R::new((self.bits & 0xffff) as u16)
54 }
55 #[doc = "Bits 16:23 - TX Status FIFO Used Space"]
56 #[inline(always)]
57 pub fn txsused(&self) -> TXSUSED_R {
58 TXSUSED_R::new(((self.bits >> 16) & 0xff) as u8)
59 }
60}
61impl W {
62 #[doc = "Bits 0:15 - TX Data FIFO Free Space"]
63 #[inline(always)]
64 pub fn tdfree(&mut self) -> TDFREE_W<0> {
65 TDFREE_W::new(self)
66 }
67 #[doc = "Bits 16:23 - TX Status FIFO Used Space"]
68 #[inline(always)]
69 pub fn txsused(&mut self) -> TXSUSED_W<16> {
70 TXSUSED_W::new(self)
71 }
72 #[doc = "Writes raw bits to the register."]
73 #[inline(always)]
74 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
75 self.0.bits(bits);
76 self
77 }
78}
79#[doc = "Transmit FIFO Configuration\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 [tx_fifo_inf](index.html) module"]
80pub struct TX_FIFO_INF_SPEC;
81impl crate::RegisterSpec for TX_FIFO_INF_SPEC {
82 type Ux = u32;
83}
84#[doc = "`read()` method returns [tx_fifo_inf::R](R) reader structure"]
85impl crate::Readable for TX_FIFO_INF_SPEC {
86 type Reader = R;
87}
88#[doc = "`write(|w| ..)` method takes [tx_fifo_inf::W](W) writer structure"]
89impl crate::Writable for TX_FIFO_INF_SPEC {
90 type Writer = W;
91}
92#[doc = "`reset()` method sets TX_FIFO_INF to value 0x1200"]
93impl crate::Resettable for TX_FIFO_INF_SPEC {
94 #[inline(always)]
95 fn reset_value() -> Self::Ux {
96 0x1200
97 }
98}