kopia lustrzana https://gitlab.com/sane-project/backends
First hack to build mustek_usb2* source files separately.
rodzic
3479acf538
commit
da64a1fc1e
|
@ -770,15 +770,13 @@ EXTRA_DIST += mustek_usb.conf.in
|
||||||
# TODO: Why are these distributed but not compiled?
|
# TODO: Why are these distributed but not compiled?
|
||||||
EXTRA_DIST += mustek_usb_high.c mustek_usb_high.h mustek_usb_low.c mustek_usb_low.h mustek_usb_mid.c mustek_usb_mid.h
|
EXTRA_DIST += mustek_usb_high.c mustek_usb_high.h mustek_usb_low.c mustek_usb_low.h mustek_usb_mid.c mustek_usb_mid.h
|
||||||
|
|
||||||
libmustek_usb2_la_SOURCES = mustek_usb2.c mustek_usb2.h
|
libmustek_usb2_la_SOURCES = mustek_usb2.c mustek_usb2.h mustek_usb2_high.c mustek_usb2_high.h mustek_usb2_asic.c mustek_usb2_asic.h
|
||||||
libmustek_usb2_la_CPPFLAGS = $(AM_CPPFLAGS) -DBACKEND_NAME=mustek_usb2
|
libmustek_usb2_la_CPPFLAGS = $(AM_CPPFLAGS) -DBACKEND_NAME=mustek_usb2
|
||||||
|
|
||||||
nodist_libsane_mustek_usb2_la_SOURCES = mustek_usb2-s.c
|
nodist_libsane_mustek_usb2_la_SOURCES = mustek_usb2-s.c
|
||||||
libsane_mustek_usb2_la_CPPFLAGS = $(AM_CPPFLAGS) -DBACKEND_NAME=mustek_usb2
|
libsane_mustek_usb2_la_CPPFLAGS = $(AM_CPPFLAGS) -DBACKEND_NAME=mustek_usb2
|
||||||
libsane_mustek_usb2_la_LDFLAGS = $(DIST_SANELIBS_LDFLAGS)
|
libsane_mustek_usb2_la_LDFLAGS = $(DIST_SANELIBS_LDFLAGS)
|
||||||
libsane_mustek_usb2_la_LIBADD = $(COMMON_LIBS) libmustek_usb2.la ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo sane_strstatus.lo ../sanei/sanei_usb.lo ../sanei/sanei_thread.lo $(MATH_LIB) $(PTHREAD_LIBS) $(USB_LIBS) $(PTHREAD_LIBS) $(RESMGR_LIBS)
|
libsane_mustek_usb2_la_LIBADD = $(COMMON_LIBS) libmustek_usb2.la ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo sane_strstatus.lo ../sanei/sanei_usb.lo ../sanei/sanei_thread.lo $(MATH_LIB) $(PTHREAD_LIBS) $(USB_LIBS) $(PTHREAD_LIBS) $(RESMGR_LIBS)
|
||||||
# TODO: Why are these distributed but not compiled?
|
|
||||||
EXTRA_DIST += mustek_usb2_asic.c mustek_usb2_asic.h mustek_usb2_high.c mustek_usb2_high.h mustek_usb2_reflective.c mustek_usb2_transparent.c
|
|
||||||
|
|
||||||
libnec_la_SOURCES = nec.c nec.h
|
libnec_la_SOURCES = nec.c nec.h
|
||||||
libnec_la_CPPFLAGS = $(AM_CPPFLAGS) -DBACKEND_NAME=nec
|
libnec_la_CPPFLAGS = $(AM_CPPFLAGS) -DBACKEND_NAME=nec
|
||||||
|
|
|
@ -60,9 +60,7 @@
|
||||||
#include "../include/sane/saneopts.h"
|
#include "../include/sane/saneopts.h"
|
||||||
|
|
||||||
#define BACKEND_NAME mustek_usb2
|
#define BACKEND_NAME mustek_usb2
|
||||||
|
|
||||||
#include "../include/sane/sanei_backend.h"
|
#include "../include/sane/sanei_backend.h"
|
||||||
#include "mustek_usb2_high.c"
|
|
||||||
|
|
||||||
#include "mustek_usb2.h"
|
#include "mustek_usb2.h"
|
||||||
|
|
||||||
|
|
|
@ -49,6 +49,8 @@
|
||||||
#ifndef MUSTEK_USB2_H
|
#ifndef MUSTEK_USB2_H
|
||||||
#define MUSTEK_USB2_H
|
#define MUSTEK_USB2_H
|
||||||
|
|
||||||
|
#include "mustek_usb2_high.h"
|
||||||
|
|
||||||
#define SCAN_BUFFER_SIZE (64 * 1024)
|
#define SCAN_BUFFER_SIZE (64 * 1024)
|
||||||
#define MAX_RESOLUTIONS 12
|
#define MAX_RESOLUTIONS 12
|
||||||
#define DEF_LINEARTTHRESHOLD 128
|
#define DEF_LINEARTTHRESHOLD 128
|
||||||
|
|
|
@ -45,6 +45,9 @@
|
||||||
This file implements a SANE backend for the Mustek BearPaw 2448 TA Pro
|
This file implements a SANE backend for the Mustek BearPaw 2448 TA Pro
|
||||||
and similar USB2 scanners. */
|
and similar USB2 scanners. */
|
||||||
|
|
||||||
|
#define DEBUG_DECLARE_ONLY
|
||||||
|
#include "../include/sane/config.h"
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
@ -56,6 +59,7 @@
|
||||||
|
|
||||||
#include "../include/sane/sane.h"
|
#include "../include/sane/sane.h"
|
||||||
#include "../include/sane/sanei_usb.h"
|
#include "../include/sane/sanei_usb.h"
|
||||||
|
#include "../include/sane/sanei_backend.h"
|
||||||
|
|
||||||
#include "mustek_usb2_asic.h"
|
#include "mustek_usb2_asic.h"
|
||||||
|
|
||||||
|
@ -1855,7 +1859,7 @@ SetExtraSettings (PAsic chip, unsigned short wXResolution,
|
||||||
static const unsigned short ProductID = 0x0409;
|
static const unsigned short ProductID = 0x0409;
|
||||||
static const unsigned short VendorID = 0x055f;
|
static const unsigned short VendorID = 0x055f;
|
||||||
|
|
||||||
static SANE_String_Const device_name;
|
SANE_String_Const device_name;
|
||||||
|
|
||||||
static SANE_Status
|
static SANE_Status
|
||||||
attach_one_scanner (SANE_String_Const devname)
|
attach_one_scanner (SANE_String_Const devname)
|
||||||
|
|
|
@ -951,6 +951,9 @@ typedef struct
|
||||||
#define ES01_2CF_VALID_PIXEL_PARAMETER_OF_SEGMENT16 0x2CF
|
#define ES01_2CF_VALID_PIXEL_PARAMETER_OF_SEGMENT16 0x2CF
|
||||||
|
|
||||||
|
|
||||||
|
extern SANE_String_Const device_name;
|
||||||
|
|
||||||
|
|
||||||
static SANE_Status WriteIOControl (PAsic chip, unsigned short wValue,
|
static SANE_Status WriteIOControl (PAsic chip, unsigned short wValue,
|
||||||
unsigned short wIndex,
|
unsigned short wIndex,
|
||||||
unsigned short wLength, SANE_Byte * lpBuf);
|
unsigned short wLength, SANE_Byte * lpBuf);
|
||||||
|
|
|
@ -45,11 +45,16 @@
|
||||||
This file implements a SANE backend for the Mustek BearPaw 2448 TA Pro
|
This file implements a SANE backend for the Mustek BearPaw 2448 TA Pro
|
||||||
and similar USB2 scanners. */
|
and similar USB2 scanners. */
|
||||||
|
|
||||||
|
#define DEBUG_DECLARE_ONLY
|
||||||
|
#include "../include/sane/config.h"
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <unistd.h>
|
||||||
#include <pthread.h> /* HOLD */
|
#include <pthread.h> /* HOLD */
|
||||||
|
|
||||||
#include "mustek_usb2_asic.c"
|
#include "../include/sane/sane.h"
|
||||||
|
#include "../include/sane/sanei_backend.h"
|
||||||
|
|
||||||
#include "mustek_usb2_high.h"
|
#include "mustek_usb2_high.h"
|
||||||
|
|
||||||
|
@ -59,10 +64,10 @@ static SANE_Bool g_bOpened;
|
||||||
static SANE_Bool g_bPrepared;
|
static SANE_Bool g_bPrepared;
|
||||||
static SANE_Bool g_isCanceled;
|
static SANE_Bool g_isCanceled;
|
||||||
static SANE_Bool g_bFirstReadImage;
|
static SANE_Bool g_bFirstReadImage;
|
||||||
static SANE_Bool g_isScanning;
|
SANE_Bool g_isScanning;
|
||||||
|
|
||||||
static SANE_Byte g_bScanBits;
|
static SANE_Byte g_bScanBits;
|
||||||
static SANE_Byte *g_lpReadImageHead;
|
SANE_Byte * g_lpReadImageHead;
|
||||||
|
|
||||||
static unsigned short g_X;
|
static unsigned short g_X;
|
||||||
static unsigned short g_Y;
|
static unsigned short g_Y;
|
||||||
|
@ -71,11 +76,11 @@ static unsigned short g_Height;
|
||||||
static unsigned short g_XDpi;
|
static unsigned short g_XDpi;
|
||||||
static unsigned short g_YDpi;
|
static unsigned short g_YDpi;
|
||||||
static unsigned short g_SWWidth;
|
static unsigned short g_SWWidth;
|
||||||
static unsigned short g_SWHeight;
|
unsigned short g_SWHeight;
|
||||||
static unsigned short g_wPixelDistance; /* even & odd sensor problem */
|
static unsigned short g_wPixelDistance; /* even & odd sensor problem */
|
||||||
static unsigned short g_wLineDistance;
|
static unsigned short g_wLineDistance;
|
||||||
static unsigned short g_wScanLinesPerBlock;
|
static unsigned short g_wScanLinesPerBlock;
|
||||||
static unsigned short g_wLineartThreshold;
|
unsigned short g_wLineartThreshold;
|
||||||
|
|
||||||
static unsigned int g_wtheReadyLines;
|
static unsigned int g_wtheReadyLines;
|
||||||
static unsigned int g_wMaxScanLines;
|
static unsigned int g_wMaxScanLines;
|
||||||
|
@ -88,14 +93,14 @@ static unsigned int g_dwBufferSize;
|
||||||
|
|
||||||
static unsigned int g_dwTotalTotalXferLines;
|
static unsigned int g_dwTotalTotalXferLines;
|
||||||
|
|
||||||
static unsigned short *g_pGammaTable;
|
unsigned short * g_pGammaTable;
|
||||||
|
|
||||||
static pthread_t g_threadid_readimage;
|
static pthread_t g_threadid_readimage;
|
||||||
|
|
||||||
static COLORMODE g_ScanMode;
|
static COLORMODE g_ScanMode;
|
||||||
static SCANSOURCE g_ssScanSource;
|
SCANSOURCE g_ssScanSource;
|
||||||
|
|
||||||
static Asic g_chip;
|
Asic g_chip;
|
||||||
|
|
||||||
static int g_nSecLength, g_nDarkSecLength;
|
static int g_nSecLength, g_nDarkSecLength;
|
||||||
static int g_nSecNum, g_nDarkSecNum;
|
static int g_nSecNum, g_nDarkSecNum;
|
||||||
|
|
|
@ -48,6 +48,8 @@
|
||||||
#ifndef MUSTEK_USB2_HIGH_H
|
#ifndef MUSTEK_USB2_HIGH_H
|
||||||
#define MUSTEK_USB2_HIGH_H
|
#define MUSTEK_USB2_HIGH_H
|
||||||
|
|
||||||
|
#include "mustek_usb2_asic.h"
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
RO_RGB,
|
RO_RGB,
|
||||||
|
@ -118,6 +120,15 @@ typedef struct
|
||||||
/*#define DEBUG_SAVE_IMAGE*/
|
/*#define DEBUG_SAVE_IMAGE*/
|
||||||
|
|
||||||
|
|
||||||
|
extern SANE_Bool g_isScanning;
|
||||||
|
extern unsigned short g_SWHeight;
|
||||||
|
extern SANE_Byte * g_lpReadImageHead;
|
||||||
|
extern unsigned short g_wLineartThreshold;
|
||||||
|
extern unsigned short * g_pGammaTable;
|
||||||
|
extern SCANSOURCE g_ssScanSource;
|
||||||
|
extern Asic g_chip;
|
||||||
|
|
||||||
|
|
||||||
static void MustScanner_Init (void);
|
static void MustScanner_Init (void);
|
||||||
static SANE_Bool MustScanner_PowerControl (SANE_Bool isLampOn,
|
static SANE_Bool MustScanner_PowerControl (SANE_Bool isLampOn,
|
||||||
SANE_Bool isTALampOn);
|
SANE_Bool isTALampOn);
|
||||||
|
|
Ładowanie…
Reference in New Issue