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 Nov 1, 2023
1 parent 694620f commit b94c9e1
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(uint32_t usec_to_wait)
{
k_busy_wait(usec_to_wait);
}

#ifdef __cplusplus
}
#endif
Expand Down

0 comments on commit b94c9e1

Please sign in to comment.