Update example for rand

This commit is contained in:
Dario Nieuwenhuis 2021-04-12 21:00:12 +02:00
parent 439092dc59
commit 28c235d786

View File

@ -80,6 +80,12 @@ async fn main_task(spawner: Spawner) {
}
}
#[no_mangle]
fn _embassy_rand(buf: &mut [u8]) {
use rand_core::{OsRng, RngCore};
OsRng.fill_bytes(buf);
}
static EXECUTOR: Forever<Executor> = Forever::new();
fn main() {