diff options
author | Yunhee Seo <yuni.seo@samsung.com> | 2024-06-27 17:24:20 +0900 |
---|---|---|
committer | Yunhee Seo <yuni.seo@samsung.com> | 2024-07-04 12:49:10 +0900 |
commit | ee274f13cd5cfac010466ca878129acc4ddc5502 (patch) | |
tree | dc5c6214a3962daeb047a81e1f39c09f0c455868 /include | |
parent | d4bd8cd1c172864a161fd2e1704a5926e0c9e7b8 (diff) | |
download | device-c4-ee274f13cd5cfac010466ca878129acc4ddc5502.tar.gz device-c4-ee274f13cd5cfac010466ca878129acc4ddc5502.tar.bz2 device-c4-ee274f13cd5cfac010466ca878129acc4ddc5502.zip |
Use only hal-rootstrap package to buildaccepted/tizen/unified/dev/20240708.001605accepted/tizen/unified/20240704.173835
As support hal-abi-versioning, the hal-backend package should be built
using only the hal-rootstrap.
Other packages not included in the hal-roostrap have been deleted to remove dependencies.
util is added to replace functions of dlog and libsyscommon package
Change-Id: Ib9f0dcc85e7182bf83ccabdf6add27f88463d1e3
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/util.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/include/util.h b/include/util.h new file mode 100644 index 0000000..2a510ac --- /dev/null +++ b/include/util.h @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2024 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifdef FEATURE_DLOG + #define LOG_TAG "HAL_BACKEND_DEVICE_C4" + #include <dlog.h> + #define _D(fmt, args...) dlog_print(DLOG_DEBUG, LOG_TAG, fmt, ##args) + #define _I(fmt, args...) dlog_print(DLOG_INFO, LOG_TAG, fmt, ##args) + #define _W(fmt, args...) dlog_print(DLOG_WARN, LOG_TAG, fmt, ##args) + #define _E(fmt, args...) dlog_print(DLOG_ERROR, LOG_TAG, fmt, ##args) +#else + #define _D(x, ...) + #define _I(x, ...) + #define _W(x, ...) + #define _E(x, ...) +#endif + +#define EXPORT __attribute__ ((visibility("default"))) + +#define ARRAY_SIZE(name) (sizeof(name)/sizeof(name[0])) +#define MAX_BUF_SIZE 255 + +int sysfs_read_int(char *path, int *val); +int sysfs_read_str(char *path, char *str, int len); +int sysfs_write_buf(char *path, char *buf); +int sysfs_write_int(char *path, int val); +int sysfs_write_str(char *path, char *str);
\ No newline at end of file |