handle: change file name "peripheral_bus.h" to "peripheral_handle.h" 09/161009/4
authorSegwon <segwon.han@samsung.com>
Tue, 21 Nov 2017 05:24:50 +0000 (14:24 +0900)
committerSegwon Han <segwon.han@samsung.com>
Tue, 21 Nov 2017 06:28:52 +0000 (06:28 +0000)
Change-Id: I1d65506dd9601ece9b685ee388332d484da26c24
Signed-off-by: Segwon <segwon.han@samsung.com>
15 files changed:
include/handle/peripheral_handle.h [new file with mode: 0644]
include/handle/peripheral_handle_common.h
include/peripheral_bus.h [deleted file]
src/gdbus/peripheral_gdbus_gpio.c
src/gdbus/peripheral_gdbus_i2c.c
src/gdbus/peripheral_gdbus_pwm.c
src/gdbus/peripheral_gdbus_spi.c
src/gdbus/peripheral_gdbus_uart.c
src/handle/peripheral_handle_common.c
src/handle/peripheral_handle_gpio.c
src/handle/peripheral_handle_i2c.c
src/handle/peripheral_handle_pwm.c
src/handle/peripheral_handle_spi.c
src/handle/peripheral_handle_uart.c
src/peripheral_bus.c

diff --git a/include/handle/peripheral_handle.h b/include/handle/peripheral_handle.h
new file mode 100644 (file)
index 0000000..595ca2c
--- /dev/null
@@ -0,0 +1,100 @@
+/*
+ * 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_BUS_H__
+#define __PERIPHERAL_BUS_H__
+
+#include <gio/gio.h>
+
+#include "peripheral_io_gdbus.h"
+#include "peripheral_bus_board.h"
+
+typedef enum {
+       PERIPHERAL_BUS_TYPE_GPIO = 0,
+       PERIPHERAL_BUS_TYPE_I2C,
+       PERIPHERAL_BUS_TYPE_PWM,
+       PERIPHERAL_BUS_TYPE_UART,
+       PERIPHERAL_BUS_TYPE_SPI,
+} peripheral_bus_type_e;
+
+typedef struct {
+       pb_board_s *board;
+       /* devices */
+       GList *gpio_list;
+       GList *i2c_list;
+       GList *pwm_list;
+       GList *uart_list;
+       GList *spi_list;
+       /* gdbus variable */
+       guint reg_id;
+       GDBusConnection *connection;
+       PeripheralIoGdbusGpio *gpio_skeleton;
+       PeripheralIoGdbusI2c *i2c_skeleton;
+       PeripheralIoGdbusPwm *pwm_skeleton;
+       PeripheralIoGdbusUart *uart_skeleton;
+       PeripheralIoGdbusSpi *spi_skeleton;
+} peripheral_bus_s;
+
+typedef struct {
+       char *id;
+       pid_t pid;
+       pid_t pgid;
+} pb_client_info_s;
+
+typedef struct {
+       int pin;
+} peripheral_bus_gpio_s;
+
+typedef struct {
+       int bus;
+       int address;
+       int fd;
+} peripheral_bus_i2c_s;
+
+typedef struct {
+       int chip;
+       int pin;
+} peripheral_bus_pwm_s;
+
+typedef struct {
+       int port;
+       int fd;
+} peripheral_bus_uart_s;
+
+typedef struct {
+       int bus;
+       int cs;
+       int fd;
+} peripheral_bus_spi_s;
+
+typedef struct {
+       peripheral_bus_type_e type;
+       uint watch_id;
+       GList **list;
+       /* client info */
+       pb_client_info_s client_info;
+       union {
+               peripheral_bus_gpio_s gpio;
+               peripheral_bus_i2c_s i2c;
+               peripheral_bus_pwm_s pwm;
+               peripheral_bus_uart_s uart;
+               peripheral_bus_spi_s spi;
+       } dev;
+} peripheral_bus_data_s;
+
+typedef peripheral_bus_data_s *pb_data_h;
+
+#endif /* __PERIPHERAL_BUS_H__ */
index ef5cc1794657b632021e679450614e50615ce413..1341b21cc3bee4891f99f5d33b9fa199a1fa6c59 100644 (file)
@@ -19,7 +19,8 @@
 
 #include <gio/gio.h>
 
-#include "peripheral_bus.h"
+#include "peripheral_handle.h"
+#include "peripheral_log.h"
 
 pb_data_h peripheral_bus_data_new(GList **plist);
 int peripheral_bus_data_free(pb_data_h handle);
diff --git a/include/peripheral_bus.h b/include/peripheral_bus.h
deleted file mode 100644 (file)
index 595ca2c..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * 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_BUS_H__
-#define __PERIPHERAL_BUS_H__
-
-#include <gio/gio.h>
-
-#include "peripheral_io_gdbus.h"
-#include "peripheral_bus_board.h"
-
-typedef enum {
-       PERIPHERAL_BUS_TYPE_GPIO = 0,
-       PERIPHERAL_BUS_TYPE_I2C,
-       PERIPHERAL_BUS_TYPE_PWM,
-       PERIPHERAL_BUS_TYPE_UART,
-       PERIPHERAL_BUS_TYPE_SPI,
-} peripheral_bus_type_e;
-
-typedef struct {
-       pb_board_s *board;
-       /* devices */
-       GList *gpio_list;
-       GList *i2c_list;
-       GList *pwm_list;
-       GList *uart_list;
-       GList *spi_list;
-       /* gdbus variable */
-       guint reg_id;
-       GDBusConnection *connection;
-       PeripheralIoGdbusGpio *gpio_skeleton;
-       PeripheralIoGdbusI2c *i2c_skeleton;
-       PeripheralIoGdbusPwm *pwm_skeleton;
-       PeripheralIoGdbusUart *uart_skeleton;
-       PeripheralIoGdbusSpi *spi_skeleton;
-} peripheral_bus_s;
-
-typedef struct {
-       char *id;
-       pid_t pid;
-       pid_t pgid;
-} pb_client_info_s;
-
-typedef struct {
-       int pin;
-} peripheral_bus_gpio_s;
-
-typedef struct {
-       int bus;
-       int address;
-       int fd;
-} peripheral_bus_i2c_s;
-
-typedef struct {
-       int chip;
-       int pin;
-} peripheral_bus_pwm_s;
-
-typedef struct {
-       int port;
-       int fd;
-} peripheral_bus_uart_s;
-
-typedef struct {
-       int bus;
-       int cs;
-       int fd;
-} peripheral_bus_spi_s;
-
-typedef struct {
-       peripheral_bus_type_e type;
-       uint watch_id;
-       GList **list;
-       /* client info */
-       pb_client_info_s client_info;
-       union {
-               peripheral_bus_gpio_s gpio;
-               peripheral_bus_i2c_s i2c;
-               peripheral_bus_pwm_s pwm;
-               peripheral_bus_uart_s uart;
-               peripheral_bus_spi_s spi;
-       } dev;
-} peripheral_bus_data_s;
-
-typedef peripheral_bus_data_s *pb_data_h;
-
-#endif /* __PERIPHERAL_BUS_H__ */
index 5bd576bbba37b5193410773ef9e1aef29e8950ed..4bb0fe3316ed849a32fc0f4f668c1075da929ead 100644 (file)
@@ -18,7 +18,7 @@
 #include <gio/gunixfdlist.h>
 
 #include "peripheral_io_gdbus.h"
-#include "peripheral_bus.h"
+#include "peripheral_handle.h"
 #include "peripheral_handle_gpio.h"
 #include "peripheral_log.h"
 #include "peripheral_gdbus_gpio.h"
index 5ba2da48052dafbfa16ef2579b7678de8ad7b656..5f233539b8488a8b282dee76f83f32b3646b3680 100644 (file)
@@ -17,7 +17,7 @@
 #include <peripheral_io.h>
 
 #include "peripheral_io_gdbus.h"
-#include "peripheral_bus.h"
+#include "peripheral_handle.h"
 #include "peripheral_handle_i2c.h"
 #include "peripheral_log.h"
 #include "peripheral_gdbus_i2c.h"
index ac42ff2367bd3dae38a22f3a4c7f4d2adddb07ba..2f1adf889ccdcdba0a38eb533eb8ba1b4e382344 100644 (file)
@@ -17,7 +17,7 @@
 #include <peripheral_io.h>
 
 #include "peripheral_io_gdbus.h"
-#include "peripheral_bus.h"
+#include "peripheral_handle.h"
 #include "peripheral_handle_pwm.h"
 #include "peripheral_log.h"
 #include "peripheral_gdbus_pwm.h"
index df7b9e84748b33cca2c956a8cc339df8da6f3ded..9910670ab1cae171a1ac9fa235c829f338f514db 100644 (file)
@@ -17,7 +17,7 @@
 #include <peripheral_io.h>
 
 #include "peripheral_io_gdbus.h"
-#include "peripheral_bus.h"
+#include "peripheral_handle.h"
 #include "peripheral_handle_spi.h"
 #include "peripheral_log.h"
 #include "peripheral_gdbus_spi.h"
index c0698e140a8d35dc56d8de57216d8d0399768cff..740001c7c3aa4604cbb589074d0498bfa838d1ed 100644 (file)
@@ -17,7 +17,7 @@
 #include <peripheral_io.h>
 
 #include "peripheral_io_gdbus.h"
-#include "peripheral_bus.h"
+#include "peripheral_handle.h"
 #include "peripheral_handle_uart.h"
 #include "peripheral_log.h"
 #include "peripheral_gdbus_uart.h"
index bbd6b61bdb7c4b4e2c58d521f210caa6d82f7be2..fb30ee89b195f3e23449a71d54775a8ed2f3ee77 100644 (file)
@@ -17,7 +17,6 @@
 #include <stdlib.h>
 
 #include "peripheral_handle_common.h"
-#include "peripheral_log.h"
 
 pb_data_h peripheral_bus_data_new(GList **plist)
 {
index 9c788ed3427a4177f20d5638d0494a41b9b13464..c92be1ef3a5156a9d0e77852b09018aadb2c279e 100644 (file)
@@ -24,8 +24,6 @@
 #include <peripheral_io.h>
 
 #include "peripheral_interface_gpio.h"
-#include "peripheral_bus.h"
-#include "peripheral_log.h"
 #include "peripheral_handle_common.h"
 
 static bool peripheral_bus_gpio_is_available(int pin, peripheral_bus_s *pb_data)
index 5cea9c91d078030ef7fe7f34e348b21db9ef6403..899725a9963ac1518821c54d7d007c8c57a114c7 100644 (file)
@@ -21,8 +21,6 @@
 #include <peripheral_io.h>
 
 #include "peripheral_interface_i2c.h"
-#include "peripheral_bus.h"
-#include "peripheral_log.h"
 #include "peripheral_handle_common.h"
 
 #define INITIAL_BUFFER_SIZE 128
index 73d46e8882fee96ae2d95a7636972a68b0385fb3..1f38f362c8e1d9a10ed2b5c3b73a8c5832bc4d0f 100644 (file)
@@ -21,8 +21,6 @@
 #include <peripheral_io.h>
 
 #include "peripheral_interface_pwm.h"
-#include "peripheral_bus.h"
-#include "peripheral_log.h"
 #include "peripheral_handle_common.h"
 
 static bool peripheral_bus_pwm_is_available(int chip, int pin, peripheral_bus_s *pb_data)
index 52a7331a241ebadfc67df30526d3daf9c409dbb6..c0615c8c58508afd222f0f2dcdc64313840603f4 100644 (file)
@@ -21,8 +21,6 @@
 #include <peripheral_io.h>
 
 #include "peripheral_interface_spi.h"
-#include "peripheral_bus.h"
-#include "peripheral_log.h"
 #include "peripheral_handle_common.h"
 
 static bool __peripheral_bus_spi_is_available(int bus, int cs, peripheral_bus_s *pb_data)
index bc87d5d0bc487817fe7831c5ea49f91de56d6fc4..64191c578c3b35a086b11b5d35fe09232a39cc94 100644 (file)
@@ -21,9 +21,6 @@
 #include <peripheral_io.h>
 
 #include "peripheral_interface_uart.h"
-#include "peripheral_io_gdbus.h"
-#include "peripheral_bus.h"
-#include "peripheral_log.h"
 #include "peripheral_handle_common.h"
 
 #define INITIAL_BUFFER_SIZE 128
index d4c038fe130b760a43be3f5884d24008c5015d76..1d1411274c383793f50b2cd17f1ba82dd9b2aa45 100644 (file)
@@ -23,7 +23,7 @@
 #include <peripheral_io.h>
 
 #include "peripheral_io_gdbus.h"
-#include "peripheral_bus.h"
+#include "peripheral_handle.h"
 #include "peripheral_log.h"
 #include "peripheral_gdbus_gpio.h"
 #include "peripheral_gdbus_i2c.h"