diff options
Diffstat (limited to 'src/ethosu_common.h')
-rw-r--r-- | src/ethosu_common.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/ethosu_common.h b/src/ethosu_common.h index a5ea197..b22bffd 100644 --- a/src/ethosu_common.h +++ b/src/ethosu_common.h @@ -16,14 +16,22 @@ * limitations under the License. */ -#if !defined ETHOSU_COMMON_H +#ifndef ETHOSU_COMMON_H #define ETHOSU_COMMON_H +/****************************************************************************** + * Includes + ******************************************************************************/ + #include "ethosu55_interface.h" #include "ethosu_device.h" #include <stdio.h> +/****************************************************************************** + * Defines + ******************************************************************************/ + #if defined(DRIVER_LOG_SEVERITY) && (DRIVER_LOG_SEVERITY >= LOG_SEVERITY_EMERG) #define LOG_EMERG(format, ...) \ fprintf(stderr, format, ##__VA_ARGS__); \ @@ -97,6 +105,10 @@ #define MASK_0_31_BITS (0xFFFFFFFF) #define MASK_32_47_BITS (0xFFFF00000000) +/****************************************************************************** + * Inline functions + ******************************************************************************/ + static const __attribute__((section("npu_driver_version"))) char driver_version_str[] = VER_STR( ETHOSU_DRIVER_VERSION_MAJOR) "." VER_STR(ETHOSU_DRIVER_VERSION_MINOR) "." VER_STR(ETHOSU_DRIVER_VERSION_PATCH); |