Skip to content

Commit ff5a458

Browse files
Jyri Sarhakartben
authored andcommitted
drivers: timer: Export sys_clock_cycle_get_64() implementations
Export sys_clock_cycle_get_64() implementations to enable k_cycle_get_64() calls from llext libraries. Signed-off-by: Jyri Sarha <[email protected]>
1 parent 42ad39b commit ff5a458

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

drivers/timer/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
zephyr_library()
44
zephyr_library_sources(sys_clock_init.c)
5+
zephyr_library_sources_ifdef(CONFIG_LLEXT export.c)
56
zephyr_library_sources_ifdef(CONFIG_ALTERA_AVALON_TIMER altera_avalon_timer_hal.c)
67
zephyr_library_sources_ifdef(CONFIG_AMBIQ_STIMER_TIMER ambiq_stimer.c)
78
zephyr_library_sources_ifdef(CONFIG_APIC_TIMER apic_timer.c)

drivers/timer/export.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/*
2+
* Copyright (c) 2024 Intel Corporation
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <zephyr/drivers/timer/system_timer.h>
8+
#include <zephyr/llext/symbol.h>
9+
#include <limits.h>
10+
11+
#ifdef CONFIG_TIMER_HAS_64BIT_CYCLE_COUNTER
12+
EXPORT_SYMBOL(sys_clock_cycle_get_64);
13+
#endif

0 commit comments

Comments
 (0)