diff --git a/backend/mustek_usb2_asic.c b/backend/mustek_usb2_asic.c index 6b2e282dc..147ae52c1 100644 --- a/backend/mustek_usb2_asic.c +++ b/backend/mustek_usb2_asic.c @@ -1593,7 +1593,7 @@ LLFMotorMove (PAsic chip, LLF_MOTORMOVE * LLF_MotorMove) DBG (DBG_ASIC, "LLFMotorMove: Enter\n"); - Mustek_SendData (chip, ES01_F4_ActiveTrigger, ACTION_TRIGGER_DISABLE); + Mustek_SendData (chip, ES01_F4_ActiveTrigger, 0); status = Asic_WaitUnitReady (chip); @@ -1699,8 +1699,7 @@ LLFMotorMove (PAsic chip, LLF_MOTORMOVE * LLF_MotorMove) temp_motor_action | UNIFORM_MOTOR_AND_SCAN_SPEED_ENABLE; } - Mustek_SendData (chip, ES01_F3_ActionOption, SCAN_DISABLE | - SCAN_BACK_TRACKING_DISABLE | temp_motor_action); + Mustek_SendData (chip, ES01_F3_ActionOption, temp_motor_action); Mustek_SendData (chip, ES01_F4_ActiveTrigger, ACTION_TRIGGER_ENABLE); if (LLF_MotorMove->WaitOrNoWait == 1) @@ -1777,7 +1776,7 @@ SetMotorStepTable (PAsic chip, LLF_MOTORMOVE * MotorStepsTable, (wStartY - wScanAccSteps) : 0; wForwardSteps = 0; - chip->isMotorGoToFirstLine = MOTOR_MOVE_TO_FIRST_LINE_DISABLE; + chip->isMotorGoToFirstLine = 0; } else { @@ -2053,7 +2052,7 @@ MotorBackHome (PAsic chip, SANE_Byte WaitOrNoWait) LLF_SetMotorTable.MotorTablePtr = BackHomeMotorTable; LLFSetMotorTable (chip, &LLF_SetMotorTable); - MotorMove.MotorSelect = MOTOR_0_ENABLE | MOTOR_1_DISABLE; + MotorMove.MotorSelect = MOTOR_0_ENABLE; MotorMove.MotorMoveUnit = TABLE_DEFINE_ES03; MotorMove.MotorSpeedUnit = SPEED_UNIT_1_PIXEL_TIME; MotorMove.MotorSyncUnit = MOTOR_SYNC_UNIT_1_PIXEL_TIME; @@ -2250,9 +2249,8 @@ SafeInitialChip (PAsic chip) DBG (DBG_ASIC, "SafeInitialChip: Enter\n"); Mustek_SendData (chip, ES01_F3_ActionOption, 0); - Mustek_SendData (chip, ES01_86_DisableAllClockWhenIdle, - CLOSE_ALL_CLOCK_DISABLE); - Mustek_SendData (chip, ES01_F4_ActiveTrigger, ACTION_TRIGGER_DISABLE); + Mustek_SendData (chip, ES01_86_DisableAllClockWhenIdle, 0); + Mustek_SendData (chip, ES01_F4_ActiveTrigger, 0); status = Asic_WaitUnitReady (chip); @@ -2699,17 +2697,10 @@ SetAFEGainOffset (PAsic chip) LLFSetRamAddress (chip, 0x0, PackAreaStartAddress - (512 * 8 - 1), ACCESS_DRAM); - Mustek_SendData (chip, ES01_F3_ActionOption, - MOTOR_MOVE_TO_FIRST_LINE_DISABLE | - MOTOR_BACK_HOME_AFTER_SCAN_DISABLE | - SCAN_ENABLE | - SCAN_BACK_TRACKING_DISABLE | - INVERT_MOTOR_DIRECTION_DISABLE | - UNIFORM_MOTOR_AND_SCAN_SPEED_ENABLE | - STATIC_SCAN_DISABLE_ES01 | MOTOR_TEST_LOOP_DISABLE); + Mustek_SendData (chip, ES01_F3_ActionOption, SCAN_ENABLE | + UNIFORM_MOTOR_AND_SCAN_SPEED_ENABLE); - Mustek_SendData (chip, ES01_9A_AFEControl, - AD9826_AFE | AUTO_CHANGE_AFE_GAIN_OFFSET_DISABLE); + Mustek_SendData (chip, ES01_9A_AFEControl, AD9826_AFE); Mustek_SendData (chip, ES01_00_ADAFEConfiguration, 0x70); Mustek_SendData (chip, ES01_02_ADAFEMuxConfig, 0x80); @@ -3165,8 +3156,7 @@ Asic_Open (PAsic chip) } Mustek_SendData (chip, ES01_94_PowerSaveControl, 0x27); - Mustek_SendData (chip, ES01_86_DisableAllClockWhenIdle, - CLOSE_ALL_CLOCK_DISABLE); + Mustek_SendData (chip, ES01_86_DisableAllClockWhenIdle, 0); Mustek_SendData (chip, ES01_79_AFEMCLK_SDRAMCLK_DELAY_CONTROL, SDRAMCLK_DELAY_12_ns); @@ -3245,7 +3235,7 @@ Asic_TurnLamp (PAsic chip, SANE_Bool isLampOn) } if (chip->firmwarestate > FS_OPENED) - Mustek_SendData (chip, ES01_F4_ActiveTrigger, ACTION_TRIGGER_DISABLE); + Mustek_SendData (chip, ES01_F4_ActiveTrigger, 0); if (isLampOn) PWM = LAMP0_PWM_DEFAULT; @@ -3276,7 +3266,7 @@ Asic_TurnTA (PAsic chip, SANE_Bool isTAOn) } if (chip->firmwarestate > FS_OPENED) - Mustek_SendData (chip, ES01_F4_ActiveTrigger, ACTION_TRIGGER_DISABLE); + Mustek_SendData (chip, ES01_F4_ActiveTrigger, 0); if (isTAOn) PWM = LAMP1_PWM_DEFAULT; @@ -3321,7 +3311,7 @@ Asic_WaitUnitReady (PAsic chip) while (((temp_status & 0x1f) != 0) && i < 300); DBG (DBG_ASIC, "Waited %d s\n", (unsigned short) (i * 0.1)); - Mustek_SendData (chip, ES01_F4_ActiveTrigger, ACTION_TRIGGER_DISABLE); + Mustek_SendData (chip, ES01_F4_ActiveTrigger, 0); DBG (DBG_ASIC, "Asic_WaitUnitReady: Exit\n"); return status; @@ -3344,7 +3334,7 @@ Asic_Initialize (PAsic chip) Asic_Reset (chip); InitTiming (chip); - chip->isUniformSpeedToScan = UNIFORM_MOTOR_AND_SCAN_SPEED_DISABLE; + chip->isUniformSpeedToScan = 0; chip->isMotorGoToFirstLine = MOTOR_MOVE_TO_FIRST_LINE_ENABLE; chip->UsbHost = HT_USB10; @@ -3406,9 +3396,8 @@ Asic_SetWindow (PAsic chip, SANE_Byte bScanBits, } Mustek_SendData (chip, ES01_F3_ActionOption, 0); - Mustek_SendData (chip, ES01_86_DisableAllClockWhenIdle, - CLOSE_ALL_CLOCK_DISABLE); - Mustek_SendData (chip, ES01_F4_ActiveTrigger, ACTION_TRIGGER_DISABLE); + Mustek_SendData (chip, ES01_86_DisableAllClockWhenIdle, 0); + Mustek_SendData (chip, ES01_F4_ActiveTrigger, 0); status = Asic_WaitUnitReady (chip); @@ -3561,16 +3550,13 @@ Asic_SetWindow (PAsic chip, SANE_Byte bScanBits, /* SetADConverter */ Mustek_SendData (chip, ES01_74_HARDWARE_SETTING, - MOTOR1_SERIAL_INTERFACE_G10_8_ENABLE | LED_OUT_G11_DISABLE - | SLAVE_SERIAL_INTERFACE_G15_14_DISABLE | - SHUTTLE_CCD_DISABLE); + MOTOR1_SERIAL_INTERFACE_G10_8_ENABLE); /* set AFE */ - Mustek_SendData (chip, ES01_9A_AFEControl, - AD9826_AFE | AUTO_CHANGE_AFE_GAIN_OFFSET_DISABLE); + Mustek_SendData (chip, ES01_9A_AFEControl, AD9826_AFE); SetAFEGainOffset (chip); - Mustek_SendData (chip, ES01_F7_DigitalControl, DIGITAL_REDUCE_DISABLE); + Mustek_SendData (chip, ES01_F7_DigitalControl, 0); /* calculate X ratio */ XRatioTypeDouble = wXResolution; @@ -3588,7 +3574,6 @@ Asic_SetWindow (PAsic chip, SANE_Byte bScanBits, /* SetMotorType */ Mustek_SendData (chip, ES01_A6_MotorOption, MOTOR_0_ENABLE | - MOTOR_1_DISABLE | HOME_SENSOR_0_ENABLE | TABLE_DEFINE_ES03); Mustek_SendData (chip, ES01_F6_MotorControl1, SPEED_UNIT_1_PIXEL_TIME | @@ -3661,17 +3646,12 @@ Asic_SetWindow (PAsic chip, SANE_Byte bScanBits, { Asic_MotorMove (chip, 1, wY / wMultiMotorStep); isUniformSpeedToScan = UNIFORM_MOTOR_AND_SCAN_SPEED_ENABLE; - isScanBackTracking = SCAN_BACK_TRACKING_DISABLE; - isMotorMoveToFirstLine = MOTOR_MOVE_TO_FIRST_LINE_DISABLE; + isScanBackTracking = 0; + isMotorMoveToFirstLine = 0; } Mustek_SendData (chip, ES01_F3_ActionOption, isMotorMoveToFirstLine | - MOTOR_BACK_HOME_AFTER_SCAN_DISABLE | - SCAN_ENABLE | - isScanBackTracking | - INVERT_MOTOR_DIRECTION_DISABLE | - isUniformSpeedToScan | - STATIC_SCAN_DISABLE_ES01 | MOTOR_TEST_LOOP_DISABLE); + SCAN_ENABLE | isScanBackTracking | isUniformSpeedToScan); if (EndSpeed > 8000) { @@ -3909,9 +3889,8 @@ Asic_ScanStop (PAsic chip) } Mustek_SendData (chip, ES01_F3_ActionOption, 0); - Mustek_SendData (chip, ES01_86_DisableAllClockWhenIdle, - CLOSE_ALL_CLOCK_DISABLE); - Mustek_SendData (chip, ES01_F4_ActiveTrigger, ACTION_TRIGGER_DISABLE); + Mustek_SendData (chip, ES01_86_DisableAllClockWhenIdle, 0); + Mustek_SendData (chip, ES01_F4_ActiveTrigger, 0); Mustek_ClearFIFO (chip); chip->firmwarestate = FS_OPENED; @@ -4090,7 +4069,7 @@ Asic_SetMotorType (PAsic chip, SANE_Bool isMotorMove) if (isMotorMove) chip->isMotorMove = MOTOR_0_ENABLE; else - chip->isMotorMove = MOTOR_0_DISABLE; + chip->isMotorMove = 0; DBG (DBG_ASIC, "isMotorMove=%d\n", chip->isMotorMove); DBG (DBG_ASIC, "Asic_SetMotorType: Exit\n"); @@ -4134,7 +4113,7 @@ Asic_MotorMove (PAsic chip, SANE_Bool isForward, unsigned int dwTotalSteps) free (NormalMoveMotorTable); - MotorMove.MotorSelect = MOTOR_0_ENABLE | MOTOR_1_DISABLE; + MotorMove.MotorSelect = MOTOR_0_ENABLE; MotorMove.MotorMoveUnit = TABLE_DEFINE_ES03; MotorMove.MotorSpeedUnit = SPEED_UNIT_1_PIXEL_TIME; MotorMove.MotorSyncUnit = MOTOR_SYNC_UNIT_1_PIXEL_TIME; @@ -4197,7 +4176,7 @@ Asic_SetShadingTable (PAsic chip, unsigned short * lpWhiteShading, if (chip->firmwarestate < FS_OPENED) OpenScanChip (chip); if (chip->firmwarestate == FS_SCANNING) - Mustek_SendData (chip, ES01_F4_ActiveTrigger, ACTION_TRIGGER_DISABLE); + Mustek_SendData (chip, ES01_F4_ActiveTrigger, 0); if (wXResolution > 600) @@ -4304,7 +4283,7 @@ Asic_WaitCarriageHome (PAsic chip) status = STATUS_DEVICE_BUSY; DBG (DBG_ASIC, "Waited %d s\n", (unsigned short) (i * 0.3)); - Mustek_SendData (chip, ES01_F4_ActiveTrigger, ACTION_TRIGGER_DISABLE); + Mustek_SendData (chip, ES01_F4_ActiveTrigger, 0); chip->firmwarestate = FS_OPENED; DBG (DBG_ASIC, "Asic_WaitCarriageHome: Exit\n"); @@ -4342,9 +4321,9 @@ Asic_SetCalibrate (PAsic chip, SANE_Byte bScanBits, unsigned short wXResolution, unsigned short BackTrackFixSpeedStep = 20; unsigned short wMultiMotorStep = 1; SANE_Byte bMotorMoveType = _4_TABLE_SPACE_FOR_FULL_STEP; - SANE_Byte isMotorMoveToFirstLine = MOTOR_MOVE_TO_FIRST_LINE_DISABLE; + SANE_Byte isMotorMoveToFirstLine = 0; SANE_Byte isUniformSpeedToScan = UNIFORM_MOTOR_AND_SCAN_SPEED_ENABLE; - SANE_Byte isScanBackTracking = SCAN_BACK_TRACKING_DISABLE; + SANE_Byte isScanBackTracking = 0; unsigned int TotalStep = 0; unsigned short StartSpeed, EndSpeed; LLF_CALCULATEMOTORTABLE CalMotorTable; @@ -4376,9 +4355,8 @@ Asic_SetCalibrate (PAsic chip, SANE_Byte bScanBits, unsigned short wXResolution, } Mustek_SendData (chip, ES01_F3_ActionOption, 0); - Mustek_SendData (chip, ES01_86_DisableAllClockWhenIdle, - CLOSE_ALL_CLOCK_DISABLE); - Mustek_SendData (chip, ES01_F4_ActiveTrigger, ACTION_TRIGGER_DISABLE); + Mustek_SendData (chip, ES01_86_DisableAllClockWhenIdle, 0); + Mustek_SendData (chip, ES01_F4_ActiveTrigger, 0); status = Asic_WaitUnitReady (chip); @@ -4493,14 +4471,11 @@ Asic_SetCalibrate (PAsic chip, SANE_Byte bScanBits, unsigned short wXResolution, /* SetADConverter */ Mustek_SendData (chip, ES01_74_HARDWARE_SETTING, - MOTOR1_SERIAL_INTERFACE_G10_8_ENABLE | LED_OUT_G11_DISABLE - | SLAVE_SERIAL_INTERFACE_G15_14_DISABLE | - SHUTTLE_CCD_DISABLE); + MOTOR1_SERIAL_INTERFACE_G10_8_ENABLE); /* set AFE */ - Mustek_SendData (chip, ES01_9A_AFEControl, - AD9826_AFE | AUTO_CHANGE_AFE_GAIN_OFFSET_DISABLE); - Mustek_SendData (chip, ES01_F7_DigitalControl, DIGITAL_REDUCE_DISABLE); + Mustek_SendData (chip, ES01_9A_AFEControl, AD9826_AFE); + Mustek_SendData (chip, ES01_F7_DigitalControl, 0); XRatioTypeDouble = wXResolution; XRatioTypeDouble /= wThinkCCDResolution; @@ -4518,18 +4493,8 @@ Asic_SetCalibrate (PAsic chip, SANE_Byte bScanBits, unsigned short wXResolution, "XRatioTypeDouble=%.2f,XRatioAdderDouble=%.2f,XRatioTypeWord=%d\n", XRatioTypeDouble, XRatioAdderDouble, XRatioTypeWord); - if (chip->isMotorMove == MOTOR_0_ENABLE) - { - Mustek_SendData (chip, ES01_A6_MotorOption, MOTOR_0_ENABLE | - MOTOR_1_DISABLE | - HOME_SENSOR_0_ENABLE | TABLE_DEFINE_ES03); - } - else - { - Mustek_SendData (chip, ES01_A6_MotorOption, MOTOR_0_DISABLE | - MOTOR_1_DISABLE | - HOME_SENSOR_0_ENABLE | TABLE_DEFINE_ES03); - } + Mustek_SendData (chip, ES01_A6_MotorOption, chip->isMotorMove | + HOME_SENSOR_0_ENABLE | TABLE_DEFINE_ES03); DBG (DBG_ASIC, "isMotorMove=%d\n", chip->isMotorMove); Mustek_SendData (chip, ES01_F6_MotorControl1, SPEED_UNIT_1_PIXEL_TIME | @@ -4609,12 +4574,7 @@ Asic_SetCalibrate (PAsic chip, SANE_Byte bScanBits, unsigned short wXResolution, Mustek_SendData (chip, ES01_F3_ActionOption, isMotorMoveToFirstLine | - MOTOR_BACK_HOME_AFTER_SCAN_DISABLE | - SCAN_ENABLE | - isScanBackTracking | - INVERT_MOTOR_DIRECTION_DISABLE | - isUniformSpeedToScan | - STATIC_SCAN_DISABLE_ES01 | MOTOR_TEST_LOOP_DISABLE); + SCAN_ENABLE | isScanBackTracking | isUniformSpeedToScan); if (chip->lsLightSource == LS_REFLECTIVE) Mustek_SendData (chip, ES01_F8_WHITE_SHADING_DATA_FORMAT, diff --git a/backend/mustek_usb2_asic.h b/backend/mustek_usb2_asic.h index e2dbb65af..67fa6cbeb 100644 --- a/backend/mustek_usb2_asic.h +++ b/backend/mustek_usb2_asic.h @@ -282,7 +282,6 @@ typedef enum #define ES02_50_MOTOR_CURRENT_CONTORL 0x50 /* bit[0] */ #define DOWN_LOAD_MOTOR_TABLE_ENABLE 0x01 -#define DOWN_LOAD_MOTOR_TABLE_DISABLE 0x00 /* bit[3:1] */ #define _4_TABLE_SPACE_FOR_FULL_STEP 0x00 #define _8_TABLE_SPACE_FOR_1_DIV_2_STEP 0x02 @@ -290,10 +289,8 @@ typedef enum #define _32_TABLE_SPACE_FOR_1_DIV_8_STEP 0x0E /* bit[4] */ #define MOTOR_TABLE_ADDR_SHOW_IN_FIRST_PIXEL_OF_LINE_ENABLE 0x10 -#define MOTOR_TABLE_ADDR_SHOW_IN_FIRST_PIXEL_OF_LINE_DISABLE 0x00 /* bit[5] */ #define MOTOR_CURRENT_TABLE_ADDRESS_BIT4_TO_BIT0_ENABLE 0x20 -#define MOTOR_CURRENT_TABLE_ADDRESS_BIT4_TO_BIT0_DISABLE 0x00 #define ES02_51_MOTOR_PHASE_TABLE_1 0x51 #define ES02_52_MOTOR_CURRENT_TABLE_A 0x52 @@ -314,21 +311,12 @@ typedef enum #define ES01_65_AFE_AUTO_GAIN_OFFSET_BLUE_HB 0x65 #define ES01_74_HARDWARE_SETTING 0x74 - /* bit[0] */ + /* bit[4:0] */ #define MOTOR1_SERIAL_INTERFACE_G10_8_ENABLE 0x01 -#define MOTOR1_SERIAL_INTERFACE_G10_8_DISABLE 0x00 - /* bit[1] */ #define LED_OUT_G11_ENABLE 0x02 -#define LED_OUT_G11_DISABLE 0x00 - /* bit[2] */ #define SLAVE_SERIAL_INTERFACE_G15_14_ENABLE 0x04 -#define SLAVE_SERIAL_INTERFACE_G15_14_DISABLE 0x00 - /* bit[3] */ #define SHUTTLE_CCD_ENABLE 0x08 -#define SHUTTLE_CCD_DISABLE 0x00 - /* bit[4] */ #define HARDWARE_RESET_ESIC_AFE_ENABLE 0x10 -#define HARDWARE_RESET_ESIC_AFE_DISABLE 0x00 #define ES01_79_AFEMCLK_SDRAMCLK_DELAY_CONTROL 0x79 /* bit[3:0] */ @@ -364,7 +352,6 @@ typedef enum #define ES01_86_DisableAllClockWhenIdle 0x86 /* bit[0] */ #define CLOSE_ALL_CLOCK_ENABLE 0x01 -#define CLOSE_ALL_CLOCK_DISABLE 0x00 #define ES01_87_SDRAM_Timing 0x87 @@ -416,15 +403,10 @@ typedef enum #define ES01_93_MotorWatchDogTime 0x93 #define ES01_94_PowerSaveControl 0x94 - /* bit[0] */ + /* bit[2:0] */ #define TIMER_POWER_SAVE_ENABLE 0x01 -#define TIMER_POWER_SAVE_DISABLE 0x00 - /* bit[1] */ #define USB_POWER_SAVE_ENABLE 0x02 -#define USB_POWER_SAVE_DISABLE 0x00 - /* bit[2] */ #define USB_REMOTE_WAKEUP_ENABLE 0x04 -#define USB_REMOTE_WAKEUP_DISABLE 0x00 /* bit[5:4] */ #define LED_MODE_ON 0x00 #define LED_MODE_OFF 0x10 @@ -443,7 +425,6 @@ typedef enum #define AD9826_AFE 0x01 /* bit[1] */ #define AUTO_CHANGE_AFE_GAIN_OFFSET_ENABLE 0x02 -#define AUTO_CHANGE_AFE_GAIN_OFFSET_DISABLE 0x00 #define ES01_9B_ShadingTableAddrA14_A21 0x9B #define ES01_9C_ShadingTableAddrODDA12_A19 0x9C @@ -467,12 +448,9 @@ typedef enum #define ES01_A5_HostEndAddr16_21 0xA5 #define ES01_A6_MotorOption 0xA6 - /* bit[0] */ + /* bit[1:0] */ #define MOTOR_0_ENABLE 0x01 -#define MOTOR_0_DISABLE 0x00 - /* bit[1] */ #define MOTOR_1_ENABLE 0x02 -#define MOTOR_1_DISABLE 0x00 /* bit[3:2] */ #define HOME_SENSOR_0_ENABLE 0x00 #define HOME_SENSOR_1_ENABLE 0x04 @@ -502,12 +480,9 @@ typedef enum #define MOTOR1_GPO_VALUE_1 0x04 #define MOTOR1_GPO_VALUE_2 0x08 #define MOTOR1_GPO_VALUE_3 0x0C - /* bit[4] */ + /* bit[5:4] */ #define GPO_OUTPUT_ENABLE 0x10 -#define GPO_OUTPUT_DISABLE 0x00 - /* bit[5] */ #define SERIAL_PORT_CONTINUOUS_OUTPUT_ENABLE 0x20 -#define SERIAL_PORT_CONTINUOUS_OUTPUT_DISABLE 0x00 #define ES01_AC_MotorPWMJamRangeLSB 0xAC #define ES01_AD_MotorPWMJamRangeMSB 0xAD @@ -547,7 +522,6 @@ typedef enum #define ES01_CC_PHTGTimingAdjust 0xCC /* bit[0] */ #define PHTG_INVERT_OUTPUT_ENABLE 0x01 -#define PHTG_INVERT_OUTPUT_DISABLE 0x00 /* bit[1] */ #define TWO_TG 0x01 #define MULTI_TG 0x00 @@ -604,30 +578,15 @@ typedef enum #define ES01_DD_PH1234_IN_DUMMY_TG 0xDD #define ES01_DE_CCD_SETUP_REGISTER 0xDE - /* bit[0] */ + /* bit[7:0] */ #define LINE_SCAN_MODE_ENABLE_ES01 0x01 -#define LINE_SCAN_MODE_DISABLE_ES01 0x00 - /* bit[1] */ #define CIS_SENSOR_MODE_ENABLE_ES01 0x02 -#define CIS_SENSOR_MODE_DISABLE_ES01 0x00 - /* bit[2] */ #define CIS_LED_OUTPUT_RtoGtoB_ES01 0x04 -#define CIS_LED_OUTPUT_RGB_ES01 0x00 - /* bit[3] */ #define CIS_LED_INVERT_OUTPUT_ES01 0x08 -#define CIS_LED_NORMAL_OUTPUT_ES01 0x00 - /* bit[4] */ #define ACC_IN_IDLE_ENABLE_ES01 0x10 -#define ACC_IN_IDLE_DISABLE_ES01 0x00 - /* bit[5] */ #define EVEN_ODD_ENABLE_ES01 0x20 -#define EVEN_ODD_DISABLE_ES01 0x00 - /* bit[6] */ #define ALTERNATE_EVEN_ODD_ENABLE_ES01 0x40 -#define ALTERNATE_EVEN_ODD_DISABLE_ES01 0x00 - /* bit[7] */ #define RESET_CCD_STATE_ENABLE_ES01 0x80 -#define RESET_CCD_STATE_DISABLE_ES01 0x00 #define ES01_DF_ICG_CONTROL 0xDF /* bit[2:0] */ @@ -639,7 +598,7 @@ typedef enum #define BEFORE_PHRS_416_3t_ns 0x05 #define BEFORE_PHRS_416_2t_ns 0x06 #define BEFORE_PHRS_416_1t_ns 0x07 - /* bit[2:0] */ + /* bit[6:4] */ #define ICG_UNIT_1_PIXEL_TIME 0x00 #define ICG_UNIT_4_PIXEL_TIME 0x10 #define ICG_UNIT_8_PIXEL_TIME 0x20 @@ -670,35 +629,19 @@ typedef enum #define ES01_F2_ScanImageStep16_19 0xF2 #define ES01_F3_ActionOption 0xF3 - /* bit[0] */ + /* bit[7:0] */ #define MOTOR_MOVE_TO_FIRST_LINE_ENABLE 0x01 -#define MOTOR_MOVE_TO_FIRST_LINE_DISABLE 0x00 - /* bit[1] */ #define MOTOR_BACK_HOME_AFTER_SCAN_ENABLE 0x02 -#define MOTOR_BACK_HOME_AFTER_SCAN_DISABLE 0x00 - /* bit[2] */ #define SCAN_ENABLE 0x04 -#define SCAN_DISABLE 0x00 - /* bit[3] */ #define SCAN_BACK_TRACKING_ENABLE 0x08 -#define SCAN_BACK_TRACKING_DISABLE 0x00 - /* bit[4] */ #define INVERT_MOTOR_DIRECTION_ENABLE 0x10 -#define INVERT_MOTOR_DIRECTION_DISABLE 0x00 - /* bit[5] */ #define UNIFORM_MOTOR_AND_SCAN_SPEED_ENABLE 0x20 -#define UNIFORM_MOTOR_AND_SCAN_SPEED_DISABLE 0x00 - /* bit[6] */ #define STATIC_SCAN_ENABLE_ES01 0x40 -#define STATIC_SCAN_DISABLE_ES01 0x00 - /* bit[7] */ #define MOTOR_TEST_LOOP_ENABLE 0x80 -#define MOTOR_TEST_LOOP_DISABLE 0x00 #define ES01_F4_ActiveTrigger 0xF4 /* bit[0] */ #define ACTION_TRIGGER_ENABLE 0x01 -#define ACTION_TRIGGER_DISABLE 0x00 #define ES01_F5_ScanDataFormat 0xF5 /* bit[0] */ @@ -733,7 +676,6 @@ typedef enum #define ES01_F7_DigitalControl 0xF7 /* bit[0] */ #define DIGITAL_REDUCE_ENABLE 0x01 -#define DIGITAL_REDUCE_DISABLE 0x00 /* bit[3:1] */ #define DIGITAL_REDUCE_1_1 0x00 #define DIGITAL_REDUCE_1_2 0x02 @@ -756,30 +698,15 @@ typedef enum #define ES01_FE_MotorFixedspeedMSB 0xFE #define ES01_FF_SCAN_IMAGE_OPTION 0xFF - /* bit[0] */ + /* bit[7:0] */ #define OUTPUT_HORIZONTAL_PATTERN_ENABLE 0x01 -#define OUTPUT_HORIZONTAL_PATTERN_DISABLE 0x00 - /* bit[1] */ #define OUTPUT_VERTICAL_PATTERN_ENABLE 0x02 -#define OUTPUT_VERTICAL_PATTERN_DISABLE 0x00 - /* bit[2] */ #define BYPASS_DARK_SHADING_ENABLE 0x04 -#define BYPASS_DARK_SHADING_DISABLE 0x00 - /* bit[3] */ #define BYPASS_WHITE_SHADING_ENABLE 0x08 -#define BYPASS_WHITE_SHADING_DISABLE 0x00 - /* bit[4] */ #define BYPASS_PRE_GAMMA_ENABLE 0x10 -#define BYPASS_PRE_GAMMA_DISABLE 0x00 - /* bit[5] */ #define BYPASS_CONVOLUTION_ENABLE 0x20 -#define BYPASS_CONVOLUTION_DISABLE 0x00 - /* bit[6] */ #define BYPASS_MATRIX_ENABLE 0x40 -#define BYPASS_MATRIX_DISABLE 0x00 - /* bit[7] */ #define BYPASS_GAMMA_ENABLE 0x80 -#define BYPASS_GAMMA_DISABLE 0x00 /*******************************************************************/