bl61x_pac/hbn/
hbn_bor_cfg.rs1#[doc = "Register `HBN_BOR_CFG` reader"]
2pub type R = crate::R<HBN_BOR_CFG_SPEC>;
3#[doc = "Register `HBN_BOR_CFG` writer"]
4pub type W = crate::W<HBN_BOR_CFG_SPEC>;
5#[doc = "Field `bod_sel` reader - "]
6pub type BOD_SEL_R = crate::BitReader;
7#[doc = "Field `bod_sel` writer - "]
8pub type BOD_SEL_W<'a, REG> = crate::BitWriter<'a, REG>;
9#[doc = "Field `bod_vth` reader - "]
10pub type BOD_VTH_R = crate::FieldReader;
11#[doc = "Field `bod_vth` writer - "]
12pub type BOD_VTH_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
13#[doc = "Field `pu_bod` reader - "]
14pub type PU_BOD_R = crate::BitReader;
15#[doc = "Field `pu_bod` writer - "]
16pub type PU_BOD_W<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `r_bod_out` reader - "]
18pub type R_BOD_OUT_R = crate::BitReader;
19#[doc = "Field `r_bod_out` writer - "]
20pub type R_BOD_OUT_W<'a, REG> = crate::BitWriter<'a, REG>;
21impl R {
22 #[doc = "Bit 0"]
23 #[inline(always)]
24 pub fn bod_sel(&self) -> BOD_SEL_R {
25 BOD_SEL_R::new((self.bits & 1) != 0)
26 }
27 #[doc = "Bits 1:3"]
28 #[inline(always)]
29 pub fn bod_vth(&self) -> BOD_VTH_R {
30 BOD_VTH_R::new(((self.bits >> 1) & 7) as u8)
31 }
32 #[doc = "Bit 4"]
33 #[inline(always)]
34 pub fn pu_bod(&self) -> PU_BOD_R {
35 PU_BOD_R::new(((self.bits >> 4) & 1) != 0)
36 }
37 #[doc = "Bit 5"]
38 #[inline(always)]
39 pub fn r_bod_out(&self) -> R_BOD_OUT_R {
40 R_BOD_OUT_R::new(((self.bits >> 5) & 1) != 0)
41 }
42}
43impl W {
44 #[doc = "Bit 0"]
45 #[inline(always)]
46 #[must_use]
47 pub fn bod_sel(&mut self) -> BOD_SEL_W<HBN_BOR_CFG_SPEC> {
48 BOD_SEL_W::new(self, 0)
49 }
50 #[doc = "Bits 1:3"]
51 #[inline(always)]
52 #[must_use]
53 pub fn bod_vth(&mut self) -> BOD_VTH_W<HBN_BOR_CFG_SPEC> {
54 BOD_VTH_W::new(self, 1)
55 }
56 #[doc = "Bit 4"]
57 #[inline(always)]
58 #[must_use]
59 pub fn pu_bod(&mut self) -> PU_BOD_W<HBN_BOR_CFG_SPEC> {
60 PU_BOD_W::new(self, 4)
61 }
62 #[doc = "Bit 5"]
63 #[inline(always)]
64 #[must_use]
65 pub fn r_bod_out(&mut self) -> R_BOD_OUT_W<HBN_BOR_CFG_SPEC> {
66 R_BOD_OUT_W::new(self, 5)
67 }
68 #[doc = r" Writes raw bits to the register."]
69 #[doc = r""]
70 #[doc = r" # Safety"]
71 #[doc = r""]
72 #[doc = r" Passing incorrect value can cause undefined behaviour. See reference manual"]
73 #[inline(always)]
74 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
75 self.bits = bits;
76 self
77 }
78}
79#[doc = "HBN_BOR_CFG.\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`hbn_bor_cfg::R`](R). You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`hbn_bor_cfg::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
80pub struct HBN_BOR_CFG_SPEC;
81impl crate::RegisterSpec for HBN_BOR_CFG_SPEC {
82 type Ux = u32;
83}
84#[doc = "`read()` method returns [`hbn_bor_cfg::R`](R) reader structure"]
85impl crate::Readable for HBN_BOR_CFG_SPEC {}
86#[doc = "`write(|w| ..)` method takes [`hbn_bor_cfg::W`](W) writer structure"]
87impl crate::Writable for HBN_BOR_CFG_SPEC {
88 const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
89 const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
90}
91#[doc = "`reset()` method sets HBN_BOR_CFG to value 0"]
92impl crate::Resettable for HBN_BOR_CFG_SPEC {
93 const RESET_VALUE: Self::Ux = 0;
94}