1#[doc = "Register `FDR` reader"]
2pub struct R(crate::R<FDR_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<FDR_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<FDR_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<FDR_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Field `R` reader - Receive FIFO Data Count"]
17pub type R_R = crate::FieldReader<u8, u8>;
18#[doc = "Field `T` reader - Transmit FIFO Data Count"]
19pub type T_R = crate::FieldReader<u8, u8>;
20impl R {
21 #[doc = "Bits 0:4 - Receive FIFO Data Count"]
22 #[inline(always)]
23 pub fn r(&self) -> R_R {
24 R_R::new((self.bits & 0x1f) as u8)
25 }
26 #[doc = "Bits 8:12 - Transmit FIFO Data Count"]
27 #[inline(always)]
28 pub fn t(&self) -> T_R {
29 T_R::new(((self.bits >> 8) & 0x1f) as u8)
30 }
31}
32#[doc = "FIFO Data Count Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [fdr](index.html) module"]
33pub struct FDR_SPEC;
34impl crate::RegisterSpec for FDR_SPEC {
35 type Ux = u16;
36}
37#[doc = "`read()` method returns [fdr::R](R) reader structure"]
38impl crate::Readable for FDR_SPEC {
39 type Reader = R;
40}
41#[doc = "`reset()` method sets FDR to value 0"]
42impl crate::Resettable for FDR_SPEC {
43 const RESET_VALUE: Self::Ux = 0;
44}