diff --git a/camlibs/sipix/ChangeLog b/camlibs/sipix/ChangeLog index bcb898537..f25ec3827 100644 --- a/camlibs/sipix/ChangeLog +++ b/camlibs/sipix/ChangeLog @@ -1,3 +1,8 @@ +2004-04-01 Marcus Meissner + + * merged patch for Snap from Thomas Coffy , + changes some usb lowlevel stuff. + 2004-01-19 Marcus Meissner * blink2.c: Some alignment issues, set altsetting. diff --git a/camlibs/sipix/blink2.c b/camlibs/sipix/blink2.c index 45b899d2c..66a5ad7ce 100644 --- a/camlibs/sipix/blink2.c +++ b/camlibs/sipix/blink2.c @@ -55,8 +55,10 @@ blink2_getnumpics( ) { char buf[6]; int ret; - - ret = gp_port_usb_msg_read(port, BLINK2_GET_NUMPICS, 0x03, 0, buf, 6); + + ret = gp_port_usb_msg_read(port, 0x18, 0x03, 0, buf, 6); + ret = gp_port_usb_msg_read(port, BLINK2_GET_NUMPICS, 0x03, 0, buf, 2); + ret = gp_port_usb_msg_read(port, BLINK2_GET_NUMPICS, 0x03, 0, buf, 2); if (retport,BLINK2_GET_DIR,0x03,0,buf,8 ); + ret = gp_port_usb_msg_read( camera->port,BLINK2_GET_DIR,0x03,0,buf,1 ); if (ret < GP_OK) { free(xbuf); return ret; @@ -144,7 +146,7 @@ get_file_func (CameraFilesystem *fs, const char *folder, const char *filename, free(xbuf); return GP_ERROR_NO_MEMORY; } - ret = gp_port_usb_msg_read( camera->port,BLINK2_GET_DIR,0x03,0,buf,8 ); + ret = gp_port_usb_msg_read( camera->port,BLINK2_GET_DIR,0x03,0,buf,1 ); if (ret < GP_OK) { free(addrs); free(xbuf); @@ -388,10 +390,12 @@ camera_init (Camera *camera, GPContext *context) settings.usb.altsetting = 0; ret = gp_port_set_settings (camera->port, settings); if (ret < GP_OK) return ret; - ret = gp_port_usb_msg_read( camera->port, 0x18, 0x0300, 0x0000, buf, 6); + + ret = gp_port_usb_msg_read( camera->port, 0x18, 0x03, 0, buf, 6); if (ret < GP_OK) return ret; - ret = gp_port_usb_msg_read( camera->port, 0x04, 0x0300, 0x0000, buf, 8); + + ret = gp_port_usb_msg_read( camera->port, 0x04, 0x03, 0, buf, 1); if (ret < GP_OK) return ret; return GP_OK;