SET(PREFIX ${CMAKE_INSTALL_PREFIX})
-INCLUDE_DIRECTORIES(../common)
-
INCLUDE(FindPkgConfig)
-pkg_check_modules(hal-backend-device-battery_pkgs REQUIRED dlog glib-2.0 libudev)
+pkg_check_modules(hal-backend-device-battery_pkgs REQUIRED hal-backend-device-common glib-2.0 libudev)
FOREACH(flag ${hal-backend-device-battery_pkgs_CFLAGS})
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
#include <hal/hal-common-interface.h>
#include <libsyscommon/file.h>
-#include "common.h"
+#include </hal/include/device/hal-backend-common.h>
+
#include "../udev.h"
#define BATTERY_ROOT_PATH "/sys/class/power_supply"
SET(PREFIX ${CMAKE_INSTALL_PREFIX})
-INCLUDE_DIRECTORIES(../common)
-
INCLUDE(FindPkgConfig)
-pkg_check_modules(hal-backend-device-board_pkgs REQUIRED dlog)
+pkg_check_modules(hal-backend-device-board_pkgs REQUIRED hal-backend-device-common)
FOREACH(flag ${hal-backend-device-board_pkgs_CFLAGS})
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
#include <errno.h>
#include <string.h>
-#include "common.h"
+#include </hal/include/device/hal-backend-common.h>
#define DATA_BUFF_MAX 256
+++ /dev/null
-/*
- * Copyright (c) 2021 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.
- */
-
-#ifndef __HAL_BACKEND_COMMON_H__
-#define __HAL_BACKEND_COMMON_H__
-
-#ifdef FEATURE_DLOG
- #define LOG_TAG "HAL_BACKEND_DEVICE"
- #include <dlog.h>
- #define _D(fmt, args...) SLOGD(fmt, ##args)
- #define _I(fmt, args...) SLOGI(fmt, ##args)
- #define _W(fmt, args...) SLOGW(fmt, ##args)
- #define _E(fmt, args...) SLOGE(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]))
-
-#endif /* __HAL_BACKEND_COMMON_H__ */
SET(PREFIX ${CMAKE_INSTALL_PREFIX})
-INCLUDE_DIRECTORIES(../common)
-
INCLUDE(FindPkgConfig)
-pkg_check_modules(hal-backend-device-display_pkgs REQUIRED dlog)
+pkg_check_modules(hal-backend-device-display_pkgs REQUIRED hal-backend-device-common)
FOREACH(flag ${hal-backend-device-display_pkgs_CFLAGS})
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
#include <hal/device/hal-display-interface.h>
#include <hal/hal-common-interface.h>
#include <libsyscommon/file.h>
-#include "common.h"
+
+#include </hal/include/device/hal-backend-common.h>
#ifndef BACKLIGHT_PATH
#define BACKLIGHT_PATH "/sys/class/backlight/panel"
SET(PREFIX ${CMAKE_INSTALL_PREFIX})
-INCLUDE_DIRECTORIES(../common)
-
INCLUDE(FindPkgConfig)
-pkg_check_modules(hal-backend-device-external-connection_pkgs REQUIRED dlog glib-2.0 libudev)
+pkg_check_modules(hal-backend-device-external-connection_pkgs REQUIRED hal-backend-device-common glib-2.0 libudev)
FOREACH(flag ${hal-backend-device-external-connection_pkgs_CFLAGS})
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
#include <hal/device/hal-external_connection-interface.h>
#include <hal/hal-common-interface.h>
-#include "common.h"
+#include </hal/include/device/hal-backend-common.h>
+
#include "../udev.h"
#define SWITCH_ROOT_PATH "/sys/devices/virtual/switch"
SET(PREFIX ${CMAKE_INSTALL_PREFIX})
-INCLUDE_DIRECTORIES(../common)
-
INCLUDE(FindPkgConfig)
pkg_check_modules(haptic_pkgs REQUIRED
- dlog
+ hal-backend-device-common
glib-2.0
libsyscommon)
#include <libsyscommon/list.h>
#include <hal/device/hal-haptic-interface.h>
-#include "common.h"
+#include </hal/include/device/hal-backend-common.h>
#define MAX_MAGNITUDE 0xFFFF
#define PERIODIC_MAX_MAGNITUDE 0x7FFF /* 0.5 * MAX_MAGNITUDE */
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT(hal-backend-device-ir C)
-INCLUDE_DIRECTORIES(../common)
-
INCLUDE(FindPkgConfig)
-pkg_check_modules(pkgs REQUIRED dlog)
+pkg_check_modules(pkgs REQUIRED hal-backend-device-common)
FOREACH(flag ${pkgs_CFLAGS})
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
#include <hal/hal-common-interface.h>
#include <libsyscommon/file.h>
-#include "common.h"
+#include </hal/include/device/hal-backend-common.h>
#define IRLED_CONTROL_PATH "/sys/class/sec/sec_ir/ir_send"
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT(hal-backend-device-led C)
-INCLUDE_DIRECTORIES(../common)
-
INCLUDE(FindPkgConfig)
-pkg_check_modules(pkgs REQUIRED dlog)
+pkg_check_modules(pkgs REQUIRED hal-backend-device-common)
FOREACH(flag ${pkgs_CFLAGS})
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
#include <hal/hal-common-interface.h>
#include <libsyscommon/file.h>
-#include "common.h"
+#include </hal/include/device/hal-backend-common.h>
#ifndef CAMERA_BACK_PATH
#define CAMERA_BACK_PATH "/sys/class/leds/torch-sec1"
SET(PREFIX ${CMAKE_INSTALL_PREFIX})
-INCLUDE_DIRECTORIES(../common)
-
INCLUDE(FindPkgConfig)
-pkg_check_modules(hal-backend-device-thermal_pkgs REQUIRED dlog glib-2.0)
+pkg_check_modules(hal-backend-device-thermal_pkgs REQUIRED hal-backend-device-common glib-2.0)
FOREACH(flag ${hal-backend-device-thermal_pkgs_CFLAGS})
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
#include <hal/device/hal-thermal-interface.h>
#include <hal/hal-common-interface.h>
-#include "common.h"
+#include </hal/include/device/hal-backend-common.h>
#define AP_PATH "/sys/class/sec/temperature/ap_therm"
#define BATTERY_PATH "/sys/class/sec/temperature/batt_therm"
SET(PREFIX ${CMAKE_INSTALL_PREFIX})
-INCLUDE_DIRECTORIES(../common)
-
INCLUDE(FindPkgConfig)
-pkg_check_modules(hal-backend-device-touchscreen_pkgs REQUIRED dlog)
+pkg_check_modules(hal-backend-device-touchscreen_pkgs REQUIRED hal-backend-device-common)
FOREACH(flag ${hal-backend-device-touchscreen_pkgs_CFLAGS})
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
#include <hal/hal-common-interface.h>
#include <libsyscommon/file.h>
-#include "common.h"
+#include </hal/include/device/hal-backend-common.h>
#define INPUT_PATH "/sys/class/input/"
#define KEY_CAPABILITIES_PATH "/device/capabilities/key"
#include <libudev.h>
#include <glib.h>
#include <string.h>
-#include "common.h"
#include "udev.h"
+#include </hal/include/device/hal-backend-common.h>
+
#define EVENT_KERNEL "kernel"
#define EVENT_UDEV "udev"
SET(PREFIX ${CMAKE_INSTALL_PREFIX})
-INCLUDE_DIRECTORIES(../common)
-
INCLUDE(FindPkgConfig)
-pkg_check_modules(hal-backend-device-usb-gadget_pkgs REQUIRED dlog hal-backend-device-common)
+pkg_check_modules(hal-backend-device-usb-gadget_pkgs REQUIRED hal-backend-device-common)
FOREACH(flag ${hal-backend-device-usb-gadget_pkgs_CFLAGS})
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
#include <hal/device/hal-usb_gadget-interface.h>
#include </hal/include/device/hal-backend-common-usb_gadget.h>
-
-#include "common.h"
+#include </hal/include/device/hal-backend-common.h>
static int usb_gadget_init(void **data)
{
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
BuildRequires: cmake
-BuildRequires: pkgconfig(dlog)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(libudev)
BuildRequires: pkgconfig(hal-api-common)