Adding functions for calling random in core0.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos
2022-09-16 00:49:10 +02:00
parent 4c49e59edc
commit 68f43f3cb2
4 changed files with 26 additions and 2 deletions

View File

@@ -176,6 +176,17 @@ void neug_wait_full(void) { //should be called only on core1
}
}
void neug_wait_full_ext(bool blocking) {
struct rng_rb *rb = &the_ring_buffer;
while (!rb->full) {
if (blocking == true)
sleep_ms(1);
else
neug_task();
}
}
void neug_fini(void) {
neug_get();
}