+++ /dev/null
-/*
- * Copyright (c) 2016-2017 Samsung Electronics Co., Ltd.
- *
- * 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 __PERIPHERAL_COMMON_H__
-#define __PERIPHERAL_COMMON_H__
-
-#include <unistd.h>
-#include <dlog.h>
-
-#undef LOG_TAG
-#define LOG_TAG "PERIPHERAL-BUS"
-
-#define _E(fmt, arg...) LOGE(fmt, ##arg)
-#define _D(fmt, arg...) LOGD(fmt, ##arg)
-#define _W(fmt, arg...) LOGW(fmt, ##arg)
-
-#define RET_IF(expr) \
- do { \
- if (expr) { \
- _E("(%s)", #expr); \
- return; \
- } \
- } while (0)
-#define RETV_IF(expr, val) \
- do {\
- if (expr) { \
- _E("(%s)", #expr); \
- return (val); \
- } \
- } while (0)
-#define RETM_IF(expr, fmt, arg...) \
- do {\
- if (expr) { \
- _E(fmt, ##arg); \
- return; \
- } \
- } while (0)
-#define RETVM_IF(expr, val, fmt, arg...) \
- do {\
- if (expr) { \
- _E(fmt, ##arg); \
- return (val); \
- } \
- } while (0)
-
-#endif /* __PERIPHERAL_COMMON_H__ */
--- /dev/null
+/*
+ * Copyright (c) 2016-2017 Samsung Electronics Co., Ltd.
+ *
+ * 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 __PERIPHERAL_LOG_H__
+#define __PERIPHERAL_LOG_H__
+
+#include <unistd.h>
+#include <dlog.h>
+
+#undef LOG_TAG
+#define LOG_TAG "PERIPHERAL-BUS"
+
+#define _E(fmt, arg...) LOGE(fmt, ##arg)
+#define _D(fmt, arg...) LOGD(fmt, ##arg)
+#define _W(fmt, arg...) LOGW(fmt, ##arg)
+
+#define RET_IF(expr) \
+ do { \
+ if (expr) { \
+ _E("(%s)", #expr); \
+ return; \
+ } \
+ } while (0)
+#define RETV_IF(expr, val) \
+ do {\
+ if (expr) { \
+ _E("(%s)", #expr); \
+ return (val); \
+ } \
+ } while (0)
+#define RETM_IF(expr, fmt, arg...) \
+ do {\
+ if (expr) { \
+ _E(fmt, ##arg); \
+ return; \
+ } \
+ } while (0)
+#define RETVM_IF(expr, val, fmt, arg...) \
+ do {\
+ if (expr) { \
+ _E(fmt, ##arg); \
+ return (val); \
+ } \
+ } while (0)
+
+#endif /* __PERIPHERAL_COMMON_H__ */
#include "peripheral_io_gdbus.h"
#include "peripheral_bus.h"
-#include "peripheral_common.h"
+#include "peripheral_log.h"
#include "peripheral_bus_gdbus_gpio.h"
#include "peripheral_bus_gdbus_i2c.h"
#include "peripheral_bus_gdbus_pwm.h"
#include <peripheral_io.h>
#include "peripheral_bus_board.h"
-#include "peripheral_common.h"
+#include "peripheral_log.h"
#define STR_BUF_MAX 255
#include "peripheral_io_gdbus.h"
#include "peripheral_bus.h"
#include "peripheral_bus_gpio.h"
-#include "peripheral_common.h"
+#include "peripheral_log.h"
#include "peripheral_bus_util.h"
#include "peripheral_bus_gdbus_gpio.h"
#include "peripheral_io_gdbus.h"
#include "peripheral_bus.h"
#include "peripheral_bus_i2c.h"
-#include "peripheral_common.h"
+#include "peripheral_log.h"
#include "peripheral_bus_util.h"
#include "peripheral_bus_gdbus_i2c.h"
#include "peripheral_io_gdbus.h"
#include "peripheral_bus.h"
#include "peripheral_bus_pwm.h"
-#include "peripheral_common.h"
+#include "peripheral_log.h"
#include "peripheral_bus_util.h"
#include "peripheral_bus_gdbus_pwm.h"
#include "peripheral_io_gdbus.h"
#include "peripheral_bus.h"
#include "peripheral_bus_spi.h"
-#include "peripheral_common.h"
+#include "peripheral_log.h"
#include "peripheral_bus_util.h"
#include "peripheral_bus_gdbus_spi.h"
#include "peripheral_io_gdbus.h"
#include "peripheral_bus.h"
#include "peripheral_bus_uart.h"
-#include "peripheral_common.h"
+#include "peripheral_log.h"
#include "peripheral_bus_util.h"
#include "peripheral_bus_gdbus_uart.h"
#include "peripheral_interface_gpio.h"
#include "peripheral_bus.h"
#include "peripheral_bus_gdbus_gpio.h"
-#include "peripheral_common.h"
+#include "peripheral_log.h"
#include "peripheral_bus_util.h"
static bool peripheral_bus_gpio_is_available(int pin, peripheral_bus_s *pb_data)
#include "peripheral_interface_i2c.h"
#include "peripheral_bus.h"
-#include "peripheral_common.h"
+#include "peripheral_log.h"
#include "peripheral_bus_util.h"
#define INITIAL_BUFFER_SIZE 128
#include "peripheral_interface_pwm.h"
#include "peripheral_bus.h"
-#include "peripheral_common.h"
+#include "peripheral_log.h"
#include "peripheral_bus_util.h"
static bool peripheral_bus_pwm_is_available(int chip, int pin, peripheral_bus_s *pb_data)
#include "peripheral_interface_spi.h"
#include "peripheral_bus.h"
-#include "peripheral_common.h"
+#include "peripheral_log.h"
#include "peripheral_bus_util.h"
static bool __peripheral_bus_spi_is_available(int bus, int cs, peripheral_bus_s *pb_data)
#include "peripheral_interface_uart.h"
#include "peripheral_io_gdbus.h"
#include "peripheral_bus.h"
-#include "peripheral_common.h"
+#include "peripheral_log.h"
#include "peripheral_bus_util.h"
#define INITIAL_BUFFER_SIZE 128
#include <cynara-session.h>
#include "peripheral_bus.h"
-#include "peripheral_common.h"
+#include "peripheral_log.h"
#include "privilege_checker.h"
#include <cynara-session.h>
#include "peripheral_bus.h"
-#include "peripheral_common.h"
+#include "peripheral_log.h"
#define CACHE_SIZE 100
#include <fcntl.h>
#include <peripheral_io.h>
-#include "peripheral_common.h"
+#include "peripheral_log.h"
#define MAX_ERR_LEN 255
#define MAX_BUF_LEN 64