reactor-c
C Runtime for Lingua Franca
Loading...
Searching...
No Matches
lf_rp2040_support.h
Go to the documentation of this file.
1/* RP2040 API support for the C target of Lingua Franca */
2
7#ifndef LF_RP2040_SUPPORT_H
8#define LF_RP2040_SUPPORT_H
9
10#include <pico/stdlib.h>
11#include <pico/sync.h>
12
13#define NO_CLI
14#define MINIMAL_STDLIB
15
16// Defines for formatting time in printf for pico
17#define PRINTF_TAG "(" PRINTF_TIME ", " PRINTF_MICROSTEP ")"
18#define PRINTF_TIME "%lld"
19#define PRINTF_MICROSTEP "%d"
20
21#define LF_TIME_BUFFER_LENGTH 80
22#define _LF_TIMEOUT 1
23
24#ifndef LF_SINGLE_THREADED
25#warning "Threaded support on rp2040 is still experimental"
26
27typedef recursive_mutex_t lf_mutex_t;
28typedef struct {
29 semaphore_t notifs[NUM_CORES];
30 lf_mutex_t* mutex;
31} lf_cond_t;
32typedef int lf_thread_t;
33
34#endif // LF_SINGLE_THREADED
35
36#endif // LF_PICO_SUPPORT_H
void * lf_cond_t
Definition lf_arduino_support.h:119
recursive_mutex_t lf_mutex_t
Definition lf_rp2040_support.h:27
int lf_thread_t
Definition lf_rp2040_support.h:32
struct k_mutex lf_mutex_t
Definition lf_zephyr_support.h:46