Lines 55-62
Link Here
|
55 |
) { |
55 |
) { |
56 |
char buf[6]; |
56 |
char buf[6]; |
57 |
int ret; |
57 |
int ret; |
58 |
|
58 |
|
59 |
ret = gp_port_usb_msg_read(port, BLINK2_GET_NUMPICS, 0x03, 0, buf, 6); |
59 |
ret = gp_port_usb_msg_read(port, 0x18, 0x03, 0, buf, 6); |
|
|
60 |
ret = gp_port_usb_msg_read(port, BLINK2_GET_NUMPICS, 0x03, 0, buf, 2); |
61 |
ret = gp_port_usb_msg_read(port, BLINK2_GET_NUMPICS, 0x03, 0, buf, 2); |
60 |
if (ret<GP_OK) |
62 |
if (ret<GP_OK) |
61 |
return ret; |
63 |
return ret; |
62 |
*numpics = (buf[0]<<8) | buf[1]; |
64 |
*numpics = (buf[0]<<8) | buf[1]; |
Lines 95-101
Link Here
|
95 |
if (ret < GP_OK) return ret; |
97 |
if (ret < GP_OK) return ret; |
96 |
|
98 |
|
97 |
xbuf = malloc(8*(1+numpics)); |
99 |
xbuf = malloc(8*(1+numpics)); |
98 |
ret = gp_port_usb_msg_read( camera->port,BLINK2_GET_DIR,0x03,0,buf,8 ); |
100 |
ret = gp_port_usb_msg_read( camera->port,BLINK2_GET_DIR,0x03,0,buf,1 ); |
99 |
if (ret < GP_OK) { |
101 |
if (ret < GP_OK) { |
100 |
free(xbuf); |
102 |
free(xbuf); |
101 |
return ret; |
103 |
return ret; |
Lines 142-148
Link Here
|
142 |
free(xbuf); |
144 |
free(xbuf); |
143 |
return GP_ERROR_NO_MEMORY; |
145 |
return GP_ERROR_NO_MEMORY; |
144 |
} |
146 |
} |
145 |
ret = gp_port_usb_msg_read( camera->port,BLINK2_GET_DIR,0x03,0,buf,8 ); |
147 |
ret = gp_port_usb_msg_read( camera->port,BLINK2_GET_DIR,0x03,0,buf,1 ); |
146 |
if (ret < GP_OK) { |
148 |
if (ret < GP_OK) { |
147 |
free(addrs); |
149 |
free(addrs); |
148 |
free(xbuf); |
150 |
free(xbuf); |
Lines 375-384
Link Here
|
375 |
settings.usb.interface = 0; |
377 |
settings.usb.interface = 0; |
376 |
ret = gp_port_set_settings( camera->port, settings); |
378 |
ret = gp_port_set_settings( camera->port, settings); |
377 |
if (ret < GP_OK) return ret; |
379 |
if (ret < GP_OK) return ret; |
378 |
ret = gp_port_usb_msg_read( camera->port, 0x18, 0x0300, 0x0000, buf, 6); |
380 |
|
|
|
381 |
ret = gp_port_usb_msg_read( camera->port, 0x18, 0x03, 0, buf, 6); |
379 |
if (ret < GP_OK) |
382 |
if (ret < GP_OK) |
380 |
return ret; |
383 |
return ret; |
381 |
ret = gp_port_usb_msg_read( camera->port, 0x04, 0x0300, 0x0000, buf, 8); |
384 |
|
|
|
385 |
ret = gp_port_usb_msg_read( camera->port, 0x04, 0x03, 0, buf, 1); |
382 |
if (ret < GP_OK) |
386 |
if (ret < GP_OK) |
383 |
return ret; |
387 |
return ret; |
384 |
return GP_OK; |
388 |
return GP_OK; |