1#[doc = "Register `PARAM` reader"]
2pub type R = crate::R<ParamSpec>;
3#[doc = "Field `TXFIFO` reader - Transmit FIFO Size"]
4pub type TxfifoR = crate::FieldReader;
5#[doc = "Field `RXFIFO` reader - Receive FIFO Size"]
6pub type RxfifoR = crate::FieldReader;
7#[doc = "Field `PCSNUM` reader - PCS Number"]
8pub type PcsnumR = crate::FieldReader;
9impl R {
10 #[doc = "Bits 0:7 - Transmit FIFO Size"]
11 #[inline(always)]
12 pub fn txfifo(&self) -> TxfifoR {
13 TxfifoR::new((self.bits & 0xff) as u8)
14 }
15 #[doc = "Bits 8:15 - Receive FIFO Size"]
16 #[inline(always)]
17 pub fn rxfifo(&self) -> RxfifoR {
18 RxfifoR::new(((self.bits >> 8) & 0xff) as u8)
19 }
20 #[doc = "Bits 16:23 - PCS Number"]
21 #[inline(always)]
22 pub fn pcsnum(&self) -> PcsnumR {
23 PcsnumR::new(((self.bits >> 16) & 0xff) as u8)
24 }
25}
26#[cfg(feature = "debug")]
27impl core::fmt::Debug for R {
28 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
29 f.debug_struct("PARAM")
30 .field("txfifo", &self.txfifo())
31 .field("rxfifo", &self.rxfifo())
32 .field("pcsnum", &self.pcsnum())
33 .finish()
34 }
35}
36#[doc = "Parameter\n\nYou can [`read`](crate::Reg::read) this register and get [`param::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
37pub struct ParamSpec;
38impl crate::RegisterSpec for ParamSpec {
39 type Ux = u32;
40}
41#[doc = "`read()` method returns [`param::R`](R) reader structure"]
42impl crate::Readable for ParamSpec {}
43#[doc = "`reset()` method sets PARAM to value 0x0004_0202"]
44impl crate::Resettable for ParamSpec {
45 const RESET_VALUE: u32 = 0x0004_0202;
46}