Expand description
Library of randomness structures.
A library for randomness structures including a system call driver for userspace applications to request randomness, entropy conversion, entropy to randomness conversion, and synchronous random number generation.
The RNG accepts a user-defined callback and buffer to hold received randomness. A single command starts the RNG, the callback is called when the requested amount of randomness is received, or the buffer is filled.
§Usage
ⓘ
let rng = static_init!(
capsules::rng::RngDriver<'static, sam4l::trng::Trng>,
capsules::rng::RngDriver::new(&sam4l::trng::TRNG, board_kernel.create_grant(&grant_cap)),
);
sam4l::trng::TRNG.set_client(rng);