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

int gp_port_usb_msg_write ( GPPort port,
int  request,
int  value,
int  index,
char *  bytes,
int  size 
)

Send a USB control message with output data.

Parameters:
port a GPPort
request control request code
value control value
index control index
bytes pointer to data
size size of the data
Sends a specific USB control command and write associated data.

Returns:
a gphoto2 error code

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

References CHECK_NULL, CHECK_RESULT, gp_log(), gp_log_data(), GP_LOG_DEBUG, _GPPortOperations::msg_write, _GPPortPrivateCore::ops, and _GPPort::pc.

{
        int retval;

      gp_log (GP_LOG_DEBUG, "gphoto2-port", _("Writing message "
            "(request=0x%x value=0x%x index=0x%x size=%i=0x%x)..."),
            request, value, index, size, size);
      gp_log_data ("gphoto2-port", bytes, size);

      CHECK_NULL (port);
      CHECK_INIT (port);

      CHECK_SUPP (port, "msg_write", port->pc->ops->msg_write);
        retval = port->pc->ops->msg_write(port, request, value, index, bytes, size);
      CHECK_RESULT (retval);

        return (retval);
}


Generated by  Doxygen 1.6.0   Back to index