Module capsules::rng [] [src]

Provides a simple driver for userspace applications to request randomness.

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::SimpleRng<'static, sam4l::trng::Trng>,
        capsules::rng::SimpleRng::new(&sam4l::trng::TRNG, kernel::Grant::create()));
sam4l::trng::TRNG.set_client(rng);

Reexports

use core::cell::Cell;
use kernel::AppId;
use kernel::AppSlice;
use kernel::Callback;
use kernel::Driver;
use kernel::Grant;
use kernel::ReturnCode;
use kernel::Shared;
use kernel::hil::rng;
use kernel::process::Error;

Structs

App
SimpleRng

Constants

DRIVER_NUM

Syscall number