Skip to content

Commit

Permalink
Zephyr integration: Add support for hosted test environment
Browse files Browse the repository at this point in the history
Provide the metal_sleep_usec() required for hosted
environments.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
  • Loading branch information
aescolar committed Oct 14, 2023
1 parent a126d5b commit 153430b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/system/zephyr/sys.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#define __METAL_ZEPHYR_SYS__H__

#include <stdlib.h>
#include <zephyr/kernel.h>

#ifdef __cplusplus
extern "C" {
Expand All @@ -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
Expand Down

0 comments on commit 153430b

Please sign in to comment.