m. allan noah
e6a249e042
revert mustek_usb2 backend upgrade
...
Instead of 100+ revert commits, I've lumped everything into a
single commit. This removes all of dedf0ac30
through db7f038f1
,
plus the parts of 497d59180
which were specific to mustek_usb2
2015-11-12 21:10:49 -05:00
Jan Hauffa
a64477bf1a
Remove USB 2.0 mode, as it causes horrible backtracking for resolutions > 300 dpi.
2015-11-08 16:54:49 -05:00
Jan Hauffa
d0ea79f000
Add model-specific functions for computing the number of motor steps.
2015-11-08 16:54:49 -05:00
Jan Hauffa
15fbbf60a6
Split SetMotorSteps into a function that computes the number of steps for the various motor states and and a function that writes the step counts to the controller's registers.
2015-11-08 16:54:49 -05:00
Jan Hauffa
70dcfa4ced
Simplify SetMotorStepTable*.
2015-11-08 16:54:49 -05:00
Jan Hauffa
27b636d294
Provide model-specific function for computing the motor current.
2015-11-08 16:54:49 -05:00
Jan Hauffa
30e3907156
Allow for model-specific parameters in mustek_usb2_high.c.
2015-11-08 16:54:48 -05:00
Jan Hauffa
47c56e3f19
Add some motor-related code for the Microtek 4800H48U.
2015-11-08 16:54:48 -05:00
Jan Hauffa
0a1125895b
Add some information about the values retrieved by GetChipStatus.
2015-11-08 16:54:48 -05:00
Jan Hauffa
4ced7a900a
Improve debug logging and fix a bug in TestDRAM.
2015-11-08 16:54:48 -05:00
Jan Hauffa
e1c00bd9ab
Introduce SetMotorCurrentAndPhase for Microtek scanner, fix old bug in simplification of Mustek variant.
2015-11-08 16:54:48 -05:00
Jan Hauffa
96b4950499
Register related fixes.
2015-11-08 16:54:48 -05:00
Jan Hauffa
5d556cd5e6
Introduce structure for specifying model-specific parameters on the ASIC level.
2015-11-08 16:54:48 -05:00
Jan Hauffa
7fda9bbf93
Introduce support for multiple scanners.
...
Keep all state local and ensure that all resources are freed by sane_exit. Ensure that each function returns only those error codes that are valid according to the SANE standard.
2015-11-08 16:54:47 -05:00
Jan Hauffa
bc203e8aa1
Sanitize option handling and add support for scanner buttons.
2015-11-08 16:54:47 -05:00
Jan Hauffa
b2b3cf767a
Use standard macros for byte swapping.
2015-11-08 16:54:47 -05:00
Jan Hauffa
281f53aa18
Remaining endian safety fixes.
2015-11-08 16:54:47 -05:00
Jan Hauffa
60a244ed1e
Store size of shading table in ASIC structure.
2015-11-08 16:54:46 -05:00
Jan Hauffa
eebbe92c4e
Simplify debug logging in mustek_usb2_asic.c.
2015-11-08 16:54:46 -05:00
Jan Hauffa
2c712f27c9
Remove uninformative function name prefixes, move gamma table creation into separate function.
2015-11-08 16:54:46 -05:00
Jan Hauffa
589d6e15ee
Endian-safe macros; moved remaining ASIC state into structure.
2015-11-08 16:54:46 -05:00
Jan Hauffa
4962b35abd
Use prefix 'p' instead of 'lp', fix other style issues.
2015-11-08 16:54:45 -05:00
Jan Hauffa
1d0f3ca42e
Fix remaining comments.
2015-11-08 16:54:45 -05:00
Jan Hauffa
9226162537
Normalize naming of constants, structures, and enums.
2015-11-08 16:54:45 -05:00
Jan Hauffa
d7ebb1553b
Remove USB host type enum.
2015-11-08 16:54:45 -05:00
Jan Hauffa
41ac627e5f
Get rid of unnecessary forward declarations.
2015-11-08 16:54:45 -05:00
Jan Hauffa
da64a1fc1e
First hack to build mustek_usb2* source files separately.
2015-11-08 16:54:45 -05:00
Jan Hauffa
3479acf538
Merge mustek_usb2_reflective/transparent.c into mustek_usb2_high.c.
2015-11-08 16:54:45 -05:00
Jan Hauffa
d7b4e02780
Use SANE_Status and SANE_TRUE/SANE_FALSE consistently.
2015-11-08 16:54:44 -05:00
Jan Hauffa
8b3c78838a
Create common helper function for Asic_CarriageHome and Asic_MotorMove, remove MotorBackHome.
2015-11-08 16:54:43 -05:00
Jan Hauffa
82a40d5dca
Refactoring of Asic_SetWindow.
2015-11-08 16:54:43 -05:00
Jan Hauffa
b43f0688db
Use symbolic constants in more places.
2015-11-08 16:54:43 -05:00
Jan Hauffa
3c87b646b5
First attempt at merging Asic_SetCalibrate into Asic_SetWindow.
2015-11-08 16:54:43 -05:00
Jan Hauffa
033ebe6d9b
Made error handling in mustek_usb2_asic.c more consistent.
2015-11-08 16:54:43 -05:00
Jan Hauffa
96c6ee1dae
Cleaned up firmware state handling.
2015-11-08 16:54:43 -05:00
Jan Hauffa
c1f22ef9a9
Clean up Asic_SetCalibrate, make Asic_SetCalibrate and Asic_SetWindow more similar.
2015-11-08 16:54:43 -05:00
Jan Hauffa
3cd05dacca
Refactoring the smaller high level ASIC functions.
2015-11-08 16:54:43 -05:00
Jan Hauffa
de5b647c4a
Refactored medium level ASIC functions.
2015-11-08 16:54:43 -05:00
Jan Hauffa
693da258ce
Move some definitions from mustek_usb2_asic.h to more appropriate headers.
2015-11-08 16:54:43 -05:00
Jan Hauffa
dea59ee824
Refactored all low-level motor functions except LLFSetMotorCurrentAndPhase.
2015-11-08 16:54:42 -05:00
Jan Hauffa
e47fee8dcc
Simplified computation of motor current, removed a redundant register assignment.
2015-11-08 16:54:42 -05:00
Jan Hauffa
1d8a008856
Simplify SetRWSize, use symbolic constants for registers whenever possible.
2015-11-08 16:54:42 -05:00
Jan Hauffa
794b15ff9e
Simplyfied Asic_SetShadingTable.
2015-11-08 16:54:42 -05:00
Jan Hauffa
3d1b409a1b
Fix a few comments.
2015-11-08 16:54:42 -05:00
Jan Hauffa
88cac5b4ad
Begin simplifying LLFSetMotorCurrentAndPhase, ensure all fields of LLF_MOTOR_CURRENT_AND_PHASE are initialized.
2015-11-08 16:54:42 -05:00
Jan Hauffa
fb55a92604
Remove even more unused code from mustek_usb2_asic.c.
2015-11-08 16:54:42 -05:00
Jan Hauffa
3f7cf8a65f
Remove DISABLE bit flag constants.
2015-11-08 16:54:41 -05:00
Jan Hauffa
073fe96611
LLF_MOTOR_CURRENT_AND_PHASE: only first byte of arrays MotorCurrentTableA/B is ever used
2015-11-08 16:54:41 -05:00
Jan Hauffa
db37c13bb3
Remove information-less comments, break long lines, fix indentation.
2015-11-08 16:54:41 -05:00
Jan Hauffa
fa8101e05e
Remove unused enum FS_NULL.
2015-11-08 16:54:41 -05:00