Files
picopal/core_comm.h
2026-08-30 19:27:26 +02:00

19 lines
672 B
C

#pragma once
#include <stdbool.h>
#include <stdint.h>
// The RP2350 multicore FIFO is physically 32 bits wide. Each logical 64-bit
// message is transferred low word first, followed by its high word.
// These functions intentionally enforce the sending/receiving core roles.
// Try to send one word from core 1. Returns false instead of waiting when the
// FIFO is full.
bool core1_to_core0_try_write(uint64_t data);
// Send one word from core 1, waiting until core 0 has made FIFO space.
void core1_to_core0_write_blocking(uint64_t data);
// Try to read one word on core 0. Returns false when no message is available.
bool core0_try_read_from_core1(uint64_t *data);