adc: the adc interface is not supported. 07/151407/3
authorSegwon <segwon.han@samsung.com>
Thu, 21 Sep 2017 00:51:33 +0000 (09:51 +0900)
committerKibak Yoon <kibak.yoon@samsung.com>
Tue, 26 Sep 2017 01:53:30 +0000 (01:53 +0000)
Signed-off-by: Segwon <segwon.han@samsung.com>
Change-Id: I47b529fecb5820fcb633d990b76ee3d01f1aa74f

CMakeLists.txt
include/peripheral_gdbus.h
include/peripheral_gdbus_adc.h [deleted file]
src/peripheral_adc.c [deleted file]
src/peripheral_gdbus_adc.c [deleted file]
src/peripheral_io.xml

index 9455ddbe8ed97d02b30dd51e26ad2a243044ae94..931ace5472f88cc3ee0571042b335d59d4d8d7ec 100644 (file)
@@ -45,13 +45,11 @@ SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=%{_libdir}")
 SET(SOURCES src/peripheral_gpio.c
                        src/peripheral_i2c.c
                        src/peripheral_pwm.c
-                       src/peripheral_adc.c
                        src/peripheral_uart.c
                        src/peripheral_spi.c
                        src/peripheral_gdbus_gpio.c
                        src/peripheral_gdbus_i2c.c
                        src/peripheral_gdbus_pwm.c
-                       src/peripheral_gdbus_adc.c
                        src/peripheral_gdbus_uart.c
                        src/peripheral_gdbus_spi.c
                        src/peripheral_io_gdbus.c
index 0e4f15a2dc5df9bab53240973ca3da94422ff4b0..ff726dee106f4f6ea2b42eab940e1540fef2145d 100644 (file)
@@ -22,7 +22,6 @@
 #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"
diff --git a/include/peripheral_gdbus_adc.h b/include/peripheral_gdbus_adc.h
deleted file mode 100644 (file)
index 2f90ecf..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright (c) 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_GDBUS_ADC_H__
-#define __PERIPHERAL_GDBUS_ADC_H__
-
-void adc_proxy_init(void);
-void adc_proxy_deinit(void);
-
-int peripheral_gdbus_adc_read(unsigned int device, unsigned int channel, int *data);
-
-#endif /* __PERIPHERAL_GDBUS_ADC_H__ */
diff --git a/src/peripheral_adc.c b/src/peripheral_adc.c
deleted file mode 100644 (file)
index 5997ad1..0000000
+++ /dev/null
@@ -1,32 +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.
- */
-
-#include "peripheral_io.h"
-#include "peripheral_gdbus_adc.h"
-#include "peripheral_common.h"
-
-int peripheral_adc_read(unsigned int device, unsigned int channel, int *data)
-{
-       int ret;
-
-       adc_proxy_init();
-
-       ret = peripheral_gdbus_adc_read(device, channel, data);
-       if (ret != PERIPHERAL_ERROR_NONE)
-               _E("Failed to read, ret : %d", ret);
-
-       return ret;
-}
diff --git a/src/peripheral_gdbus_adc.c b/src/peripheral_gdbus_adc.c
deleted file mode 100644 (file)
index f52c0b8..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (c) 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.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "peripheral_io.h"
-#include "peripheral_gdbus.h"
-#include "peripheral_common.h"
-#include "peripheral_io_gdbus.h"
-
-PeripheralIoGdbusAdc *adc_proxy = NULL;
-
-void adc_proxy_init(void)
-{
-       GError *error = NULL;
-
-       if (adc_proxy != NULL)
-               return;
-
-       adc_proxy = peripheral_io_gdbus_adc_proxy_new_for_bus_sync(
-               G_BUS_TYPE_SYSTEM,
-               G_DBUS_PROXY_FLAGS_NONE,
-               PERIPHERAL_GDBUS_NAME,
-               PERIPHERAL_GDBUS_ADC_PATH,
-               NULL,
-               &error);
-}
-
-void adc_proxy_deinit()
-{
-       if (adc_proxy) {
-               g_object_unref(adc_proxy);
-               if (!G_IS_OBJECT(adc_proxy))
-                       adc_proxy = NULL;
-       }
-}
-
-int peripheral_gdbus_adc_read(unsigned int device, unsigned int channel, int *data)
-{
-       GError *error = NULL;
-       peripheral_error_e ret = PERIPHERAL_ERROR_NONE;
-       gint value;
-
-       if (adc_proxy == NULL) return PERIPHERAL_ERROR_UNKNOWN;
-
-       if (peripheral_io_gdbus_adc_call_read_sync(
-                       adc_proxy,
-                       device,
-                       channel,
-                       &value,
-                       &ret,
-                       NULL,
-                       &error) == FALSE) {
-               _E("Error in %s() : %s", __func__, error->message);
-               g_error_free(error);
-               return PERIPHERAL_ERROR_UNKNOWN;
-       }
-
-       *data = value;
-
-       return ret;
-}
index 878fb5c91e176e79b437d9ffdcf32893d5bd1ca9..ad80f0474b45484fb91d74f009a141f73c0fb028 100644 (file)
                        <arg type="i" name="result" direction="out"/>
                </method>
        </interface>
-       <interface name="org.tizen.peripheral_io.adc">
-               <method name="Read">
-                       <arg type="u" name="device" direction="in"/>
-                       <arg type="u" name="channel" direction="in"/>
-                       <arg type="i" name="value" direction="out"/>
-                       <arg type="i" name="result" direction="out"/>
-               </method>
-       </interface>
        <interface name="org.tizen.peripheral_io.uart">
                <method name="Open">
                        <arg type="i" name="port" direction="in"/>