From 37b06afdb2853d3a603ca0160b762406aa8bb08b Mon Sep 17 00:00:00 2001 From: Alberto Escolar Piedras Date: Fri, 13 Oct 2023 18:33:02 +0200 Subject: [PATCH] Zephyr integration: Add support for hosted test environment Provide the metal_sleep_usec() required for hosted environments. Signed-off-by: Alberto Escolar Piedras --- lib/system/zephyr/sys.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/system/zephyr/sys.h b/lib/system/zephyr/sys.h index 9133e105..781c8871 100644 --- a/lib/system/zephyr/sys.h +++ b/lib/system/zephyr/sys.h @@ -17,6 +17,7 @@ #define __METAL_ZEPHYR_SYS__H__ #include +#include #ifdef __cplusplus extern "C" { @@ -39,6 +40,11 @@ struct metal_state { struct metal_common_state common; }; +static inline void metal_wait_usec(void) +{ + k_busy_wait(1); +} + #ifdef __cplusplus } #endif