xmc4700/eth0/
operation_mode.rs

1#[doc = "Register `OPERATION_MODE` reader"]
2pub type R = crate::R<OPERATION_MODE_SPEC>;
3#[doc = "Register `OPERATION_MODE` writer"]
4pub type W = crate::W<OPERATION_MODE_SPEC>;
5#[doc = "Field `SR` reader - Start or Stop Receive"]
6pub type SR_R = crate::BitReader;
7#[doc = "Field `SR` writer - Start or Stop Receive"]
8pub type SR_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `OSF` reader - Operate on Second Frame"]
10pub type OSF_R = crate::BitReader;
11#[doc = "Field `OSF` writer - Operate on Second Frame"]
12pub type OSF_W<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `RTC` reader - Receive Threshold Control"]
14pub type RTC_R = crate::FieldReader;
15#[doc = "Field `RTC` writer - Receive Threshold Control"]
16pub type RTC_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
17#[doc = "Field `FUF` reader - Forward Undersized Good Frames"]
18pub type FUF_R = crate::BitReader;
19#[doc = "Field `FUF` writer - Forward Undersized Good Frames"]
20pub type FUF_W<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `FEF` reader - Forward Error Frames"]
22pub type FEF_R = crate::BitReader;
23#[doc = "Field `FEF` writer - Forward Error Frames"]
24pub type FEF_W<'a, REG> = crate::BitWriter<'a, REG>;
25#[doc = "Field `ST` reader - Start or Stop Transmission Command"]
26pub type ST_R = crate::BitReader;
27#[doc = "Field `ST` writer - Start or Stop Transmission Command"]
28pub type ST_W<'a, REG> = crate::BitWriter<'a, REG>;
29#[doc = "Field `TTC` reader - Transmit Threshold Control"]
30pub type TTC_R = crate::FieldReader;
31#[doc = "Field `TTC` writer - Transmit Threshold Control"]
32pub type TTC_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
33#[doc = "Field `FTF` reader - Flush Transmit FIFO"]
34pub type FTF_R = crate::BitReader;
35#[doc = "Field `FTF` writer - Flush Transmit FIFO"]
36pub type FTF_W<'a, REG> = crate::BitWriter<'a, REG>;
37#[doc = "Field `TSF` reader - Transmit Store and Forward"]
38pub type TSF_R = crate::BitReader;
39#[doc = "Field `TSF` writer - Transmit Store and Forward"]
40pub type TSF_W<'a, REG> = crate::BitWriter<'a, REG>;
41#[doc = "Field `DFF` reader - Disable Flushing of Received Frames"]
42pub type DFF_R = crate::BitReader;
43#[doc = "Field `DFF` writer - Disable Flushing of Received Frames"]
44pub type DFF_W<'a, REG> = crate::BitWriter<'a, REG>;
45#[doc = "Field `RSF` reader - Receive Store and Forward"]
46pub type RSF_R = crate::BitReader;
47#[doc = "Field `RSF` writer - Receive Store and Forward"]
48pub type RSF_W<'a, REG> = crate::BitWriter<'a, REG>;
49#[doc = "Field `DT` reader - Disable Dropping of TCP/IP Checksum Error Frames"]
50pub type DT_R = crate::BitReader;
51#[doc = "Field `DT` writer - Disable Dropping of TCP/IP Checksum Error Frames"]
52pub type DT_W<'a, REG> = crate::BitWriter<'a, REG>;
53impl R {
54    #[doc = "Bit 1 - Start or Stop Receive"]
55    #[inline(always)]
56    pub fn sr(&self) -> SR_R {
57        SR_R::new(((self.bits >> 1) & 1) != 0)
58    }
59    #[doc = "Bit 2 - Operate on Second Frame"]
60    #[inline(always)]
61    pub fn osf(&self) -> OSF_R {
62        OSF_R::new(((self.bits >> 2) & 1) != 0)
63    }
64    #[doc = "Bits 3:4 - Receive Threshold Control"]
65    #[inline(always)]
66    pub fn rtc(&self) -> RTC_R {
67        RTC_R::new(((self.bits >> 3) & 3) as u8)
68    }
69    #[doc = "Bit 6 - Forward Undersized Good Frames"]
70    #[inline(always)]
71    pub fn fuf(&self) -> FUF_R {
72        FUF_R::new(((self.bits >> 6) & 1) != 0)
73    }
74    #[doc = "Bit 7 - Forward Error Frames"]
75    #[inline(always)]
76    pub fn fef(&self) -> FEF_R {
77        FEF_R::new(((self.bits >> 7) & 1) != 0)
78    }
79    #[doc = "Bit 13 - Start or Stop Transmission Command"]
80    #[inline(always)]
81    pub fn st(&self) -> ST_R {
82        ST_R::new(((self.bits >> 13) & 1) != 0)
83    }
84    #[doc = "Bits 14:16 - Transmit Threshold Control"]
85    #[inline(always)]
86    pub fn ttc(&self) -> TTC_R {
87        TTC_R::new(((self.bits >> 14) & 7) as u8)
88    }
89    #[doc = "Bit 20 - Flush Transmit FIFO"]
90    #[inline(always)]
91    pub fn ftf(&self) -> FTF_R {
92        FTF_R::new(((self.bits >> 20) & 1) != 0)
93    }
94    #[doc = "Bit 21 - Transmit Store and Forward"]
95    #[inline(always)]
96    pub fn tsf(&self) -> TSF_R {
97        TSF_R::new(((self.bits >> 21) & 1) != 0)
98    }
99    #[doc = "Bit 24 - Disable Flushing of Received Frames"]
100    #[inline(always)]
101    pub fn dff(&self) -> DFF_R {
102        DFF_R::new(((self.bits >> 24) & 1) != 0)
103    }
104    #[doc = "Bit 25 - Receive Store and Forward"]
105    #[inline(always)]
106    pub fn rsf(&self) -> RSF_R {
107        RSF_R::new(((self.bits >> 25) & 1) != 0)
108    }
109    #[doc = "Bit 26 - Disable Dropping of TCP/IP Checksum Error Frames"]
110    #[inline(always)]
111    pub fn dt(&self) -> DT_R {
112        DT_R::new(((self.bits >> 26) & 1) != 0)
113    }
114}
115impl W {
116    #[doc = "Bit 1 - Start or Stop Receive"]
117    #[inline(always)]
118    pub fn sr(&mut self) -> SR_W<OPERATION_MODE_SPEC> {
119        SR_W::new(self, 1)
120    }
121    #[doc = "Bit 2 - Operate on Second Frame"]
122    #[inline(always)]
123    pub fn osf(&mut self) -> OSF_W<OPERATION_MODE_SPEC> {
124        OSF_W::new(self, 2)
125    }
126    #[doc = "Bits 3:4 - Receive Threshold Control"]
127    #[inline(always)]
128    pub fn rtc(&mut self) -> RTC_W<OPERATION_MODE_SPEC> {
129        RTC_W::new(self, 3)
130    }
131    #[doc = "Bit 6 - Forward Undersized Good Frames"]
132    #[inline(always)]
133    pub fn fuf(&mut self) -> FUF_W<OPERATION_MODE_SPEC> {
134        FUF_W::new(self, 6)
135    }
136    #[doc = "Bit 7 - Forward Error Frames"]
137    #[inline(always)]
138    pub fn fef(&mut self) -> FEF_W<OPERATION_MODE_SPEC> {
139        FEF_W::new(self, 7)
140    }
141    #[doc = "Bit 13 - Start or Stop Transmission Command"]
142    #[inline(always)]
143    pub fn st(&mut self) -> ST_W<OPERATION_MODE_SPEC> {
144        ST_W::new(self, 13)
145    }
146    #[doc = "Bits 14:16 - Transmit Threshold Control"]
147    #[inline(always)]
148    pub fn ttc(&mut self) -> TTC_W<OPERATION_MODE_SPEC> {
149        TTC_W::new(self, 14)
150    }
151    #[doc = "Bit 20 - Flush Transmit FIFO"]
152    #[inline(always)]
153    pub fn ftf(&mut self) -> FTF_W<OPERATION_MODE_SPEC> {
154        FTF_W::new(self, 20)
155    }
156    #[doc = "Bit 21 - Transmit Store and Forward"]
157    #[inline(always)]
158    pub fn tsf(&mut self) -> TSF_W<OPERATION_MODE_SPEC> {
159        TSF_W::new(self, 21)
160    }
161    #[doc = "Bit 24 - Disable Flushing of Received Frames"]
162    #[inline(always)]
163    pub fn dff(&mut self) -> DFF_W<OPERATION_MODE_SPEC> {
164        DFF_W::new(self, 24)
165    }
166    #[doc = "Bit 25 - Receive Store and Forward"]
167    #[inline(always)]
168    pub fn rsf(&mut self) -> RSF_W<OPERATION_MODE_SPEC> {
169        RSF_W::new(self, 25)
170    }
171    #[doc = "Bit 26 - Disable Dropping of TCP/IP Checksum Error Frames"]
172    #[inline(always)]
173    pub fn dt(&mut self) -> DT_W<OPERATION_MODE_SPEC> {
174        DT_W::new(self, 26)
175    }
176}
177#[doc = "Operation Mode Register\n\nYou can [`read`](crate::Reg::read) this register and get [`operation_mode::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`operation_mode::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
178pub struct OPERATION_MODE_SPEC;
179impl crate::RegisterSpec for OPERATION_MODE_SPEC {
180    type Ux = u32;
181}
182#[doc = "`read()` method returns [`operation_mode::R`](R) reader structure"]
183impl crate::Readable for OPERATION_MODE_SPEC {}
184#[doc = "`write(|w| ..)` method takes [`operation_mode::W`](W) writer structure"]
185impl crate::Writable for OPERATION_MODE_SPEC {
186    type Safety = crate::Unsafe;
187    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
188    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
189}
190#[doc = "`reset()` method sets OPERATION_MODE to value 0"]
191impl crate::Resettable for OPERATION_MODE_SPEC {
192    const RESET_VALUE: u32 = 0;
193}