libgphoto2 photo camera library (libgphoto2) Internals
2.5.23
|
Go to the documentation of this file.
24 #ifndef __GPHOTO2_PORT_H__
25 #define __GPHOTO2_PORT_H__
32 #include <gphoto2/gphoto2-port-portability-os2.h>
61 #define GP_PORT_MAX_BUF_LEN 4096
213 int index,
char *bytes,
int size);
215 int index,
char *bytes,
int size);
217 int value,
int index,
char *bytes,
int size);
219 int value,
int index,
char *bytes,
int size);
221 int value,
int index,
char *bytes,
int size);
223 int value,
int index,
char *bytes,
int size);
228 char *cmd,
int cmd_size,
229 char *sense,
int sense_size,
230 char *data,
int data_size);
235 __attribute__((__format__(printf,2,3)))
246 #define PIN_CTS GP_PIN_CTS
union _GPPortSettings GPPortSettings
Union of port settings.
struct _GPPortSettingsUsbScsi GPPortSettingsUsbScsi
Port settings for USB Mass Storage raw SCSI ports.
int gp_port_usb_msg_read(GPPort *port, int request, int value, int index, char *bytes, int size)
Send a USB control message with input data.
GPPortSerialParity parity
int gp_port_get_info(GPPort *port, GPPortInfo *info)
Retreives information about the port.
struct _GPPort GPPort
The GPhoto port structure.
int gp_port_usb_msg_interface_write(GPPort *port, int request, int value, int index, char *bytes, int size)
Send a USB interface control message with output data.
GPPortSettings gp_port_settings
int gp_port_get_settings(GPPort *port, GPPortSettings *settings)
Get the current port settings.
int gp_port_get_pin(GPPort *port, GPPin pin, GPLevel *level)
Get setting of specific serial PIN.
Port settings for USB Mass Storage raw SCSI ports.
@ GP_PORT_USB_ENDPOINT_OUT
USB bulk OUT ep.
int gp_port_new(GPPort **port)
Create new GPPort.
int gp_port_flush(GPPort *port, int direction)
Flush data on serial port.
int gp_port_set_info(GPPort *port, GPPortInfo info)
Configure a port.
int gp_port_set_settings(GPPort *port, GPPortSettings settings)
Set port settings.
@ GP_PORT_USB_ENDPOINT_INT
USB Interrupt ep.
GPPortSettingsUsbDiskDirect usbdiskdirect
usb disk direct port specific settings
GPPortPrivateCore * pc
Port library private data pointer.
enum _GPPortSerialParity GPPortSerialParity
Serial parity.
int intep
Interrupt endpoint used.
int gp_port_check_int(GPPort *port, char *data, int size)
Check for intterupt.
struct _GPPortSettingsUsbDiskDirect GPPortSettingsUsbDiskDirect
Port settings for USB mass storage direct IO ports.
Port settings for USB ports.
int gp_port_set_pin(GPPort *port, GPPin pin, GPLevel level)
Set specified serial PIN to value.
int gp_port_usb_find_device(GPPort *port, int idvendor, int idproduct)
Find USB device by vendor/product.
int gp_port_open(GPPort *port)
Open a port.
int maxpacketsize
Maximum USB packetsize of the IN endpoint. (r/o)
@ GP_PIN_RING
RING (Modem) line.
int config
USB bConfigurationValue used.
int gp_port_free(GPPort *port)
Free the port structure.
int gp_port_read(GPPort *port, char *data, int size)
Read data from port.
The GPhoto port structure.
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.
int gp_port_set_timeout(GPPort *port, int timeout)
Set timeout of port.
GPPortSettings settings_pending
Settings to be committed.
GPPortSettingsSerial serial
Serial specific settings.
@ GP_PIN_CD
Carrier Detect line.
GPPortSettingsUSB usb
USB specific settings.
Internal private libgphoto2_port data. This structure contains private data.
int inep
Bulk IN endpoint used.
const char * gp_port_get_error(GPPort *port)
Get verbose port error message.
int gp_port_reset(GPPort *port)
Reset a port.
int gp_port_close(GPPort *port)
Close a port.
struct _GPPortSettingsUSB GPPortSettingsUSB
Port settings for USB ports.
Port settings for USB mass storage direct IO ports.
@ GP_PORT_SERIAL_PARITY_ODD
Parity is odd.
int gp_port_send_scsi_cmd(GPPort *port, int to_dev, char *cmd, int cmd_size, char *sense, int sense_size, char *data, int data_size)
Send a SCSI command to a port (for usb scsi ports)
int gp_port_usb_msg_class_write(GPPort *port, int request, int value, int index, char *bytes, int size)
Send a USB class control message with output data.
_GPPortSerialParity
Serial parity.
int gp_port_usb_clear_halt(GPPort *port, int ep)
Clear USB endpoint HALT condition.
enum _GPLevel GPLevel
Level to pull specific lines.
int gp_port_send_break(GPPort *port, int duration)
Send a break over a serial port.
int outep
Bulk OUT endpoint used.
enum _GPPin GPPin
Serial pins.
_GPLevel
Level to pull specific lines.
int gp_port_seek(GPPort *port, int offset, int whence)
Seek on a port (for usb disk direct ports)
char port[64]
USB Portname. Specific to lowlevel USB.
int gp_port_usb_msg_class_read(GPPort *port, int request, int value, int index, char *bytes, int size)
Send a USB class control message with input data.
@ GP_LEVEL_HIGH
Pull to high (nV)
GPPortSettingsUsbScsi usbscsi
usb scsi port specific settings
int gp_port_usb_msg_interface_read(GPPort *port, int request, int value, int index, char *bytes, int size)
Send a USB interface control message with input data.
@ GP_PORT_SERIAL_PARITY_EVEN
Parity is even.
@ GP_LEVEL_LOW
Pull to low (0V)
int gp_port_set_error(GPPort *port, const char *format,...)
Set verbose port error message.
GPPortPrivateLibrary * pl
Camera driver private data pointer.
int gp_port_usb_find_device_by_class(GPPort *port, int mainclass, int subclass, int protocol)
Find USB device by interface class.
Port settings for serial ports.
int altsetting
USB Alternative Setting used.
@ GP_PORT_USB_ENDPOINT_IN
USB bulk IN ep.
int timeout
Port timeout in milliseconds.
int gp_port_check_int_fast(GPPort *port, char *data, int size)
Check for interrupt without wait.
GPPortSettings settings
Current port settings.
int gp_port_write(GPPort *port, const char *data, int size)
Writes a specified amount of data to a port.
struct _GPPortPrivateLibrary GPPortPrivateLibrary
struct _GPPortSettingsSerial GPPortSettingsSerial
Port settings for serial ports.
GPPortType type
Actual type of this port.
int interface
USB Interface number used.
int gp_port_get_timeout(GPPort *port, int *timeout)
Get the current port timeout.
@ GP_PORT_SERIAL_PARITY_OFF
Parity is off (disabled)
GPPortType
The gphoto port type.