|
nrfcxx
0.1.0
C++-17 Framework for Nordic nRF5 Devices
|
Wrapper around the nRF51 RNG peripheral. More...
#include <nrfcxx/periph.hpp>
Static Public Member Functions | |
| static void * | fill (void *dest, size_t count) |
| Fill a block of memory with random bytes. More... | |
| template<typename T , typename = std::enable_if<std::is_integral<T>::value>> | |
| static T | generate () |
| Generate a random value of the specified type. More... | |
Wrapper around the nRF51 RNG peripheral.
Random bytes are generated in the background and kept in a buffer, from which fill() reads values.
|
static |
Fill a block of memory with random bytes.
| dest | pointer to area to be filled |
| count | number of bytes to be written starting at dest |
dest
|
inlinestatic |
Generate a random value of the specified type.
This delegates to fill() to obtain a block of random octets of the required length.
| T | any integral type |
1.8.16