efm32tg11b120_pac/adc0/
scandatax.rs

1#[doc = "Register `SCANDATAX` reader"]
2pub struct R(crate::R<SCANDATAX_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<SCANDATAX_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<SCANDATAX_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<SCANDATAX_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Field `DATA` reader - Scan Conversion Result Data"]
17pub type DATA_R = crate::FieldReader<u16, u16>;
18#[doc = "Field `SCANINPUTID` reader - Scan Conversion Input ID"]
19pub type SCANINPUTID_R = crate::FieldReader<u8, u8>;
20impl R {
21    #[doc = "Bits 0:15 - Scan Conversion Result Data"]
22    #[inline(always)]
23    pub fn data(&self) -> DATA_R {
24        DATA_R::new((self.bits & 0xffff) as u16)
25    }
26    #[doc = "Bits 16:20 - Scan Conversion Input ID"]
27    #[inline(always)]
28    pub fn scaninputid(&self) -> SCANINPUTID_R {
29        SCANINPUTID_R::new(((self.bits >> 16) & 0x1f) as u8)
30    }
31}
32#[doc = "Scan Sequence Result Data + Data Source 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 [scandatax](index.html) module\n\nOne or more dependent resources other than the current register are immediately affected by a read operation."]
33pub struct SCANDATAX_SPEC;
34impl crate::RegisterSpec for SCANDATAX_SPEC {
35    type Ux = u32;
36}
37#[doc = "`read()` method returns [scandatax::R](R) reader structure"]
38impl crate::Readable for SCANDATAX_SPEC {
39    type Reader = R;
40}
41#[doc = "`reset()` method sets SCANDATAX to value 0"]
42impl crate::Resettable for SCANDATAX_SPEC {
43    #[inline(always)]
44    fn reset_value() -> Self::Ux {
45        0
46    }
47}