stm32l4x2_pac/dfsdm/flt/
rdatar.rs

1#[doc = r" Value read from the register"]
2pub struct R {
3    bits: u32,
4}
5impl super::RDATAR {
6    #[doc = r" Reads the contents of the register"]
7    #[inline]
8    pub fn read(&self) -> R {
9        R {
10            bits: self.register.get(),
11        }
12    }
13}
14#[doc = r" Value of the field"]
15pub struct RDATAR {
16    bits: u32,
17}
18impl RDATAR {
19    #[doc = r" Value of the field as raw bits"]
20    #[inline]
21    pub fn bits(&self) -> u32 {
22        self.bits
23    }
24}
25#[doc = r" Value of the field"]
26pub struct RPENDR {
27    bits: bool,
28}
29impl RPENDR {
30    #[doc = r" Value of the field as raw bits"]
31    #[inline]
32    pub fn bit(&self) -> bool {
33        self.bits
34    }
35    #[doc = r" Returns `true` if the bit is clear (0)"]
36    #[inline]
37    pub fn bit_is_clear(&self) -> bool {
38        !self.bit()
39    }
40    #[doc = r" Returns `true` if the bit is set (1)"]
41    #[inline]
42    pub fn bit_is_set(&self) -> bool {
43        self.bit()
44    }
45}
46#[doc = r" Value of the field"]
47pub struct RDATACHR {
48    bits: u8,
49}
50impl RDATACHR {
51    #[doc = r" Value of the field as raw bits"]
52    #[inline]
53    pub fn bits(&self) -> u8 {
54        self.bits
55    }
56}
57impl R {
58    #[doc = r" Value of the register as raw bits"]
59    #[inline]
60    pub fn bits(&self) -> u32 {
61        self.bits
62    }
63    #[doc = "Bits 8:31 - Regular channel conversion data"]
64    #[inline]
65    pub fn rdata(&self) -> RDATAR {
66        let bits = {
67            const MASK: u32 = 16777215;
68            const OFFSET: u8 = 8;
69            ((self.bits >> OFFSET) & MASK as u32) as u32
70        };
71        RDATAR { bits }
72    }
73    #[doc = "Bit 4 - Regular channel pending data"]
74    #[inline]
75    pub fn rpend(&self) -> RPENDR {
76        let bits = {
77            const MASK: bool = true;
78            const OFFSET: u8 = 4;
79            ((self.bits >> OFFSET) & MASK as u32) != 0
80        };
81        RPENDR { bits }
82    }
83    #[doc = "Bits 0:2 - Regular channel most recently converted"]
84    #[inline]
85    pub fn rdatach(&self) -> RDATACHR {
86        let bits = {
87            const MASK: u8 = 7;
88            const OFFSET: u8 = 0;
89            ((self.bits >> OFFSET) & MASK as u32) as u8
90        };
91        RDATACHR { bits }
92    }
93}