efm32pg22_pac/efm32pg22c200/dcdc_ns/
status.rs

1#[doc = "Register `STATUS` reader"]
2pub struct R(crate::R<STATUS_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<STATUS_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<STATUS_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<STATUS_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Field `BYPSW` reader - Bypass Switch is currently enabled"]
17pub type BYPSW_R = crate::BitReader<bool>;
18#[doc = "Field `WARM` reader - DCDC Warmup Done"]
19pub type WARM_R = crate::BitReader<bool>;
20#[doc = "Field `RUNNING` reader - DCDC is running"]
21pub type RUNNING_R = crate::BitReader<bool>;
22#[doc = "Field `VREGIN` reader - VREGVDD comparator status"]
23pub type VREGIN_R = crate::BitReader<bool>;
24#[doc = "Field `BYPCMPOUT` reader - Bypass Comparator Output"]
25pub type BYPCMPOUT_R = crate::BitReader<bool>;
26impl R {
27    #[doc = "Bit 0 - Bypass Switch is currently enabled"]
28    #[inline(always)]
29    pub fn bypsw(&self) -> BYPSW_R {
30        BYPSW_R::new((self.bits & 1) != 0)
31    }
32    #[doc = "Bit 1 - DCDC Warmup Done"]
33    #[inline(always)]
34    pub fn warm(&self) -> WARM_R {
35        WARM_R::new(((self.bits >> 1) & 1) != 0)
36    }
37    #[doc = "Bit 2 - DCDC is running"]
38    #[inline(always)]
39    pub fn running(&self) -> RUNNING_R {
40        RUNNING_R::new(((self.bits >> 2) & 1) != 0)
41    }
42    #[doc = "Bit 3 - VREGVDD comparator status"]
43    #[inline(always)]
44    pub fn vregin(&self) -> VREGIN_R {
45        VREGIN_R::new(((self.bits >> 3) & 1) != 0)
46    }
47    #[doc = "Bit 4 - Bypass Comparator Output"]
48    #[inline(always)]
49    pub fn bypcmpout(&self) -> BYPCMPOUT_R {
50        BYPCMPOUT_R::new(((self.bits >> 4) & 1) != 0)
51    }
52}
53#[doc = "DCDC Status 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 [status](index.html) module"]
54pub struct STATUS_SPEC;
55impl crate::RegisterSpec for STATUS_SPEC {
56    type Ux = u32;
57}
58#[doc = "`read()` method returns [status::R](R) reader structure"]
59impl crate::Readable for STATUS_SPEC {
60    type Reader = R;
61}
62#[doc = "`reset()` method sets STATUS to value 0"]
63impl crate::Resettable for STATUS_SPEC {
64    const RESET_VALUE: Self::Ux = 0;
65}