From 3c4391763b45c693e54b17b47e9bd65f0b3427c6 Mon Sep 17 00:00:00 2001 From: Kristofer Jonsson Date: Wed, 5 Aug 2020 09:38:40 +0200 Subject: Header cleanup Change-Id: I84754f316ce940917516cb7f5c59189f523d4095 --- src/ethosu_common.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src') 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 +/****************************************************************************** + * 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); -- cgit v1.2.1