* backend/umax_pp_low.c backend/umax_pp_low.h backend/umax_pp_mid.c:

make use of PPGETMODES only when available in ppdev.h. Corrected OS/2
	  typo in Outb() and rename sanei_umax_pp_Lamp() to
	  sanei_umax_pp_SetLamp().
DEVEL_2_0_BRANCH-1
Stéphane Voltz 2001-06-11 04:46:51 +00:00
rodzic e0fa6483c5
commit 3553dfc927
3 zmienionych plików z 11 dodań i 6 usunięć

Wyświetl plik

@ -553,6 +553,7 @@ sanei_umax_pp_InitPort (int port)
else
{
/* we check if parport is does ECP */
#ifdef PPGETMODES
if (ioctl (fd, PPGETMODES, &mode))
{
DBG (16, "umax_pp: ppdev couldn't gave modes for port '%s'\n",
@ -581,9 +582,11 @@ sanei_umax_pp_InitPort (int port)
return (0);
}
}
#else
DBG (16, "umax_pp: ppdev used to build SANE doesn't have PPGETMODES.\n");
#endif
/* write to DATA via direct io and read DATA via parport */
/* if values match, we found the right parport */
/* find the base addr of ppdev */
if (sanei_parport_info (i, &addr))
{
if (gPort == addr)
@ -594,6 +597,8 @@ sanei_umax_pp_InitPort (int port)
}
else
{
/* write to DATA via direct io and read DATA via parport */
/* if values match, we found the right parport */
Outb (DATA, 0x5A);
if (ioctl (fd, PPRDATA, &value))
{
@ -648,7 +653,7 @@ Outb (int port, int value)
{
#ifndef IO_SUPPORT_MISSING
#ifdef HAVE_SYS_HW_H
_outp8 (port, value) & 0xFF;
_outp8 (port, value);
#else
outb (value, port);
#endif
@ -5735,7 +5740,7 @@ CompletionWait (void)
}
int
sanei_umax_pp_Lamp (int on)
sanei_umax_pp_SetLamp (int on)
{
int buffer[17];
int state;

Wyświetl plik

@ -91,7 +91,7 @@ extern int sanei_umax_pp_Scan (int x, int y, int width, int height, int dpi,
int color, int gain, int highlight);
extern int sanei_umax_pp_Move (int distance, int precision,
unsigned char *buffer);
extern int sanei_umax_pp_Lamp (int on);
extern int sanei_umax_pp_SetLamp (int on);
extern int sanei_umax_pp_CompletionWait (void);
extern int sanei_umax_pp_CommitScan (void);
extern int sanei_umax_pp_Park (void);

Wyświetl plik

@ -313,7 +313,7 @@ sanei_umax_pp_lamp (int on)
sanei_umax_pp_EndSession ();
return (UMAX1220P_TRANSPORT_FAILED);
}
if (sanei_umax_pp_Lamp (on) == 0)
if (sanei_umax_pp_SetLamp (on) == 0)
{
DBG (0, "Setting lamp state failed!\n");
}