efm32pg1b_pac/acmp0/
status.rs

1///Register `STATUS` reader
2pub type R = crate::R<STATUSrs>;
3///Field `ACMPACT` reader - Analog Comparator Active
4pub type AcmpactR = crate::BitReader;
5///Field `ACMPOUT` reader - Analog Comparator Output
6pub type AcmpoutR = crate::BitReader;
7///Field `APORTCONFLICT` reader - APORT Conflict Output
8pub type AportconflictR = crate::BitReader;
9impl R {
10    ///Bit 0 - Analog Comparator Active
11    #[inline(always)]
12    pub fn acmpact(&self) -> AcmpactR {
13        AcmpactR::new((self.bits & 1) != 0)
14    }
15    ///Bit 1 - Analog Comparator Output
16    #[inline(always)]
17    pub fn acmpout(&self) -> AcmpoutR {
18        AcmpoutR::new(((self.bits >> 1) & 1) != 0)
19    }
20    ///Bit 2 - APORT Conflict Output
21    #[inline(always)]
22    pub fn aportconflict(&self) -> AportconflictR {
23        AportconflictR::new(((self.bits >> 2) & 1) != 0)
24    }
25}
26impl core::fmt::Debug for R {
27    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
28        f.debug_struct("STATUS")
29            .field("acmpact", &self.acmpact())
30            .field("acmpout", &self.acmpout())
31            .field("aportconflict", &self.aportconflict())
32            .finish()
33    }
34}
35///Status Register
36///
37///You can [`read`](crate::Reg::read) this register and get [`status::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api).
38pub struct STATUSrs;
39impl crate::RegisterSpec for STATUSrs {
40    type Ux = u32;
41}
42///`read()` method returns [`status::R`](R) reader structure
43impl crate::Readable for STATUSrs {}
44///`reset()` method sets STATUS to value 0
45impl crate::Resettable for STATUSrs {
46    const RESET_VALUE: u32 = 0;
47}