Remove rand(), fixes #50

This commit is contained in:
Dario Nieuwenhuis
2021-02-26 01:58:00 +01:00
parent 11be9170ec
commit 17cf301d4f
4 changed files with 1 additions and 27 deletions

View File

@ -13,7 +13,6 @@ pub mod flash;
pub mod gpio;
pub mod interrupt;
pub mod io;
pub mod rand;
pub mod time;
pub mod uart;
pub mod util;

View File

@ -1,15 +0,0 @@
use crate::fmt::*;
pub trait Rand {
fn rand(&self, buf: &mut [u8]);
}
static mut RAND: Option<&'static dyn Rand> = None;
pub unsafe fn set_rand(rand: &'static dyn Rand) {
RAND = Some(rand);
}
pub fn rand(buf: &mut [u8]) {
unsafe { unwrap!(RAND, "No rand set").rand(buf) }
}