stm32h5/stm32h562/rng/dr.rs
1///Register `DR` reader
2pub type R = crate::R<DRrs>;
3///Field `RNDATA` reader - Random data 32-bit random data which are valid when DRDY=1. When DRDY=0 RNDATA value is zero. It is recommended to always verify that RNG_DR is different from zero. Because when it is the case a seed error occurred between RNG_SR polling and RND_DR output reading (rare event).
4pub type RNDATA_R = crate::FieldReader<u32>;
5impl R {
6 ///Bits 0:31 - Random data 32-bit random data which are valid when DRDY=1. When DRDY=0 RNDATA value is zero. It is recommended to always verify that RNG_DR is different from zero. Because when it is the case a seed error occurred between RNG_SR polling and RND_DR output reading (rare event).
7 #[inline(always)]
8 pub fn rndata(&self) -> RNDATA_R {
9 RNDATA_R::new(self.bits)
10 }
11}
12impl core::fmt::Debug for R {
13 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
14 f.debug_struct("DR")
15 .field("rndata", &self.rndata())
16 .finish()
17 }
18}
19/**RNG data register
20
21You can [`read`](crate::Reg::read) this register and get [`dr::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api).
22
23See register [structure](https://stm32-rs.github.io/stm32-rs/STM32H562.html#RNG:DR)*/
24pub struct DRrs;
25impl crate::RegisterSpec for DRrs {
26 type Ux = u32;
27}
28///`read()` method returns [`dr::R`](R) reader structure
29impl crate::Readable for DRrs {}
30///`reset()` method sets DR to value 0
31impl crate::Resettable for DRrs {}