interface: add prefix "peripheral_interface" to interface file name 48/160948/1
authorSegwon <segwon.han@samsung.com>
Tue, 21 Nov 2017 01:17:27 +0000 (10:17 +0900)
committerSegwon <segwon.han@samsung.com>
Tue, 21 Nov 2017 01:17:27 +0000 (10:17 +0900)
Change-Id: I9217d313406d113f0e314609d01edd577e9940c9
Signed-off-by: Segwon <segwon.han@samsung.com>
16 files changed:
CMakeLists.txt
src/daemon/peripheral_bus_gpio.c
src/daemon/peripheral_bus_i2c.c
src/daemon/peripheral_bus_pwm.c
src/daemon/peripheral_bus_spi.c
src/daemon/peripheral_bus_uart.c
src/interface/include/peripheral_interface_gpio.h [moved from src/interface/include/gpio.h with 85% similarity]
src/interface/include/peripheral_interface_i2c.h [moved from src/interface/include/i2c.h with 88% similarity]
src/interface/include/peripheral_interface_pwm.h [moved from src/interface/include/pwm.h with 89% similarity]
src/interface/include/peripheral_interface_spi.h [moved from src/interface/include/spi.h with 84% similarity]
src/interface/include/peripheral_interface_uart.h [moved from src/interface/include/uart.h with 91% similarity]
src/interface/peripheral_interface_gpio.c [moved from src/interface/gpio.c with 98% similarity]
src/interface/peripheral_interface_i2c.c [moved from src/interface/i2c.c with 97% similarity]
src/interface/peripheral_interface_pwm.c [moved from src/interface/pwm.c with 98% similarity]
src/interface/peripheral_interface_spi.c [moved from src/interface/spi.c with 97% similarity]
src/interface/peripheral_interface_uart.c [moved from src/interface/uart.c with 98% similarity]

index 1ac4d25..e73c117 100644 (file)
@@ -36,11 +36,11 @@ SET(SRCS
        src/daemon/peripheral_bus_board.c
        src/daemon/peripheral_io_gdbus.c
        src/daemon/privilege_checker.c
-       src/interface/gpio.c
-       src/interface/i2c.c
-       src/interface/pwm.c
-       src/interface/uart.c
-       src/interface/spi.c)
+       src/interface/peripheral_interface_gpio.c
+       src/interface/peripheral_interface_i2c.c
+       src/interface/peripheral_interface_pwm.c
+       src/interface/peripheral_interface_uart.c
+       src/interface/peripheral_interface_spi.c)
 
 INCLUDE(FindPkgConfig)
 pkg_check_modules(pbus_pkgs REQUIRED ${dependents})
index 567d5a5..057cac6 100644 (file)
@@ -23,7 +23,7 @@
 
 #include <peripheral_io.h>
 
-#include "gpio.h"
+#include "peripheral_interface_gpio.h"
 #include "peripheral_bus.h"
 #include "peripheral_bus_gdbus_gpio.h"
 #include "peripheral_common.h"
index c0ac7d4..e0edbd5 100644 (file)
@@ -20,7 +20,7 @@
 
 #include <peripheral_io.h>
 
-#include "i2c.h"
+#include "peripheral_interface_i2c.h"
 #include "peripheral_bus.h"
 #include "peripheral_common.h"
 #include "peripheral_bus_util.h"
index 45dff1a..6bf13dd 100644 (file)
@@ -20,7 +20,7 @@
 
 #include <peripheral_io.h>
 
-#include "pwm.h"
+#include "peripheral_interface_pwm.h"
 #include "peripheral_bus.h"
 #include "peripheral_common.h"
 #include "peripheral_bus_util.h"
index c3da9b8..f982c2a 100644 (file)
@@ -20,7 +20,7 @@
 
 #include <peripheral_io.h>
 
-#include "spi.h"
+#include "peripheral_interface_spi.h"
 #include "peripheral_bus.h"
 #include "peripheral_common.h"
 #include "peripheral_bus_util.h"
index cf221c0..1ca35e7 100644 (file)
@@ -20,7 +20,7 @@
 
 #include <peripheral_io.h>
 
-#include "uart.h"
+#include "peripheral_interface_uart.h"
 #include "peripheral_io_gdbus.h"
 #include "peripheral_bus.h"
 #include "peripheral_common.h"
similarity index 85%
rename from src/interface/include/gpio.h
rename to src/interface/include/peripheral_interface_gpio.h
index 38b51c6..483968d 100644 (file)
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef __GPIO_H__
-#define __GPIO_H__
+#ifndef __PERIPHERAL_INTERFACE_GPIO_H__
+#define __PERIPHERAL_INTERFACE_GPIO_H__
 
 #define SYSFS_GPIO_DIR "/sys/class/gpio"
 #define GPIO_BUFFER_MAX 64
@@ -23,4 +23,4 @@
 int gpio_open(int gpiopin);
 int gpio_close(int gpiopin);
 
-#endif/*__GPIO_H__*/
+#endif /*__PERIPHERAL_INTERFACE_GPIO_H__*/
similarity index 88%
rename from src/interface/include/i2c.h
rename to src/interface/include/peripheral_interface_i2c.h
index 097654d..fb1df3d 100644 (file)
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef __I2C_H__
-#define __I2C_H__
+#ifndef __PERIPHERAL_INTERFACE_I2C_H__
+#define __PERIPHERAL_INTERFACE_I2C_H__
 
 #include <stdint.h>
 
@@ -29,4 +29,4 @@ int i2c_open(int bus, int *fd);
 int i2c_close(int fd);
 int i2c_set_address(int fd, int address);
 
-#endif/* __I2C_H__ */
+#endif /* __PERIPHERAL_INTERFACE_I2C_H__ */
similarity index 89%
rename from src/interface/include/pwm.h
rename to src/interface/include/peripheral_interface_pwm.h
index 1c58def..7621bfc 100644 (file)
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef __PWM_H__
-#define __PWM_H__
+#ifndef __PERIPHERAL_INTERFACE_PWM_H__
+#define __PERIPHERAL_INTERFACE_PWM_H__
 
 /**
 * @brief pwm_open() init pwm pin.
@@ -35,4 +35,4 @@ int pwm_open(int chip, int pin);
 */
 int pwm_close(int chip, int pin);
 
-#endif /* __PWM_H__ */
+#endif /* __PERIPHERAL_INTERFACE_PWM_H__ */
similarity index 84%
rename from src/interface/include/spi.h
rename to src/interface/include/peripheral_interface_spi.h
index b3bf84f..95994f0 100644 (file)
  * limitations under the License.
  */
 
-#ifndef __SPI_H__
-#define __SPI_H__
+#ifndef __PERIPHERAL_INTERFACE_SPI_H__
+#define __PERIPHERAL_INTERFACE_SPI_H__
 
 int spi_open(int bus, int cs, int *fd);
 int spi_close(int fd);
 
-#endif /* __SPI_H__ */
+#endif /* __PERIPHERAL_INTERFACE_SPI_H__ */
similarity index 91%
rename from src/interface/include/uart.h
rename to src/interface/include/peripheral_interface_uart.h
index 769418e..9c61401 100644 (file)
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef __UART_H__
-#define __UART_H__
+#ifndef __PERIPHERAL_INTERFACE_UART_H__
+#define __PERIPHERAL_INTERFACE_UART_H__
 
 #include <stdint.h>
 
@@ -44,5 +44,5 @@ int uart_close(int file_hndl);
 */
 int uart_flush(int file_hndl);
 
-#endif /* __UART_H__ */
+#endif /* __PERIPHERAL_INTERFACE_UART_H__ */
 
similarity index 98%
rename from src/interface/gpio.c
rename to src/interface/peripheral_interface_gpio.c
index 50358a3..168f67e 100644 (file)
@@ -22,7 +22,7 @@
 #include <fcntl.h>
 #include <poll.h>
 
-#include "gpio.h"
+#include "peripheral_interface_gpio.h"
 #include "peripheral_common.h"
 
 #define MAX_ERR_LEN 255
similarity index 97%
rename from src/interface/i2c.c
rename to src/interface/peripheral_interface_i2c.c
index c052e89..933e009 100644 (file)
@@ -22,7 +22,7 @@
 #include <fcntl.h>
 #include <sys/ioctl.h>
 
-#include "i2c.h"
+#include "peripheral_interface_i2c.h"
 #include "peripheral_common.h"
 
 #define MAX_ERR_LEN 255
similarity index 98%
rename from src/interface/pwm.c
rename to src/interface/peripheral_interface_pwm.c
index f5c04b1..77f7fac 100644 (file)
@@ -22,7 +22,7 @@
 #include <unistd.h>
 #include <stdbool.h>
 
-#include "pwm.h"
+#include "peripheral_interface_pwm.h"
 #include "peripheral_common.h"
 
 #define SYSFS_PWM_PATH "/sys/class/pwm"
similarity index 97%
rename from src/interface/spi.c
rename to src/interface/peripheral_interface_spi.c
index 4e8fbe6..8e9a255 100644 (file)
@@ -23,7 +23,7 @@
 #include <sys/ioctl.h>
 #include <linux/spi/spidev.h>
 
-#include "spi.h"
+#include "peripheral_interface_spi.h"
 #include "peripheral_common.h"
 
 #define SYSFS_SPI_DIR "/dev/spidev"
similarity index 98%
rename from src/interface/uart.c
rename to src/interface/peripheral_interface_uart.c
index 96e36ef..eb1fa8f 100644 (file)
@@ -24,7 +24,7 @@
 #include <stdbool.h>
 #include <sys/ioctl.h>
 
-#include "uart.h"
+#include "peripheral_interface_uart.h"
 #include "peripheral_common.h"
 
 #define PATH_BUF_MAX 64