done for the week. fujitsu still being worked on

git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@619 67ed7778-7388-44ab-90cf-0a291f65f57c
This commit is contained in:
Scott Fritzinger
2000-07-01 01:23:28 +00:00
parent 11b3329f10
commit 8dfa754a72
3 changed files with 26 additions and 11 deletions

View File

@@ -1,3 +1,3 @@
This is just a shell of the fujitsu library so far.
Adding support. communications established.
i will be developing it in a day or so after the core is introduced.
i'm chugging along.

View File

@@ -67,12 +67,15 @@ int fujitsu_set_int_register (gpio_device *dev, int reg, int value) {
sprintf(buf, "Setting register #%i to %i", reg, value);
debug_print(buf);
p = fujitsu_build_packet(TYPE_COMMAND, SUBTYPE_COMMAND_FIRST,3);
p = fujitsu_build_packet(TYPE_COMMAND, SUBTYPE_COMMAND_FIRST,6);
/* Fill in the data */
p[3] = 0x00;
p[4] = reg;
p[5] = value;
p[5]=(value) & 0xff;
p[6]=(value>>8) & 0xff;
p[7]=(value>>16) & 0xff;
p[8]=(value>>24) & 0xff;
l = fujitsu_process_packet(p);

View File

@@ -119,21 +119,33 @@ int camera_init (CameraInit *init) {
}
if (fujitsu_ping(glob_dev)==GP_ERROR) {
interface_message("Can not establish communications with the camera");
interface_message("Can not talk to camera");
return (GP_ERROR);
}
if (fujitsu_set_int_register(glob_dev, 17, 5)==GP_ERROR) {
if (fujitsu_set_int_register(glob_dev, 17, 2)==GP_ERROR) {
interface_message("Can not set the serial port speed");
return (GP_ERROR);
}
// if (init->speed)
// settings.serial.speed = init->port_settings.speed;
// else
// settings.serial.speed = 115200;
// gpio_set_settings(glob_dev, settings);
sleep(1);
if (fujitsu_set_int_register(glob_dev, 1, 2)==GP_ERROR) {
interface_message("Can not set camera quality");
return (GP_ERROR);
}
/*
if (init->speed)
settings.serial.speed = init->port_settings.speed;
else
settings,serial.speed = 115200;
*/
if (fujitsu_ping(glob_dev)==GP_ERROR) {
interface_message("Can not talk to camera after speed change");
return (GP_ERROR);
}
*/
return (GP_OK);
}