Update example for rand
This commit is contained in:
parent
439092dc59
commit
28c235d786
1 changed files with 6 additions and 0 deletions
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue