2001-10-20 Lutz M�ller <urc8@rz.uni-karlsruhe.de>
* libgphoto2/gphoto2-camera.[c,h] (gp_camera_get_port_speed): New git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2656 67ed7778-7388-44ab-90cf-0a291f65f57c
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
2001-10-20 Lutz Müller <urc8@rz.uni-karlsruhe.de>
|
||||
|
||||
* libgphoto2/gphoto2-camera.[c,h] (gp_camera_get_port_speed): New
|
||||
|
||||
2001-10-20 Lutz Müller <urc8@rz.uni-karlsruhe.de>
|
||||
|
||||
* camlibs/kodak/dc240/library.c: Don't access a CameraFile directly.
|
||||
|
||||
@@ -69,6 +69,7 @@ struct _CameraPrivateCore {
|
||||
/* Some information about the port */
|
||||
char port_name[1024];
|
||||
char port_path[1024];
|
||||
unsigned int speed;
|
||||
|
||||
CameraStatusFunc status_func;
|
||||
void *status_data;
|
||||
@@ -391,10 +392,27 @@ gp_camera_set_port_speed (Camera *camera, int speed)
|
||||
CHECK_RESULT (gp_port_settings_get (camera->port, &settings));
|
||||
settings.serial.speed = speed;
|
||||
CHECK_RESULT (gp_port_settings_set (camera->port, settings));
|
||||
camera->pc->speed = speed;
|
||||
|
||||
return (GP_OK);
|
||||
}
|
||||
|
||||
/**
|
||||
* gp_camera_get_port_speed:
|
||||
* @camera: a #Camera
|
||||
*
|
||||
* Retreives the current speed.
|
||||
*
|
||||
* Return value: The current speed or a gphoto2 error code
|
||||
**/
|
||||
int
|
||||
gp_camera_get_port_speed (Camera *camera)
|
||||
{
|
||||
CHECK_NULL (camera);
|
||||
|
||||
return (camera->pc->speed);
|
||||
}
|
||||
|
||||
/**
|
||||
* gp_camera_set_progress_func:
|
||||
* @camera: a #Camera
|
||||
|
||||
@@ -151,8 +151,12 @@ int gp_camera_get_port_name (Camera *camera, const char **port_name);
|
||||
int gp_camera_set_port_path (Camera *camera, const char *port_path);
|
||||
int gp_camera_get_port_path (Camera *camera, const char **port_path);
|
||||
|
||||
/* Don't use */
|
||||
/*
|
||||
* You normally don't use that. If you do, you prevent the camera driver
|
||||
* from selecting the optimal speed
|
||||
*/
|
||||
int gp_camera_set_port_speed (Camera *camera, int speed);
|
||||
int gp_camera_get_port_speed (Camera *camera);
|
||||
|
||||
/************************************************************************
|
||||
* Part I: *
|
||||
|
||||
Reference in New Issue
Block a user