mirror of
https://github.com/polhenarejos/pico-keys-sdk
synced 2026-05-11 01:38:26 +02:00
No more discrimination related with core0/core1. using get_core_num() returns the core number.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
@@ -168,19 +168,11 @@ uint32_t neug_get() {
|
||||
return v;
|
||||
}
|
||||
|
||||
void neug_wait_full(void) { //should be called only on core1
|
||||
void neug_wait_full() {
|
||||
struct rng_rb *rb = &the_ring_buffer;
|
||||
|
||||
uint core = get_core_num();
|
||||
while (!rb->full) {
|
||||
sleep_ms(1);
|
||||
}
|
||||
}
|
||||
|
||||
void neug_wait_full_ext(bool blocking) {
|
||||
struct rng_rb *rb = &the_ring_buffer;
|
||||
|
||||
while (!rb->full) {
|
||||
if (blocking == true)
|
||||
if (core == 1)
|
||||
sleep_ms(1);
|
||||
else
|
||||
neug_task();
|
||||
|
||||
Reference in New Issue
Block a user