Lines Matching defs:mode
62 int rc, mode = 0xff;
76 mode = 1; /* data_reverse */
77 rc = ioctl (fd, PPDATADIR, &mode);
78 mode = IEEE1284_MODE_EPP | IEEE1284_DATA;
79 rc = ioctl (fd, PPSETMODE, &mode);
81 mode = PP_FASTREAD;
82 rc = ioctl (fd, PPSETFLAGS, &mode);
106 int rc = 0, mode = 0xff;
114 mode = value & 0x20;
115 rc = ioctl (fd, PPDATADIR, &mode);
123 mode = 0; /* data forward */
124 rc = ioctl (fd, PPDATADIR, &mode);
125 mode = IEEE1284_MODE_EPP | IEEE1284_DATA;
126 rc = ioctl (fd, PPSETMODE, &mode);
130 mode = 0; /* data forward */
131 rc = ioctl (fd, PPDATADIR, &mode);
132 mode = IEEE1284_MODE_EPP | IEEE1284_ADDR;
133 rc = ioctl (fd, PPSETMODE, &mode);
180 int mode, rc, nb;
184 mode = IEEE1284_MODE_EPP | IEEE1284_ADDR;
185 rc = ioctl (fd, PPSETMODE, &mode);
188 mode = 1; /* data_reverse */
189 rc = ioctl (fd, PPDATADIR, &mode);
191 mode = PP_FASTREAD;
192 rc = ioctl (fd, PPSETFLAGS, &mode);
194 mode = IEEE1284_MODE_EPP | IEEE1284_DATA;
195 rc = ioctl (fd, PPSETMODE, &mode);
217 int mode;
221 mode = IEEE1284_MODE_EPP | IEEE1284_ADDR;
222 ioctl (fd, PPSETMODE, &mode);
225 mode = IEEE1284_MODE_EPP | IEEE1284_DATA;
226 ioctl (fd, PPSETMODE, &mode);
227 mode = 0; /* data forward */
228 ioctl (fd, PPDATADIR, &mode);
465 * opens parallel port's low level device in EPP mode
472 int fd, mode = 0;
516 ioctl (fd, PPGETMODES, &mode);
517 if (mode & PARPORT_MODE_PCSPP)
519 if (mode & PARPORT_MODE_TRISTATE)
521 if (mode & PARPORT_MODE_EPP)
523 if (mode & PARPORT_MODE_ECP)
525 if (mode & PARPORT_MODE_COMPAT)
527 if (mode & PARPORT_MODE_DMA)
529 if (mode & PARPORT_MODE_EPP)
531 mode = IEEE1284_MODE_EPP;
536 if (mode & PARPORT_MODE_ECP)
538 mode = IEEE1284_MODE_ECP;
543 mode = -1;
546 if (mode == -1)
548 DBG (DBG_error, "open_pp: no EPP mode, giving up ...\n");
553 ioctl (fd, PPNEGOT, &mode);
554 ioctl (fd, PPSETMODE, &mode);
565 int mode = IEEE1284_MODE_COMPAT;
569 ioctl (fd, PPNEGOT, &mode);
632 build_correction (P5_Device * dev, unsigned int dpi, unsigned int mode,
638 DBG (DBG_trace, "build_correction: dpi=%d, mode=%d\n", dpi, mode);
680 if (mode == MODE_GRAY)
711 * @param mode color, gray level or lineart.
720 start_scan (P5_Device * dev, int mode, unsigned int dpi, unsigned int startx,
776 switch (mode)
812 if (mode == MODE_COLOR)
822 build_correction (dev, xdpi, mode, start, width);
832 if (mode == MODE_LINEART)
844 if (mode == MODE_LINEART)
863 * @param mode COLOR_MODE if color mode
868 SANE_Bool retry, SANE_Bool x2, int mode, SANE_Bool correction)
890 /* in retry mode we read until not enough data, but in no retry
927 if (mode == MODE_COLOR)
1129 * @param mode MODE_COLOR or MODE_GRAY
1133 is_black_line (uint8_t * buffer, unsigned int pixels, int mode)
1138 if (mode == MODE_COLOR)
1178 * @param mode MODE_COLOR or MODE_GRAY
1182 is_white_line (uint8_t * buffer, unsigned int pixels, int mode)
1187 if (mode == MODE_COLOR)