reactor-c
C Runtime for Lingua Franca
Loading...
Searching...
No Matches
lf_zephyr_board_support.h
Go to the documentation of this file.
1
31#ifndef LF_ZEPHYR_BOARD_SUPPORT_H
32#define LF_ZEPHYR_BOARD_SUPPORT_H
33
34// Default options
35#define LF_ZEPHYR_THREAD_PRIORITY_DEFAULT 5
36#define LF_ZEPHYR_STACK_SIZE_DEFAULT 2048
37
38#if defined(LF_ZEPHYR_CLOCK_COUNTER)
39#if defined(CONFIG_SOC_FAMILY_NRF)
40#define LF_TIMER DT_NODELABEL(timer1)
41#define LF_WAKEUP_OVERHEAD_US 100
42#define LF_MIN_SLEEP_US 10
43#define LF_RUNTIME_OVERHEAD_US 19
44#elif defined(CONFIG_BOARD_ATSAMD20_XPRO)
45#define LF_TIMER DT_NODELABEL(tc4)
46#elif defined(CONFIG_SOC_FAMILY_SAM)
47#define LF_TIMER DT_NODELABEL(tc0)
48#elif defined(CONFIG_COUNTER_MICROCHIP_MCP7940N)
49#define LF_TIMER DT_NODELABEL(extrtc0)
50#elif defined(CONFIG_COUNTER_RTC0)
51#define LF_TIMER DT_NODELABEL(rtc0)
52#elif defined(CONFIG_COUNTER_RTC_STM32)
53#define LF_TIMER DT_INST(0, st_stm32_rtc)
54#elif defined(CONFIG_COUNTER_XLNX_AXI_TIMER)
55#define LF_TIMER DT_INST(0, xlnx_xps_timer_1_00_a)
56#elif defined(CONFIG_COUNTER_TMR_ESP32)
57#define LF_TIMER DT_NODELABEL(timer0)
58#elif defined(CONFIG_COUNTER_MCUX_CTIMER)
59#define LF_TIMER DT_NODELABEL(ctimer0)
60#elif defined(CONFIG_SOC_MIMXRT1176_CM7)
61#define LF_TIMER DT_NODELABEL(gpt2)
62#else
63// This board does not have support for the counter clock. If the user
64// explicitly asked for this cock, then throw an error.
65#error "LF_ZEPHYR_CLOCK_COUNTER was requested but it is not supported by the board"
66#endif
67#ifndef LF_WAKEUP_OVERHEAD_US
68#define LF_WAKEUP_OVERHEAD_US 0
69#endif
70
71#ifndef LF_MIN_SLEEP_US
72#define LF_MIN_SLEEP_US 10
73#endif
74
75#ifndef LF_RUNTIME_OVERHEAD_US
76#define LF_RUNTIME_OVERHEAD_US 0
77#endif
78
79#ifndef LF_TIMER_ALARM_CHANNEL
80#define LF_TIMER_ALARM_CHANNEL 0
81#endif
82#endif
83
84#endif