efm32gg11b510_pac/emu/
r5vstatus.rs1#[doc = "Register `R5VSTATUS` reader"]
2pub struct R(crate::R<R5VSTATUS_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<R5VSTATUS_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<R5VSTATUS_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<R5VSTATUS_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Field `VREGIDET` reader - VREGI Detected"]
17pub type VREGIDET_R = crate::BitReader<bool>;
18#[doc = "Field `VREGODET` reader - VREGO Detected"]
19pub type VREGODET_R = crate::BitReader<bool>;
20#[doc = "Field `VBUSGTVREGI` reader - Output of the Supply Comparator Between VBUS and VREGI"]
21pub type VBUSGTVREGI_R = crate::BitReader<bool>;
22#[doc = "Field `LDODROPOUTDET` reader - Regulator Dropout Detection"]
23pub type LDODROPOUTDET_R = crate::BitReader<bool>;
24#[doc = "Field `COLDSTART` reader - Indicates If the Regulator is Going Through a Cold Start"]
25pub type COLDSTART_R = crate::BitReader<bool>;
26impl R {
27 #[doc = "Bit 0 - VREGI Detected"]
28 #[inline(always)]
29 pub fn vregidet(&self) -> VREGIDET_R {
30 VREGIDET_R::new((self.bits & 1) != 0)
31 }
32 #[doc = "Bit 2 - VREGO Detected"]
33 #[inline(always)]
34 pub fn vregodet(&self) -> VREGODET_R {
35 VREGODET_R::new(((self.bits >> 2) & 1) != 0)
36 }
37 #[doc = "Bit 3 - Output of the Supply Comparator Between VBUS and VREGI"]
38 #[inline(always)]
39 pub fn vbusgtvregi(&self) -> VBUSGTVREGI_R {
40 VBUSGTVREGI_R::new(((self.bits >> 3) & 1) != 0)
41 }
42 #[doc = "Bit 4 - Regulator Dropout Detection"]
43 #[inline(always)]
44 pub fn ldodropoutdet(&self) -> LDODROPOUTDET_R {
45 LDODROPOUTDET_R::new(((self.bits >> 4) & 1) != 0)
46 }
47 #[doc = "Bit 5 - Indicates If the Regulator is Going Through a Cold Start"]
48 #[inline(always)]
49 pub fn coldstart(&self) -> COLDSTART_R {
50 COLDSTART_R::new(((self.bits >> 5) & 1) != 0)
51 }
52}
53#[doc = "5V Detector 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 [r5vstatus](index.html) module"]
54pub struct R5VSTATUS_SPEC;
55impl crate::RegisterSpec for R5VSTATUS_SPEC {
56 type Ux = u32;
57}
58#[doc = "`read()` method returns [r5vstatus::R](R) reader structure"]
59impl crate::Readable for R5VSTATUS_SPEC {
60 type Reader = R;
61}
62#[doc = "`reset()` method sets R5VSTATUS to value 0x20"]
63impl crate::Resettable for R5VSTATUS_SPEC {
64 #[inline(always)]
65 fn reset_value() -> Self::Ux {
66 0x20
67 }
68}