hil:: rng:: Rng
Generic interface for a 32-bit random number generator.
Implementors should assume the client implements the Client trait.
fn get(&self) -> ReturnCode
Initiate the aquisition of new random number generation.
There are three valid return values:
- SUCCESS: a
randomness_availablecallback will be called in the future when randomness is available.
- FAIL: a
randomness_availablecallback will not be called in the future, because random numbers cannot be generated. This is a general failure condition.
- EOFF: a
randomness_availablecallback will not be called in the future, because the random number generator is off/not powered.
fn cancel(&self) -> ReturnCode
Cancel acquisition of random numbers.
There are two valid return values:
- SUCCESS: an outstanding request from
gethas been cancelled, or there was no oustanding request. No
randomness_availablecallback will be issued.
- FAIL: There will be a randomness_available callback, which may or may not return an error code.