stm32l4x2_pac/adc/
dr.rs

1#[doc = r" Value read from the register"]
2pub struct R {
3    bits: u32,
4}
5impl super::DR {
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 REGULARDATAR {
16    bits: u16,
17}
18impl REGULARDATAR {
19    #[doc = r" Value of the field as raw bits"]
20    #[inline]
21    pub fn bits(&self) -> u16 {
22        self.bits
23    }
24}
25impl R {
26    #[doc = r" Value of the register as raw bits"]
27    #[inline]
28    pub fn bits(&self) -> u32 {
29        self.bits
30    }
31    #[doc = "Bits 0:15 - regularDATA"]
32    #[inline]
33    pub fn regular_data(&self) -> REGULARDATAR {
34        let bits = {
35            const MASK: u16 = 65535;
36            const OFFSET: u8 = 0;
37            ((self.bits >> OFFSET) & MASK as u32) as u16
38        };
39        REGULARDATAR { bits }
40    }
41}