rp2040_pac/dma/
fifo_levels.rs
1#[doc = "Register `FIFO_LEVELS` reader"]
2pub type R = crate::R<FIFO_LEVELS_SPEC>;
3#[doc = "Field `TDF_LVL` reader - Current Transfer-Data-FIFO fill level"]
4pub type TDF_LVL_R = crate::FieldReader;
5#[doc = "Field `WAF_LVL` reader - Current Write-Address-FIFO fill level"]
6pub type WAF_LVL_R = crate::FieldReader;
7#[doc = "Field `RAF_LVL` reader - Current Read-Address-FIFO fill level"]
8pub type RAF_LVL_R = crate::FieldReader;
9impl R {
10 #[doc = "Bits 0:7 - Current Transfer-Data-FIFO fill level"]
11 #[inline(always)]
12 pub fn tdf_lvl(&self) -> TDF_LVL_R {
13 TDF_LVL_R::new((self.bits & 0xff) as u8)
14 }
15 #[doc = "Bits 8:15 - Current Write-Address-FIFO fill level"]
16 #[inline(always)]
17 pub fn waf_lvl(&self) -> WAF_LVL_R {
18 WAF_LVL_R::new(((self.bits >> 8) & 0xff) as u8)
19 }
20 #[doc = "Bits 16:23 - Current Read-Address-FIFO fill level"]
21 #[inline(always)]
22 pub fn raf_lvl(&self) -> RAF_LVL_R {
23 RAF_LVL_R::new(((self.bits >> 16) & 0xff) as u8)
24 }
25}
26#[doc = "Debug RAF, WAF, TDF levels
27
28You can [`read`](crate::generic::Reg::read) this register and get [`fifo_levels::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
29pub struct FIFO_LEVELS_SPEC;
30impl crate::RegisterSpec for FIFO_LEVELS_SPEC {
31 type Ux = u32;
32}
33#[doc = "`read()` method returns [`fifo_levels::R`](R) reader structure"]
34impl crate::Readable for FIFO_LEVELS_SPEC {}
35#[doc = "`reset()` method sets FIFO_LEVELS to value 0"]
36impl crate::Resettable for FIFO_LEVELS_SPEC {
37 const RESET_VALUE: u32 = 0;
38}