SET(PREFIX $(CMAKE_INSTALL_PREFIX))
SET(VERSION ${version})
-FIND_PROGRAM(GDBUS_CODEGEN NAMES gdbus-codegen)
-EXEC_PROGRAM(${GDBUS_CODEGEN} ARGS
- " \\
- --generate-c-code ${CMAKE_SOURCE_DIR}/src/gdbus/peripheral_io_gdbus \\
- --c-namespace PeripheralIoGdbus \\
- --interface-prefix org.tizen.peripheral_io. \\
- ${CMAKE_SOURCE_DIR}/src/gdbus/peripheral_io.xml \\
- ")
-
SET(INC_DIR include)
INCLUDE_DIRECTORIES(${INC_DIR})
-INCLUDE_DIRECTORIES(${INC_DIR}/gdbus)
INCLUDE_DIRECTORIES(${INC_DIR}/interface)
SET(SRC_DIR src)
-INCLUDE_DIRECTORIES(${SRC_DIR}/gdbus)
INCLUDE(FindPkgConfig)
pkg_check_modules(${fw_name} REQUIRED ${dependents})
src/peripheral_adc.c
src/peripheral_uart.c
src/peripheral_spi.c
- src/interface/peripheral_interface_pwm.c
- src/gdbus/peripheral_io_gdbus.c)
+ src/interface/peripheral_interface_pwm.c)
ADD_LIBRARY(${fw_name} SHARED ${SOURCES})
+++ /dev/null
-/*
- * Copyright (c) 2017-2018 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_GDBUS_COMMON_H__
-#define __PERIPHERAL_GDBUS_COMMON_H__
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <gio/gunixfdlist.h>
-
-#include "peripheral_io.h"
-#include "peripheral_handle.h"
-#include "peripheral_io_gdbus.h"
-#include "peripheral_log.h"
-
-#define PERIPHERAL_GDBUS_INTERFACE "org.tizen.peripheral_io"
-#define PERIPHERAL_GDBUS_GPIO_PATH "/Org/Tizen/Peripheral_io/Gpio"
-#define PERIPHERAL_GDBUS_I2C_PATH "/Org/Tizen/Peripheral_io/I2c"
-#define PERIPHERAL_GDBUS_PWM_PATH "/Org/Tizen/Peripheral_io/Pwm"
-#define PERIPHERAL_GDBUS_ADC_PATH "/Org/Tizen/Peripheral_io/Adc"
-#define PERIPHERAL_GDBUS_UART_PATH "/Org/Tizen/Peripheral_io/Uart"
-#define PERIPHERAL_GDBUS_SPI_PATH "/Org/Tizen/Peripheral_io/Spi"
-#define PERIPHERAL_GDBUS_NAME "org.tizen.peripheral_io"
-
-#endif /* __PERIPHERAL_GDBUS_COMMON_H__ */
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" ?>
-<node>
- <interface name="org.tizen.peripheral_io.gpio">
- <method name="Open">
- <annotation name="org.gtk.GDBus.C.UnixFD" value="true"/>
- <arg type="i" name="pin" direction="in"/>
- <arg type="u" name="handle" direction="out"/>
- <arg type="i" name="result" direction="out"/>
- </method>
- <method name="Close">
- <arg type="u" name="handle" direction="in"/>
- <arg type="i" name="result" direction="out"/>
- </method>
- </interface>
- <interface name="org.tizen.peripheral_io.i2c">
- <method name="Open">
- <annotation name="org.gtk.GDBus.C.UnixFD" value="true"/>
- <arg type="i" name="bus" direction="in"/>
- <arg type="i" name="address" direction="in"/>
- <arg type="u" name="handle" direction="out"/>
- <arg type="i" name="result" direction="out"/>
- </method>
- <method name="OpenFlags">
- <annotation name="org.gtk.GDBus.C.UnixFD" value="true"/>
- <arg type="i" name="bus" direction="in"/>
- <arg type="i" name="address" direction="in"/>
- <arg type="i" name="flags" direction="in"/>
- <arg type="u" name="handle" direction="out"/>
- <arg type="i" name="result" direction="out"/>
- </method>
- <method name="Close">
- <arg type="u" name="handle" direction="in"/>
- <arg type="i" name="result" direction="out"/>
- </method>
- </interface>
- <interface name="org.tizen.peripheral_io.pwm">
- <method name="Open">
- <annotation name="org.gtk.GDBus.C.UnixFD" value="true"/>
- <arg type="i" name="chip" direction="in"/>
- <arg type="i" name="pin" direction="in"/>
- <arg type="u" name="handle" direction="out"/>
- <arg type="i" name="result" direction="out"/>
- </method>
- <method name="Close">
- <arg type="u" name="handle" direction="in"/>
- <arg type="i" name="result" direction="out"/>
- </method>
- </interface>
- <interface name="org.tizen.peripheral_io.adc">
- <method name="Open">
- <annotation name="org.gtk.GDBus.C.UnixFD" value="true"/>
- <arg type="i" name="device" direction="in"/>
- <arg type="i" name="channel" direction="in"/>
- <arg type="u" name="handle" direction="out"/>
- <arg type="i" name="result" direction="out"/>
- </method>
- <method name="Close">
- <arg type="u" name="handle" direction="in"/>
- <arg type="i" name="result" direction="out"/>
- </method>
- </interface>
- <interface name="org.tizen.peripheral_io.uart">
- <method name="Open">
- <annotation name="org.gtk.GDBus.C.UnixFD" value="true"/>
- <arg type="i" name="port" direction="in"/>
- <arg type="u" name="handle" direction="out"/>
- <arg type="i" name="result" direction="out"/>
- </method>
- <method name="Close">
- <arg type="u" name="handle" direction="in"/>
- <arg type="i" name="result" direction="out"/>
- </method>
- </interface>
- <interface name="org.tizen.peripheral_io.spi">
- <method name="Open">
- <annotation name="org.gtk.GDBus.C.UnixFD" value="true"/>
- <arg type="i" name="bus" direction="in"/>
- <arg type="i" name="cs" direction="in"/>
- <arg type="u" name="handle" direction="out"/>
- <arg type="i" name="result" direction="out"/>
- </method>
- <method name="Close">
- <arg type="u" name="handle" direction="in"/>
- <arg type="i" name="result" direction="out"/>
- </method>
- </interface>
-</node>