Lines Matching refs:camera
52 digital camera. THIS IS EXTREMELY ALPHA CODE! USE AT YOUR OWN RISK!!
165 "Select folder within camera",
179 "Select Image Number to load from camera",
260 "camera-init",
262 "Re-establish communications with camera (in case of timeout, etc.)",
328 SANE_Byte r = 0xf0; /* prime the loop with a "camera busy" */
333 /* keep trying if camera says it's busy */
350 DBG (127, "send_pck: read one byte result from camera = %x\n", r);
355 init_dc240 (DC240 * camera)
365 if (speeds[speed_index].baud == camera->baud)
382 if ((camera->fd = open (camera->tty_name, O_RDWR)) == -1)
385 camera->tty_name);
391 if (tcgetattr (camera->fd, &tty_orig) == -1)
434 if (tcsetattr (camera->fd, TCSANOW, &tty_new) == -1)
448 tcsendbreak (camera->fd, 0);
450 tcdrain (camera->fd);
453 ioctl (camera->fd, TCSBRKP, 0);
455 ioctl (camera->fd, TCSBRK, 0);
469 n = read (camera->fd, buf, 5);
474 if (send_pck (camera->fd, init_pck) == -1)
477 * The camera always powers up at 9600, so we try
482 tcsetattr (camera->fd, TCSANOW, &tty_orig);
483 DBG (1, "init_dc240: error: no response from camera\n");
487 n = read (camera->fd, buf, 5);
497 if (tcsetattr (camera->fd, TCSANOW, &tty_new) == -1)
504 if (send_pck (camera->fd, open_card_pck) == -1)
510 if (end_of_data (camera->fd) == -1)
516 return camera->fd;
524 * Put the camera back to 9600 baud
534 get_info (DC240 * camera)
542 if (send_pck (camera->fd, info_pck) == -1)
550 if (read_data (camera->fd, buf, 256) == -1)
556 if (end_of_data (camera->fd) == -1)
562 camera->model = buf[1];
564 if (camera->model != 0x5)
568 "Only the DC-240 is supported by this driver.\n", camera->model);
571 camera->ver_major = buf[2];
572 camera->ver_minor = buf[3];
573 camera->pic_taken = buf[14] << 8 | buf[15];
574 DBG (4, "pic_taken=%d\n", camera->pic_taken);
575 camera->pic_left = buf[64] << 8 | buf[65];
576 DBG (4, "pictures left (at current res)=%d\n", camera->pic_left);
577 camera->flags.low_batt = buf[8];
578 DBG (4, "battery=%d (0=OK, 1=weak, 2=empty)\n", camera->flags.low_batt);
644 * a retry - signal the camera that we didn't like what
725 { /* loop until the camera isn't busy */
749 DBG (1, "end_of_data: error: bad EOD from camera (%02x)\n",
954 "still camera"},
1084 /* get the image's resolution, unless the camera has no
1369 * camera.
1518 /* clean up comms with the camera */
1589 /* Flush any pending data from the camera before continuing */
1651 * camera: Mainly the mapping of picture number
1677 "%s: warning: Number of pictures in directory (%d) doesn't match camera status table (%d). Using directory count\n",
1787 /* make sure camera is set to our settings state */
1839 SANE_Byte r = 0xf0; /* prime the loop with a "camera busy" */
1888 /* Determine if it's time to read another 256 byte buffer from the camera */
1936 * read_info - read the info block from camera for the specified file
1992 * send_data - Send a data block - assumes all data blocks to camera
1999 SANE_Byte r = 0xf0; /* prime the loop with a "camera busy" */
2011 /* keep trying if camera says it's busy */