libmetal  v2024.05.0
sys.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017, Linaro Limited. and Contributors. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 /*
8  * @file zephyr/sys.h
9  * @brief Zephyr system primitives for libmetal.
10  */
11 
12 #ifndef __METAL_SYS__H__
13 #error "Include metal/sys.h instead of metal/zephyr/sys.h"
14 #endif
15 
16 #ifndef __METAL_ZEPHYR_SYS__H__
17 #define __METAL_ZEPHYR_SYS__H__
18 
19 #include <stdlib.h>
20 #include <zephyr/kernel.h>
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
26 #define METAL_INIT_DEFAULTS \
27 { \
28  .log_handler = metal_zephyr_log_handler, \
29  .log_level = METAL_LOG_INFO, \
30 }
31 
32 #ifndef METAL_MAX_DEVICE_REGIONS
33 #define METAL_MAX_DEVICE_REGIONS 1
34 #endif
35 
37 struct metal_state {
38 
41 };
42 
43 static inline void metal_wait_usec(uint32_t usec_to_wait)
44 {
45  k_busy_wait(usec_to_wait);
46 }
47 
48 #ifdef __cplusplus
49 }
50 #endif
51 
52 #endif /* __METAL_ZEPHYR_SYS__H__ */
System independent runtime state for libmetal.
Definition: sys.h:63
Structure for FreeRTOS libmetal runtime state.
Definition: sys.h:37
struct metal_common_state common
Common (system independent) data.
Definition: sys.h:40
static void metal_wait_usec(uint32_t usec_to_wait)
Definition: sys.h:43