Fix remaining comments.

merge-requests/1/head
Jan Hauffa 2011-04-17 14:51:01 +02:00 zatwierdzone przez m. allan noah
rodzic 9226162537
commit 1d0f3ca42e
4 zmienionych plików z 8 dodań i 13 usunięć

Wyświetl plik

@ -576,14 +576,12 @@ StopScan (void)
sleep (1); /* wait for ReadScannedData to return */
}
/* free gamma table */
if (g_pGammaTable)
{
free (g_pGammaTable);
g_pGammaTable = NULL;
}
/* free image buffer */
if (g_lpReadImageHead)
{
free (g_lpReadImageHead);
@ -675,7 +673,7 @@ AutoLevel (SANE_Byte *lpSource, unsigned short ScanLines,
DBG (DBG_FUNC, "AutoLevel: start\n");
/* find min and max */
/* find min and max values for each color component */
for (j = 0, tLines = 0; j < ScanLines; j++, tLines += BytesPerLine)
{
for (i = 0; i < iWidth; i++)
@ -698,7 +696,7 @@ AutoLevel (SANE_Byte *lpSource, unsigned short ScanLines,
range_G = max_G - min_G;
range_B = max_B - min_B;
/* autolevel */
/* stretch histogram */
for (j = 0, tLines = 0; j < ScanLines; j++, tLines += BytesPerLine)
{
for (i = 0; i < iWidth; i++)

Wyświetl plik

@ -403,7 +403,6 @@ LLFRamAccess (ASIC * chip, LLF_RAMACCESS * RamAccess)
if (status != SANE_STATUS_GOOD)
return status;
/* set SDRAM delay time */
Mustek_SendData (chip, ES01_79_AFEMCLK_SDRAMCLK_DELAY_CONTROL,
SDRAMCLK_DELAY_12_ns);
@ -421,7 +420,7 @@ LLFRamAccess (ASIC * chip, LLF_RAMACCESS * RamAccess)
status = LLFRamAccess (chip, RamAccess);
DBG (DBG_ASIC, "end steal 2 byte!\n");
}
else /* read RAM */
else
{
status = Mustek_DMARead (chip, RamAccess->RwSize, RamAccess->BufferPtr);
}
@ -602,14 +601,14 @@ LLFMotorMove (ASIC * chip, LLF_MOTORMOVE * LLF_MotorMove)
Mustek_SendData (chip, ES01_C2_ChannelBlueExpEndPixelLSB, LOBYTE (101));
Mustek_SendData (chip, ES01_C3_ChannelBlueExpEndPixelMSB, HIBYTE (101));
/* set motor accelerate steps, max. 511 steps */
/* set motor acceleration steps, max. 511 steps */
Mustek_SendData (chip, ES01_E0_MotorAccStep0_7,
LOBYTE (LLF_MotorMove->AccStep));
Mustek_SendData (chip, ES01_E1_MotorAccStep8_8,
HIBYTE (LLF_MotorMove->AccStep));
DBG (DBG_ASIC, "AccStep=%d\n", LLF_MotorMove->AccStep);
/* set motor decelerate steps, max. 255 steps */
/* set motor deceleration steps, max. 255 steps */
Mustek_SendData (chip, ES01_E5_MotorDecStep, LLF_MotorMove->DecStep);
DBG (DBG_ASIC, "DecStep=%d\n", LLF_MotorMove->DecStep);
@ -2178,13 +2177,11 @@ Asic_SetWindow (ASIC * chip, SCANSOURCE lsLightSource,
if (status != SANE_STATUS_GOOD)
return status;
/* LED flash */
Mustek_SendData (chip, ES01_94_PowerSaveControl,
TIMER_POWER_SAVE_ENABLE |
USB_POWER_SAVE_ENABLE | USB_REMOTE_WAKEUP_ENABLE |
LED_MODE_FLASH_SLOWLY | 0x40 | 0x80);
/* calculate byte per line */
chip->dwBytesCountPerRow = (unsigned int) wWidth *
GetBytePerPixel (bScanBits);
DBG (DBG_ASIC, "dwBytesCountPerRow=%d\n", chip->dwBytesCountPerRow);
@ -2410,7 +2407,7 @@ Asic_SetWindow (ASIC * chip, SCANSOURCE lsLightSource,
((RealTableSize + (TABLE_BASE_SIZE - 1)) &
~(TABLE_BASE_SIZE - 1));
/* TODO: table size should be stored in Asic structure */
/* TODO: table size should be stored in ASIC structure */
RealTableSize = sizeof (unsigned short) *
ShadingTableSize ((int) ((wWidth + 4) * XRatioAdderDouble));
status = LLFSetShadingTable (chip, dwTableBaseAddr, RealTableSize,

Wyświetl plik

@ -112,7 +112,7 @@ typedef struct
SANE_Bool IsWriteAccess;
RAM_TYPE RamType;
unsigned int StartAddress; /* only lower 3 bytes used */
unsigned int RwSize; /* unit: byte; must be a multiple of 2 (?) */
unsigned int RwSize; /* unit: byte; must be a multiple of 2 */
SANE_Byte *BufferPtr;
} LLF_RAMACCESS;

Wyświetl plik

@ -1176,7 +1176,7 @@ MustScanner_PrepareCalculateMaxMin (unsigned short wResolution)
{
g_nPowerNum = 3;
g_nSecLength = 8; /* 2^nPowerNum */
/* Dark has at least 2 sections */
/* dark has at least 2 sections */
g_nDarkSecLength = g_wDarkCalWidth / 2;
}
else