1#[doc = "Register `MFSR` reader"]
2pub type R = crate::R<MfsrSpec>;
3#[doc = "Field `TXCOUNT` reader - Transmit FIFO Count"]
4pub type TxcountR = crate::FieldReader;
5#[doc = "Field `RXCOUNT` reader - Receive FIFO Count"]
6pub type RxcountR = crate::FieldReader;
7impl R {
8 #[doc = "Bits 0:2 - Transmit FIFO Count"]
9 #[inline(always)]
10 pub fn txcount(&self) -> TxcountR {
11 TxcountR::new((self.bits & 7) as u8)
12 }
13 #[doc = "Bits 16:18 - Receive FIFO Count"]
14 #[inline(always)]
15 pub fn rxcount(&self) -> RxcountR {
16 RxcountR::new(((self.bits >> 16) & 7) as u8)
17 }
18}
19#[cfg(feature = "debug")]
20impl core::fmt::Debug for R {
21 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
22 f.debug_struct("MFSR")
23 .field("txcount", &self.txcount())
24 .field("rxcount", &self.rxcount())
25 .finish()
26 }
27}
28#[doc = "Controller FIFO Status\n\nYou can [`read`](crate::Reg::read) this register and get [`mfsr::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
29pub struct MfsrSpec;
30impl crate::RegisterSpec for MfsrSpec {
31 type Ux = u32;
32}
33#[doc = "`read()` method returns [`mfsr::R`](R) reader structure"]
34impl crate::Readable for MfsrSpec {}
35#[doc = "`reset()` method sets MFSR to value 0"]
36impl crate::Resettable for MfsrSpec {}