kopia lustrzana https://gitlab.com/sane-project/backends
2003-01-13 Jochen Eisinger <jochen.eisinger@gmx.de>
* backend/mustek_pp*, backend/Makefile: merged all mustek_pp related files into one compile unit and removed illegal symbolsRELEASE_1_0_11_BRANCH
rodzic
4d0cba9aab
commit
48d3828a13
|
@ -1,3 +1,8 @@
|
|||
2003-01-13 Jochen Eisinger <jochen.eisinger@gmx.de>
|
||||
|
||||
* backend/mustek_pp*, backend/Makefile: merged all mustek_pp
|
||||
related files into one compile unit and removed illegal symbols
|
||||
|
||||
2003-01-13 Gerhard Jaeger <gerhard@gjaeger.de>
|
||||
|
||||
* doc/descriptions/unsupported.desc: Added HP ScanJet 2300C and various chipset
|
||||
|
|
|
@ -242,7 +242,6 @@ EXTRA_canon_pp = canon_pp-io canon_pp-dev
|
|||
EXTRA_hp = hp-accessor hp-device hp-handle hp-hpmem hp-option hp-scl
|
||||
EXTRA_umax_pp = umax_pp_low umax_pp_mid
|
||||
EXTRA_epson = epson_scsi epson_usb
|
||||
EXTRA_mustek_pp = mustek_pp_null mustek_pp_cis mustek_pp_ccd300
|
||||
# EXTRA_dc210 = djpeg
|
||||
# EXTRA_dc240 = djpeg
|
||||
|
||||
|
@ -328,7 +327,6 @@ libsane-mustek.la: ../sanei/sanei_config2.lo
|
|||
libsane-mustek.la: ../sanei/sanei_constrain_value.lo
|
||||
libsane-mustek.la: ../sanei/sanei_scsi.lo
|
||||
libsane-mustek.la: ../sanei/sanei_ab306.lo
|
||||
libsane-mustek_pp.la: $(addsuffix .lo,$(EXTRA_mustek_pp))
|
||||
libsane-mustek_pp.la: ../sanei/sanei_constrain_value.lo
|
||||
libsane-mustek_pp.la: ../sanei/sanei_pa4s2.lo
|
||||
libsane-mustek_usb.la: ../sanei/sanei_constrain_value.lo
|
||||
|
|
|
@ -116,29 +116,29 @@ static SANE_Device **devarray = NULL;
|
|||
/* currently active Handles */
|
||||
static Mustek_pp_Handle *first_hndl = NULL;
|
||||
|
||||
SANE_String_Const mustek_pp_modes[4] = {"Lineart", "Grayscale", "Color", NULL};
|
||||
SANE_Word mustek_pp_modes_size = 10;
|
||||
static SANE_String_Const mustek_pp_modes[4] = {"Lineart", "Grayscale", "Color", NULL};
|
||||
static SANE_Word mustek_pp_modes_size = 10;
|
||||
|
||||
SANE_String_Const mustek_pp_speeds[6] = {"Slowest", "Slower", "Normal", "Faster", "Fastest", NULL};
|
||||
SANE_Word mustek_pp_speeds_size = 8;
|
||||
SANE_Word mustek_pp_depths[5] = {4, 8, 10, 12, 16};
|
||||
static SANE_String_Const mustek_pp_speeds[6] = {"Slowest", "Slower", "Normal", "Faster", "Fastest", NULL};
|
||||
static SANE_Word mustek_pp_speeds_size = 8;
|
||||
static SANE_Word mustek_pp_depths[5] = {4, 8, 10, 12, 16};
|
||||
|
||||
/* prototypes */
|
||||
void free_cfg_options(int *numoptions, Mustek_pp_config_option** options);
|
||||
SANE_Status do_eof(Mustek_pp_Handle *hndl);
|
||||
SANE_Status do_stop(Mustek_pp_Handle *hndl);
|
||||
int reader_process (Mustek_pp_Handle * hndl, int pipe);
|
||||
SANE_Status sane_attach(SANE_String_Const port, SANE_String_Const name,
|
||||
static void free_cfg_options(int *numoptions, Mustek_pp_config_option** options);
|
||||
static SANE_Status do_eof(Mustek_pp_Handle *hndl);
|
||||
static SANE_Status do_stop(Mustek_pp_Handle *hndl);
|
||||
static int reader_process (Mustek_pp_Handle * hndl, int pipe);
|
||||
static SANE_Status sane_attach(SANE_String_Const port, SANE_String_Const name,
|
||||
SANE_Int driver, SANE_Int info);
|
||||
void init_options(Mustek_pp_Handle *hndl);
|
||||
void attach_device(SANE_String *driver, SANE_String *name,
|
||||
static void init_options(Mustek_pp_Handle *hndl);
|
||||
static void attach_device(SANE_String *driver, SANE_String *name,
|
||||
SANE_String *port, SANE_String *option_ta);
|
||||
|
||||
|
||||
/*
|
||||
* Auxiliary function for freeing arrays of configuration options,
|
||||
*/
|
||||
void
|
||||
static void
|
||||
free_cfg_options(int *numoptions, Mustek_pp_config_option** options)
|
||||
{
|
||||
int i;
|
||||
|
@ -163,7 +163,7 @@ free_cfg_options(int *numoptions, Mustek_pp_config_option** options)
|
|||
* Description:
|
||||
* closes the pipe (read-only end)
|
||||
*/
|
||||
SANE_Status
|
||||
static SANE_Status
|
||||
do_eof (Mustek_pp_Handle *hndl)
|
||||
{
|
||||
if (hndl->pipe >= 0) {
|
||||
|
@ -183,7 +183,7 @@ do_eof (Mustek_pp_Handle *hndl)
|
|||
* Description:
|
||||
* kills the reader process with a SIGTERM and cancels the scanner
|
||||
*/
|
||||
SANE_Status
|
||||
static SANE_Status
|
||||
do_stop(Mustek_pp_Handle *hndl)
|
||||
{
|
||||
|
||||
|
@ -237,7 +237,7 @@ sigterm_handler (int signal __UNUSED__)
|
|||
* The signal handle for SIGTERM is initialized.
|
||||
*
|
||||
*/
|
||||
int
|
||||
static int
|
||||
reader_process (Mustek_pp_Handle * hndl, int pipe)
|
||||
{
|
||||
sigset_t sigterm_set;
|
||||
|
@ -312,7 +312,7 @@ reader_process (Mustek_pp_Handle * hndl, int pipe)
|
|||
* devlist
|
||||
*
|
||||
*/
|
||||
SANE_Status
|
||||
static SANE_Status
|
||||
sane_attach (SANE_String_Const port, SANE_String_Const name, SANE_Int driver, SANE_Int info)
|
||||
{
|
||||
Mustek_pp_Device *dev;
|
||||
|
@ -369,7 +369,7 @@ sane_attach (SANE_String_Const port, SANE_String_Const name, SANE_Int driver, SA
|
|||
*
|
||||
* Description:
|
||||
*/
|
||||
void
|
||||
static void
|
||||
init_options(Mustek_pp_Handle *hndl)
|
||||
{
|
||||
int i;
|
||||
|
@ -612,7 +612,7 @@ init_options(Mustek_pp_Handle *hndl)
|
|||
* is called to look for a driver with a matching name. When found,
|
||||
* this driver is called to initialize the device.
|
||||
*/
|
||||
void
|
||||
static void
|
||||
attach_device(SANE_String *driver, SANE_String *name,
|
||||
SANE_String *port, SANE_String *option_ta)
|
||||
{
|
||||
|
@ -1877,3 +1877,11 @@ sane_get_select_fd (SANE_Handle handle, SANE_Int * fd)
|
|||
|
||||
return SANE_STATUS_GOOD;
|
||||
}
|
||||
|
||||
/* include drivers */
|
||||
#include "mustek_pp_decl.h"
|
||||
#include "mustek_pp_null.c"
|
||||
#include "mustek_pp_cis.h"
|
||||
#include "mustek_pp_cis.c"
|
||||
#include "mustek_pp_ccd300.h"
|
||||
#include "mustek_pp_ccd300.c"
|
||||
|
|
|
@ -67,13 +67,13 @@
|
|||
|
||||
/* A4SII300 driver */
|
||||
|
||||
unsigned char ChannelCode[] = { 0x82, 0x42, 0xc2 };
|
||||
unsigned char ChannelCode_1015[] = { 0x80, 0x40, 0xc0 };
|
||||
unsigned char MotorPhase[] = { 0x09, 0x0c, 0x06, 0x03 };
|
||||
unsigned char MotorPhase_HalfStep[]
|
||||
static unsigned char ChannelCode[] = { 0x82, 0x42, 0xc2 };
|
||||
static unsigned char ChannelCode_1015[] = { 0x80, 0x40, 0xc0 };
|
||||
static unsigned char MotorPhase[] = { 0x09, 0x0c, 0x06, 0x03 };
|
||||
static unsigned char MotorPhase_HalfStep[]
|
||||
= { 0x01, 0x09, 0x08, 0x0c, 0x04, 0x06, 0x02, 0x03 };
|
||||
|
||||
SANE_Status
|
||||
static SANE_Status
|
||||
ParRead (mustek_pp_ccd300_priv * dev)
|
||||
{
|
||||
unsigned char ASICId;
|
||||
|
@ -87,25 +87,25 @@ ParRead (mustek_pp_ccd300_priv * dev)
|
|||
return SANE_STATUS_GOOD;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
Switch_To_Scanner (mustek_pp_ccd300_priv * dev)
|
||||
{
|
||||
sanei_pa4s2_enable (dev->fd, SANE_TRUE);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
Switch_To_Printer (mustek_pp_ccd300_priv * dev)
|
||||
{
|
||||
sanei_pa4s2_enable (dev->fd, SANE_FALSE);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
LampPowerOn (mustek_pp_ccd300_priv * dev)
|
||||
{
|
||||
LampOnOP (dev);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
LampOnOP (mustek_pp_ccd300_priv * dev)
|
||||
{
|
||||
int btLoop;
|
||||
|
@ -120,13 +120,13 @@ LampOnOP (mustek_pp_ccd300_priv * dev)
|
|||
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
LampPowerOff (mustek_pp_ccd300_priv * dev)
|
||||
{
|
||||
LampOffOP (dev);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
LampOffOP (mustek_pp_ccd300_priv * dev)
|
||||
{
|
||||
int btLoop;
|
||||
|
@ -140,7 +140,7 @@ LampOffOP (mustek_pp_ccd300_priv * dev)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
SetCCDInfo (mustek_pp_ccd300_priv * dev)
|
||||
{
|
||||
dev->CCD_Type = CheckCCD_Kind (dev);
|
||||
|
@ -196,7 +196,7 @@ SetCCDInfo (mustek_pp_ccd300_priv * dev)
|
|||
SetScanByte (dev);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
SetCCDDPI (mustek_pp_ccd300_priv * dev)
|
||||
{
|
||||
unsigned char ucRes = 0x00;
|
||||
|
@ -232,7 +232,7 @@ SetCCDDPI (mustek_pp_ccd300_priv * dev)
|
|||
OutChar (6, 0x00, dev);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
SetCCDMode (mustek_pp_ccd300_priv * dev)
|
||||
{
|
||||
unsigned char ucMode = 0x00;
|
||||
|
@ -255,7 +255,7 @@ SetCCDMode (mustek_pp_ccd300_priv * dev)
|
|||
SetCCD_Channel (dev);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
SetCCDMode_1015 (mustek_pp_ccd300_priv * dev)
|
||||
{
|
||||
switch (dev->ScanMode)
|
||||
|
@ -277,7 +277,7 @@ SetCCDMode_1015 (mustek_pp_ccd300_priv * dev)
|
|||
SetCCD_Channel (dev);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
SetCCDInvert_1015 (mustek_pp_ccd300_priv * dev)
|
||||
{
|
||||
dev->ImageCtrl &= 0xe4;
|
||||
|
@ -288,13 +288,13 @@ SetCCDInvert_1015 (mustek_pp_ccd300_priv * dev)
|
|||
OutChar (6, dev->ImageCtrl, dev);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
SetPixelAverage (mustek_pp_ccd300_priv * dev)
|
||||
{
|
||||
OutChar (6, 0x15, dev);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
SetCCD_Channel_WriteSRAM (mustek_pp_ccd300_priv * dev)
|
||||
{
|
||||
unsigned char ucChannelCode;
|
||||
|
@ -303,7 +303,7 @@ SetCCD_Channel_WriteSRAM (mustek_pp_ccd300_priv * dev)
|
|||
OutChar (6, ucChannelCode, dev);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
SetCCD_Channel (mustek_pp_ccd300_priv * dev)
|
||||
{
|
||||
unsigned char ucChannelCode;
|
||||
|
@ -324,7 +324,7 @@ SetCCD_Channel (mustek_pp_ccd300_priv * dev)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
SetCCDInvert (mustek_pp_ccd300_priv * dev)
|
||||
{
|
||||
if (dev->PixelFlavor == 1)
|
||||
|
@ -333,13 +333,13 @@ SetCCDInvert (mustek_pp_ccd300_priv * dev)
|
|||
OutChar (6, 0x04, dev);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
ClearBankCount (mustek_pp_ccd300_priv * dev)
|
||||
{
|
||||
OutChar (6, 0x07, dev);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
SetDummyCount (mustek_pp_ccd300_priv * dev)
|
||||
{
|
||||
unsigned char ucTotalDummy;
|
||||
|
@ -369,7 +369,7 @@ SetDummyCount (mustek_pp_ccd300_priv * dev)
|
|||
OutChar (6, 0x01, dev);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
SetScanByte (mustek_pp_ccd300_priv * dev)
|
||||
{
|
||||
unsigned int wASICScanBytes, wTmp;
|
||||
|
@ -387,7 +387,7 @@ SetScanByte (mustek_pp_ccd300_priv * dev)
|
|||
OutChar (6, 0x01, dev);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
SetRGBRefVoltage (mustek_pp_ccd300_priv * dev)
|
||||
{
|
||||
dev->CCD_Type = CheckCCD_Kind (dev);
|
||||
|
@ -430,7 +430,7 @@ SetRGBRefVoltage (mustek_pp_ccd300_priv * dev)
|
|||
OutChar (6, 0x00, dev);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
SetLed_OnOff (mustek_pp_ccd300_priv * dev)
|
||||
{
|
||||
unsigned int wModNo;
|
||||
|
@ -1136,7 +1136,7 @@ FindVerBlackPos (mustek_pp_ccd300_priv * dev)
|
|||
dev->SkipCount = wSkipTmp;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
AllocBuffer (mustek_pp_ccd300_priv * dev)
|
||||
{
|
||||
unsigned long wBufSize;
|
||||
|
@ -1158,7 +1158,7 @@ AllocBuffer (mustek_pp_ccd300_priv * dev)
|
|||
memset (dev->Calib_Gray_Buf, 0, wBufSize);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
FreeBuf (mustek_pp_ccd300_priv * dev)
|
||||
{
|
||||
free (dev->lpTmpBuf_R);
|
||||
|
@ -1169,7 +1169,7 @@ FreeBuf (mustek_pp_ccd300_priv * dev)
|
|||
free (dev->Calib_Gray_Buf);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
IO_GetGrayData (mustek_pp_ccd300_priv * dev)
|
||||
{
|
||||
unsigned int wLineCount;
|
||||
|
@ -1216,7 +1216,7 @@ IO_GetGrayData (mustek_pp_ccd300_priv * dev)
|
|||
dev->CatchDataFirst = 0;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
IO_GetGrayData_100 (mustek_pp_ccd300_priv * dev)
|
||||
{
|
||||
unsigned int wLineCount;
|
||||
|
@ -1254,7 +1254,7 @@ IO_GetGrayData_100 (mustek_pp_ccd300_priv * dev)
|
|||
dev->CatchDataFirst = 0;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
IO_GetColorData (mustek_pp_ccd300_priv * dev)
|
||||
{
|
||||
unsigned int wLineCount;
|
||||
|
@ -1312,7 +1312,7 @@ IO_GetColorData (mustek_pp_ccd300_priv * dev)
|
|||
dev->CatchDataFirst = 0;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
IO_GetColorData_100 (mustek_pp_ccd300_priv * dev)
|
||||
{
|
||||
unsigned int wLineCount;
|
||||
|
@ -1371,7 +1371,7 @@ IO_GetColorData_100 (mustek_pp_ccd300_priv * dev)
|
|||
dev->CatchDataFirst = 0;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
Res50_Go_3_step (mustek_pp_ccd300_priv * dev)
|
||||
{
|
||||
unsigned int wLoop;
|
||||
|
@ -1384,7 +1384,7 @@ Res50_Go_3_step (mustek_pp_ccd300_priv * dev)
|
|||
WaitBankCountChange (dev);
|
||||
}
|
||||
}
|
||||
void
|
||||
static void
|
||||
MoveR_Tmp_Image_Buffer (mustek_pp_ccd300_priv * dev,
|
||||
unsigned char * pImagePtr, unsigned char * pBufferPtr)
|
||||
{
|
||||
|
@ -1405,7 +1405,7 @@ MoveR_Tmp_Image_Buffer (mustek_pp_ccd300_priv * dev,
|
|||
dev->Catch_R_TmpC = 0;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
MoveB_Tmp_Image_Buffer (mustek_pp_ccd300_priv * dev,
|
||||
unsigned char * pImagePtr, unsigned char * pBufferPtr)
|
||||
{
|
||||
|
@ -1426,7 +1426,7 @@ MoveB_Tmp_Image_Buffer (mustek_pp_ccd300_priv * dev,
|
|||
dev->Catch_B_TmpC = 0;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
Catch_Red_Line (mustek_pp_ccd300_priv * dev)
|
||||
{
|
||||
unsigned int wBuf_Lines;
|
||||
|
@ -1463,7 +1463,7 @@ Catch_Red_Line (mustek_pp_ccd300_priv * dev)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
Catch_Blue_Line (mustek_pp_ccd300_priv * dev)
|
||||
{
|
||||
unsigned int wCatch_Count, wBuf_Lines;
|
||||
|
@ -1520,7 +1520,7 @@ Catch_Blue_Line (mustek_pp_ccd300_priv * dev)
|
|||
dev->Catch_B_TmpC++;
|
||||
}
|
||||
}
|
||||
void
|
||||
static void
|
||||
Catch_Green_Line (mustek_pp_ccd300_priv * dev)
|
||||
{
|
||||
unsigned int wCatch_Count;
|
||||
|
@ -1563,7 +1563,7 @@ Catch_Green_Line (mustek_pp_ccd300_priv * dev)
|
|||
dev->Catch_G_Count++;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
IO_GetData (mustek_pp_ccd300_priv * dev, unsigned char * pImagePtr)
|
||||
{
|
||||
unsigned int wByteCount;
|
||||
|
@ -1580,7 +1580,7 @@ IO_GetData (mustek_pp_ccd300_priv * dev, unsigned char * pImagePtr)
|
|||
InChar_End_Dispatch (dev->PM, dev);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
IO_GetData_SPEC (mustek_pp_ccd300_priv * dev, unsigned char *pImagePtr)
|
||||
{
|
||||
unsigned int wByteCount;
|
||||
|
@ -1600,7 +1600,7 @@ IO_GetData_SPEC (mustek_pp_ccd300_priv * dev, unsigned char *pImagePtr)
|
|||
InChar_End_Dispatch (dev->PM, dev);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
IO_Color_Line (mustek_pp_ccd300_priv * dev, unsigned char * pImagePtr)
|
||||
{
|
||||
unsigned int wLoop;
|
||||
|
@ -1631,7 +1631,7 @@ IO_Color_Line (mustek_pp_ccd300_priv * dev, unsigned char * pImagePtr)
|
|||
InChar_End_Dispatch (dev->PM, dev);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
IO_Color_Line_SPEC (mustek_pp_ccd300_priv * dev, unsigned char * pImagePtr)
|
||||
{
|
||||
unsigned int wByteCount;
|
||||
|
@ -1665,7 +1665,7 @@ IO_Color_Line_SPEC (mustek_pp_ccd300_priv * dev, unsigned char * pImagePtr)
|
|||
InChar_End_Dispatch (dev->PM, dev);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
IO_SkipData (mustek_pp_ccd300_priv * dev)
|
||||
{
|
||||
unsigned int wLoop, wSkipCount;
|
||||
|
@ -1676,7 +1676,7 @@ IO_SkipData (mustek_pp_ccd300_priv * dev)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
Check_DataPar (mustek_pp_ccd300_priv * dev)
|
||||
{
|
||||
dev->ASICRes = 1;
|
||||
|
@ -1699,7 +1699,7 @@ Check_DataPar (mustek_pp_ccd300_priv * dev)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
Whether_Skip_One_Line (mustek_pp_ccd300_priv * dev, int wCatch_Count)
|
||||
{
|
||||
switch (dev->ScanResolution)
|
||||
|
@ -1737,7 +1737,7 @@ Whether_Skip_One_Line (mustek_pp_ccd300_priv * dev, int wCatch_Count)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
Chk_Color_100_Abort (mustek_pp_ccd300_priv * dev, int wCatch_Count)
|
||||
{
|
||||
unsigned int wModNo;
|
||||
|
@ -1775,7 +1775,7 @@ Chk_Color_100_Abort (mustek_pp_ccd300_priv * dev, int wCatch_Count)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
Chk_Color_100_Abort_3794 (mustek_pp_ccd300_priv * dev, int wCatch_Count)
|
||||
{
|
||||
unsigned int wModNo;
|
||||
|
@ -1814,7 +1814,7 @@ Chk_Color_100_Abort_3794 (mustek_pp_ccd300_priv * dev, int wCatch_Count)
|
|||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
void
|
||||
static void
|
||||
Delay_Motor_Times (mustek_pp_ccd300_priv * dev __UNUSED__,
|
||||
unsigned long lgScanTime)
|
||||
{
|
||||
|
@ -1837,7 +1837,7 @@ Delay_Motor_Times (mustek_pp_ccd300_priv * dev __UNUSED__,
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
GetCalibData (mustek_pp_ccd300_priv * dev)
|
||||
{
|
||||
unsigned long dwLoop;
|
||||
|
@ -1891,7 +1891,7 @@ GetCalibData (mustek_pp_ccd300_priv * dev)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
GetChannelData (mustek_pp_ccd300_priv * dev, unsigned char * pucBuf)
|
||||
{
|
||||
SetCCD_Channel (dev);
|
||||
|
@ -1904,7 +1904,7 @@ GetChannelData (mustek_pp_ccd300_priv * dev, unsigned char * pucBuf)
|
|||
ClearBankCount (dev);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
GetMaxData (mustek_pp_ccd300_priv * dev, unsigned char * pImagePtr)
|
||||
{
|
||||
unsigned int wLoop, wLoop1;
|
||||
|
@ -1930,7 +1930,7 @@ GetMaxData (mustek_pp_ccd300_priv * dev, unsigned char * pImagePtr)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
Get_Line_ntimes (mustek_pp_ccd300_priv * dev, unsigned char * pImagePtr)
|
||||
{
|
||||
unsigned char *pucCalib_Buf, *pCalibPtr;
|
||||
|
@ -1956,7 +1956,7 @@ Get_Line_ntimes (mustek_pp_ccd300_priv * dev, unsigned char * pImagePtr)
|
|||
free (pucCalib_Buf);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
Average_Data (mustek_pp_ccd300_priv * dev, unsigned char * pInImagePtr,
|
||||
unsigned char * pOutImagePtr)
|
||||
{
|
||||
|
@ -1979,7 +1979,7 @@ Average_Data (mustek_pp_ccd300_priv * dev, unsigned char * pInImagePtr,
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
FindHBlackPos (mustek_pp_ccd300_priv * dev, unsigned char * pImagePtr)
|
||||
{
|
||||
unsigned char *pImagePtrTmp;
|
||||
|
@ -2001,7 +2001,7 @@ FindHBlackPos (mustek_pp_ccd300_priv * dev, unsigned char * pImagePtr)
|
|||
pImagePtr = pImagePtrTmp;
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
FindVBlackPos (mustek_pp_ccd300_priv * dev, unsigned char * pImagePtr)
|
||||
{
|
||||
unsigned int wBkPos, wFindBkCount;
|
||||
|
@ -2019,7 +2019,7 @@ FindVBlackPos (mustek_pp_ccd300_priv * dev, unsigned char * pImagePtr)
|
|||
return 0;
|
||||
}
|
||||
|
||||
unsigned char
|
||||
static unsigned char
|
||||
ABSCompute (unsigned char ucData1, unsigned char ucData2)
|
||||
{
|
||||
unsigned char ucData;
|
||||
|
@ -2030,7 +2030,7 @@ ABSCompute (unsigned char ucData1, unsigned char ucData2)
|
|||
return ucData;
|
||||
}
|
||||
|
||||
unsigned char
|
||||
static unsigned char
|
||||
SubRefBlack (mustek_pp_ccd300_priv * dev, unsigned char ucData)
|
||||
{
|
||||
|
||||
|
@ -2041,7 +2041,7 @@ SubRefBlack (mustek_pp_ccd300_priv * dev, unsigned char ucData)
|
|||
return ucData;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
Bubble_Sort_Arg (mustek_pp_ccd300_priv * dev, unsigned int wCount)
|
||||
{
|
||||
unsigned int wLoop, wLoop1;
|
||||
|
@ -2060,7 +2060,7 @@ Bubble_Sort_Arg (mustek_pp_ccd300_priv * dev, unsigned int wCount)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
CalibrationData_Gray (mustek_pp_ccd300_priv * dev, unsigned char * pImagePtr)
|
||||
{
|
||||
unsigned int wLoop;
|
||||
|
@ -2076,7 +2076,8 @@ CalibrationData_Gray (mustek_pp_ccd300_priv * dev, unsigned char * pImagePtr)
|
|||
}
|
||||
}
|
||||
|
||||
void CalibrationData_Color (mustek_pp_ccd300_priv * dev,
|
||||
static void
|
||||
CalibrationData_Color (mustek_pp_ccd300_priv * dev,
|
||||
unsigned char * pImagePtr)
|
||||
{
|
||||
unsigned char *lpImageTmp;
|
||||
|
@ -2096,7 +2097,7 @@ void CalibrationData_Color (mustek_pp_ccd300_priv * dev,
|
|||
CalibrationData_B (dev, lpImageTmp);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
CalibrationData_R (mustek_pp_ccd300_priv * dev, unsigned char * pImagePtr)
|
||||
{
|
||||
unsigned int wLoop;
|
||||
|
@ -2112,7 +2113,7 @@ CalibrationData_R (mustek_pp_ccd300_priv * dev, unsigned char * pImagePtr)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
CalibrationData_G (mustek_pp_ccd300_priv * dev, unsigned char * pImagePtr)
|
||||
{
|
||||
unsigned int wLoop;
|
||||
|
@ -2128,7 +2129,7 @@ CalibrationData_G (mustek_pp_ccd300_priv * dev, unsigned char * pImagePtr)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
CalibrationData_B (mustek_pp_ccd300_priv * dev, unsigned char * pImagePtr)
|
||||
{
|
||||
unsigned int wLoop;
|
||||
|
@ -2144,7 +2145,7 @@ CalibrationData_B (mustek_pp_ccd300_priv * dev, unsigned char * pImagePtr)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
CalibrationData (mustek_pp_ccd300_priv * dev, unsigned char * pImagePtr,
|
||||
unsigned char * pCaliBufPtr)
|
||||
{
|
||||
|
@ -2180,7 +2181,7 @@ CalibrationData (mustek_pp_ccd300_priv * dev, unsigned char * pImagePtr,
|
|||
|
||||
#define MUSTEK_PP_CCD300 4
|
||||
|
||||
SANE_Status
|
||||
static SANE_Status
|
||||
ccd300_init (SANE_Int options, SANE_String_Const port,
|
||||
SANE_String_Const name, SANE_Attach_Callback attach)
|
||||
{
|
||||
|
@ -2231,7 +2232,7 @@ ccd300_init (SANE_Int options, SANE_String_Const port,
|
|||
}
|
||||
|
||||
|
||||
void
|
||||
static void
|
||||
ccd300_capabilities (SANE_Int info, SANE_String * model,
|
||||
SANE_String * vendor, SANE_String * type,
|
||||
SANE_Int * maxres, SANE_Int * minres,
|
||||
|
@ -2260,7 +2261,7 @@ ccd300_capabilities (SANE_Int info, SANE_String * model,
|
|||
|
||||
}
|
||||
|
||||
SANE_Status
|
||||
static SANE_Status
|
||||
ccd300_open (SANE_String port, SANE_Int caps, SANE_Int * fd)
|
||||
{
|
||||
SANE_Status status;
|
||||
|
@ -2282,7 +2283,7 @@ ccd300_open (SANE_String port, SANE_Int caps, SANE_Int * fd)
|
|||
return status;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
ccd300_setup (SANE_Handle hndl)
|
||||
{
|
||||
|
||||
|
@ -2315,7 +2316,7 @@ ccd300_setup (SANE_Handle hndl)
|
|||
dev->LampOnTime = time(NULL);
|
||||
}
|
||||
|
||||
SANE_Status
|
||||
static SANE_Status
|
||||
ccd300_config (SANE_Handle handle, SANE_String_Const optname,
|
||||
SANE_String_Const optval)
|
||||
{
|
||||
|
@ -2350,7 +2351,8 @@ ccd300_config (SANE_Handle handle, SANE_String_Const optname,
|
|||
|
||||
}
|
||||
|
||||
void ccd300_close(SANE_Handle handle)
|
||||
static void
|
||||
ccd300_close(SANE_Handle handle)
|
||||
{
|
||||
Mustek_pp_Handle *hndl = handle;
|
||||
mustek_pp_ccd300_priv *dev = hndl->priv;
|
||||
|
@ -2362,7 +2364,8 @@ void ccd300_close(SANE_Handle handle)
|
|||
|
||||
}
|
||||
|
||||
SANE_Status ccd300_start (SANE_Handle handle)
|
||||
static SANE_Status
|
||||
ccd300_start (SANE_Handle handle)
|
||||
{
|
||||
Mustek_pp_Handle *hndl = handle;
|
||||
mustek_pp_ccd300_priv *dev = hndl->priv;
|
||||
|
@ -2400,3 +2403,15 @@ SANE_Status ccd300_start (SANE_Handle handle)
|
|||
|
||||
return SANE_STATUS_GOOD;
|
||||
}
|
||||
|
||||
|
||||
/*ARGSUSED*/
|
||||
static void
|
||||
ccd300_read (SANE_Handle hndl __UNUSED__, SANE_Byte *buffer __UNUSED__)
|
||||
{
|
||||
}
|
||||
/*ARGSUSED*/
|
||||
static void
|
||||
ccd300_stop (SANE_Handle hndl __UNUSED__)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -133,122 +133,122 @@ typedef struct
|
|||
mustek_pp_ccd300_priv;
|
||||
|
||||
/* prototypes */
|
||||
SANE_Status ParRead (mustek_pp_ccd300_priv * dev);
|
||||
void Switch_To_Scanner (mustek_pp_ccd300_priv * dev);
|
||||
void Switch_To_Printer (mustek_pp_ccd300_priv * dev);
|
||||
void LampPowerOn (mustek_pp_ccd300_priv * dev);
|
||||
void LampOnOP (mustek_pp_ccd300_priv * dev);
|
||||
void LampPowerOff (mustek_pp_ccd300_priv * dev);
|
||||
void LampOffOP (mustek_pp_ccd300_priv * dev);
|
||||
void SetCCDInfo (mustek_pp_ccd300_priv * dev);
|
||||
void SetCCDDPI (mustek_pp_ccd300_priv * dev);
|
||||
void SetCCDMode (mustek_pp_ccd300_priv * dev);
|
||||
void SetCCDMode_1015 (mustek_pp_ccd300_priv * dev);
|
||||
void SetCCDInvert_1015 (mustek_pp_ccd300_priv * dev);
|
||||
void SetPixelAverage (mustek_pp_ccd300_priv * dev);
|
||||
void SetCCD_Channel_WriteSRAM (mustek_pp_ccd300_priv * dev);
|
||||
void SetCCD_Channel (mustek_pp_ccd300_priv * dev);
|
||||
void SetCCDInvert (mustek_pp_ccd300_priv * dev);
|
||||
void ClearBankCount (mustek_pp_ccd300_priv * dev);
|
||||
void SetDummyCount (mustek_pp_ccd300_priv * dev);
|
||||
void SetScanByte (mustek_pp_ccd300_priv * dev);
|
||||
void SetRGBRefVoltage (mustek_pp_ccd300_priv * dev);
|
||||
void SetLed_OnOff (mustek_pp_ccd300_priv * dev);
|
||||
void OutChar (unsigned char RegNo,
|
||||
unsigned char OutData, mustek_pp_ccd300_priv * dev);
|
||||
unsigned char Read_a_Byte (mustek_pp_ccd300_priv * dev, unsigned char RegNo);
|
||||
void InChar_Begin_Dispatch (unsigned char Mode, mustek_pp_ccd300_priv * dev,
|
||||
unsigned char RegNo);
|
||||
unsigned char InChar_Do_Dispatch (unsigned char Mode,
|
||||
mustek_pp_ccd300_priv * dev);
|
||||
void InChar_End_Dispatch (unsigned char Mode, mustek_pp_ccd300_priv * dev);
|
||||
unsigned char Change_Mode (mustek_pp_ccd300_priv * dev);
|
||||
unsigned char ReadID1 (unsigned char Mode, mustek_pp_ccd300_priv * dev);
|
||||
void CheckMotorSatus (mustek_pp_ccd300_priv * dev);
|
||||
void CheckPIPStatus (mustek_pp_ccd300_priv * dev);
|
||||
unsigned char GetBankCount (mustek_pp_ccd300_priv * dev);
|
||||
unsigned char CheckCCDBit (mustek_pp_ccd300_priv * dev);
|
||||
unsigned char CheckCCD_Kind (mustek_pp_ccd300_priv * dev);
|
||||
void WaitBankCountChange (mustek_pp_ccd300_priv * dev);
|
||||
void GetDeviceInfo (mustek_pp_ccd300_priv * dev);
|
||||
void SetScanParameter (int DeviceObject, int Irp, mustek_pp_ccd300_priv * dev);
|
||||
void GetScanParameter (int DeviceObject, int Irp, mustek_pp_ccd300_priv * dev);
|
||||
void A4StartScan (int DeviceObject, int Irp, mustek_pp_ccd300_priv * dev);
|
||||
void A4StopScan (int DeviceObject, int Irp, mustek_pp_ccd300_priv * dev);
|
||||
void A4CheckScanner_HomeSensor (int DeviceObject, int Irp,
|
||||
mustek_pp_ccd300_priv * dev);
|
||||
void A4CarriageTo_Home (int DeviceObject, int Irp,
|
||||
mustek_pp_ccd300_priv * dev);
|
||||
void PullCarriage_ToHome (mustek_pp_ccd300_priv * dev);
|
||||
void Motor_BackHome (mustek_pp_ccd300_priv * dev);
|
||||
void A4GetImage (int DeviceObject, int Irp, mustek_pp_ccd300_priv * dev);
|
||||
void SetASICRes (mustek_pp_ccd300_priv * dev);
|
||||
int CalScanParameter (int wResolution, int wPar);
|
||||
void Forward_onestep (mustek_pp_ccd300_priv * dev);
|
||||
void Backward_onestep (mustek_pp_ccd300_priv * dev);
|
||||
void Asic1015_Motor_Ctrl (mustek_pp_ccd300_priv * dev,
|
||||
unsigned char ucMotorCtrl);
|
||||
void Delay_nTimes_mSec (unsigned int wTimes);
|
||||
void SetSTI (mustek_pp_ccd300_priv * dev);
|
||||
void Motor_StepLoop (mustek_pp_ccd300_priv * dev,
|
||||
unsigned char ucForBackFlag, unsigned int wStepNo);
|
||||
void Motor_Off (mustek_pp_ccd300_priv * dev);
|
||||
void Store_Tmp_Data (mustek_pp_ccd300_priv * dev);
|
||||
void Restore_Tmp_Data (mustek_pp_ccd300_priv * dev);
|
||||
void IO_FindBlack_Data (mustek_pp_ccd300_priv * dev);
|
||||
void CalRefBlack (mustek_pp_ccd300_priv * dev);
|
||||
void GetRefBlack (mustek_pp_ccd300_priv * dev);
|
||||
void RestoreCCDInfo_Set (mustek_pp_ccd300_priv * dev);
|
||||
void FindHorBlackPos (mustek_pp_ccd300_priv * dev);
|
||||
void FindVerBlackPos (mustek_pp_ccd300_priv * dev);
|
||||
void AllocBuffer (mustek_pp_ccd300_priv * dev);
|
||||
void FreeBuf (mustek_pp_ccd300_priv * dev);
|
||||
void IO_GetGrayData (mustek_pp_ccd300_priv * dev);
|
||||
void IO_GetGrayData_100 (mustek_pp_ccd300_priv * dev);
|
||||
void IO_GetColorData (mustek_pp_ccd300_priv * dev);
|
||||
void IO_GetColorData_100 (mustek_pp_ccd300_priv * dev);
|
||||
void Res50_Go_3_step (mustek_pp_ccd300_priv * dev);
|
||||
void MoveR_Tmp_Image_Buffer (mustek_pp_ccd300_priv * dev,
|
||||
unsigned char * pImagePtr,
|
||||
unsigned char * pBufferPtr);
|
||||
void MoveB_Tmp_Image_Buffer (mustek_pp_ccd300_priv * dev,
|
||||
unsigned char * pImagePtr,
|
||||
unsigned char * pBufferPtr);
|
||||
void Catch_Red_Line (mustek_pp_ccd300_priv * dev);
|
||||
void Catch_Blue_Line (mustek_pp_ccd300_priv * dev);
|
||||
void Catch_Green_Line (mustek_pp_ccd300_priv * dev);
|
||||
void IO_GetData (mustek_pp_ccd300_priv * dev, unsigned char * pImagePtr);
|
||||
void IO_GetData_SPEC (mustek_pp_ccd300_priv * dev, unsigned char *pImagePtr);
|
||||
void IO_Color_Line (mustek_pp_ccd300_priv * dev, unsigned char * pImagePtr);
|
||||
void IO_Color_Line_SPEC (mustek_pp_ccd300_priv * dev,
|
||||
unsigned char * pImagePtr);
|
||||
void IO_SkipData (mustek_pp_ccd300_priv * dev);
|
||||
void Check_DataPar (mustek_pp_ccd300_priv * dev);
|
||||
void Whether_Skip_One_Line (mustek_pp_ccd300_priv * dev, int wCatch_Count);
|
||||
void Chk_Color_100_Abort (mustek_pp_ccd300_priv * dev, int wCatch_Count);
|
||||
void Chk_Color_100_Abort_3794 (mustek_pp_ccd300_priv * dev, int wCatch_Count);
|
||||
void Delay_Motor_Times (mustek_pp_ccd300_priv * dev, unsigned long lgScanTime);
|
||||
void GetCalibData (mustek_pp_ccd300_priv * dev);
|
||||
void GetChannelData (mustek_pp_ccd300_priv * dev, unsigned char * pucBuf);
|
||||
void GetMaxData (mustek_pp_ccd300_priv * dev, unsigned char * pImagePtr);
|
||||
void Get_Line_ntimes (mustek_pp_ccd300_priv * dev, unsigned char * pImagePtr);
|
||||
void Average_Data (mustek_pp_ccd300_priv * dev, unsigned char * pInImagePtr,
|
||||
unsigned char * pOutImagePtr);
|
||||
void FindHBlackPos (mustek_pp_ccd300_priv * dev, unsigned char * pImagePtr);
|
||||
int FindVBlackPos (mustek_pp_ccd300_priv * dev, unsigned char * pImagePtr);
|
||||
unsigned char ABSCompute (unsigned char ucData1, unsigned char ucData2);
|
||||
unsigned char SubRefBlack (mustek_pp_ccd300_priv * dev, unsigned char ucData);
|
||||
void Bubble_Sort_Arg (mustek_pp_ccd300_priv * dev, unsigned int wCount);
|
||||
void CalibrationData_Gray (mustek_pp_ccd300_priv * dev,
|
||||
unsigned char * pImagePtr);
|
||||
void CalibrationData_Color (mustek_pp_ccd300_priv * dev,
|
||||
unsigned char * pImagePtr);
|
||||
void CalibrationData_R (mustek_pp_ccd300_priv * dev,
|
||||
unsigned char * pImagePtr);
|
||||
void CalibrationData_G (mustek_pp_ccd300_priv * dev,
|
||||
unsigned char * pImagePtr);
|
||||
void CalibrationData_B (mustek_pp_ccd300_priv * dev,
|
||||
unsigned char * pImagePtr);
|
||||
void CalibrationData (mustek_pp_ccd300_priv * dev, unsigned char * pImagePtr,
|
||||
unsigned char * pCaliBufPtr);
|
||||
static SANE_Status ParRead (mustek_pp_ccd300_priv * dev);
|
||||
static void Switch_To_Scanner (mustek_pp_ccd300_priv * dev);
|
||||
static void Switch_To_Printer (mustek_pp_ccd300_priv * dev);
|
||||
static void LampPowerOn (mustek_pp_ccd300_priv * dev);
|
||||
static void LampOnOP (mustek_pp_ccd300_priv * dev);
|
||||
static void LampPowerOff (mustek_pp_ccd300_priv * dev);
|
||||
static void LampOffOP (mustek_pp_ccd300_priv * dev);
|
||||
static void SetCCDInfo (mustek_pp_ccd300_priv * dev);
|
||||
static void SetCCDDPI (mustek_pp_ccd300_priv * dev);
|
||||
static void SetCCDMode (mustek_pp_ccd300_priv * dev);
|
||||
static void SetCCDMode_1015 (mustek_pp_ccd300_priv * dev);
|
||||
static void SetCCDInvert_1015 (mustek_pp_ccd300_priv * dev);
|
||||
static void SetPixelAverage (mustek_pp_ccd300_priv * dev);
|
||||
static void SetCCD_Channel_WriteSRAM (mustek_pp_ccd300_priv * dev);
|
||||
static void SetCCD_Channel (mustek_pp_ccd300_priv * dev);
|
||||
static void SetCCDInvert (mustek_pp_ccd300_priv * dev);
|
||||
static void ClearBankCount (mustek_pp_ccd300_priv * dev);
|
||||
static void SetDummyCount (mustek_pp_ccd300_priv * dev);
|
||||
static void SetScanByte (mustek_pp_ccd300_priv * dev);
|
||||
static void SetRGBRefVoltage (mustek_pp_ccd300_priv * dev);
|
||||
static void SetLed_OnOff (mustek_pp_ccd300_priv * dev);
|
||||
static void OutChar (unsigned char RegNo,
|
||||
unsigned char OutData, mustek_pp_ccd300_priv * dev);
|
||||
static unsigned char Read_a_Byte (mustek_pp_ccd300_priv * dev, unsigned char RegNo);
|
||||
static void InChar_Begin_Dispatch (unsigned char Mode, mustek_pp_ccd300_priv * dev,
|
||||
unsigned char RegNo);
|
||||
static unsigned char InChar_Do_Dispatch (unsigned char Mode,
|
||||
mustek_pp_ccd300_priv * dev);
|
||||
static void InChar_End_Dispatch (unsigned char Mode, mustek_pp_ccd300_priv * dev);
|
||||
static unsigned char Change_Mode (mustek_pp_ccd300_priv * dev);
|
||||
static unsigned char ReadID1 (unsigned char Mode, mustek_pp_ccd300_priv * dev);
|
||||
static void CheckMotorSatus (mustek_pp_ccd300_priv * dev);
|
||||
static void CheckPIPStatus (mustek_pp_ccd300_priv * dev);
|
||||
static unsigned char GetBankCount (mustek_pp_ccd300_priv * dev);
|
||||
static unsigned char CheckCCDBit (mustek_pp_ccd300_priv * dev);
|
||||
static unsigned char CheckCCD_Kind (mustek_pp_ccd300_priv * dev);
|
||||
static void WaitBankCountChange (mustek_pp_ccd300_priv * dev);
|
||||
static void GetDeviceInfo (mustek_pp_ccd300_priv * dev);
|
||||
static void SetScanParameter (int DeviceObject, int Irp, mustek_pp_ccd300_priv * dev);
|
||||
static void GetScanParameter (int DeviceObject, int Irp, mustek_pp_ccd300_priv * dev);
|
||||
static void A4StartScan (int DeviceObject, int Irp, mustek_pp_ccd300_priv * dev);
|
||||
static void A4StopScan (int DeviceObject, int Irp, mustek_pp_ccd300_priv * dev);
|
||||
static void A4CheckScanner_HomeSensor (int DeviceObject, int Irp,
|
||||
mustek_pp_ccd300_priv * dev);
|
||||
static void A4CarriageTo_Home (int DeviceObject, int Irp,
|
||||
mustek_pp_ccd300_priv * dev);
|
||||
static void PullCarriage_ToHome (mustek_pp_ccd300_priv * dev);
|
||||
static void Motor_BackHome (mustek_pp_ccd300_priv * dev);
|
||||
static void A4GetImage (int DeviceObject, int Irp, mustek_pp_ccd300_priv * dev);
|
||||
static void SetASICRes (mustek_pp_ccd300_priv * dev);
|
||||
static int CalScanParameter (int wResolution, int wPar);
|
||||
static void Forward_onestep (mustek_pp_ccd300_priv * dev);
|
||||
static void Backward_onestep (mustek_pp_ccd300_priv * dev);
|
||||
static void Asic1015_Motor_Ctrl (mustek_pp_ccd300_priv * dev,
|
||||
unsigned char ucMotorCtrl);
|
||||
static void Delay_nTimes_mSec (unsigned int wTimes);
|
||||
static void SetSTI (mustek_pp_ccd300_priv * dev);
|
||||
static void Motor_StepLoop (mustek_pp_ccd300_priv * dev,
|
||||
unsigned char ucForBackFlag, unsigned int wStepNo);
|
||||
static void Motor_Off (mustek_pp_ccd300_priv * dev);
|
||||
static void Store_Tmp_Data (mustek_pp_ccd300_priv * dev);
|
||||
static void Restore_Tmp_Data (mustek_pp_ccd300_priv * dev);
|
||||
static void IO_FindBlack_Data (mustek_pp_ccd300_priv * dev);
|
||||
static void CalRefBlack (mustek_pp_ccd300_priv * dev);
|
||||
static void GetRefBlack (mustek_pp_ccd300_priv * dev);
|
||||
static void RestoreCCDInfo_Set (mustek_pp_ccd300_priv * dev);
|
||||
static void FindHorBlackPos (mustek_pp_ccd300_priv * dev);
|
||||
static void FindVerBlackPos (mustek_pp_ccd300_priv * dev);
|
||||
static void AllocBuffer (mustek_pp_ccd300_priv * dev);
|
||||
static void FreeBuf (mustek_pp_ccd300_priv * dev);
|
||||
static void IO_GetGrayData (mustek_pp_ccd300_priv * dev);
|
||||
static void IO_GetGrayData_100 (mustek_pp_ccd300_priv * dev);
|
||||
static void IO_GetColorData (mustek_pp_ccd300_priv * dev);
|
||||
static void IO_GetColorData_100 (mustek_pp_ccd300_priv * dev);
|
||||
static void Res50_Go_3_step (mustek_pp_ccd300_priv * dev);
|
||||
static void MoveR_Tmp_Image_Buffer (mustek_pp_ccd300_priv * dev,
|
||||
unsigned char * pImagePtr,
|
||||
unsigned char * pBufferPtr);
|
||||
static void MoveB_Tmp_Image_Buffer (mustek_pp_ccd300_priv * dev,
|
||||
unsigned char * pImagePtr,
|
||||
unsigned char * pBufferPtr);
|
||||
static void Catch_Red_Line (mustek_pp_ccd300_priv * dev);
|
||||
static void Catch_Blue_Line (mustek_pp_ccd300_priv * dev);
|
||||
static void Catch_Green_Line (mustek_pp_ccd300_priv * dev);
|
||||
static void IO_GetData (mustek_pp_ccd300_priv * dev, unsigned char * pImagePtr);
|
||||
static void IO_GetData_SPEC (mustek_pp_ccd300_priv * dev, unsigned char *pImagePtr);
|
||||
static void IO_Color_Line (mustek_pp_ccd300_priv * dev, unsigned char * pImagePtr);
|
||||
static void IO_Color_Line_SPEC (mustek_pp_ccd300_priv * dev,
|
||||
unsigned char * pImagePtr);
|
||||
static void IO_SkipData (mustek_pp_ccd300_priv * dev);
|
||||
static void Check_DataPar (mustek_pp_ccd300_priv * dev);
|
||||
static void Whether_Skip_One_Line (mustek_pp_ccd300_priv * dev, int wCatch_Count);
|
||||
static void Chk_Color_100_Abort (mustek_pp_ccd300_priv * dev, int wCatch_Count);
|
||||
static void Chk_Color_100_Abort_3794 (mustek_pp_ccd300_priv * dev, int wCatch_Count);
|
||||
static void Delay_Motor_Times (mustek_pp_ccd300_priv * dev, unsigned long lgScanTime);
|
||||
static void GetCalibData (mustek_pp_ccd300_priv * dev);
|
||||
static void GetChannelData (mustek_pp_ccd300_priv * dev, unsigned char * pucBuf);
|
||||
static void GetMaxData (mustek_pp_ccd300_priv * dev, unsigned char * pImagePtr);
|
||||
static void Get_Line_ntimes (mustek_pp_ccd300_priv * dev, unsigned char * pImagePtr);
|
||||
static void Average_Data (mustek_pp_ccd300_priv * dev, unsigned char * pInImagePtr,
|
||||
unsigned char * pOutImagePtr);
|
||||
static void FindHBlackPos (mustek_pp_ccd300_priv * dev, unsigned char * pImagePtr);
|
||||
static int FindVBlackPos (mustek_pp_ccd300_priv * dev, unsigned char * pImagePtr);
|
||||
static unsigned char ABSCompute (unsigned char ucData1, unsigned char ucData2);
|
||||
static unsigned char SubRefBlack (mustek_pp_ccd300_priv * dev, unsigned char ucData);
|
||||
static void Bubble_Sort_Arg (mustek_pp_ccd300_priv * dev, unsigned int wCount);
|
||||
static void CalibrationData_Gray (mustek_pp_ccd300_priv * dev,
|
||||
unsigned char * pImagePtr);
|
||||
static void CalibrationData_Color (mustek_pp_ccd300_priv * dev,
|
||||
unsigned char * pImagePtr);
|
||||
static void CalibrationData_R (mustek_pp_ccd300_priv * dev,
|
||||
unsigned char * pImagePtr);
|
||||
static void CalibrationData_G (mustek_pp_ccd300_priv * dev,
|
||||
unsigned char * pImagePtr);
|
||||
static void CalibrationData_B (mustek_pp_ccd300_priv * dev,
|
||||
unsigned char * pImagePtr);
|
||||
static void CalibrationData (mustek_pp_ccd300_priv * dev, unsigned char * pImagePtr,
|
||||
unsigned char * pCaliBufPtr);
|
||||
#endif
|
||||
|
|
|
@ -399,7 +399,7 @@ Mustek_PP_1015_display_reg(const char* info, int val)
|
|||
* 3: bank count info
|
||||
*
|
||||
*****************************************************************************/
|
||||
SANE_Byte
|
||||
static SANE_Byte
|
||||
Mustek_PP_1015_read_reg(Mustek_PP_CIS_dev * dev, Mustek_PP_1015R_reg reg)
|
||||
{
|
||||
SANE_Byte tmp;
|
||||
|
@ -427,7 +427,7 @@ Mustek_PP_1015_read_reg(Mustek_PP_CIS_dev * dev, Mustek_PP_1015R_reg reg)
|
|||
* controlled through the sleep parameter (microseconds).
|
||||
*
|
||||
*****************************************************************************/
|
||||
SANE_Bool
|
||||
static SANE_Bool
|
||||
Mustek_PP_1015_wait_bit(Mustek_PP_CIS_dev * dev, Mustek_PP_1015R_reg reg,
|
||||
Mustek_PP_1015R_bit bit, SANE_Bool on, unsigned period)
|
||||
{
|
||||
|
@ -505,7 +505,7 @@ Mustek_PP_1015_wait_bit(Mustek_PP_CIS_dev * dev, Mustek_PP_1015R_reg reg,
|
|||
*
|
||||
*****************************************************************************/
|
||||
|
||||
void
|
||||
static void
|
||||
Mustek_PP_1015_write_reg(Mustek_PP_CIS_dev * dev, Mustek_PP_1015W_reg reg, SANE_Byte val)
|
||||
{
|
||||
|
||||
|
@ -538,7 +538,7 @@ Mustek_PP_1015_write_reg(Mustek_PP_CIS_dev * dev, Mustek_PP_1015W_reg reg, SANE_
|
|||
* val2 is written to register[regNo+1]
|
||||
*
|
||||
*****************************************************************************/
|
||||
void
|
||||
static void
|
||||
Mustek_PP_1015_write_reg2(Mustek_PP_CIS_dev * dev, Mustek_PP_1015W_reg reg,
|
||||
SANE_Byte val1, SANE_Byte val2)
|
||||
{
|
||||
|
@ -575,7 +575,7 @@ Mustek_PP_1015_write_reg2(Mustek_PP_CIS_dev * dev, Mustek_PP_1015W_reg reg,
|
|||
* val3 is written to register[regNo+2]
|
||||
*
|
||||
*****************************************************************************/
|
||||
void
|
||||
static void
|
||||
Mustek_PP_1015_write_reg3(Mustek_PP_CIS_dev * dev, Mustek_PP_1015W_reg reg,
|
||||
SANE_Byte val1, SANE_Byte val2, SANE_Byte val3)
|
||||
{
|
||||
|
@ -608,7 +608,7 @@ Mustek_PP_1015_write_reg3(Mustek_PP_CIS_dev * dev, Mustek_PP_1015W_reg reg,
|
|||
/******************************************************************************
|
||||
* Opens a register for a (series of) write operation(s).
|
||||
*****************************************************************************/
|
||||
void
|
||||
static void
|
||||
Mustek_PP_1015_write_reg_start(Mustek_PP_CIS_dev * dev, Mustek_PP_1015W_reg reg)
|
||||
{
|
||||
SANE_Byte regBank = (reg & 0xF0) >> 4;
|
||||
|
@ -629,7 +629,7 @@ Mustek_PP_1015_write_reg_start(Mustek_PP_CIS_dev * dev, Mustek_PP_1015W_reg reg)
|
|||
/******************************************************************************
|
||||
* Writes a value to the currently open register.
|
||||
*****************************************************************************/
|
||||
void
|
||||
static void
|
||||
Mustek_PP_1015_write_reg_val(Mustek_PP_CIS_dev * dev, SANE_Byte val)
|
||||
{
|
||||
#ifdef M1015_TRACE_REGS
|
||||
|
@ -652,7 +652,7 @@ Mustek_PP_1015_write_reg_val(Mustek_PP_CIS_dev * dev, SANE_Byte val)
|
|||
/******************************************************************************
|
||||
* Closes a register after a (series of) write operation(s).
|
||||
*****************************************************************************/
|
||||
void
|
||||
static void
|
||||
Mustek_PP_1015_write_reg_stop(Mustek_PP_CIS_dev * dev)
|
||||
{
|
||||
SANE_Byte regBank = (dev->CIS.regs.current_write_reg & 0xF0) >> 4;
|
||||
|
|
|
@ -2,40 +2,40 @@
|
|||
#ifndef MUSTEK_PP_DECL_H
|
||||
#define MUSTEK_PP_DECL_H
|
||||
/* debug driver, version 0.11-devel, author Jochen Eisinger */
|
||||
extern SANE_Status debug_drv_init (SANE_Int options, SANE_String_Const port,
|
||||
static SANE_Status debug_drv_init (SANE_Int options, SANE_String_Const port,
|
||||
SANE_String_Const name, SANE_Attach_Callback attach);
|
||||
extern void debug_drv_capabilities (SANE_Int info, SANE_String *model,
|
||||
static void debug_drv_capabilities (SANE_Int info, SANE_String *model,
|
||||
SANE_String *vendor, SANE_String *type,
|
||||
SANE_Int *maxres, SANE_Int *minres,
|
||||
SANE_Int *maxhsize, SANE_Int *maxvsize,
|
||||
SANE_Int *caps);
|
||||
extern SANE_Status debug_drv_open (SANE_String port, SANE_Int caps, SANE_Int *fd);
|
||||
extern void debug_drv_setup (SANE_Handle hndl);
|
||||
extern SANE_Status debug_drv_config (SANE_Handle hndl,
|
||||
static SANE_Status debug_drv_open (SANE_String port, SANE_Int caps, SANE_Int *fd);
|
||||
static void debug_drv_setup (SANE_Handle hndl);
|
||||
static SANE_Status debug_drv_config (SANE_Handle hndl,
|
||||
SANE_String_Const optname,
|
||||
SANE_String_Const optval);
|
||||
extern void debug_drv_close (SANE_Handle hndl);
|
||||
extern SANE_Status debug_drv_start (SANE_Handle hndl);
|
||||
extern void debug_drv_read (SANE_Handle hndl, SANE_Byte *buffer);
|
||||
extern void debug_drv_stop (SANE_Handle hndl);
|
||||
static void debug_drv_close (SANE_Handle hndl);
|
||||
static SANE_Status debug_drv_start (SANE_Handle hndl);
|
||||
static void debug_drv_read (SANE_Handle hndl, SANE_Byte *buffer);
|
||||
static void debug_drv_stop (SANE_Handle hndl);
|
||||
|
||||
|
||||
/* CIS drivers for 600CP, 1200CP, and 1200CP+
|
||||
Version 0.11-devel, author Eddy De Greef */
|
||||
|
||||
extern SANE_Status cis600_drv_init (SANE_Int options,
|
||||
static SANE_Status cis600_drv_init (SANE_Int options,
|
||||
SANE_String_Const port,
|
||||
SANE_String_Const name,
|
||||
SANE_Attach_Callback attach);
|
||||
extern SANE_Status cis1200_drv_init (SANE_Int options,
|
||||
static SANE_Status cis1200_drv_init (SANE_Int options,
|
||||
SANE_String_Const port,
|
||||
SANE_String_Const name,
|
||||
SANE_Attach_Callback attach);
|
||||
extern SANE_Status cis1200p_drv_init(SANE_Int options,
|
||||
static SANE_Status cis1200p_drv_init(SANE_Int options,
|
||||
SANE_String_Const port,
|
||||
SANE_String_Const name,
|
||||
SANE_Attach_Callback attach);
|
||||
extern void cis_drv_capabilities(SANE_Int info,
|
||||
static void cis_drv_capabilities(SANE_Int info,
|
||||
SANE_String *model,
|
||||
SANE_String *vendor,
|
||||
SANE_String *type,
|
||||
|
@ -44,24 +44,24 @@ extern void cis_drv_capabilities(SANE_Int info,
|
|||
SANE_Int *maxhsize,
|
||||
SANE_Int *maxvsize,
|
||||
SANE_Int *caps);
|
||||
extern SANE_Status cis_drv_open (SANE_String port, SANE_Int caps, SANE_Int *fd);
|
||||
extern void cis_drv_setup (SANE_Handle hndl);
|
||||
extern SANE_Status cis_drv_config (SANE_Handle hndl,
|
||||
static SANE_Status cis_drv_open (SANE_String port, SANE_Int caps, SANE_Int *fd);
|
||||
static void cis_drv_setup (SANE_Handle hndl);
|
||||
static SANE_Status cis_drv_config (SANE_Handle hndl,
|
||||
SANE_String_Const optname,
|
||||
SANE_String_Const optval);
|
||||
extern void cis_drv_close (SANE_Handle hndl);
|
||||
extern SANE_Status cis_drv_start (SANE_Handle hndl);
|
||||
extern void cis_drv_read (SANE_Handle hndl, SANE_Byte *buffer);
|
||||
extern void cis_drv_stop (SANE_Handle hndl);
|
||||
static void cis_drv_close (SANE_Handle hndl);
|
||||
static SANE_Status cis_drv_start (SANE_Handle hndl);
|
||||
static void cis_drv_read (SANE_Handle hndl, SANE_Byte *buffer);
|
||||
static void cis_drv_stop (SANE_Handle hndl);
|
||||
|
||||
/* CCD drivers for 300 dpi models
|
||||
Version 0.11-devel, author Jochen Eisinger */
|
||||
|
||||
extern SANE_Status ccd300_init (SANE_Int options,
|
||||
static SANE_Status ccd300_init (SANE_Int options,
|
||||
SANE_String_Const port,
|
||||
SANE_String_Const name,
|
||||
SANE_Attach_Callback attach);
|
||||
extern void ccd300_capabilities(SANE_Int info,
|
||||
static void ccd300_capabilities(SANE_Int info,
|
||||
SANE_String *model,
|
||||
SANE_String *vendor,
|
||||
SANE_String *type,
|
||||
|
@ -70,14 +70,14 @@ extern void ccd300_capabilities(SANE_Int info,
|
|||
SANE_Int *maxhsize,
|
||||
SANE_Int *maxvsize,
|
||||
SANE_Int *caps);
|
||||
extern SANE_Status ccd300_open (SANE_String port, SANE_Int caps, SANE_Int *fd);
|
||||
extern void ccd300_setup (SANE_Handle hndl);
|
||||
extern SANE_Status ccd300_config (SANE_Handle hndl,
|
||||
static SANE_Status ccd300_open (SANE_String port, SANE_Int caps, SANE_Int *fd);
|
||||
static void ccd300_setup (SANE_Handle hndl);
|
||||
static SANE_Status ccd300_config (SANE_Handle hndl,
|
||||
SANE_String_Const optname,
|
||||
SANE_String_Const optval);
|
||||
extern void ccd300_close (SANE_Handle hndl);
|
||||
extern SANE_Status ccd300_start (SANE_Handle hndl);
|
||||
extern void ccd300_read (SANE_Handle hndl, SANE_Byte *buffer);
|
||||
extern void ccd300_stop (SANE_Handle hndl);
|
||||
static void ccd300_close (SANE_Handle hndl);
|
||||
static SANE_Status ccd300_start (SANE_Handle hndl);
|
||||
static void ccd300_read (SANE_Handle hndl, SANE_Byte *buffer);
|
||||
static void ccd300_stop (SANE_Handle hndl);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include "mustek_pp.h"
|
||||
#include "mustek_pp_decl.h"
|
||||
|
||||
Mustek_pp_Functions Mustek_pp_Drivers[] = {
|
||||
static Mustek_pp_Functions Mustek_pp_Drivers[] = {
|
||||
{
|
||||
"debug", "Jochen Eisinger", "0.11-devel",
|
||||
debug_drv_init,
|
||||
|
|
|
@ -62,7 +62,8 @@
|
|||
|
||||
#define MUSTEK_PP_NULL_DRIVER 0
|
||||
|
||||
SANE_Status debug_drv_init(SANE_Int options, SANE_String_Const port,
|
||||
static SANE_Status
|
||||
debug_drv_init(SANE_Int options, SANE_String_Const port,
|
||||
SANE_String_Const name, SANE_Attach_Callback attach)
|
||||
{
|
||||
|
||||
|
@ -74,7 +75,8 @@ SANE_Status debug_drv_init(SANE_Int options, SANE_String_Const port,
|
|||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
void debug_drv_capabilities(SANE_Int info __UNUSED__, SANE_String *model,
|
||||
static void
|
||||
debug_drv_capabilities(SANE_Int info __UNUSED__, SANE_String *model,
|
||||
SANE_String *vendor, SANE_String *type,
|
||||
SANE_Int *maxres, SANE_Int *minres,
|
||||
SANE_Int *maxhsize, SANE_Int *maxvsize,
|
||||
|
@ -93,14 +95,16 @@ void debug_drv_capabilities(SANE_Int info __UNUSED__, SANE_String *model,
|
|||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
SANE_Status debug_drv_open (SANE_String port __UNUSED__,
|
||||
static SANE_Status
|
||||
debug_drv_open (SANE_String port __UNUSED__,
|
||||
SANE_Int caps __UNUSED__, SANE_Int *fd)
|
||||
{
|
||||
*fd = 1;
|
||||
return SANE_STATUS_GOOD;
|
||||
}
|
||||
|
||||
void debug_drv_setup (SANE_Handle hndl)
|
||||
static void
|
||||
debug_drv_setup (SANE_Handle hndl)
|
||||
{
|
||||
|
||||
Mustek_pp_Handle *dev = hndl;
|
||||
|
@ -110,7 +114,8 @@ void debug_drv_setup (SANE_Handle hndl)
|
|||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
SANE_Status debug_drv_config(SANE_Handle hndl __UNUSED__,
|
||||
static SANE_Status
|
||||
debug_drv_config(SANE_Handle hndl __UNUSED__,
|
||||
SANE_String_Const optname,
|
||||
SANE_String_Const optval)
|
||||
{
|
||||
|
@ -119,17 +124,20 @@ SANE_Status debug_drv_config(SANE_Handle hndl __UNUSED__,
|
|||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
void debug_drv_close (SANE_Handle hndl __UNUSED__)
|
||||
static void
|
||||
debug_drv_close (SANE_Handle hndl __UNUSED__)
|
||||
{
|
||||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
SANE_Status debug_drv_start (SANE_Handle hndl __UNUSED__)
|
||||
static SANE_Status
|
||||
debug_drv_start (SANE_Handle hndl __UNUSED__)
|
||||
{
|
||||
return SANE_STATUS_GOOD;
|
||||
}
|
||||
|
||||
void debug_drv_read (SANE_Handle hndl, SANE_Byte *buffer)
|
||||
static void
|
||||
debug_drv_read (SANE_Handle hndl, SANE_Byte *buffer)
|
||||
{
|
||||
|
||||
Mustek_pp_Handle *dev = hndl;
|
||||
|
@ -138,7 +146,8 @@ void debug_drv_read (SANE_Handle hndl, SANE_Byte *buffer)
|
|||
}
|
||||
|
||||
/*ARGSUSED*/
|
||||
void debug_drv_stop (SANE_Handle hndl __UNUSED__)
|
||||
static void
|
||||
debug_drv_stop (SANE_Handle hndl __UNUSED__)
|
||||
{
|
||||
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue