Adding support for generating more than 32 bytes at a time.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos
2022-03-04 10:46:10 +01:00
parent 41f0b53dd5
commit 59833d08eb
7 changed files with 28 additions and 24 deletions

10
neug.c
View File

@@ -62,7 +62,6 @@ static void ep_init (int mode)
/* Here, we assume a little endian architecture. */
static int ep_process (int mode)
{
if (ep_round == 0)
{
ep_init(mode);
@@ -259,13 +258,16 @@ uint32_t neug_get (int kick)
return v;
}
void neug_wait_full (void)
void neug_wait_full (void) //should be called only on core1
{
struct rng_rb *rb = &the_ring_buffer;
//chopstx_mutex_lock (&rb->m);
while (!rb->full)
neug_task(); //chopstx_cond_wait (&rb->data_available, &rb->m);
while (!rb->full) {
printf("not full yet!\r\n");
//neug_task(); //chopstx_cond_wait (&rb->data_available, &rb->m);
sleep_ms(1);
}
//chopstx_mutex_unlock (&rb->m);
}