stm32g0/stm32g041/rng/
cr.rs1pub type R = crate::R<CRrs>;
3pub type W = crate::W<CRrs>;
5pub type RNGEN_R = crate::BitReader;
7pub type RNGEN_W<'a, REG> = crate::BitWriter<'a, REG>;
9pub type IE_R = crate::BitReader;
11pub type IE_W<'a, REG> = crate::BitWriter<'a, REG>;
13pub type CED_R = crate::BitReader;
15pub type CED_W<'a, REG> = crate::BitWriter<'a, REG>;
17pub type BYP_R = crate::BitReader;
19pub type BYP_W<'a, REG> = crate::BitWriter<'a, REG>;
21impl R {
22 #[inline(always)]
24 pub fn rngen(&self) -> RNGEN_R {
25 RNGEN_R::new(((self.bits >> 2) & 1) != 0)
26 }
27 #[inline(always)]
29 pub fn ie(&self) -> IE_R {
30 IE_R::new(((self.bits >> 3) & 1) != 0)
31 }
32 #[inline(always)]
34 pub fn ced(&self) -> CED_R {
35 CED_R::new(((self.bits >> 5) & 1) != 0)
36 }
37 #[inline(always)]
39 pub fn byp(&self) -> BYP_R {
40 BYP_R::new(((self.bits >> 6) & 1) != 0)
41 }
42}
43impl core::fmt::Debug for R {
44 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
45 f.debug_struct("CR")
46 .field("rngen", &self.rngen())
47 .field("ie", &self.ie())
48 .field("ced", &self.ced())
49 .field("byp", &self.byp())
50 .finish()
51 }
52}
53impl W {
54 #[inline(always)]
56 pub fn rngen(&mut self) -> RNGEN_W<CRrs> {
57 RNGEN_W::new(self, 2)
58 }
59 #[inline(always)]
61 pub fn ie(&mut self) -> IE_W<CRrs> {
62 IE_W::new(self, 3)
63 }
64 #[inline(always)]
66 pub fn ced(&mut self) -> CED_W<CRrs> {
67 CED_W::new(self, 5)
68 }
69 #[inline(always)]
71 pub fn byp(&mut self) -> BYP_W<CRrs> {
72 BYP_W::new(self, 6)
73 }
74}
75pub struct CRrs;
81impl crate::RegisterSpec for CRrs {
82 type Ux = u32;
83}
84impl crate::Readable for CRrs {}
86impl crate::Writable for CRrs {
88 type Safety = crate::Unsafe;
89}
90impl crate::Resettable for CRrs {}