py32f0/py32f003/adc/
calrr2.rs

1///Register `CALRR2` reader
2pub struct R(crate::R<CALRR2_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<CALRR2_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<CALRR2_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<CALRR2_SPEC>) -> Self {
13        R(reader)
14    }
15}
16///Field `CALC0OUT` reader - C0 result
17pub type CALC0OUT_R = crate::FieldReader<u8, u8>;
18///Field `CALC1OUT` reader - C1 result
19pub type CALC1OUT_R = crate::FieldReader<u8, u8>;
20///Field `CALC2OUT` reader - C2 result
21pub type CALC2OUT_R = crate::FieldReader<u8, u8>;
22///Field `CALC3OUT` reader - C3 result
23pub type CALC3OUT_R = crate::FieldReader<u8, u8>;
24impl R {
25    ///Bits 0:7 - C0 result
26    #[inline(always)]
27    pub fn calc0out(&self) -> CALC0OUT_R {
28        CALC0OUT_R::new((self.bits & 0xff) as u8)
29    }
30    ///Bits 8:15 - C1 result
31    #[inline(always)]
32    pub fn calc1out(&self) -> CALC1OUT_R {
33        CALC1OUT_R::new(((self.bits >> 8) & 0xff) as u8)
34    }
35    ///Bits 16:23 - C2 result
36    #[inline(always)]
37    pub fn calc2out(&self) -> CALC2OUT_R {
38        CALC2OUT_R::new(((self.bits >> 16) & 0xff) as u8)
39    }
40    ///Bits 24:31 - C3 result
41    #[inline(always)]
42    pub fn calc3out(&self) -> CALC3OUT_R {
43        CALC3OUT_R::new(((self.bits >> 24) & 0xff) as u8)
44    }
45}
46/**ADC calibration result register 2
47
48This register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).
49
50For information about available fields see [calrr2](index.html) module*/
51pub struct CALRR2_SPEC;
52impl crate::RegisterSpec for CALRR2_SPEC {
53    type Ux = u32;
54}
55///`read()` method returns [calrr2::R](R) reader structure
56impl crate::Readable for CALRR2_SPEC {
57    type Reader = R;
58}
59///`reset()` method sets CALRR2 to value 0
60impl crate::Resettable for CALRR2_SPEC {
61    const RESET_VALUE: Self::Ux = 0;
62}