Use file library of libsyscommon
[platform/adaptation/samsung_exynos/device-manager-plugin-artik.git] / hw / common / common.h
1 /*
2  * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #ifndef __HAL_BACKEND_COMMON_H__
18 #define __HAL_BACKEND_COMMON_H__
19
20 #ifdef FEATURE_DLOG
21     #define LOG_TAG "HAL_BACKEND_DEVICE"
22     #include <dlog.h>
23     #define _D(fmt, args...)    SLOGD(fmt, ##args)
24     #define _I(fmt, args...)    SLOGI(fmt, ##args)
25     #define _W(fmt, args...)    SLOGW(fmt, ##args)
26     #define _E(fmt, args...)    SLOGE(fmt, ##args)
27 #else
28     #define _D(x, ...)
29     #define _I(x, ...)
30     #define _W(x, ...)
31     #define _E(x, ...)
32 #endif
33
34 #define EXPORT __attribute__ ((visibility("default")))
35
36 #define ARRAY_SIZE(name) (sizeof(name)/sizeof(name[0]))
37
38 #endif /* __HAL_BACKEND_COMMON_H__ */