[riot-notifications] [RIOT-OS/RIOT] periph/hwrng: Introduce generic hwrng_read(), allow for leaner HWRNG implementations (#11924)

Martine Lenders notifications at github.com
Fri Jul 26 13:53:42 CEST 2019


miri64 commented on this pull request.



> @@ -59,6 +105,17 @@ void hwrng_init(void);
  */
 void hwrng_read(void *buf, unsigned int num);
 
+/**
+ * @brief   Read a single random word.
+ *
+ * The read function does not power on the HWRNG MCU peripheral, the caller
+ * is responsible for calling hwrng_poweron() / hwrng_poweroff() manually if
+ * HWRNG_HAS_POWERONOFF = 1.
+ *
+ * @return  The random number.
+ */
+uint32_t hwrand(void);

Shouldn't this have a name more in line with the name space. To take from [`random`](https://doc.riot-os.org/group__sys__random.html), how about

```C
uint32_t hwrng_uint32(void);
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/11924#pullrequestreview-267142980
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190726/87376cb2/attachment.htm>


More information about the notifications mailing list