if (peripheral_io_gdbus_gpio_call_open_sync(
gpio_proxy,
gpio->pin,
- (gint*)&gpio->edge,
- (gint*)&gpio->direction,
+ &gpio->handle,
&ret,
NULL,
&error) == FALSE) {
if (peripheral_io_gdbus_gpio_call_close_sync(
gpio_proxy,
- gpio->pin,
+ gpio->handle,
&ret,
NULL,
&error) == FALSE) {
if (peripheral_io_gdbus_gpio_call_get_direction_sync(
gpio_proxy,
- gpio->pin,
+ gpio->handle,
(gint*)direction,
&ret,
NULL,
g_error_free(error);
return PERIPHERAL_ERROR_UNKNOWN;
}
- gpio->direction = *direction;
return ret;
}
if (peripheral_io_gdbus_gpio_call_set_direction_sync(
gpio_proxy,
- gpio->pin,
+ gpio->handle,
direction,
&ret,
NULL,
g_error_free(error);
return PERIPHERAL_ERROR_UNKNOWN;
}
- gpio->direction = direction;
return ret;
}
if (peripheral_io_gdbus_gpio_call_read_sync(
gpio_proxy,
- gpio->pin,
+ gpio->handle,
value,
&ret,
NULL,
if (peripheral_io_gdbus_gpio_call_write_sync(
gpio_proxy,
- gpio->pin,
+ gpio->handle,
value,
&ret,
NULL,
if (peripheral_io_gdbus_gpio_call_get_edge_mode_sync(
gpio_proxy,
- gpio->pin,
+ gpio->handle,
(int*)edge,
&ret,
NULL,
g_error_free(error);
return PERIPHERAL_ERROR_UNKNOWN;
}
- gpio->edge = *edge;
return ret;
}
if (peripheral_io_gdbus_gpio_call_set_edge_mode_sync(
gpio_proxy,
- gpio->pin,
+ gpio->handle,
edge,
&ret,
NULL,
g_error_free(error);
return PERIPHERAL_ERROR_UNKNOWN;
}
- gpio->edge = edge;
return ret;
}
if (peripheral_io_gdbus_gpio_call_register_irq_sync(
gpio_proxy,
- gpio->pin,
+ gpio->handle,
&ret,
NULL,
&error) == FALSE) {
if (peripheral_io_gdbus_gpio_call_unregister_irq_sync(
gpio_proxy,
- gpio->pin,
+ gpio->handle,
&ret,
NULL,
&error) == FALSE) {
return PERIPHERAL_ERROR_INVALID_PARAMETER;
ret = peripheral_gdbus_gpio_get_direction(gpio, direction);
- if (ret == PERIPHERAL_ERROR_NONE)
- gpio->direction = (*direction);
return ret;
}
/* call gpio_set_direction */
ret = peripheral_gdbus_gpio_set_direction(gpio, direction);
- if (ret == PERIPHERAL_ERROR_NONE)
- gpio->direction = direction;
return ret;
}
return PERIPHERAL_ERROR_INVALID_PARAMETER;
ret = peripheral_gdbus_gpio_get_edge_mode(gpio, edge);
- if (ret == PERIPHERAL_ERROR_NONE)
- gpio->edge = (*edge);
return ret;
}
/* call gpio_set_edge_mode */
ret = peripheral_gdbus_gpio_set_edge_mode(gpio, edge);
- if (ret == PERIPHERAL_ERROR_NONE)
- gpio->edge = edge;
return ret;
}
<interface name="org.tizen.peripheral_io.gpio">
<method name="Open">
<arg type="i" name="pin" direction="in"/>
- <arg type="i" name="edge" direction="out"/>
- <arg type="i" name="direction" direction="out"/>
+ <arg type="u" name="handle" direction="out"/>
<arg type="i" name="result" direction="out"/>
</method>
<method name="Close">
- <arg type="i" name="pin" direction="in"/>
+ <arg type="u" name="handle" direction="in"/>
<arg type="i" name="result" direction="out"/>
</method>
<method name="GetDirection">
- <arg type="i" name="pin" direction="in"/>
+ <arg type="u" name="handle" direction="in"/>
<arg type="i" name="direction" direction="out"/>
<arg type="i" name="result" direction="out"/>
</method>
<method name="SetDirection">
- <arg type="i" name="pin" direction="in"/>
+ <arg type="u" name="handle" direction="in"/>
<arg type="i" name="direction" direction="in"/>
<arg type="i" name="result" direction="out"/>
</method>
<method name="Read">
- <arg type="i" name="pin" direction="in"/>
+ <arg type="u" name="handle" direction="in"/>
<arg type="i" name="value" direction="out"/>
<arg type="i" name="result" direction="out"/>
</method>
<method name="Write">
- <arg type="i" name="pin" direction="in"/>
+ <arg type="u" name="handle" direction="in"/>
<arg type="i" name="value" direction="in"/>
<arg type="i" name="result" direction="out"/>
</method>
<method name="GetEdgeMode">
- <arg type="i" name="pin" direction="in"/>
+ <arg type="u" name="handle" direction="in"/>
<arg type="i" name="edge" direction="out"/>
<arg type="i" name="result" direction="out"/>
</method>
<method name="SetEdgeMode">
- <arg type="i" name="pin" direction="in"/>
+ <arg type="u" name="handle" direction="in"/>
<arg type="i" name="edge" direction="in"/>
<arg type="i" name="result" direction="out"/>
</method>
<method name="RegisterIrq">
- <arg type="i" name="pin" direction="in"/>
+ <arg type="u" name="handle" direction="in"/>
<arg type="i" name="result" direction="out"/>
</method>
<method name="UnregisterIrq">
- <arg type="i" name="pin" direction="in"/>
+ <arg type="u" name="handle" direction="in"/>
<arg type="i" name="result" direction="out"/>
</method>
<signal name='GpioChanged'>