Irix fixes from mailing list

RELEASE_1_0_11_BRANCH
Peter Fales 2003-01-07 01:15:16 +00:00
rodzic 5e464b1576
commit 58993e7e36
6 zmienionych plików z 83 dodań i 18 usunięć

Wyświetl plik

@ -358,10 +358,28 @@ init_dc210 (DC210 * camera)
#ifdef HAVE_CFMAKERAW
cfmakeraw (&tty_new);
#else
tty_new.c_lflag &= ~(ICANON | ECHO | ISIG);
/* Modified to set the port REALLY as required. Code inspired by
the gPhoto2 serial port setup */
/* input control settings */
tty_new.c_iflag &= ~(IGNBRK | IGNCR | INLCR | ICRNL | IUCLC |
IXANY | IXON | IXOFF | INPCK | ISTRIP);
tty_new.c_iflag |= (BRKINT | IGNPAR);
/* output control settings */
tty_new.c_oflag &= ~OPOST;
/* hardware control settings */
tty_new.c_cflag = (tty_new.c_cflag & ~CSIZE) | CS8;
tty_new.c_cflag &= ~(PARENB | PARODD | CSTOPB);
# if defined(__sgi)
tty_new.c_cflag &= ~CNEW_RTSCTS;
# else
tty_new.c_cflag &= ~CRTSCTS;
# endif
tty_new.c_cflag |= CLOCAL | CREAD;
#endif
tty_new.c_oflag &= ~CSTOPB;
tty_new.c_lflag = 0;
/* line discipline settings */
tty_new.c_lflag &= ~(ICANON | ISIG | ECHO | ECHONL | ECHOE |
ECHOK | IEXTEN);
tty_new.c_cc[VMIN] = 0;
tty_new.c_cc[VTIME] = 5;
cfsetospeed (&tty_new, B9600);
@ -375,7 +393,15 @@ init_dc210 (DC210 * camera)
/* send a break to get it back to a known state */
#ifdef HAVE_TCSENDBREAK
# if defined(__sgi)
/* Maybe you should consider the following for all the platforms, not just
IRIX. Again, inspired by the gPhoto2 DC210 camera library setup */
ioctl (camera->fd, TCSBRK, 0);
ioctl (camera->fd, TCSBRK, 1);
# else
tcsendbreak (camera->fd, 4);
# endif
#else
# if defined(TCSBRKP)
ioctl (camera->fd, TCSBRKP, 4);
@ -383,8 +409,14 @@ init_dc210 (DC210 * camera)
ioctl (camera->fd, TCSBRK, 4);
# endif
#endif
/* and wait for it to recover from the break */
usleep (breakpause);
/* and wait for it to recover from the break */
#ifdef HAVE_USLEEP
usleep (breakpause);
#else
+ sleep (1);
#endif
if (send_pck (camera->fd, init_pck) == -1)
{

Wyświetl plik

@ -11,10 +11,12 @@ port=/dev/ttyS0
#port=/dev/tty01
# Max baud rate for download. Camera always starts at 9600 baud, then
# switches to the higher rate
## This works for Linux and some versions of IRIX (6.3 or higher)
baud=115200
## This works for Linux. Also works for IRIX (6.3 or higher), providing that
## the host is an O2, OCTANE, Origin2000/200, Onyx2, Origin3000/300, Onyx3 or
## a newer SGI hardware [see serial(7)].
#baud=115200
## This works for most UNIX's
#baud=38400
baud=38400
# Prints some extra information during the init phase. This can be
# handy, but note that printing anything to stderr breaks the saned
# network scanning.

Wyświetl plik

@ -403,10 +403,28 @@ init_dc240 (DC240 * camera)
#ifdef HAVE_CFMAKERAW
cfmakeraw (&tty_new);
#else
tty_new.c_lflag &= ~(ICANON | ECHO | ISIG);
/* Modified to set the port REALLY as required (9600, 8b, 1sb, NO parity).
Code inspired by the gPhoto2 serial port setup */
/* input control settings */
tty_new.c_iflag &= ~(IGNBRK | IGNCR | INLCR | ICRNL | IUCLC |
IXANY | IXON | IXOFF | INPCK | ISTRIP);
tty_new.c_iflag |= (BRKINT | IGNPAR);
/* output control settings */
tty_new.c_oflag &= ~OPOST;
/* hardware control settings */
tty_new.c_cflag = (tty_new.c_cflag & ~CSIZE) | CS8;
tty_new.c_cflag &= ~(PARENB | PARODD | CSTOPB);
# if defined(__sgi)
tty_new.c_cflag &= ~CNEW_RTSCTS;
# else
tty_new.c_cflag &= ~CRTSCTS;
# endif
tty_new.c_cflag |= CLOCAL | CREAD;
#endif
tty_new.c_oflag &= ~CSTOPB;
tty_new.c_lflag = 0;
/* line discipline settings */
tty_new.c_lflag &= ~(ICANON | ISIG | ECHO | ECHONL | ECHOE |
ECHOK | IEXTEN);
tty_new.c_cc[VMIN] = 0;
tty_new.c_cc[VTIME] = 5;
cfsetospeed (&tty_new, B9600);
@ -421,7 +439,15 @@ init_dc240 (DC240 * camera)
/* send a break to get it back to a known state */
#ifdef HAVE_TCSENDBREAK
# if defined(__sgi)
/* Maybe you should consider the following for all the platforms, not just
IRIX. Again, inspired by the gPhoto2 DC240 camera library setup */
ioctl (camera->fd, TCSBRK, 0);
ioctl (camera->fd, TCSBRK, 1);
# else
tcsendbreak (camera->fd, 4);
# endif
#else
# if defined(TCSBRKP)
ioctl (camera->fd, TCSBRKP, 4);
@ -429,6 +455,7 @@ init_dc240 (DC240 * camera)
ioctl (camera->fd, TCSBRK, 4);
# endif
#endif
/* and wait for it to recover from the break */
#ifdef HAVE_USLEEP

Wyświetl plik

@ -11,10 +11,12 @@ port=/dev/ttyS0
#port=/dev/tty01
# Max baud rate for download. Camera always starts at 9600 baud, then
# switches to the higher rate
## This works for Linux and some versions of IRIX (6.3 or higher)
baud=115200
## This works for Linux. Also works for IRIX (6.3 or higher), providing that
## the host is an O2, OCTANE, Origin2000/200, Onyx2, Origin3000/300, Onyx3 or
## a newer SGI hardware [see serial(7)].
#baud=115200
## This works for most UNIX's
#baud=38400
baud=38400
# Prints some extra information during the init phase. This can be
# handy, but note that printing anything to stderr breaks the saned
# network scanning.

Wyświetl plik

@ -11,10 +11,12 @@ port=/dev/ttyS0
#port=/dev/tty01
# Max baud rate for download. Camera always starts at 9600 baud, then
# switches to the higher rate
## This works for Linux and some versions of IRIX (6.3 or higher)
baud=115200
## This works for Linux. Also works for IRIX (6.3 or higher), providing that
## the host is an O2, OCTANE, Origin2000/200, Onyx2, Origin3000/300, Onyx3 or
## a newer SGI hardware [see serial(7)].
#baud=115200
## This works for most UNIX's
#baud=38400
baud=38400
# Prints some extra information during the init phase. This can be
# handy, but note that printing anything to stderr breaks the saned
# network scanning.

Wyświetl plik

@ -1,7 +1,7 @@
# Interface port where the camera is connected
# This should be one of the values returned by "gphoto2 --list-ports",
# such # as serial:/dev/ttyS6 or usb:
port=usb:
port=serial:/dev/ttyd1
# Port speed. This should be one of the values returned by
# "gphoto2 --abilities"