gint pin,
gpointer user_data);
-gboolean handle_gpio_close(
- PeripheralIoGdbusGpio *gpio,
- GDBusMethodInvocation *invocation,
- gint handle,
- gpointer user_data);
-
-gboolean handle_gpio_set_direction(
- PeripheralIoGdbusGpio *gpio,
- GDBusMethodInvocation *invocation,
- gint handle,
- gint direction,
- gpointer user_data);
-
-gboolean handle_gpio_set_edge_mode(
- PeripheralIoGdbusGpio *gpio,
- GDBusMethodInvocation *invocation,
- gint handle,
- gint edge,
- gpointer user_data);
-
-gboolean handle_gpio_set_interrupted_cb(
- PeripheralIoGdbusGpio *gpio,
- GDBusMethodInvocation *invocation,
- gint handle,
- gpointer user_data);
-
-gboolean handle_gpio_unset_interrupted_cb(
- PeripheralIoGdbusGpio *gpio,
- GDBusMethodInvocation *invocation,
- gint handle,
- gpointer user_data);
-
-void peripheral_bus_emit_interrupted_cb(
- PeripheralIoGdbusGpio *gpio,
- gint pin,
- gint value,
- guint64 timestamp);
-
-gboolean handle_gpio_read(
- PeripheralIoGdbusGpio *gpio,
- GDBusMethodInvocation *invocation,
- gint handle,
- gpointer user_data);
-
-gboolean handle_gpio_write(
- PeripheralIoGdbusGpio *gpio,
- GDBusMethodInvocation *invocation,
- gint handle,
- gint value,
- gpointer user_data);
-
#endif /* __PERIPHERAL_BUS_GDBUS_GPIO_H__ */
gint address,
gpointer user_data);
-gboolean handle_i2c_close(
- PeripheralIoGdbusI2c *i2c,
- GDBusMethodInvocation *invocation,
- gint handle,
- gpointer user_data);
-
-gboolean handle_i2c_read(
- PeripheralIoGdbusI2c *i2c,
- GDBusMethodInvocation *invocation,
- gint handle,
- gint length,
- gpointer user_data);
-
-gboolean handle_i2c_write(
- PeripheralIoGdbusI2c *i2c,
- GDBusMethodInvocation *invocation,
- gint handle,
- gint length,
- GVariant *data_array,
- gpointer user_data);
-
-gboolean handle_i2c_smbus_ioctl(
- PeripheralIoGdbusI2c *i2c,
- GDBusMethodInvocation *invocation,
- gint handle,
- guchar read_write,
- guchar command,
- guint size,
- guint16 data_in,
- gpointer user_data);
-
#endif /* __PERIPHERAL_BUS_GDBUS_I2C_H__ */
gint pin,
gpointer user_data);
-gboolean handle_pwm_close(
- PeripheralIoGdbusPwm *pwm,
- GDBusMethodInvocation *invocation,
- gint handle,
- gpointer user_data);
-
-gboolean handle_pwm_set_period(
- PeripheralIoGdbusPwm *pwm,
- GDBusMethodInvocation *invocation,
- gint handle,
- gint period,
- gpointer user_data);
-
-gboolean handle_pwm_set_duty_cycle(
- PeripheralIoGdbusPwm *pwm,
- GDBusMethodInvocation *invocation,
- gint handle,
- gint duty_cycle,
- gpointer user_data);
-
-gboolean handle_pwm_set_polarity(
- PeripheralIoGdbusPwm *pwm,
- GDBusMethodInvocation *invocation,
- gint handle,
- gint polarity,
- gpointer user_data);
-
-gboolean handle_pwm_set_enable(
- PeripheralIoGdbusPwm *pwm,
- GDBusMethodInvocation *invocation,
- gint handle,
- gint enable,
- gpointer user_data);
-
#endif /* __PERIPHERAL_BUS_GDBUS_PWM_H__ */
gint cs,
gpointer user_data);
-gboolean handle_spi_close(
- PeripheralIoGdbusSpi *spi,
- GDBusMethodInvocation *invocation,
- gint handle,
- gpointer user_data);
-
-gboolean handle_spi_set_mode(
- PeripheralIoGdbusSpi *spi,
- GDBusMethodInvocation *invocation,
- gint handle,
- guchar mode,
- gpointer user_data);
-
-gboolean handle_spi_set_bit_order(
- PeripheralIoGdbusSpi *spi,
- GDBusMethodInvocation *invocation,
- gint handle,
- gboolean lsb,
- gpointer user_data);
-
-gboolean handle_spi_set_bits_per_word(
- PeripheralIoGdbusSpi *spi,
- GDBusMethodInvocation *invocation,
- gint handle,
- guchar bits,
- gpointer user_data);
-
-gboolean handle_spi_set_frequency(
- PeripheralIoGdbusSpi *spi,
- GDBusMethodInvocation *invocation,
- gint handle,
- guint freq,
- gpointer user_data);
-
-gboolean handle_spi_read(
- PeripheralIoGdbusSpi *spi,
- GDBusMethodInvocation *invocation,
- gint handle,
- gint length,
- gpointer user_data);
-
-gboolean handle_spi_write(
- PeripheralIoGdbusSpi *spi,
- GDBusMethodInvocation *invocation,
- gint handle,
- gint length,
- GVariant *data_array,
- gpointer user_data);
-
-gboolean handle_spi_transfer(
- PeripheralIoGdbusSpi *spi,
- GDBusMethodInvocation *invocation,
- gint handle,
- gint length,
- GVariant *tx_data_array,
- gpointer user_data);
-
#endif /* __PERIPHERAL_BUS_GDBUS_SPI_H__ */
gint port,
gpointer user_data);
-gboolean handle_uart_close(
- PeripheralIoGdbusUart *uart,
- GDBusMethodInvocation *invocation,
- gint handle,
- gpointer user_data);
-
-gboolean handle_uart_set_baud_rate(
- PeripheralIoGdbusUart *uart,
- GDBusMethodInvocation *invocation,
- gint handle,
- guint baudrate,
- gpointer user_data);
-
-gboolean handle_uart_set_byte_size(
- PeripheralIoGdbusUart *uart,
- GDBusMethodInvocation *invocation,
- gint handle,
- guint byte_size,
- gpointer user_data);
-
-gboolean handle_uart_set_parity(
- PeripheralIoGdbusUart *uart,
- GDBusMethodInvocation *invocation,
- gint handle,
- guint parity,
- gpointer user_data);
-
-gboolean handle_uart_set_stop_bits(
- PeripheralIoGdbusUart *uart,
- GDBusMethodInvocation *invocation,
- gint handle,
- guint stop_bits,
- gpointer user_data);
-
-gboolean handle_uart_set_flow_control(
- PeripheralIoGdbusUart *uart,
- GDBusMethodInvocation *invocation,
- gint handle,
- gboolean xonxoff,
- gboolean rtscts,
- gpointer user_data);
-
-gboolean handle_uart_read(
- PeripheralIoGdbusUart *uart,
- GDBusMethodInvocation *invocation,
- gint handle,
- gint length,
- gpointer user_data);
-
-gboolean handle_uart_write(
- PeripheralIoGdbusUart *uart,
- GDBusMethodInvocation *invocation,
- gint handle,
- gint length,
- GVariant *data_array,
- gpointer user_data);
-
#endif /* __PERIPHERAL_BUS_GDBUS_UART_H__ */
"handle-open",
G_CALLBACK(handle_gpio_open),
pb_data);
- g_signal_connect(pb_data->gpio_skeleton,
- "handle-close",
- G_CALLBACK(handle_gpio_close),
- pb_data);
- g_signal_connect(pb_data->gpio_skeleton,
- "handle-set-direction",
- G_CALLBACK(handle_gpio_set_direction),
- pb_data);
- g_signal_connect(pb_data->gpio_skeleton,
- "handle-set-edge-mode",
- G_CALLBACK(handle_gpio_set_edge_mode),
- pb_data);
- g_signal_connect(pb_data->gpio_skeleton,
- "handle-set-interrupted-cb",
- G_CALLBACK(handle_gpio_set_interrupted_cb),
- pb_data);
- g_signal_connect(pb_data->gpio_skeleton,
- "handle-unset-interrupted-cb",
- G_CALLBACK(handle_gpio_unset_interrupted_cb),
- pb_data);
- g_signal_connect(pb_data->gpio_skeleton,
- "handle-read",
- G_CALLBACK(handle_gpio_read),
- pb_data);
- g_signal_connect(pb_data->gpio_skeleton,
- "handle-write",
- G_CALLBACK(handle_gpio_write),
- pb_data);
manager = g_dbus_object_manager_server_new(PERIPHERAL_GDBUS_GPIO_PATH);
"handle-open",
G_CALLBACK(handle_i2c_open),
pb_data);
- g_signal_connect(pb_data->i2c_skeleton,
- "handle-close",
- G_CALLBACK(handle_i2c_close),
- pb_data);
- g_signal_connect(pb_data->i2c_skeleton,
- "handle-read",
- G_CALLBACK(handle_i2c_read),
- pb_data);
- g_signal_connect(pb_data->i2c_skeleton,
- "handle-write",
- G_CALLBACK(handle_i2c_write),
- pb_data);
- g_signal_connect(pb_data->i2c_skeleton,
- "handle-smbus-ioctl",
- G_CALLBACK(handle_i2c_smbus_ioctl),
- pb_data);
manager = g_dbus_object_manager_server_new(PERIPHERAL_GDBUS_I2C_PATH);
"handle-open",
G_CALLBACK(handle_pwm_open),
pb_data);
- g_signal_connect(pb_data->pwm_skeleton,
- "handle-close",
- G_CALLBACK(handle_pwm_close),
- pb_data);
- g_signal_connect(pb_data->pwm_skeleton,
- "handle-set-period",
- G_CALLBACK(handle_pwm_set_period),
- pb_data);
- g_signal_connect(pb_data->pwm_skeleton,
- "handle-set-duty-cycle",
- G_CALLBACK(handle_pwm_set_duty_cycle),
- pb_data);
- g_signal_connect(pb_data->pwm_skeleton,
- "handle-set-polarity",
- G_CALLBACK(handle_pwm_set_polarity),
- pb_data);
- g_signal_connect(pb_data->pwm_skeleton,
- "handle-set-enable",
- G_CALLBACK(handle_pwm_set_enable),
- pb_data);
manager = g_dbus_object_manager_server_new(PERIPHERAL_GDBUS_PWM_PATH);
"handle-open",
G_CALLBACK(handle_uart_open),
pb_data);
- g_signal_connect(pb_data->uart_skeleton,
- "handle-close",
- G_CALLBACK(handle_uart_close),
- pb_data);
- g_signal_connect(pb_data->uart_skeleton,
- "handle-set-baud-rate",
- G_CALLBACK(handle_uart_set_baud_rate),
- pb_data);
- g_signal_connect(pb_data->uart_skeleton,
- "handle-set-byte-size",
- G_CALLBACK(handle_uart_set_byte_size),
- pb_data);
- g_signal_connect(pb_data->uart_skeleton,
- "handle-set-parity",
- G_CALLBACK(handle_uart_set_parity),
- pb_data);
- g_signal_connect(pb_data->uart_skeleton,
- "handle-set-stop-bits",
- G_CALLBACK(handle_uart_set_stop_bits),
- pb_data);
- g_signal_connect(pb_data->uart_skeleton,
- "handle-set-flow-control",
- G_CALLBACK(handle_uart_set_flow_control),
- pb_data);
- g_signal_connect(pb_data->uart_skeleton,
- "handle-read",
- G_CALLBACK(handle_uart_read),
- pb_data);
- g_signal_connect(pb_data->uart_skeleton,
- "handle-write",
- G_CALLBACK(handle_uart_write),
- pb_data);
manager = g_dbus_object_manager_server_new(PERIPHERAL_GDBUS_UART_PATH);
"handle-open",
G_CALLBACK(handle_spi_open),
pb_data);
- g_signal_connect(pb_data->spi_skeleton,
- "handle-close",
- G_CALLBACK(handle_spi_close),
- pb_data);
- g_signal_connect(pb_data->spi_skeleton,
- "handle-set-mode",
- G_CALLBACK(handle_spi_set_mode),
- pb_data);
- g_signal_connect(pb_data->spi_skeleton,
- "handle-set-bit-order",
- G_CALLBACK(handle_spi_set_bit_order),
- pb_data);
- g_signal_connect(pb_data->spi_skeleton,
- "handle-set-bits-per-word",
- G_CALLBACK(handle_spi_set_bits_per_word),
- pb_data);
- g_signal_connect(pb_data->spi_skeleton,
- "handle-set-frequency",
- G_CALLBACK(handle_spi_set_frequency),
- pb_data);
- g_signal_connect(pb_data->spi_skeleton,
- "handle-read",
- G_CALLBACK(handle_spi_read),
- pb_data);
- g_signal_connect(pb_data->spi_skeleton,
- "handle-write",
- G_CALLBACK(handle_spi_write),
- pb_data);
- g_signal_connect(pb_data->spi_skeleton,
- "handle-transfer",
- G_CALLBACK(handle_spi_transfer),
- pb_data);
manager = g_dbus_object_manager_server_new(PERIPHERAL_GDBUS_SPI_PATH);
peripheral_io_gdbus_gpio_complete_open(gpio, invocation, GPOINTER_TO_UINT(gpio_handle), ret);
return true;
-}
-
-gboolean handle_gpio_close(
- PeripheralIoGdbusGpio *gpio,
- GDBusMethodInvocation *invocation,
- gint handle,
- gpointer user_data)
-{
- peripheral_bus_s *pb_data = (peripheral_bus_s*)user_data;
- peripheral_error_e ret = PERIPHERAL_ERROR_NONE;
- pb_data_h gpio_handle = GUINT_TO_POINTER(handle);
-
- if (peripheral_bus_handle_is_valid(invocation, gpio_handle, pb_data->gpio_list) != 0) {
- _E("gpio handle is not valid");
- ret = PERIPHERAL_ERROR_INVALID_PARAMETER;
- } else {
- g_bus_unwatch_name(gpio_handle->watch_id);
- ret = peripheral_bus_gpio_close(gpio_handle);
- }
-
- peripheral_io_gdbus_gpio_complete_close(gpio, invocation, ret);
-
- return true;
-}
-
-gboolean handle_gpio_set_direction(
- PeripheralIoGdbusGpio *gpio,
- GDBusMethodInvocation *invocation,
- gint handle,
- gint direction,
- gpointer user_data)
-{
- peripheral_bus_s *pb_data = (peripheral_bus_s*)user_data;
- peripheral_error_e ret = PERIPHERAL_ERROR_NONE;
- pb_data_h gpio_handle = GUINT_TO_POINTER(handle);
-
- if (peripheral_bus_handle_is_valid(invocation, gpio_handle, pb_data->gpio_list) != 0) {
- _E("gpio handle is not valid");
- ret = PERIPHERAL_ERROR_INVALID_PARAMETER;
- } else
- ret = peripheral_bus_gpio_set_direction(gpio_handle, direction);
-
- peripheral_io_gdbus_gpio_complete_set_direction(gpio, invocation, ret);
-
- return true;
-}
-
-gboolean handle_gpio_set_edge_mode(
- PeripheralIoGdbusGpio *gpio,
- GDBusMethodInvocation *invocation,
- gint handle,
- gint edge,
- gpointer user_data)
-{
- peripheral_bus_s *pb_data = (peripheral_bus_s*)user_data;
- peripheral_error_e ret = PERIPHERAL_ERROR_NONE;
- pb_data_h gpio_handle = GUINT_TO_POINTER(handle);
-
- if (peripheral_bus_handle_is_valid(invocation, gpio_handle, pb_data->gpio_list) != 0) {
- _E("gpio handle is not valid");
- ret = PERIPHERAL_ERROR_INVALID_PARAMETER;
- } else
- ret = peripheral_bus_gpio_set_edge(gpio_handle, edge);
-
- peripheral_io_gdbus_gpio_complete_set_edge_mode(gpio, invocation, ret);
-
- return true;
-}
-
-gboolean handle_gpio_set_interrupted_cb(
- PeripheralIoGdbusGpio *gpio,
- GDBusMethodInvocation *invocation,
- gint handle,
- gpointer user_data)
-{
- peripheral_bus_s *pb_data = (peripheral_bus_s*)user_data;
- peripheral_error_e ret = PERIPHERAL_ERROR_NONE;
- pb_data_h gpio_handle = GUINT_TO_POINTER(handle);
-
- if (peripheral_bus_handle_is_valid(invocation, gpio_handle, pb_data->gpio_list) != 0) {
- _E("gpio handle is not valid");
- ret = PERIPHERAL_ERROR_INVALID_PARAMETER;
- } else
- ret = peripheral_bus_gpio_set_interrupted_cb(gpio_handle);
-
- peripheral_io_gdbus_gpio_complete_set_interrupted_cb(gpio, invocation, ret);
-
- return true;
-}
-
-gboolean handle_gpio_unset_interrupted_cb(
- PeripheralIoGdbusGpio *gpio,
- GDBusMethodInvocation *invocation,
- gint handle,
- gpointer user_data)
-{
- peripheral_bus_s *pb_data = (peripheral_bus_s*)user_data;
- peripheral_error_e ret = PERIPHERAL_ERROR_NONE;
- pb_data_h gpio_handle = GUINT_TO_POINTER(handle);
-
- if (peripheral_bus_handle_is_valid(invocation, gpio_handle, pb_data->gpio_list) != 0) {
- _E("gpio handle is not valid");
- ret = PERIPHERAL_ERROR_INVALID_PARAMETER;
- } else
- ret = peripheral_bus_gpio_unset_interrupted_cb(gpio_handle);
-
- peripheral_io_gdbus_gpio_complete_unset_interrupted_cb(gpio, invocation, ret);
-
- return true;
-}
-
-void peripheral_bus_emit_interrupted_cb(
- PeripheralIoGdbusGpio *gpio,
- gint pin,
- gint value,
- guint64 timestamp)
-{
- g_assert(gpio != NULL);
-
- peripheral_io_gdbus_gpio_emit_interrupted_cb(gpio, pin, value, timestamp);
-}
-
-gboolean handle_gpio_read(
- PeripheralIoGdbusGpio *gpio,
- GDBusMethodInvocation *invocation,
- gint handle,
- gpointer user_data)
-{
- peripheral_bus_s *pb_data = (peripheral_bus_s*)user_data;
- peripheral_error_e ret = PERIPHERAL_ERROR_NONE;
- pb_data_h gpio_handle = GUINT_TO_POINTER(handle);
- gint read_value = 0;
-
- if (peripheral_bus_handle_is_valid(invocation, gpio_handle, pb_data->gpio_list) != 0) {
- _E("gpio handle is not valid");
- ret = PERIPHERAL_ERROR_INVALID_PARAMETER;
- } else
- ret = peripheral_bus_gpio_read(gpio_handle, &read_value);
-
- peripheral_io_gdbus_gpio_complete_read(gpio, invocation, read_value, ret);
-
- return true;
-}
-
-gboolean handle_gpio_write(
- PeripheralIoGdbusGpio *gpio,
- GDBusMethodInvocation *invocation,
- gint handle,
- gint value,
- gpointer user_data)
-{
- peripheral_bus_s *pb_data = (peripheral_bus_s*)user_data;
- peripheral_error_e ret = PERIPHERAL_ERROR_NONE;
- pb_data_h gpio_handle = GUINT_TO_POINTER(handle);
-
- if (peripheral_bus_handle_is_valid(invocation, gpio_handle, pb_data->gpio_list) != 0) {
- _E("gpio handle is not valid");
- ret = PERIPHERAL_ERROR_INVALID_PARAMETER;
- } else
- ret = peripheral_bus_gpio_write(gpio_handle, value);
-
- peripheral_io_gdbus_gpio_complete_write(gpio, invocation, ret);
-
- return true;
-}
+}
\ No newline at end of file
return true;
}
-
-gboolean handle_i2c_close(
- PeripheralIoGdbusI2c *i2c,
- GDBusMethodInvocation *invocation,
- gint handle,
- gpointer user_data)
-{
- peripheral_bus_s *pb_data = (peripheral_bus_s*)user_data;
- peripheral_error_e ret = PERIPHERAL_ERROR_NONE;
- pb_data_h i2c_handle = GUINT_TO_POINTER(handle);
-
- if (peripheral_bus_handle_is_valid(invocation, i2c_handle, pb_data->i2c_list) != 0) {
- _E("i2c handle is not valid");
- ret = PERIPHERAL_ERROR_INVALID_PARAMETER;
- } else {
- g_bus_unwatch_name(i2c_handle->watch_id);
- ret = peripheral_bus_i2c_close(i2c_handle);
- }
-
- peripheral_io_gdbus_i2c_complete_close(i2c, invocation, ret);
-
- return true;
-}
-
-gboolean handle_i2c_read(
- PeripheralIoGdbusI2c *i2c,
- GDBusMethodInvocation *invocation,
- gint handle,
- gint length,
- gpointer user_data)
-{
- peripheral_bus_s *pb_data = (peripheral_bus_s*)user_data;
- peripheral_error_e ret = PERIPHERAL_ERROR_NONE;
- pb_data_h i2c_handle = GUINT_TO_POINTER(handle);
- GVariant *data_array = NULL;
- uint8_t err_buf[2] = {0, };
-
- if (peripheral_bus_handle_is_valid(invocation, i2c_handle, pb_data->i2c_list) != 0) {
- _E("i2c handle is not valid");
- data_array = peripheral_bus_build_variant_ay(err_buf, sizeof(err_buf));
- ret = PERIPHERAL_ERROR_INVALID_PARAMETER;
- } else
- ret = peripheral_bus_i2c_read(i2c_handle, length, &data_array);
-
- peripheral_io_gdbus_i2c_complete_read(i2c, invocation, data_array, ret);
-
- return true;
-}
-
-gboolean handle_i2c_write(
- PeripheralIoGdbusI2c *i2c,
- GDBusMethodInvocation *invocation,
- gint handle,
- gint length,
- GVariant *data_array,
- gpointer user_data)
-{
- peripheral_bus_s *pb_data = (peripheral_bus_s*)user_data;
- peripheral_error_e ret = PERIPHERAL_ERROR_NONE;
- pb_data_h i2c_handle = GUINT_TO_POINTER(handle);
-
- if (peripheral_bus_handle_is_valid(invocation, i2c_handle, pb_data->i2c_list) != 0) {
- _E("i2c handle is not valid");
- ret = PERIPHERAL_ERROR_INVALID_PARAMETER;
- } else
- ret = peripheral_bus_i2c_write(i2c_handle, length, data_array);
-
- peripheral_io_gdbus_i2c_complete_write(i2c, invocation, ret);
-
- return true;
-}
-
-gboolean handle_i2c_smbus_ioctl(
- PeripheralIoGdbusI2c *i2c,
- GDBusMethodInvocation *invocation,
- gint handle,
- guchar read_write,
- guchar command,
- guint size,
- guint16 data_in,
- gpointer user_data)
-{
- peripheral_bus_s *pb_data = (peripheral_bus_s*)user_data;
- peripheral_error_e ret = PERIPHERAL_ERROR_NONE;
- pb_data_h i2c_handle = GUINT_TO_POINTER(handle);
- uint16_t data = 0xFFFF;
-
- if (peripheral_bus_handle_is_valid(invocation, i2c_handle, pb_data->i2c_list) != 0) {
- _E("i2c handle is not valid");
- ret = PERIPHERAL_ERROR_INVALID_PARAMETER;
- } else
- ret = peripheral_bus_i2c_smbus_ioctl(i2c_handle, read_write, command, size, data_in, &data);
-
- peripheral_io_gdbus_i2c_complete_smbus_ioctl(i2c, invocation, data, ret);
-
- return true;
-}
return true;
}
-
-gboolean handle_pwm_close(
- PeripheralIoGdbusPwm *pwm,
- GDBusMethodInvocation *invocation,
- gint handle,
- gpointer user_data)
-{
- peripheral_bus_s *pb_data = (peripheral_bus_s*)user_data;
- peripheral_error_e ret = PERIPHERAL_ERROR_NONE;
- pb_data_h pwm_handle = GUINT_TO_POINTER(handle);
-
- if (peripheral_bus_handle_is_valid(invocation, pwm_handle, pb_data->pwm_list) != 0) {
- _E("pwm handle is not valid");
- ret = PERIPHERAL_ERROR_INVALID_PARAMETER;
- } else {
- g_bus_unwatch_name(pwm_handle->watch_id);
- ret = peripheral_bus_pwm_close(pwm_handle);
- }
-
- peripheral_io_gdbus_pwm_complete_close(pwm, invocation, ret);
-
- return true;
-}
-
-gboolean handle_pwm_set_period(
- PeripheralIoGdbusPwm *pwm,
- GDBusMethodInvocation *invocation,
- gint handle,
- gint period,
- gpointer user_data)
-{
- peripheral_bus_s *pb_data = (peripheral_bus_s*)user_data;
- peripheral_error_e ret = PERIPHERAL_ERROR_NONE;
- pb_data_h pwm_handle = GUINT_TO_POINTER(handle);
-
- if (peripheral_bus_handle_is_valid(invocation, pwm_handle, pb_data->pwm_list) != 0) {
- _E("pwm handle is not valid");
- ret = PERIPHERAL_ERROR_INVALID_PARAMETER;
- } else
- ret = peripheral_bus_pwm_set_period(pwm_handle, period);
-
- peripheral_io_gdbus_pwm_complete_set_period(pwm, invocation, ret);
-
- return true;
-}
-
-gboolean handle_pwm_set_duty_cycle(
- PeripheralIoGdbusPwm *pwm,
- GDBusMethodInvocation *invocation,
- gint handle,
- gint duty_cycle,
- gpointer user_data)
-{
- peripheral_bus_s *pb_data = (peripheral_bus_s*)user_data;
- peripheral_error_e ret = PERIPHERAL_ERROR_NONE;
- pb_data_h pwm_handle = GUINT_TO_POINTER(handle);
-
- if (peripheral_bus_handle_is_valid(invocation, pwm_handle, pb_data->pwm_list) != 0) {
- _E("pwm handle is not valid");
- ret = PERIPHERAL_ERROR_INVALID_PARAMETER;
- } else
- ret = peripheral_bus_pwm_set_duty_cycle(pwm_handle, duty_cycle);
-
- peripheral_io_gdbus_pwm_complete_set_duty_cycle(pwm, invocation, ret);
-
- return true;
-}
-
-gboolean handle_pwm_set_polarity(
- PeripheralIoGdbusPwm *pwm,
- GDBusMethodInvocation *invocation,
- gint handle,
- gint polarity,
- gpointer user_data)
-{
- peripheral_bus_s *pb_data = (peripheral_bus_s*)user_data;
- peripheral_error_e ret = PERIPHERAL_ERROR_NONE;
- pb_data_h pwm_handle = GUINT_TO_POINTER(handle);
-
- if (peripheral_bus_handle_is_valid(invocation, pwm_handle, pb_data->pwm_list) != 0) {
- _E("pwm handle is not valid");
- ret = PERIPHERAL_ERROR_INVALID_PARAMETER;
- } else
- ret = peripheral_bus_pwm_set_polarity(pwm_handle, polarity);
-
- peripheral_io_gdbus_pwm_complete_set_polarity(pwm, invocation, ret);
-
- return true;
-}
-
-gboolean handle_pwm_set_enable(
- PeripheralIoGdbusPwm *pwm,
- GDBusMethodInvocation *invocation,
- gint handle,
- gint enable,
- gpointer user_data)
-{
- peripheral_bus_s *pb_data = (peripheral_bus_s*)user_data;
- peripheral_error_e ret = PERIPHERAL_ERROR_NONE;
- pb_data_h pwm_handle = GUINT_TO_POINTER(handle);
-
- if (peripheral_bus_handle_is_valid(invocation, pwm_handle, pb_data->pwm_list) != 0) {
- _E("pwm handle is not valid");
- ret = PERIPHERAL_ERROR_INVALID_PARAMETER;
- } else
- ret = peripheral_bus_pwm_set_enable(pwm_handle, enable);
-
- peripheral_io_gdbus_pwm_complete_set_enable(pwm, invocation, ret);
-
- return true;
-}
return true;
}
-
-gboolean handle_spi_close(
- PeripheralIoGdbusSpi *spi,
- GDBusMethodInvocation *invocation,
- gint handle,
- gpointer user_data)
-{
- peripheral_bus_s *pb_data = (peripheral_bus_s*)user_data;
- peripheral_error_e ret = PERIPHERAL_ERROR_NONE;
- pb_data_h spi_handle = GUINT_TO_POINTER(handle);
-
- if (peripheral_bus_handle_is_valid(invocation, spi_handle, pb_data->spi_list) != 0) {
- _E("spi handle is not valid");
- ret = PERIPHERAL_ERROR_INVALID_PARAMETER;
- } else {
- g_bus_unwatch_name(spi_handle->watch_id);
- ret = peripheral_bus_spi_close(spi_handle);
- }
-
- peripheral_io_gdbus_spi_complete_close(spi, invocation, ret);
-
- return true;
-}
-
-gboolean handle_spi_set_mode(
- PeripheralIoGdbusSpi *spi,
- GDBusMethodInvocation *invocation,
- gint handle,
- guchar mode,
- gpointer user_data)
-{
- peripheral_bus_s *pb_data = (peripheral_bus_s*)user_data;
- peripheral_error_e ret = PERIPHERAL_ERROR_NONE;
- pb_data_h spi_handle = GUINT_TO_POINTER(handle);
-
- if (peripheral_bus_handle_is_valid(invocation, spi_handle, pb_data->spi_list) != 0) {
- _E("spi handle is not valid");
- ret = PERIPHERAL_ERROR_INVALID_PARAMETER;
- } else
- ret = peripheral_bus_spi_set_mode(spi_handle, mode);
-
- peripheral_io_gdbus_spi_complete_set_mode(spi, invocation, ret);
-
- return true;
-}
-
-gboolean handle_spi_set_bit_order(
- PeripheralIoGdbusSpi *spi,
- GDBusMethodInvocation *invocation,
- gint handle,
- gboolean lsb,
- gpointer user_data)
-{
- peripheral_bus_s *pb_data = (peripheral_bus_s*)user_data;
- peripheral_error_e ret = PERIPHERAL_ERROR_NONE;
- pb_data_h spi_handle = GUINT_TO_POINTER(handle);
-
- if (peripheral_bus_handle_is_valid(invocation, spi_handle, pb_data->spi_list) != 0) {
- _E("spi handle is not valid");
- ret = PERIPHERAL_ERROR_INVALID_PARAMETER;
- } else
- ret = peripheral_bus_spi_set_bit_order(spi_handle, lsb);
-
- peripheral_io_gdbus_spi_complete_set_bit_order(spi, invocation, ret);
-
- return true;
-}
-
-gboolean handle_spi_set_bits_per_word(
- PeripheralIoGdbusSpi *spi,
- GDBusMethodInvocation *invocation,
- gint handle,
- guchar bits,
- gpointer user_data)
-{
- peripheral_bus_s *pb_data = (peripheral_bus_s*)user_data;
- peripheral_error_e ret = PERIPHERAL_ERROR_NONE;
- pb_data_h spi_handle = GUINT_TO_POINTER(handle);
-
- if (peripheral_bus_handle_is_valid(invocation, spi_handle, pb_data->spi_list) != 0) {
- _E("spi handle is not valid");
- ret = PERIPHERAL_ERROR_INVALID_PARAMETER;
- } else
- ret = peripheral_bus_spi_set_bits_per_word(spi_handle, bits);
-
- peripheral_io_gdbus_spi_complete_set_bits_per_word(spi, invocation, ret);
-
- return true;
-}
-
-gboolean handle_spi_set_frequency(
- PeripheralIoGdbusSpi *spi,
- GDBusMethodInvocation *invocation,
- gint handle,
- guint freq,
- gpointer user_data)
-{
- peripheral_bus_s *pb_data = (peripheral_bus_s*)user_data;
- peripheral_error_e ret = PERIPHERAL_ERROR_NONE;
- pb_data_h spi_handle = GUINT_TO_POINTER(handle);
-
- if (peripheral_bus_handle_is_valid(invocation, spi_handle, pb_data->spi_list) != 0) {
- _E("spi handle is not valid");
- ret = PERIPHERAL_ERROR_INVALID_PARAMETER;
- } else
- ret = peripheral_bus_spi_set_frequency(spi_handle, freq);
-
- peripheral_io_gdbus_spi_complete_set_frequency(spi, invocation, ret);
-
- return true;
-}
-
-gboolean handle_spi_read(
- PeripheralIoGdbusSpi *spi,
- GDBusMethodInvocation *invocation,
- gint handle,
- gint length,
- gpointer user_data)
-{
- peripheral_bus_s *pb_data = (peripheral_bus_s*)user_data;
- peripheral_error_e ret = PERIPHERAL_ERROR_NONE;
- pb_data_h spi_handle = GUINT_TO_POINTER(handle);
- GVariant *data_array = NULL;
- uint8_t err_buf[2] = {0, };
-
- if (peripheral_bus_handle_is_valid(invocation, spi_handle, pb_data->spi_list) != 0) {
- _E("spi handle is not valid");
- data_array = peripheral_bus_build_variant_ay(err_buf, sizeof(err_buf));
- ret = PERIPHERAL_ERROR_INVALID_PARAMETER;
- } else
- ret = peripheral_bus_spi_read(spi_handle, &data_array, length);
-
- peripheral_io_gdbus_spi_complete_read(spi, invocation, data_array, ret);
-
- return true;
-}
-
-gboolean handle_spi_write(
- PeripheralIoGdbusSpi *spi,
- GDBusMethodInvocation *invocation,
- gint handle,
- gint length,
- GVariant *data_array,
- gpointer user_data)
-{
- peripheral_bus_s *pb_data = (peripheral_bus_s*)user_data;
- peripheral_error_e ret = PERIPHERAL_ERROR_NONE;
- pb_data_h spi_handle = GUINT_TO_POINTER(handle);
-
- if (peripheral_bus_handle_is_valid(invocation, spi_handle, pb_data->spi_list) != 0) {
- _E("spi handle is not valid");
- ret = PERIPHERAL_ERROR_INVALID_PARAMETER;
- } else
- ret = peripheral_bus_spi_write(spi_handle, data_array, length);
-
- peripheral_io_gdbus_spi_complete_write(spi, invocation, ret);
-
- return true;
-}
-
-gboolean handle_spi_transfer(
- PeripheralIoGdbusSpi *spi,
- GDBusMethodInvocation *invocation,
- gint handle,
- gint length,
- GVariant *tx_data_array,
- gpointer user_data)
-{
- peripheral_bus_s *pb_data = (peripheral_bus_s*)user_data;
- peripheral_error_e ret = PERIPHERAL_ERROR_NONE;
- pb_data_h spi_handle = GUINT_TO_POINTER(handle);
- GVariant *rx_data_array = NULL;
- uint8_t err_buf[2] = {0, };
-
- if (peripheral_bus_handle_is_valid(invocation, spi_handle, pb_data->spi_list) != 0) {
- _E("spi handle is not valid");
- rx_data_array = peripheral_bus_build_variant_ay(err_buf, sizeof(err_buf));
- ret = PERIPHERAL_ERROR_INVALID_PARAMETER;
- } else
- ret = peripheral_bus_spi_transfer(spi_handle, tx_data_array, &rx_data_array, length);
-
- peripheral_io_gdbus_spi_complete_transfer(spi, invocation, rx_data_array, ret);
-
- return true;
-}
return true;
}
-
-gboolean handle_uart_close(
- PeripheralIoGdbusUart *uart,
- GDBusMethodInvocation *invocation,
- gint handle,
- gpointer user_data)
-{
- peripheral_bus_s *pb_data = (peripheral_bus_s*)user_data;
- peripheral_error_e ret = PERIPHERAL_ERROR_NONE;
- pb_data_h uart_handle = GUINT_TO_POINTER(handle);
-
- if (peripheral_bus_handle_is_valid(invocation, uart_handle, pb_data->uart_list) != 0) {
- _E("uart handle is not valid");
- ret = PERIPHERAL_ERROR_INVALID_PARAMETER;
- } else {
- g_bus_unwatch_name(uart_handle->watch_id);
- ret = peripheral_bus_uart_close(uart_handle);
- }
-
- peripheral_io_gdbus_uart_complete_close(uart, invocation, ret);
-
- return true;
-}
-
-gboolean handle_uart_set_baud_rate(
- PeripheralIoGdbusUart *uart,
- GDBusMethodInvocation *invocation,
- gint handle,
- guint baud_rate,
- gpointer user_data)
-{
- peripheral_bus_s *pb_data = (peripheral_bus_s*)user_data;
- peripheral_error_e ret = PERIPHERAL_ERROR_NONE;
- pb_data_h uart_handle = GUINT_TO_POINTER(handle);
-
- if (peripheral_bus_handle_is_valid(invocation, uart_handle, pb_data->uart_list) != 0) {
- _E("uart handle is not valid");
- ret = PERIPHERAL_ERROR_INVALID_PARAMETER;
- } else
- ret = peripheral_bus_uart_set_baud_rate(uart_handle, baud_rate);
-
- peripheral_io_gdbus_uart_complete_set_baud_rate(uart, invocation, ret);
-
- return true;
-}
-
-gboolean handle_uart_set_byte_size(
- PeripheralIoGdbusUart *uart,
- GDBusMethodInvocation *invocation,
- gint handle,
- guint byte_size,
- gpointer user_data)
-{
- peripheral_bus_s *pb_data = (peripheral_bus_s*)user_data;
- peripheral_error_e ret = PERIPHERAL_ERROR_NONE;
- pb_data_h uart_handle = GUINT_TO_POINTER(handle);
-
- if (peripheral_bus_handle_is_valid(invocation, uart_handle, pb_data->uart_list) != 0) {
- _E("uart handle is not valid");
- ret = PERIPHERAL_ERROR_INVALID_PARAMETER;
- } else
- ret = peripheral_bus_uart_set_byte_size(uart_handle, byte_size);
-
- peripheral_io_gdbus_uart_complete_set_byte_size(uart, invocation, ret);
-
- return true;
-}
-
-gboolean handle_uart_set_parity(
- PeripheralIoGdbusUart *uart,
- GDBusMethodInvocation *invocation,
- gint handle,
- guint parity,
- gpointer user_data)
-{
- peripheral_bus_s *pb_data = (peripheral_bus_s*)user_data;
- peripheral_error_e ret = PERIPHERAL_ERROR_NONE;
- pb_data_h uart_handle = GUINT_TO_POINTER(handle);
-
- if (peripheral_bus_handle_is_valid(invocation, uart_handle, pb_data->uart_list) != 0) {
- _E("uart handle is not valid");
- ret = PERIPHERAL_ERROR_INVALID_PARAMETER;
- } else
- ret = peripheral_bus_uart_set_parity(uart_handle, parity);
-
- peripheral_io_gdbus_uart_complete_set_parity(uart, invocation, ret);
-
- return true;
-}
-
-gboolean handle_uart_set_stop_bits(
- PeripheralIoGdbusUart *uart,
- GDBusMethodInvocation *invocation,
- gint handle,
- guint stop_bits,
- gpointer user_data)
-{
- peripheral_bus_s *pb_data = (peripheral_bus_s*)user_data;
- peripheral_error_e ret = PERIPHERAL_ERROR_NONE;
- pb_data_h uart_handle = GUINT_TO_POINTER(handle);
-
- if (peripheral_bus_handle_is_valid(invocation, uart_handle, pb_data->uart_list) != 0) {
- _E("uart handle is not valid");
- ret = PERIPHERAL_ERROR_INVALID_PARAMETER;
- } else
- ret = peripheral_bus_uart_set_stop_bits(uart_handle, stop_bits);
-
- peripheral_io_gdbus_uart_complete_set_stop_bits(uart, invocation, ret);
-
- return true;
-}
-
-gboolean handle_uart_set_flow_control(
- PeripheralIoGdbusUart *uart,
- GDBusMethodInvocation *invocation,
- gint handle,
- gboolean xonxoff,
- gboolean rtscts,
- gpointer user_data)
-{
- peripheral_bus_s *pb_data = (peripheral_bus_s*)user_data;
- peripheral_error_e ret = PERIPHERAL_ERROR_NONE;
- pb_data_h uart_handle = GUINT_TO_POINTER(handle);
-
- if (peripheral_bus_handle_is_valid(invocation, uart_handle, pb_data->uart_list) != 0) {
- _E("uart handle is not valid");
- ret = PERIPHERAL_ERROR_INVALID_PARAMETER;
- } else
- ret = peripheral_bus_uart_set_flow_control(uart_handle, xonxoff, rtscts);
-
- peripheral_io_gdbus_uart_complete_set_flow_control(uart, invocation, ret);
-
- return true;
-}
-
-gboolean handle_uart_read(
- PeripheralIoGdbusUart *uart,
- GDBusMethodInvocation *invocation,
- gint handle,
- gint length,
- gpointer user_data)
-{
- peripheral_bus_s *pb_data = (peripheral_bus_s*)user_data;
- peripheral_error_e ret = PERIPHERAL_ERROR_NONE;
- pb_data_h uart_handle = GUINT_TO_POINTER(handle);
- uint8_t err_buf[2] = {0, };
- GVariant *data_array = NULL;
-
- if (peripheral_bus_handle_is_valid(invocation, uart_handle, pb_data->uart_list) != 0) {
- _E("uart handle is not valid");
- ret = PERIPHERAL_ERROR_INVALID_PARAMETER;
- } else
- ret = peripheral_bus_uart_read(uart_handle, &data_array, length);
-
- if (!data_array)
- data_array = peripheral_bus_build_variant_ay(err_buf, sizeof(err_buf));
-
- peripheral_io_gdbus_uart_complete_read(uart, invocation, data_array, ret);
-
- return true;
-}
-
-gboolean handle_uart_write(
- PeripheralIoGdbusUart *uart,
- GDBusMethodInvocation *invocation,
- gint handle,
- gint length,
- GVariant *data_array,
- gpointer user_data)
-{
- peripheral_bus_s *pb_data = (peripheral_bus_s*)user_data;
- peripheral_error_e ret = PERIPHERAL_ERROR_NONE;
- pb_data_h uart_handle = GUINT_TO_POINTER(handle);
-
- if (peripheral_bus_handle_is_valid(invocation, uart_handle, pb_data->uart_list) != 0) {
- _E("uart handle is not valid");
- ret = PERIPHERAL_ERROR_INVALID_PARAMETER;
- } else
- ret = peripheral_bus_uart_write(uart_handle, data_array, length);
-
- peripheral_io_gdbus_uart_complete_write(uart, invocation, ret);
-
- return true;
-}
return ret;;
}
+// TODO : This function will be removed.
int peripheral_bus_gpio_set_direction(pb_data_h handle, gint direction)
{
peripheral_bus_gpio_s *gpio = &handle->dev.gpio;
return PERIPHERAL_ERROR_NONE;
}
+// TODO : This function will be removed.
int peripheral_bus_gpio_set_edge(pb_data_h handle, gint edge)
{
peripheral_bus_gpio_s *gpio = &handle->dev.gpio;
return PERIPHERAL_ERROR_NONE;
}
+// TODO : This function will be removed.
static gboolean peripheral_bus_interrupted_cb(GIOChannel *io, GIOCondition condition, gpointer data)
{
peripheral_bus_gpio_s *gpio_data = (peripheral_bus_gpio_s *)data;
struct timeval time;
- unsigned long long timestamp;
+ // unsigned long long timestamp;
GIOStatus status;
gchar* strval;
int value;
else if (gpio_data->edge == PERIPHERAL_GPIO_EDGE_FALLING && value == 1)
return TRUE;
- timestamp = (unsigned long long)time.tv_sec * 1000000 + time.tv_usec;
- peripheral_bus_emit_interrupted_cb(gpio_data->gpio_skeleton, gpio_data->pin, value, timestamp);
+ //timestamp = (unsigned long long)time.tv_sec * 1000000 + time.tv_usec;
+ //peripheral_bus_emit_interrupted_cb(gpio_data->gpio_skeleton, gpio_data->pin, value, timestamp);
return TRUE;
}
+// TODO : This function will be removed.
int peripheral_bus_gpio_set_interrupted_cb(pb_data_h handle)
{
peripheral_bus_gpio_s *gpio = &handle->dev.gpio;
return PERIPHERAL_ERROR_UNKNOWN;
}
+// TODO : This function will be removed.
int peripheral_bus_gpio_unset_interrupted_cb(pb_data_h handle)
{
peripheral_bus_gpio_s *gpio = &handle->dev.gpio;
return PERIPHERAL_ERROR_NONE;
}
+// TODO : This function will be removed.
int peripheral_bus_gpio_read(pb_data_h handle, gint *value)
{
peripheral_bus_gpio_s *gpio = &handle->dev.gpio;
return PERIPHERAL_ERROR_NONE;
}
+// TODO : This function will be removed.
int peripheral_bus_gpio_write(pb_data_h handle, gint value)
{
peripheral_bus_gpio_s *gpio = &handle->dev.gpio;
<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>
- <method name="SetDirection">
- <arg type="u" name="handle" direction="in"/>
- <arg type="i" name="direction" direction="in"/>
- <arg type="i" name="result" direction="out"/>
- </method>
- <method name="SetEdgeMode">
- <arg type="u" name="handle" direction="in"/>
- <arg type="i" name="edge" direction="in"/>
- <arg type="i" name="result" direction="out"/>
- </method>
- <method name="SetInterruptedCb">
- <arg type="u" name="handle" direction="in"/>
- <arg type="i" name="result" direction="out"/>
- </method>
- <method name="UnsetInterruptedCb">
- <arg type="u" name="handle" direction="in"/>
- <arg type="i" name="result" direction="out"/>
- </method>
- <signal name='InterruptedCb'>
- <arg type='i' name='pin'/>
- <arg type='i' name='value'/>
- <arg type='t' name='timestamp'/>
- </signal>
- <method name="Read">
- <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="u" name="handle" direction="in"/>
- <arg type="i" name="value" direction="in"/>
- <arg type="i" name="result" direction="out"/>
- </method>
</interface>
<interface name="org.tizen.peripheral_io.i2c">
<method name="Open">
<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>
- <method name="Read">
- <arg type="u" name="handle" direction="in"/>
- <arg type="i" name="length" direction="in"/>
- <arg type="a(y)" name="data" direction="out">
- <annotation name="org.gtk.GDBus.C.ForceGVariant" value="true"/>
- </arg>
- <arg type="i" name="result" direction="out"/>
- </method>
- <method name="Write">
- <arg type="u" name="handle" direction="in"/>
- <arg type="i" name="length" direction="in"/>
- <arg type="a(y)" name="data" direction="in">
- <annotation name="org.gtk.GDBus.C.ForceGVariant" value="true"/>
- </arg>
- <arg type="i" name="result" direction="out"/>
- </method>
- <method name="SmbusIoctl">
- <arg type="u" name="handle" direction="in"/>
- <arg type="y" name="read_write" direction="in"/>
- <arg type="y" name="command" direction="in"/>
- <arg type="u" name="size" direction="in"/>
- <arg type="q" name="data_in" direction="in"/>
- <arg type="q" name="data_out" direction="out"/>
- <arg type="i" name="result" direction="out"/>
- </method>
</interface>
<interface name="org.tizen.peripheral_io.pwm">
<method name="Open">
<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>
- <method name="SetPeriod">
- <arg type="u" name="handle" direction="in"/>
- <arg type="i" name="period" direction="in"/>
- <arg type="i" name="result" direction="out"/>
- </method>
- <method name="SetDutyCycle">
- <arg type="u" name="handle" direction="in"/>
- <arg type="i" name="duty_cycle" direction="in"/>
- <arg type="i" name="result" direction="out"/>
- </method>
- <method name="SetPolarity">
- <arg type="u" name="handle" direction="in"/>
- <arg type="i" name="polarity" direction="in"/>
- <arg type="i" name="result" direction="out"/>
- </method>
- <method name="SetEnable">
- <arg type="u" name="handle" direction="in"/>
- <arg type="b" name="enable" direction="in"/>
- <arg type="i" name="result" direction="out"/>
- </method>
</interface>
<interface name="org.tizen.peripheral_io.uart">
<method name="Open">
<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>
- <method name="SetBaudRate">
- <arg type="u" name="handle" direction="in"/>
- <arg type="u" name="baud_rate" direction="in"/>
- <arg type="i" name="result" direction="out"/>
- </method>
- <method name="SetByteSize">
- <arg type="u" name="handle" direction="in"/>
- <arg type="u" name="byte_size" direction="in"/>
- <arg type="i" name="result" direction="out"/>
- </method>
- <method name="SetParity">
- <arg type="u" name="handle" direction="in"/>
- <arg type="u" name="parity" direction="in"/>
- <arg type="i" name="result" direction="out"/>
- </method>
- <method name="SetStopBits">
- <arg type="u" name="handle" direction="in"/>
- <arg type="u" name="stop_bits" direction="in"/>
- <arg type="i" name="result" direction="out"/>
- </method>
- <method name="SetFlowControl">
- <arg type="u" name="handle" direction="in"/>
- <arg type="b" name="xonxoff" direction="in"/>
- <arg type="b" name="rtscts" direction="in"/>
- <arg type="i" name="result" direction="out"/>
- </method>
- <method name="Read">
- <arg type="u" name="handle" direction="in"/>
- <arg type="i" name="length" direction="in"/>
- <arg type="a(y)" name="data" direction="out">
- <annotation name="org.gtk.GDBus.C.ForceGVariant" value="true"/>
- </arg>
- <arg type="i" name="result" direction="out"/>
- </method>
- <method name="Write">
- <arg type="u" name="handle" direction="in"/>
- <arg type="i" name="length" direction="in"/>
- <arg type="a(y)" name="data" direction="in">
- <annotation name="org.gtk.GDBus.C.ForceGVariant" value="true"/>
- </arg>
- <arg type="i" name="result" direction="out"/>
- </method>
</interface>
<interface name="org.tizen.peripheral_io.spi">
<method name="Open">
<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>
- <method name="SetMode">
- <arg type="u" name="handle" direction="in"/>
- <arg type="y" name="mode" direction="in"/>
- <arg type="i" name="result" direction="out"/>
- </method>
- <method name="SetBitOrder">
- <arg type="u" name="handle" direction="in"/>
- <arg type="b" name="lsb" direction="in"/>
- <arg type="i" name="result" direction="out"/>
- </method>
- <method name="SetBitsPerWord">
- <arg type="u" name="handle" direction="in"/>
- <arg type="y" name="bits" direction="in"/>
- <arg type="i" name="result" direction="out"/>
- </method>
- <method name="SetFrequency">
- <arg type="u" name="handle" direction="in"/>
- <arg type="u" name="freq" direction="in"/>
- <arg type="i" name="result" direction="out"/>
- </method>
- <method name="Read">
- <arg type="u" name="handle" direction="in"/>
- <arg type="i" name="length" direction="in"/>
- <arg type="a(y)" name="data" direction="out">
- <annotation name="org.gtk.GDBus.C.ForceGVariant" value="true"/>
- </arg>
- <arg type="i" name="result" direction="out"/>
- </method>
- <method name="Write">
- <arg type="u" name="handle" direction="in"/>
- <arg type="i" name="length" direction="in"/>
- <arg type="a(y)" name="data" direction="in">
- <annotation name="org.gtk.GDBus.C.ForceGVariant" value="true"/>
- </arg>
- <arg type="i" name="result" direction="out"/>
- </method>
- <method name="Transfer">
- <arg type="u" name="handle" direction="in"/>
- <arg type="i" name="length" direction="in"/>
- <arg type="a(y)" name="tx_data" direction="in">
- <annotation name="org.gtk.GDBus.C.ForceGVariant" value="true"/>
- </arg>
- <arg type="a(y)" name="rx_data" direction="out">
- <annotation name="org.gtk.GDBus.C.ForceGVariant" value="true"/>
- </arg>
- <arg type="i" name="result" direction="out"/>
- </method>
</interface>
</node>