stm32wb_pac/pwr/
sr2.rs

1#[doc = "Reader of register SR2"]
2pub type R = crate::R<u32, super::SR2>;
3#[doc = "Reader of field `PVMO3`"]
4pub type PVMO3_R = crate::R<bool, bool>;
5#[doc = "Reader of field `PVMO1`"]
6pub type PVMO1_R = crate::R<bool, bool>;
7#[doc = "Reader of field `PVDO`"]
8pub type PVDO_R = crate::R<bool, bool>;
9#[doc = "Reader of field `VOSF`"]
10pub type VOSF_R = crate::R<bool, bool>;
11#[doc = "Reader of field `REGLPF`"]
12pub type REGLPF_R = crate::R<bool, bool>;
13#[doc = "Reader of field `REGLPS`"]
14pub type REGLPS_R = crate::R<bool, bool>;
15#[doc = "Reader of field `SDSMPSF`"]
16pub type SDSMPSF_R = crate::R<bool, bool>;
17#[doc = "Reader of field `SDBF`"]
18pub type SDBF_R = crate::R<bool, bool>;
19impl R {
20    #[doc = "Bit 14 - Peripheral voltage monitoring output: VDDA vs. 1.62 V"]
21    #[inline(always)]
22    pub fn pvmo3(&self) -> PVMO3_R {
23        PVMO3_R::new(((self.bits >> 14) & 0x01) != 0)
24    }
25    #[doc = "Bit 12 - Peripheral voltage monitoring output: VDDUSB vs. 1.2 V"]
26    #[inline(always)]
27    pub fn pvmo1(&self) -> PVMO1_R {
28        PVMO1_R::new(((self.bits >> 12) & 0x01) != 0)
29    }
30    #[doc = "Bit 11 - Power voltage detector output"]
31    #[inline(always)]
32    pub fn pvdo(&self) -> PVDO_R {
33        PVDO_R::new(((self.bits >> 11) & 0x01) != 0)
34    }
35    #[doc = "Bit 10 - Voltage scaling flag"]
36    #[inline(always)]
37    pub fn vosf(&self) -> VOSF_R {
38        VOSF_R::new(((self.bits >> 10) & 0x01) != 0)
39    }
40    #[doc = "Bit 9 - Low-power regulator flag"]
41    #[inline(always)]
42    pub fn reglpf(&self) -> REGLPF_R {
43        REGLPF_R::new(((self.bits >> 9) & 0x01) != 0)
44    }
45    #[doc = "Bit 8 - Low-power regulator started"]
46    #[inline(always)]
47    pub fn reglps(&self) -> REGLPS_R {
48        REGLPS_R::new(((self.bits >> 8) & 0x01) != 0)
49    }
50    #[doc = "Bit 1 - Step Down converter SMPS mode flag"]
51    #[inline(always)]
52    pub fn sdsmpsf(&self) -> SDSMPSF_R {
53        SDSMPSF_R::new(((self.bits >> 1) & 0x01) != 0)
54    }
55    #[doc = "Bit 0 - Step Down converter Bypass mode flag"]
56    #[inline(always)]
57    pub fn sdbf(&self) -> SDBF_R {
58        SDBF_R::new((self.bits & 0x01) != 0)
59    }
60}