efm32pg1b200_pac/adc0/
scandataxp.rs

1#[doc = "Register `SCANDATAXP` reader"]
2pub struct R(crate::R<SCANDATAXP_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<SCANDATAXP_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<SCANDATAXP_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<SCANDATAXP_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Field `DATAP` reader - Scan Conversion Result Data Peek"]
17pub type DATAP_R = crate::FieldReader<u16, u16>;
18#[doc = "Field `SCANINPUTIDPEEK` reader - Scan Conversion Data Source Peek"]
19pub type SCANINPUTIDPEEK_R = crate::FieldReader<u8, u8>;
20impl R {
21    #[doc = "Bits 0:15 - Scan Conversion Result Data Peek"]
22    #[inline(always)]
23    pub fn datap(&self) -> DATAP_R {
24        DATAP_R::new((self.bits & 0xffff) as u16)
25    }
26    #[doc = "Bits 16:20 - Scan Conversion Data Source Peek"]
27    #[inline(always)]
28    pub fn scaninputidpeek(&self) -> SCANINPUTIDPEEK_R {
29        SCANINPUTIDPEEK_R::new(((self.bits >> 16) & 0x1f) as u8)
30    }
31}
32#[doc = "Scan Sequence Result Data + Data Source Peek 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 [scandataxp](index.html) module"]
33pub struct SCANDATAXP_SPEC;
34impl crate::RegisterSpec for SCANDATAXP_SPEC {
35    type Ux = u32;
36}
37#[doc = "`read()` method returns [scandataxp::R](R) reader structure"]
38impl crate::Readable for SCANDATAXP_SPEC {
39    type Reader = R;
40}
41#[doc = "`reset()` method sets SCANDATAXP to value 0"]
42impl crate::Resettable for SCANDATAXP_SPEC {
43    #[inline(always)]
44    fn reset_value() -> Self::Ux {
45        0
46    }
47}