Logo Search packages:      
Sourcecode: libgphoto2 version File versions  Download package

int gp_port_set_settings ( GPPort port,
GPPortSettings  settings 
)

Set port settings.

Parameters:
porta GPPort
settingsthe GPPortSettings to be set

Adjusts the settings of a port. You should always call gp_port_get_settings, adjust the values depending on the type of the port, and then call gp_port_set_settings.

Returns:
a gphoto2 error code

Definition at line 575 of file gphoto2-port.c.

References gp_log(), GP_LOG_DEBUG, GP_OK, _GPPortPrivateCore::ops, _GPPort::pc, and _GPPort::settings_pending.

Referenced by camera_init(), gp_camera_set_port_speed(), gp_port_set_info(), and gp_port_settings_set().

{
      gp_log (GP_LOG_DEBUG, "gphoto2-port", _("Setting settings..."));

      CHECK_NULL (port);
      CHECK_INIT (port);

        /*
       * We copy the settings to settings_pending and call update on the 
       * port.
       */
        memcpy (&port->settings_pending, &settings,
            sizeof (port->settings_pending));
      CHECK_SUPP (port, "update", port->pc->ops->update);
        CHECK_RESULT (port->pc->ops->update (port));

        return (GP_OK);
}

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index