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

int gp_port_set_settings ( GPPort port,
GPPortSettings  settings 

Set port settings.

port a GPPort
settings the 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.

a gphoto2 error code

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

References CHECK_NULL, CHECK_RESULT, gp_log(), GP_LOG_DEBUG, GP_OK, _GPPortPrivateCore::ops, _GPPort::pc, _GPPort::settings_pending, and _GPPortOperations::update.

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);

Generated by  Doxygen 1.6.0   Back to index