1141cc406Sopenharmony_ci/* HP Scanjet 3900 series - RTS8822 internal config 2141cc406Sopenharmony_ci 3141cc406Sopenharmony_ci Copyright (C) 2005-2009 Jonathan Bravo Lopez <jkdsoft@gmail.com> 4141cc406Sopenharmony_ci 5141cc406Sopenharmony_ci This file is part of the SANE package. 6141cc406Sopenharmony_ci 7141cc406Sopenharmony_ci This program is free software; you can redistribute it and/or 8141cc406Sopenharmony_ci modify it under the terms of the GNU General Public License 9141cc406Sopenharmony_ci as published by the Free Software Foundation; either version 2 10141cc406Sopenharmony_ci of the License, or (at your option) any later version. 11141cc406Sopenharmony_ci 12141cc406Sopenharmony_ci This program is distributed in the hope that it will be useful, 13141cc406Sopenharmony_ci but WITHOUT ANY WARRANTY; without even the implied warranty of 14141cc406Sopenharmony_ci MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15141cc406Sopenharmony_ci GNU General Public License for more details. 16141cc406Sopenharmony_ci 17141cc406Sopenharmony_ci You should have received a copy of the GNU General Public License 18141cc406Sopenharmony_ci along with this program. If not, see <https://www.gnu.org/licenses/>. 19141cc406Sopenharmony_ci 20141cc406Sopenharmony_ci As a special exception, the authors of SANE give permission for 21141cc406Sopenharmony_ci additional uses of the libraries contained in this release of SANE. 22141cc406Sopenharmony_ci 23141cc406Sopenharmony_ci The exception is that, if you link a SANE library with other files 24141cc406Sopenharmony_ci to produce an executable, this does not by itself cause the 25141cc406Sopenharmony_ci resulting executable to be covered by the GNU General Public 26141cc406Sopenharmony_ci License. Your use of that executable is in no way restricted on 27141cc406Sopenharmony_ci account of linking the SANE library code into it. 28141cc406Sopenharmony_ci 29141cc406Sopenharmony_ci This exception does not, however, invalidate any other reasons why 30141cc406Sopenharmony_ci the executable file might be covered by the GNU General Public 31141cc406Sopenharmony_ci License. 32141cc406Sopenharmony_ci 33141cc406Sopenharmony_ci If you submit changes to SANE to the maintainers to be included in 34141cc406Sopenharmony_ci a subsequent release, you agree by submitting the changes that 35141cc406Sopenharmony_ci those changes may be distributed with this exception intact. 36141cc406Sopenharmony_ci 37141cc406Sopenharmony_ci If you write modifications of your own for SANE, it is your choice 38141cc406Sopenharmony_ci whether to permit this exception to apply to your modifications. 39141cc406Sopenharmony_ci If you do not wish that, delete this exception notice. 40141cc406Sopenharmony_ci*/ 41141cc406Sopenharmony_ci 42141cc406Sopenharmony_ci/* returns device model according to given product and vendor id's */ 43141cc406Sopenharmony_cistatic SANE_Int cfg_device_get(SANE_Int product, SANE_Int vendor); 44141cc406Sopenharmony_ci 45141cc406Sopenharmony_ci/* returns information and capabilities about selected chipset model */ 46141cc406Sopenharmony_cistatic SANE_Int cfg_chipset_get(SANE_Int model, struct st_chip *chipset); 47141cc406Sopenharmony_ci 48141cc406Sopenharmony_ci/* returns the chipset model for each scanner */ 49141cc406Sopenharmony_cistatic SANE_Int cfg_chipset_model_get(SANE_Int device); 50141cc406Sopenharmony_ci 51141cc406Sopenharmony_ci/* buttons for each scanner */ 52141cc406Sopenharmony_cistatic SANE_Int cfg_buttons_get(struct st_buttons *reg); 53141cc406Sopenharmony_ci 54141cc406Sopenharmony_ci/* area constraints for each scanner */ 55141cc406Sopenharmony_cistatic SANE_Int cfg_constrains_get(struct st_constrains *constrain); 56141cc406Sopenharmony_ci 57141cc406Sopenharmony_ci/* spectrum clock generator for each scanner */ 58141cc406Sopenharmony_cistatic SANE_Int cfg_sscg_get(SANE_Int *enable, SANE_Int *mode, SANE_Int *clock); 59141cc406Sopenharmony_ci 60141cc406Sopenharmony_ci/* motor general configuration for each scanner */ 61141cc406Sopenharmony_cistatic SANE_Int cfg_motor_get(struct st_motorcfg *reg); 62141cc406Sopenharmony_ci 63141cc406Sopenharmony_ci/* motor resource for each scanner */ 64141cc406Sopenharmony_cistatic SANE_Byte *cfg_motor_resource_get(SANE_Byte *size); 65141cc406Sopenharmony_ci 66141cc406Sopenharmony_ci/* sensor general configuration for each scanner */ 67141cc406Sopenharmony_cistatic SANE_Int cfg_sensor_get(struct st_sensorcfg *reg); 68141cc406Sopenharmony_ci 69141cc406Sopenharmony_ci/* reference voltages for each scanner */ 70141cc406Sopenharmony_cistatic void cfg_refvoltages_get(SANE_Int sensortype, SANE_Byte *vrts, SANE_Byte *vrms, SANE_Byte *vrbs); 71141cc406Sopenharmony_cistatic void hp3800_refvoltages(SANE_Int usb, SANE_Int sensor, SANE_Byte *vrts, SANE_Byte *vrms, SANE_Byte *vrbs); 72141cc406Sopenharmony_cistatic void hp3970_refvoltages(SANE_Int usb, SANE_Int sensor, SANE_Byte *vrts, SANE_Byte *vrms, SANE_Byte *vrbs); 73141cc406Sopenharmony_ci 74141cc406Sopenharmony_ci/* offset calibration start and length */ 75141cc406Sopenharmony_cistatic void cfg_offset_get(SANE_Int sensortype, SANE_Int resolution, SANE_Int scantype, SANE_Int *left, SANE_Int *width); 76141cc406Sopenharmony_cistatic void ua4900_offset(SANE_Int resolution, SANE_Int scantype, SANE_Int *left, SANE_Int *width); 77141cc406Sopenharmony_cistatic void hp3800_offset(SANE_Int resolution, SANE_Int scantype, SANE_Int *left, SANE_Int *width); 78141cc406Sopenharmony_cistatic void hp3970_offset(SANE_Int sensor, SANE_Int resolution, SANE_Int scantype, SANE_Int *left, SANE_Int *width); 79141cc406Sopenharmony_cistatic void hp4370_offset(SANE_Int resolution, SANE_Int scantype, SANE_Int *left, SANE_Int *width); 80141cc406Sopenharmony_ci 81141cc406Sopenharmony_ci/* autoref configuration */ 82141cc406Sopenharmony_cistatic void cfg_autoref_get(struct st_autoref *reg); 83141cc406Sopenharmony_ci 84141cc406Sopenharmony_ci/* autoref start effective pixel */ 85141cc406Sopenharmony_cistatic SANE_Int cfg_effectivepixel_get(SANE_Int sensortype, SANE_Int resolution); 86141cc406Sopenharmony_cistatic SANE_Int ua4900_effectivepixel(SANE_Int resolution); 87141cc406Sopenharmony_cistatic SANE_Int hp3800_effectivepixel(SANE_Int resolution); 88141cc406Sopenharmony_cistatic SANE_Int hp3970_effectivepixel(SANE_Int sensor, SANE_Int resolution); 89141cc406Sopenharmony_cistatic SANE_Int hp4370_effectivepixel(SANE_Int resolution); 90141cc406Sopenharmony_ci 91141cc406Sopenharmony_ci/* default values for gain and offset */ 92141cc406Sopenharmony_cistatic SANE_Int cfg_gainoffset_get(SANE_Int sensortype, struct st_gain_offset *reg); 93141cc406Sopenharmony_cistatic SANE_Int bq5550_gainoffset(SANE_Int usb, struct st_gain_offset *myreg); 94141cc406Sopenharmony_cistatic SANE_Int ua4900_gainoffset(SANE_Int usb, struct st_gain_offset *myreg); 95141cc406Sopenharmony_cistatic SANE_Int hp3800_gainoffset(SANE_Int usb, struct st_gain_offset *myreg); 96141cc406Sopenharmony_cistatic SANE_Int hp3970_gainoffset(SANE_Int usb, SANE_Int sensor, struct st_gain_offset *myreg); 97141cc406Sopenharmony_cistatic SANE_Int hp4370_gainoffset(SANE_Int usb, struct st_gain_offset *myreg); 98141cc406Sopenharmony_ci 99141cc406Sopenharmony_ci/* values to detect optimum pulse-width modulation */ 100141cc406Sopenharmony_cistatic SANE_Int cfg_checkstable_get(SANE_Int lamp, struct st_checkstable *check); 101141cc406Sopenharmony_cistatic SANE_Int ua4900_checkstable(SANE_Int lamp, struct st_checkstable *check); 102141cc406Sopenharmony_cistatic SANE_Int hp3800_checkstable(SANE_Int lamp, struct st_checkstable *check); 103141cc406Sopenharmony_cistatic SANE_Int hp3970_checkstable(SANE_Int lamp, struct st_checkstable *check); 104141cc406Sopenharmony_cistatic SANE_Int hp4370_checkstable(SANE_Int lamp, struct st_checkstable *check); 105141cc406Sopenharmony_ci 106141cc406Sopenharmony_ci/* fixed pulse-width modulation values */ 107141cc406Sopenharmony_cistatic SANE_Int cfg_fixedpwm_get(SANE_Int sensortype, SANE_Int scantype); 108141cc406Sopenharmony_cistatic SANE_Int ua4900_fixedpwm(SANE_Int scantype, SANE_Int usb); 109141cc406Sopenharmony_cistatic SANE_Int hp3800_fixedpwm(SANE_Int scantype, SANE_Int usb); 110141cc406Sopenharmony_cistatic SANE_Int hp3970_fixedpwm(SANE_Int scantype, SANE_Int usb, SANE_Int sensor); 111141cc406Sopenharmony_cistatic SANE_Int hp4370_fixedpwm(SANE_Int scantype, SANE_Int usb); 112141cc406Sopenharmony_ci 113141cc406Sopenharmony_ci/* virtual origin (ser and ler references) */ 114141cc406Sopenharmony_cistatic void cfg_vrefs_get(SANE_Int sensortype, SANE_Int res, SANE_Int *ser, SANE_Int *ler); 115141cc406Sopenharmony_cistatic void hp3800_vrefs(SANE_Int res, SANE_Int *ser, SANE_Int *ler); 116141cc406Sopenharmony_cistatic void hp3970_vrefs(SANE_Int usb, SANE_Int sensor, SANE_Int res, SANE_Int *ser, SANE_Int *ler); 117141cc406Sopenharmony_cistatic void hp4370_vrefs(SANE_Int res, SANE_Int *ser, SANE_Int *ler); 118141cc406Sopenharmony_ci 119141cc406Sopenharmony_ci/* scanmodes supported by each scanner */ 120141cc406Sopenharmony_cistatic SANE_Int cfg_scanmode_get(SANE_Int sensortype, SANE_Int sm, struct st_scanmode *mymode); 121141cc406Sopenharmony_cistatic SANE_Int bq5550_scanmodes(SANE_Int usb, SANE_Int sm, struct st_scanmode *mymode); 122141cc406Sopenharmony_cistatic SANE_Int ua4900_scanmodes(SANE_Int usb, SANE_Int sm, struct st_scanmode *mymode); 123141cc406Sopenharmony_cistatic SANE_Int hp3800_scanmodes(SANE_Int usb, SANE_Int sm, struct st_scanmode *mymode); 124141cc406Sopenharmony_cistatic SANE_Int hp3970_scanmodes(SANE_Int usb, SANE_Int ccd, SANE_Int sm, struct st_scanmode *mymode); 125141cc406Sopenharmony_cistatic SANE_Int hp4370_scanmodes(SANE_Int usb, SANE_Int sm, struct st_scanmode *mymode); 126141cc406Sopenharmony_ci 127141cc406Sopenharmony_ci/* timing values for ccd sensors */ 128141cc406Sopenharmony_cistatic SANE_Int cfg_timing_get(SANE_Int sensortype, SANE_Int tm, struct st_timing *reg); 129141cc406Sopenharmony_cistatic SANE_Int bq5550_timing_get(SANE_Int tm, struct st_timing *reg); 130141cc406Sopenharmony_cistatic SANE_Int ua4900_timing_get(SANE_Int tm, struct st_timing *reg); 131141cc406Sopenharmony_cistatic SANE_Int hp3800_timing_get(SANE_Int tm, struct st_timing *reg); 132141cc406Sopenharmony_cistatic SANE_Int hp3970_timing_get(SANE_Int sensortype, SANE_Int tm, struct st_timing *reg); 133141cc406Sopenharmony_cistatic SANE_Int hp4370_timing_get(SANE_Int tm, struct st_timing *reg); 134141cc406Sopenharmony_ci 135141cc406Sopenharmony_ci/* motor movements */ 136141cc406Sopenharmony_cistatic SANE_Int cfg_motormove_get(SANE_Int sensortype, SANE_Int mm, struct st_motormove *reg); 137141cc406Sopenharmony_cistatic SANE_Int bq5550_motormove(SANE_Int item, struct st_motormove *reg); 138141cc406Sopenharmony_cistatic SANE_Int hp3800_motormove(SANE_Int item, struct st_motormove *reg); 139141cc406Sopenharmony_cistatic SANE_Int hp3970_motormove(SANE_Int usb, SANE_Int ccd, SANE_Int item, struct st_motormove *reg); 140141cc406Sopenharmony_ci 141141cc406Sopenharmony_ci/* motor curves */ 142141cc406Sopenharmony_cistatic SANE_Int *cfg_motorcurve_get(void); 143141cc406Sopenharmony_cistatic SANE_Int *bq5550_motor(void); 144141cc406Sopenharmony_cistatic SANE_Int *hp3800_motor(void); 145141cc406Sopenharmony_cistatic SANE_Int *hp3970_motor(void); 146141cc406Sopenharmony_cistatic SANE_Int *hp4370_motor(void); 147141cc406Sopenharmony_ci 148141cc406Sopenharmony_ci/* shading cut values */ 149141cc406Sopenharmony_cistatic void cfg_shading_cut_get(SANE_Int sensortype, SANE_Int depth, SANE_Int res, SANE_Int scantype, SANE_Int *red, SANE_Int *green, SANE_Int *blue); 150141cc406Sopenharmony_cistatic void ua4900_shading_cut(SANE_Int usb, SANE_Int depth, SANE_Int res, SANE_Int scantype, SANE_Int *red, SANE_Int *green, SANE_Int *blue); 151141cc406Sopenharmony_cistatic void hp3800_shading_cut(SANE_Int res, SANE_Int scantype, SANE_Int *red, SANE_Int *green, SANE_Int *blue); 152141cc406Sopenharmony_cistatic void hp3970_shading_cut(SANE_Int usb, SANE_Int ccd, SANE_Int depth, SANE_Int res, SANE_Int scantype, SANE_Int *red, SANE_Int *green, SANE_Int *blue); 153141cc406Sopenharmony_cistatic void hp4370_shading_cut(SANE_Int depth, SANE_Int res, SANE_Int scantype, SANE_Int *red, SANE_Int *green, SANE_Int *blue); 154141cc406Sopenharmony_ci 155141cc406Sopenharmony_ci/* wrefs values */ 156141cc406Sopenharmony_cistatic void cfg_wrefs_get(SANE_Int sensortype, SANE_Int depth, SANE_Int res, SANE_Int scantype, SANE_Int *red, SANE_Int *green, SANE_Int *blue); 157141cc406Sopenharmony_cistatic void ua4900_wrefs(SANE_Int usb, SANE_Int depth, SANE_Int res, SANE_Int scantype, SANE_Int *red, SANE_Int *green, SANE_Int *blue); 158141cc406Sopenharmony_cistatic void hp3800_wrefs(SANE_Int res, SANE_Int scantype, SANE_Int *red, SANE_Int *green, SANE_Int *blue); 159141cc406Sopenharmony_cistatic void hp3970_wrefs(SANE_Int usb, SANE_Int ccd, SANE_Int depth, SANE_Int res, SANE_Int scantype, SANE_Int *red, SANE_Int *green, SANE_Int *blue); 160141cc406Sopenharmony_cistatic void hp4370_wrefs(SANE_Int res, SANE_Int scantype, SANE_Int *red, SANE_Int *green, SANE_Int *blue); 161141cc406Sopenharmony_ci 162141cc406Sopenharmony_ci 163141cc406Sopenharmony_ci/* DEPRECATED FUNCTIONS !!!!!!!!!!!!!!!!!!! */ 164141cc406Sopenharmony_ci 165141cc406Sopenharmony_ci 166141cc406Sopenharmony_cistatic int get_value(int section, int option, int defvalue, int file); 167141cc406Sopenharmony_ci 168141cc406Sopenharmony_ci/* HP Scanjet 3800 */ 169141cc406Sopenharmony_cistatic int hp3800_calibreflective(int option, int defvalue); 170141cc406Sopenharmony_cistatic int hp3800_calibtransparent(int option, int defvalue); 171141cc406Sopenharmony_cistatic int hp3800_calibnegative(int option, int defvalue); 172141cc406Sopenharmony_cistatic int srt_hp3800_scanparam_get(int option, int defvalue); 173141cc406Sopenharmony_ci 174141cc406Sopenharmony_ci/* UMAX Astra 4900 */ 175141cc406Sopenharmony_cistatic int ua4900_calibreflective(int option, int defvalue); 176141cc406Sopenharmony_cistatic int ua4900_calibtransparent(int option, int defvalue); 177141cc406Sopenharmony_cistatic int ua4900_calibnegative(int option, int defvalue); 178141cc406Sopenharmony_ci 179141cc406Sopenharmony_ci/* HP Scanjet 3970 */ 180141cc406Sopenharmony_cistatic int hp3970_calibreflective(int option, int defvalue); 181141cc406Sopenharmony_cistatic int hp3970_calibtransparent(int option, int defvalue); 182141cc406Sopenharmony_cistatic int hp3970_calibnegative(int option, int defvalue); 183141cc406Sopenharmony_cistatic int srt_hp3970_scanparam_get(int file, int option, int defvalue); 184141cc406Sopenharmony_cistatic int srt_hp3970_platform_get(int option, int defvalue); 185141cc406Sopenharmony_ci 186141cc406Sopenharmony_ci/* HP Scanjet 4370 */ 187141cc406Sopenharmony_cistatic int hp4370_calibreflective(int option, int defvalue); 188141cc406Sopenharmony_cistatic int hp4370_calibtransparent(int option, int defvalue); 189141cc406Sopenharmony_cistatic int hp4370_calibnegative(int option, int defvalue); 190141cc406Sopenharmony_cistatic int srt_hp4370_scanparam_get(int file, int option, int defvalue); 191141cc406Sopenharmony_ci 192141cc406Sopenharmony_ci/* HP Scanjet g3110 */ 193141cc406Sopenharmony_cistatic int hpg3110_calibnegative(int option, int defvalue); 194141cc406Sopenharmony_cistatic int hpg3110_calibtransparent(int option, int defvalue); 195141cc406Sopenharmony_ci 196141cc406Sopenharmony_ci/* ----- Implementation ----- */ 197141cc406Sopenharmony_ci 198141cc406Sopenharmony_ci/* DEPRECATED enumerations */ 199141cc406Sopenharmony_ci 200141cc406Sopenharmony_cienum ConfigFiles 201141cc406Sopenharmony_ci{ 202141cc406Sopenharmony_ci FITCALIBRATE=0, 203141cc406Sopenharmony_ci 204141cc406Sopenharmony_ci T_RTINIFILE, T_USB1INIFILE, 205141cc406Sopenharmony_ci S_RTINIFILE, S_USB1INIFILE 206141cc406Sopenharmony_ci}; 207141cc406Sopenharmony_ci 208141cc406Sopenharmony_cienum fcsec6 209141cc406Sopenharmony_ci{ 210141cc406Sopenharmony_ci CALIBREFLECTIVE = 0, CALIBTRANSPARENT, CALIBNEGATIVEFILM, 211141cc406Sopenharmony_ci 212141cc406Sopenharmony_ci SCANINFO, 213141cc406Sopenharmony_ci SCAN_CALI, 214141cc406Sopenharmony_ci 215141cc406Sopenharmony_ci WSTRIPXPOS, WSTRIPYPOS, 216141cc406Sopenharmony_ci BSTRIPXPOS, BSTRIPYPOS, 217141cc406Sopenharmony_ci 218141cc406Sopenharmony_ci BREFR, BREFG, BREFB, 219141cc406Sopenharmony_ci 220141cc406Sopenharmony_ci REFBITDEPTH, 221141cc406Sopenharmony_ci OFFSETHEIGHT, 222141cc406Sopenharmony_ci 223141cc406Sopenharmony_ci OFFSETNSIGMA, OFFSETTARGETMAX, OFFSETTARGETMIN, 224141cc406Sopenharmony_ci OFFSETAVGTARGETR, OFFSETAVGTARGETG, OFFSETAVGTARGETB, 225141cc406Sopenharmony_ci 226141cc406Sopenharmony_ci ADCOFFEVENODD, 227141cc406Sopenharmony_ci CALIBOFFSET1ON, 228141cc406Sopenharmony_ci 229141cc406Sopenharmony_ci ADCOFFQUICKWAY, ADCOFFPREDICTSTART, ADCOFFPREDICTEND, 230141cc406Sopenharmony_ci 231141cc406Sopenharmony_ci OFFSETTUNESTEP1, OFFSETBOUNDARYRATIO1, OFFSETAVGRATIO1, 232141cc406Sopenharmony_ci 233141cc406Sopenharmony_ci OFFSETEVEN1R, OFFSETEVEN1G, OFFSETEVEN1B, 234141cc406Sopenharmony_ci OFFSETODD1R, OFFSETODD1G, OFFSETODD1B, 235141cc406Sopenharmony_ci 236141cc406Sopenharmony_ci ADCOFFPREDICTR, ADCOFFPREDICTG, ADCOFFPREDICTB, 237141cc406Sopenharmony_ci ADCOFFEVEN1R_1ST, ADCOFFEVEN1G_1ST, ADCOFFEVEN1B_1ST, 238141cc406Sopenharmony_ci ADCOFFODD1R_1ST, ADCOFFODD1G_1ST, ADCOFFODD1B_1ST, 239141cc406Sopenharmony_ci 240141cc406Sopenharmony_ci PEAKR, PEAKG, PEAKB, 241141cc406Sopenharmony_ci MINR, MING, MINB, 242141cc406Sopenharmony_ci 243141cc406Sopenharmony_ci CALIBOFFSET2ON, 244141cc406Sopenharmony_ci OFFSETTUNESTEP2, OFFSETBOUNDARYRATIO2, OFFSETAVGRATIO2, 245141cc406Sopenharmony_ci 246141cc406Sopenharmony_ci OFFSETEVEN2R, OFFSETEVEN2G, OFFSETEVEN2B, 247141cc406Sopenharmony_ci OFFSETODD2R, OFFSETODD2G, OFFSETODD2B, 248141cc406Sopenharmony_ci 249141cc406Sopenharmony_ci GAINHEIGHT, GAINTARGETFACTOR, 250141cc406Sopenharmony_ci 251141cc406Sopenharmony_ci CALIBPAGON, 252141cc406Sopenharmony_ci 253141cc406Sopenharmony_ci HIPAGR, HIPAGG, HIPAGB, 254141cc406Sopenharmony_ci LOPAGR, LOPAGG, LOPAGB, 255141cc406Sopenharmony_ci PAGR, PAGG, PAGB, 256141cc406Sopenharmony_ci 257141cc406Sopenharmony_ci CALIBGAIN1ON, GAIN1R, GAIN1G, GAIN1B, 258141cc406Sopenharmony_ci CALIBGAIN2ON, GAIN2R, GAIN2G, GAIN2B, 259141cc406Sopenharmony_ci 260141cc406Sopenharmony_ci TOTSHADING, 261141cc406Sopenharmony_ci 262141cc406Sopenharmony_ci BSHADINGON, BSHADINGHEIGHT, BSHADINGPREDIFFR, BSHADINGPREDIFFG, BSHADINGPREDIFFB, 263141cc406Sopenharmony_ci BSHADINGDEFCUTOFF, 264141cc406Sopenharmony_ci WSHADINGON, WSHADINGHEIGHT, WSHADINGPREDIFFR, WSHADINGPREDIFFG, WSHADINGPREDIFFB, 265141cc406Sopenharmony_ci 266141cc406Sopenharmony_ci PARKHOMEAFTERCALIB, 267141cc406Sopenharmony_ci 268141cc406Sopenharmony_ci SHADINGTIME_16BIT, SHADOWTIME_16BIT, SHADINGTIME_8BIT, SHADOWTIME_8BIT, 269141cc406Sopenharmony_ci PREVIEWDPI, 270141cc406Sopenharmony_ci 271141cc406Sopenharmony_ci FIRSTDCOFFSETEVEN0, FIRSTDCOFFSETODD0, FIRSTDCOFFSETEVEN1, 272141cc406Sopenharmony_ci FIRSTDCOFFSETODD1, FIRSTDCOFFSETEVEN2, FIRSTDCOFFSETODD2, 273141cc406Sopenharmony_ci 274141cc406Sopenharmony_ci CALIBOFFSET10N, CALIBOFFSET20N, 275141cc406Sopenharmony_ci CALIBGAIN10N, CALIBGAIN20N, 276141cc406Sopenharmony_ci ARRANGELINE, 277141cc406Sopenharmony_ci COMPRESSION, 278141cc406Sopenharmony_ci 279141cc406Sopenharmony_ci TA_X_START, TA_Y_START, 280141cc406Sopenharmony_ci 281141cc406Sopenharmony_ci DPIGAINCONTROL600, 282141cc406Sopenharmony_ci DPIGAINCONTROL_TA600, 283141cc406Sopenharmony_ci DPIGAINCONTROL_NEG600, 284141cc406Sopenharmony_ci 285141cc406Sopenharmony_ci CRVS, MLOCK, 286141cc406Sopenharmony_ci ENABLEWARMUP, 287141cc406Sopenharmony_ci 288141cc406Sopenharmony_ci NMAXTARGET, NMINTARGET, 289141cc406Sopenharmony_ci NMAXTARGETTA, NMINTARGETTA, 290141cc406Sopenharmony_ci NMAXTARGETNEG, NMINTARGETNEG, 291141cc406Sopenharmony_ci 292141cc406Sopenharmony_ci STABLEDIFF, 293141cc406Sopenharmony_ci DELTAPWM, 294141cc406Sopenharmony_ci 295141cc406Sopenharmony_ci PWMLAMPLEVEL, 296141cc406Sopenharmony_ci 297141cc406Sopenharmony_ci TMAPWMDUTY, 298141cc406Sopenharmony_ci 299141cc406Sopenharmony_ci PAG1, PAG2, PAG3, 300141cc406Sopenharmony_ci 301141cc406Sopenharmony_ci LEFTLEADING, 302141cc406Sopenharmony_ci 303141cc406Sopenharmony_ci WAVE_XSTART, 304141cc406Sopenharmony_ci 305141cc406Sopenharmony_ci WAVE_S575_XDUMMY_2400, WAVE_S575_XDUMMY_1200, WAVE_S575_XDUMMY_600, 306141cc406Sopenharmony_ci 307141cc406Sopenharmony_ci ODD_DCOFFSET11, ODD_DCOFFSET12, ODD_DCOFFSET13, 308141cc406Sopenharmony_ci ODD_DCOFFSET21, ODD_DCOFFSET22, ODD_DCOFFSET23, 309141cc406Sopenharmony_ci 310141cc406Sopenharmony_ci EVEN_DCOFFSET11, EVEN_DCOFFSET12, EVEN_DCOFFSET13, 311141cc406Sopenharmony_ci EVEN_DCOFFSET21, EVEN_DCOFFSET22, EVEN_DCOFFSET23, 312141cc406Sopenharmony_ci 313141cc406Sopenharmony_ci DCGAIN11, DCGAIN12, DCGAIN13, 314141cc406Sopenharmony_ci DCGAIN21, DCGAIN22, DCGAIN23, 315141cc406Sopenharmony_ci 316141cc406Sopenharmony_ci CRYSTALFREQ, 317141cc406Sopenharmony_ci 318141cc406Sopenharmony_ci PGA1, PGA2, PGA3, 319141cc406Sopenharmony_ci 320141cc406Sopenharmony_ci VGAGAIN11, VGAGAIN12, VGAGAIN13, 321141cc406Sopenharmony_ci 322141cc406Sopenharmony_ci DCSTEPEVEN1, DCSTEPODD1, 323141cc406Sopenharmony_ci DCSTEPEVEN2, DCSTEPODD2, 324141cc406Sopenharmony_ci DCSTEPEVEN3, DCSTEPODD3, 325141cc406Sopenharmony_ci 326141cc406Sopenharmony_ci FIRSTDCOFFSETEVEN11, FIRSTDCOFFSETODD11, 327141cc406Sopenharmony_ci FIRSTDCOFFSETEVEN12, FIRSTDCOFFSETODD12, 328141cc406Sopenharmony_ci FIRSTDCOFFSETEVEN13, FIRSTDCOFFSETODD13, 329141cc406Sopenharmony_ci 330141cc406Sopenharmony_ci DCOFFSETEVEN11, DCOFFSETODD11, 331141cc406Sopenharmony_ci DCOFFSETEVEN12, DCOFFSETODD12, 332141cc406Sopenharmony_ci DCOFFSETEVEN13, DCOFFSETODD13, 333141cc406Sopenharmony_ci 334141cc406Sopenharmony_ci SHADINGBASE, SHADINGFACT1, SHADINGFACT2, SHADINGFACT3, 335141cc406Sopenharmony_ci 336141cc406Sopenharmony_ci PIXELDARKLEVEL, 337141cc406Sopenharmony_ci 338141cc406Sopenharmony_ci EXPOSURETIME, 339141cc406Sopenharmony_ci SCANYSTART, SCANYLINES, 340141cc406Sopenharmony_ci 341141cc406Sopenharmony_ci BINARYTHRESHOLDH, BINARYTHRESHOLDL, 342141cc406Sopenharmony_ci CLOSETIME, 343141cc406Sopenharmony_ci PLATFORM, 344141cc406Sopenharmony_ci SCAN_PARAM, 345141cc406Sopenharmony_ci USB1_PWM, USB2_PWM, 346141cc406Sopenharmony_ci WAVETEST, 347141cc406Sopenharmony_ci DMA_PARAM, 348141cc406Sopenharmony_ci TRUE_GRAY_PARAM, 349141cc406Sopenharmony_ci CALI_PARAM, 350141cc406Sopenharmony_ci DUMMYLINE, 351141cc406Sopenharmony_ci 352141cc406Sopenharmony_ci MEXPT1, MEXPT2, MEXPT3, 353141cc406Sopenharmony_ci EXPT1, EXPT2, EXPT3, 354141cc406Sopenharmony_ci 355141cc406Sopenharmony_ci STARTPOS, 356141cc406Sopenharmony_ci LINEDARLAMPOFF, 357141cc406Sopenharmony_ci MCLKIOC 358141cc406Sopenharmony_ci}; 359141cc406Sopenharmony_ci 360141cc406Sopenharmony_cistatic SANE_Int cfg_device_get(SANE_Int product, SANE_Int vendor) 361141cc406Sopenharmony_ci{ 362141cc406Sopenharmony_ci struct st_myreg 363141cc406Sopenharmony_ci { 364141cc406Sopenharmony_ci SANE_Int vendor, product, device; 365141cc406Sopenharmony_ci }; 366141cc406Sopenharmony_ci 367141cc406Sopenharmony_ci struct st_myreg myreg[] = 368141cc406Sopenharmony_ci { 369141cc406Sopenharmony_ci /*vendor, prodct, device */ 370141cc406Sopenharmony_ci { 0x4a5, 0x2211, BQ5550 }, /* BenQ 5550 */ 371141cc406Sopenharmony_ci { 0x6dc, 0x0020, UA4900 }, /* UMAX Astra 4900 */ 372141cc406Sopenharmony_ci { 0x3f0, 0x2605, HP3800 }, /* HP Scanjet 3800 */ 373141cc406Sopenharmony_ci { 0x3f0, 0x2805, HPG2710}, /* HP Scanjet G2710 */ 374141cc406Sopenharmony_ci { 0x3f0, 0x2305, HP3970 }, /* HP Scanjet 3970c */ 375141cc406Sopenharmony_ci { 0x3f0, 0x2405, HP4070 }, /* HP Scanjet 4070 Photosmart */ 376141cc406Sopenharmony_ci { 0x3f0, 0x4105, HP4370 }, /* HP Scanjet 4370 */ 377141cc406Sopenharmony_ci { 0x3f0, 0x4205, HPG3010}, /* HP Scanjet G3010 */ 378141cc406Sopenharmony_ci { 0x3f0, 0x4305, HPG3110} /* HP Scanjet G3010 */ 379141cc406Sopenharmony_ci }; 380141cc406Sopenharmony_ci 381141cc406Sopenharmony_ci SANE_Int rst = -1; /* default */ 382141cc406Sopenharmony_ci SANE_Int a; 383141cc406Sopenharmony_ci SANE_Int count = sizeof(myreg) / sizeof(struct st_myreg); 384141cc406Sopenharmony_ci 385141cc406Sopenharmony_ci for (a = 0; a < count; a++) 386141cc406Sopenharmony_ci { 387141cc406Sopenharmony_ci if ((vendor == myreg[a].vendor)&&(product == myreg[a].product)) 388141cc406Sopenharmony_ci { 389141cc406Sopenharmony_ci rst = myreg[a].device; 390141cc406Sopenharmony_ci 391141cc406Sopenharmony_ci break; 392141cc406Sopenharmony_ci } 393141cc406Sopenharmony_ci } 394141cc406Sopenharmony_ci 395141cc406Sopenharmony_ci return rst; 396141cc406Sopenharmony_ci} 397141cc406Sopenharmony_ci 398141cc406Sopenharmony_cistatic SANE_Int cfg_chipset_model_get(SANE_Int device) 399141cc406Sopenharmony_ci{ 400141cc406Sopenharmony_ci /* returns the chipset model for each scanner */ 401141cc406Sopenharmony_ci struct st_myreg 402141cc406Sopenharmony_ci { 403141cc406Sopenharmony_ci SANE_Int device, chipset; 404141cc406Sopenharmony_ci }; 405141cc406Sopenharmony_ci 406141cc406Sopenharmony_ci struct st_myreg myreg[] = 407141cc406Sopenharmony_ci { 408141cc406Sopenharmony_ci /*device , chipset */ 409141cc406Sopenharmony_ci { HP3800 , RTS8822BL_03A }, 410141cc406Sopenharmony_ci { HPG2710, RTS8822BL_03A }, 411141cc406Sopenharmony_ci { BQ5550 , RTS8823L_01E }, 412141cc406Sopenharmony_ci { UA4900 , RTS8822L_01H }, 413141cc406Sopenharmony_ci { HP3970 , RTS8822L_01H }, 414141cc406Sopenharmony_ci { HP4070 , RTS8822L_01H }, 415141cc406Sopenharmony_ci { HP4370 , RTS8822L_02A }, 416141cc406Sopenharmony_ci { HPG3010, RTS8822L_02A }, 417141cc406Sopenharmony_ci { HPG3110, RTS8822L_02A } 418141cc406Sopenharmony_ci }; 419141cc406Sopenharmony_ci 420141cc406Sopenharmony_ci SANE_Int rst = RTS8822L_01H; /* default */ 421141cc406Sopenharmony_ci SANE_Int a; 422141cc406Sopenharmony_ci SANE_Int count = sizeof(myreg) / sizeof(struct st_myreg); 423141cc406Sopenharmony_ci 424141cc406Sopenharmony_ci for (a = 0; a < count; a++) 425141cc406Sopenharmony_ci { 426141cc406Sopenharmony_ci if (device == myreg[a].device) 427141cc406Sopenharmony_ci { 428141cc406Sopenharmony_ci rst = myreg[a].chipset; 429141cc406Sopenharmony_ci 430141cc406Sopenharmony_ci break; 431141cc406Sopenharmony_ci } 432141cc406Sopenharmony_ci } 433141cc406Sopenharmony_ci 434141cc406Sopenharmony_ci return rst; 435141cc406Sopenharmony_ci} 436141cc406Sopenharmony_ci 437141cc406Sopenharmony_cistatic SANE_Int cfg_chipset_get(SANE_Int model, struct st_chip *chipset) 438141cc406Sopenharmony_ci{ 439141cc406Sopenharmony_ci /* returns info and capabilities of selected chipset */ 440141cc406Sopenharmony_ci SANE_Int rst = ERROR; 441141cc406Sopenharmony_ci 442141cc406Sopenharmony_ci if (chipset != NULL) 443141cc406Sopenharmony_ci { 444141cc406Sopenharmony_ci struct st_chip data[] = 445141cc406Sopenharmony_ci { 446141cc406Sopenharmony_ci /* model , capabilities, name */ 447141cc406Sopenharmony_ci {RTS8823L_01E , 0 , "RTS8823L-01E" }, 448141cc406Sopenharmony_ci {RTS8822BL_03A, CAP_EEPROM , "RTS8822BL-03A"}, 449141cc406Sopenharmony_ci {RTS8822L_02A , CAP_EEPROM , "RTS8822L-02A" }, 450141cc406Sopenharmony_ci {RTS8822L_01H , CAP_EEPROM , "RTS8822L-01H" } 451141cc406Sopenharmony_ci }; 452141cc406Sopenharmony_ci 453141cc406Sopenharmony_ci SANE_Int a; 454141cc406Sopenharmony_ci 455141cc406Sopenharmony_ci for (a = 0; a < 4; a++) 456141cc406Sopenharmony_ci { 457141cc406Sopenharmony_ci if (model == data[a].model) 458141cc406Sopenharmony_ci { 459141cc406Sopenharmony_ci /* model found, fill information */ 460141cc406Sopenharmony_ci chipset->model = data[a].model; 461141cc406Sopenharmony_ci chipset->capabilities = data[a].capabilities; 462141cc406Sopenharmony_ci chipset->name = strdup(data[a].name); 463141cc406Sopenharmony_ci 464141cc406Sopenharmony_ci if (chipset->name != NULL) 465141cc406Sopenharmony_ci rst = OK; 466141cc406Sopenharmony_ci 467141cc406Sopenharmony_ci break; 468141cc406Sopenharmony_ci } 469141cc406Sopenharmony_ci } 470141cc406Sopenharmony_ci } 471141cc406Sopenharmony_ci 472141cc406Sopenharmony_ci return rst; 473141cc406Sopenharmony_ci} 474141cc406Sopenharmony_ci 475141cc406Sopenharmony_ci/** SEC: Device's Buttons ---------- */ 476141cc406Sopenharmony_ci 477141cc406Sopenharmony_cistatic SANE_Int cfg_buttons_get(struct st_buttons *reg) 478141cc406Sopenharmony_ci{ 479141cc406Sopenharmony_ci /* buttons for each scanner */ 480141cc406Sopenharmony_ci SANE_Int rst = ERROR; 481141cc406Sopenharmony_ci 482141cc406Sopenharmony_ci if (reg != NULL) 483141cc406Sopenharmony_ci { 484141cc406Sopenharmony_ci struct st_myreg 485141cc406Sopenharmony_ci { 486141cc406Sopenharmony_ci SANE_Int device; 487141cc406Sopenharmony_ci struct st_buttons value; 488141cc406Sopenharmony_ci }; 489141cc406Sopenharmony_ci 490141cc406Sopenharmony_ci struct st_myreg myreg[] = 491141cc406Sopenharmony_ci { 492141cc406Sopenharmony_ci /*device, {count, {btn1, btn2, btn3, btn4, btn5, btn6)} */ 493141cc406Sopenharmony_ci { BQ5550 , {3 , {0x01, 0x02, 0x08, -1, -1, -1}}}, 494141cc406Sopenharmony_ci { UA4900 , {4 , {0x04, 0x08, 0x02, 0x01, -1, -1}}}, 495141cc406Sopenharmony_ci { HP3800 , {3 , {0x01, 0x02, 0x04, -1, -1, -1}}}, 496141cc406Sopenharmony_ci { HPG2710, {3 , {0x01, 0x02, 0x04, -1, -1, -1}}}, 497141cc406Sopenharmony_ci { HP3970 , {4 , {0x04, 0x08, 0x02, 0x01, -1, -1}}}, 498141cc406Sopenharmony_ci { HP4070 , {4 , {0x04, 0x08, 0x02, 0x01, -1, -1}}}, 499141cc406Sopenharmony_ci { HP4370 , {4 , {0x04, 0x08, 0x02, 0x01, -1, -1}}}, 500141cc406Sopenharmony_ci { HPG3010, {4 , {0x04, 0x08, 0x02, 0x01, -1, -1}}}, 501141cc406Sopenharmony_ci { HPG3110, {4 , {0x04, 0x08, 0x02, 0x01, -1, -1}}} 502141cc406Sopenharmony_ci }; 503141cc406Sopenharmony_ci 504141cc406Sopenharmony_ci SANE_Int a; 505141cc406Sopenharmony_ci SANE_Int count = sizeof(myreg) / sizeof(struct st_myreg); 506141cc406Sopenharmony_ci 507141cc406Sopenharmony_ci for (a = 0; a < count; a++) 508141cc406Sopenharmony_ci { 509141cc406Sopenharmony_ci if (RTS_Debug->dev_model == myreg[a].device) 510141cc406Sopenharmony_ci { 511141cc406Sopenharmony_ci memcpy(reg, &myreg[a].value, sizeof(struct st_buttons)); 512141cc406Sopenharmony_ci rst = OK; 513141cc406Sopenharmony_ci 514141cc406Sopenharmony_ci break; 515141cc406Sopenharmony_ci } 516141cc406Sopenharmony_ci } 517141cc406Sopenharmony_ci } 518141cc406Sopenharmony_ci 519141cc406Sopenharmony_ci return rst; 520141cc406Sopenharmony_ci} 521141cc406Sopenharmony_ci 522141cc406Sopenharmony_ci/** SEC: Spectrum clock generator ---------- */ 523141cc406Sopenharmony_ci 524141cc406Sopenharmony_cistatic SANE_Int cfg_sscg_get(SANE_Int *enable, SANE_Int *mode, SANE_Int *clock) 525141cc406Sopenharmony_ci{ 526141cc406Sopenharmony_ci SANE_Int rst = ERROR; 527141cc406Sopenharmony_ci 528141cc406Sopenharmony_ci if ((enable != NULL)&&(mode != NULL)&&(clock != NULL)) 529141cc406Sopenharmony_ci { 530141cc406Sopenharmony_ci struct st_myreg 531141cc406Sopenharmony_ci { 532141cc406Sopenharmony_ci SANE_Int device; 533141cc406Sopenharmony_ci SANE_Int value[3]; 534141cc406Sopenharmony_ci }; 535141cc406Sopenharmony_ci 536141cc406Sopenharmony_ci struct st_myreg myreg[] = 537141cc406Sopenharmony_ci { 538141cc406Sopenharmony_ci /*device, {enable, mode, clock} */ 539141cc406Sopenharmony_ci { BQ5550, {1 , 1, 1}}, 540141cc406Sopenharmony_ci { UA4900, {1 , 1, 0}}, 541141cc406Sopenharmony_ci { HP3800, {1 , 1, 0}}, 542141cc406Sopenharmony_ci {HPG2710, {1 , 1, 0}}, 543141cc406Sopenharmony_ci { HP3970, {1 , 1, 0}}, 544141cc406Sopenharmony_ci { HP4070, {1 , 1, 0}}, 545141cc406Sopenharmony_ci { HP4370, {1 , 1, 0}}, 546141cc406Sopenharmony_ci {HPG3010, {1 , 1, 0}}, 547141cc406Sopenharmony_ci {HPG3110, {1 , 1, 0}} 548141cc406Sopenharmony_ci }; 549141cc406Sopenharmony_ci 550141cc406Sopenharmony_ci SANE_Int a; 551141cc406Sopenharmony_ci SANE_Int count = sizeof(myreg) / sizeof(struct st_myreg); 552141cc406Sopenharmony_ci 553141cc406Sopenharmony_ci /* default values */ 554141cc406Sopenharmony_ci *enable = 0; 555141cc406Sopenharmony_ci *mode = 0; 556141cc406Sopenharmony_ci *clock = 3; 557141cc406Sopenharmony_ci 558141cc406Sopenharmony_ci for (a = 0; a < count; a++) 559141cc406Sopenharmony_ci { 560141cc406Sopenharmony_ci if (RTS_Debug->dev_model == myreg[a].device) 561141cc406Sopenharmony_ci { 562141cc406Sopenharmony_ci *enable = myreg[a].value[0]; 563141cc406Sopenharmony_ci *mode = myreg[a].value[1]; 564141cc406Sopenharmony_ci *clock = myreg[a].value[2]; 565141cc406Sopenharmony_ci rst = OK; 566141cc406Sopenharmony_ci 567141cc406Sopenharmony_ci break; 568141cc406Sopenharmony_ci } 569141cc406Sopenharmony_ci } 570141cc406Sopenharmony_ci } 571141cc406Sopenharmony_ci return rst; 572141cc406Sopenharmony_ci} 573141cc406Sopenharmony_ci 574141cc406Sopenharmony_ci/** SEC: Motors ---------- */ 575141cc406Sopenharmony_ci 576141cc406Sopenharmony_cistatic SANE_Int cfg_motor_get(struct st_motorcfg *reg) 577141cc406Sopenharmony_ci{ 578141cc406Sopenharmony_ci SANE_Int rst = ERROR; 579141cc406Sopenharmony_ci 580141cc406Sopenharmony_ci if (reg != NULL) 581141cc406Sopenharmony_ci { 582141cc406Sopenharmony_ci struct st_myreg 583141cc406Sopenharmony_ci { 584141cc406Sopenharmony_ci SANE_Int device; 585141cc406Sopenharmony_ci struct st_motorcfg motor; 586141cc406Sopenharmony_ci }; 587141cc406Sopenharmony_ci 588141cc406Sopenharmony_ci struct st_myreg myreg[] = 589141cc406Sopenharmony_ci { 590141cc406Sopenharmony_ci /*device, {type , res, freq, speed, basemove, highmove, parkmove, change}} */ 591141cc406Sopenharmony_ci { BQ5550, {MT_OUTPUTSTATE, 1200, 30, 800, 1, 0, 0, TRUE}}, 592141cc406Sopenharmony_ci { UA4900, {MT_OUTPUTSTATE, 2400, 30, 800, 1, 0, 0, TRUE}}, 593141cc406Sopenharmony_ci { HP3800, {MT_OUTPUTSTATE, 1200, 30, 800, 1, 0, 0, TRUE}}, 594141cc406Sopenharmony_ci {HPG2710, {MT_OUTPUTSTATE, 1200, 30, 800, 1, 0, 0, TRUE}}, 595141cc406Sopenharmony_ci { HP3970, {MT_OUTPUTSTATE, 2400, 30, 800, 1, 0, 0, TRUE}}, 596141cc406Sopenharmony_ci { HP4070, {MT_OUTPUTSTATE, 2400, 30, 800, 1, 0, 0, TRUE}}, 597141cc406Sopenharmony_ci { HP4370, {MT_OUTPUTSTATE, 2400, 30, 800, 1, 0, 0, TRUE}}, 598141cc406Sopenharmony_ci {HPG3010, {MT_OUTPUTSTATE, 2400, 30, 800, 1, 0, 0, TRUE}}, 599141cc406Sopenharmony_ci {HPG3110, {MT_OUTPUTSTATE, 2400, 30, 800, 1, 0, 0, TRUE}} 600141cc406Sopenharmony_ci }; 601141cc406Sopenharmony_ci 602141cc406Sopenharmony_ci SANE_Int a; 603141cc406Sopenharmony_ci SANE_Int count = sizeof(myreg) / sizeof(struct st_myreg); 604141cc406Sopenharmony_ci 605141cc406Sopenharmony_ci /* default values */ 606141cc406Sopenharmony_ci memset(reg, 0, sizeof(struct st_motorcfg)); 607141cc406Sopenharmony_ci reg->type = -1; 608141cc406Sopenharmony_ci 609141cc406Sopenharmony_ci for (a = 0; a < count; a++) 610141cc406Sopenharmony_ci { 611141cc406Sopenharmony_ci if (RTS_Debug->dev_model == myreg[a].device) 612141cc406Sopenharmony_ci { 613141cc406Sopenharmony_ci memcpy(reg, &myreg[a].motor, sizeof(struct st_motorcfg)); 614141cc406Sopenharmony_ci rst = OK; 615141cc406Sopenharmony_ci 616141cc406Sopenharmony_ci break; 617141cc406Sopenharmony_ci } 618141cc406Sopenharmony_ci } 619141cc406Sopenharmony_ci } 620141cc406Sopenharmony_ci 621141cc406Sopenharmony_ci return rst; 622141cc406Sopenharmony_ci} 623141cc406Sopenharmony_ci 624141cc406Sopenharmony_ci/** SEC: Sensors ---------- */ 625141cc406Sopenharmony_ci 626141cc406Sopenharmony_cistatic SANE_Int cfg_sensor_get(struct st_sensorcfg *reg) 627141cc406Sopenharmony_ci{ 628141cc406Sopenharmony_ci SANE_Int rst = ERROR; 629141cc406Sopenharmony_ci 630141cc406Sopenharmony_ci if (reg != NULL) 631141cc406Sopenharmony_ci { 632141cc406Sopenharmony_ci struct st_myreg 633141cc406Sopenharmony_ci { 634141cc406Sopenharmony_ci SANE_Int device; 635141cc406Sopenharmony_ci struct st_sensorcfg sensor; 636141cc406Sopenharmony_ci }; 637141cc406Sopenharmony_ci 638141cc406Sopenharmony_ci struct st_myreg myreg[] = 639141cc406Sopenharmony_ci { 640141cc406Sopenharmony_ci /*device, {type , name , resolution, {chnl_colors }, {chnl_gray }, {rgb_order }, line_dist, evenodd_dist} */ 641141cc406Sopenharmony_ci { BQ5550, {CCD_SENSOR, -1, 1200 , {CL_BLUE, CL_GREEN, CL_RED }, {CL_GREEN, 0}, {CL_BLUE, CL_GREEN, CL_RED }, 24 , 4 }}, 642141cc406Sopenharmony_ci { UA4900, {CIS_SENSOR, SNYS575, 2400 , {CL_RED , CL_GREEN, CL_BLUE}, {CL_RED , 0}, {CL_RED , CL_GREEN, CL_BLUE}, 24 , 0 }}, 643141cc406Sopenharmony_ci { HP3800, {CCD_SENSOR, TCD2905, 2400 , {CL_RED , CL_GREEN, CL_BLUE}, {CL_RED , 0}, {CL_RED , CL_GREEN, CL_BLUE}, 64 , 8 }}, 644141cc406Sopenharmony_ci {HPG2710, {CCD_SENSOR, TCD2905, 2400 , {CL_RED , CL_GREEN, CL_BLUE}, {CL_RED , 0}, {CL_RED , CL_GREEN, CL_BLUE}, 64 , 8 }}, 645141cc406Sopenharmony_ci { HP3970, {CCD_SENSOR, TCD2952, 2400 , {CL_RED , CL_GREEN, CL_BLUE}, {CL_RED , 0}, {CL_RED , CL_GREEN, CL_BLUE}, 24 , 4 }}, 646141cc406Sopenharmony_ci { HP4070, {CCD_SENSOR, TCD2952, 2400 , {CL_RED , CL_GREEN, CL_BLUE}, {CL_RED , 0}, {CL_RED , CL_GREEN, CL_BLUE}, 24 , 4 }}, 647141cc406Sopenharmony_ci { HP4370, {CCD_SENSOR, TCD2958, 4800 , {CL_RED , CL_GREEN, CL_BLUE}, {CL_RED , 0}, {CL_RED , CL_GREEN, CL_BLUE}, 128 , 6 }}, 648141cc406Sopenharmony_ci {HPG3010, {CCD_SENSOR, TCD2958, 4800 , {CL_RED , CL_GREEN, CL_BLUE}, {CL_RED , 0}, {CL_RED , CL_GREEN, CL_BLUE}, 128 , 6 }}, 649141cc406Sopenharmony_ci {HPG3110, {CCD_SENSOR, TCD2958, 4800 , {CL_RED , CL_GREEN, CL_BLUE}, {CL_RED , 0}, {CL_RED , CL_GREEN, CL_BLUE}, 128 , 6 }} 650141cc406Sopenharmony_ci }; 651141cc406Sopenharmony_ci 652141cc406Sopenharmony_ci SANE_Int a; 653141cc406Sopenharmony_ci SANE_Int count = sizeof(myreg) / sizeof(struct st_myreg); 654141cc406Sopenharmony_ci 655141cc406Sopenharmony_ci /* default values */ 656141cc406Sopenharmony_ci memset(reg, 0, sizeof(struct st_sensorcfg)); 657141cc406Sopenharmony_ci reg->type = -1; 658141cc406Sopenharmony_ci 659141cc406Sopenharmony_ci for (a = 0; a < count; a++) 660141cc406Sopenharmony_ci { 661141cc406Sopenharmony_ci if (RTS_Debug->dev_model == myreg[a].device) 662141cc406Sopenharmony_ci { 663141cc406Sopenharmony_ci memcpy(reg, &myreg[a].sensor, sizeof(struct st_sensorcfg)); 664141cc406Sopenharmony_ci rst = OK; 665141cc406Sopenharmony_ci 666141cc406Sopenharmony_ci break; 667141cc406Sopenharmony_ci } 668141cc406Sopenharmony_ci } 669141cc406Sopenharmony_ci } 670141cc406Sopenharmony_ci 671141cc406Sopenharmony_ci return rst; 672141cc406Sopenharmony_ci} 673141cc406Sopenharmony_ci 674141cc406Sopenharmony_ci/** SEC: Reference voltages ---------- */ 675141cc406Sopenharmony_ci 676141cc406Sopenharmony_cistatic void hp3800_refvoltages(SANE_Int usb, SANE_Int sensor, SANE_Byte *vrts, SANE_Byte *vrms, SANE_Byte *vrbs) 677141cc406Sopenharmony_ci{ 678141cc406Sopenharmony_ci /* this function returns top, middle and bottom reference voltages for each scanner */ 679141cc406Sopenharmony_ci struct st_reg 680141cc406Sopenharmony_ci { 681141cc406Sopenharmony_ci SANE_Int usb; 682141cc406Sopenharmony_ci SANE_Int sensor; 683141cc406Sopenharmony_ci SANE_Byte values[3]; 684141cc406Sopenharmony_ci }; 685141cc406Sopenharmony_ci 686141cc406Sopenharmony_ci struct st_reg myreg[] = 687141cc406Sopenharmony_ci { 688141cc406Sopenharmony_ci /* usb, sensor , {vrts, vrms, vrbs} */ 689141cc406Sopenharmony_ci {USB20, CCD_SENSOR, { 2, 3, 2}}, 690141cc406Sopenharmony_ci {USB11, CCD_SENSOR, { 2, 3, 2}}, 691141cc406Sopenharmony_ci }; 692141cc406Sopenharmony_ci 693141cc406Sopenharmony_ci if ((vrts != NULL)&&(vrms != NULL)&&(vrbs != NULL)) 694141cc406Sopenharmony_ci { 695141cc406Sopenharmony_ci SANE_Int a; 696141cc406Sopenharmony_ci SANE_Int count = sizeof(myreg) / sizeof(struct st_reg); 697141cc406Sopenharmony_ci 698141cc406Sopenharmony_ci *vrts = *vrms = *vrbs = 0; 699141cc406Sopenharmony_ci 700141cc406Sopenharmony_ci for (a = 0; a < count; a++) 701141cc406Sopenharmony_ci { 702141cc406Sopenharmony_ci if ((myreg[a].usb == usb)&&(myreg[a].sensor == sensor)) 703141cc406Sopenharmony_ci { 704141cc406Sopenharmony_ci *vrts = myreg[a].values[0]; 705141cc406Sopenharmony_ci *vrms = myreg[a].values[1]; 706141cc406Sopenharmony_ci *vrbs = myreg[a].values[2]; 707141cc406Sopenharmony_ci } 708141cc406Sopenharmony_ci } 709141cc406Sopenharmony_ci } 710141cc406Sopenharmony_ci} 711141cc406Sopenharmony_ci 712141cc406Sopenharmony_cistatic void hp3970_refvoltages(SANE_Int usb, SANE_Int sensor, SANE_Byte *vrts, SANE_Byte *vrms, SANE_Byte *vrbs) 713141cc406Sopenharmony_ci{ 714141cc406Sopenharmony_ci /* this function returns top, middle and bottom reference voltages for each scanner */ 715141cc406Sopenharmony_ci struct st_reg 716141cc406Sopenharmony_ci { 717141cc406Sopenharmony_ci SANE_Int usb; 718141cc406Sopenharmony_ci SANE_Int sensor; 719141cc406Sopenharmony_ci SANE_Byte values[3]; 720141cc406Sopenharmony_ci }; 721141cc406Sopenharmony_ci 722141cc406Sopenharmony_ci struct st_reg myreg[] = 723141cc406Sopenharmony_ci { 724141cc406Sopenharmony_ci /* usb, sensor , {vrts, vrms, vrbs} */ 725141cc406Sopenharmony_ci {USB20, CCD_SENSOR, { 0, 0, 0}}, 726141cc406Sopenharmony_ci {USB11, CCD_SENSOR, { 0, 0, 0}}, 727141cc406Sopenharmony_ci {USB20, CIS_SENSOR, { 0, 0, 0}}, 728141cc406Sopenharmony_ci {USB11, CIS_SENSOR, { 0, 0, 0}} 729141cc406Sopenharmony_ci }; 730141cc406Sopenharmony_ci 731141cc406Sopenharmony_ci if ((vrts != NULL)&&(vrms != NULL)&&(vrbs != NULL)) 732141cc406Sopenharmony_ci { 733141cc406Sopenharmony_ci SANE_Int a; 734141cc406Sopenharmony_ci SANE_Int count = sizeof(myreg) / sizeof(struct st_reg); 735141cc406Sopenharmony_ci 736141cc406Sopenharmony_ci *vrts = *vrms = *vrbs = 0; 737141cc406Sopenharmony_ci 738141cc406Sopenharmony_ci for (a = 0; a < count; a++) 739141cc406Sopenharmony_ci { 740141cc406Sopenharmony_ci if ((myreg[a].usb == usb)&&(myreg[a].sensor == sensor)) 741141cc406Sopenharmony_ci { 742141cc406Sopenharmony_ci *vrts = myreg[a].values[0]; 743141cc406Sopenharmony_ci *vrms = myreg[a].values[1]; 744141cc406Sopenharmony_ci *vrbs = myreg[a].values[2]; 745141cc406Sopenharmony_ci } 746141cc406Sopenharmony_ci } 747141cc406Sopenharmony_ci } 748141cc406Sopenharmony_ci} 749141cc406Sopenharmony_ci 750141cc406Sopenharmony_cistatic void cfg_refvoltages_get(SANE_Int sensortype, SANE_Byte *vrts, SANE_Byte *vrms, SANE_Byte *vrbs) 751141cc406Sopenharmony_ci{ 752141cc406Sopenharmony_ci /* this function returns top, middle and bottom reference voltages for each scanner */ 753141cc406Sopenharmony_ci switch(RTS_Debug->dev_model) 754141cc406Sopenharmony_ci { 755141cc406Sopenharmony_ci case HP3800: 756141cc406Sopenharmony_ci case HPG2710: 757141cc406Sopenharmony_ci hp3800_refvoltages(RTS_Debug->usbtype, sensortype, vrts, vrms, vrbs); 758141cc406Sopenharmony_ci break; 759141cc406Sopenharmony_ci default: 760141cc406Sopenharmony_ci /* at this momment all analyzed scanners have the same values */ 761141cc406Sopenharmony_ci hp3970_refvoltages(RTS_Debug->usbtype, sensortype, vrts, vrms, vrbs); 762141cc406Sopenharmony_ci break; 763141cc406Sopenharmony_ci } 764141cc406Sopenharmony_ci} 765141cc406Sopenharmony_ci 766141cc406Sopenharmony_ci/** SEC: Calibration Offset ---------- */ 767141cc406Sopenharmony_ci 768141cc406Sopenharmony_cistatic void hp3800_offset(SANE_Int resolution, SANE_Int scantype, SANE_Int *left, SANE_Int *width) 769141cc406Sopenharmony_ci{ 770141cc406Sopenharmony_ci /* this function provides left coordinate and width to calculate offset 771141cc406Sopenharmony_ci Sensor = Toshiba T2905 772141cc406Sopenharmony_ci */ 773141cc406Sopenharmony_ci 774141cc406Sopenharmony_ci struct st_ofst 775141cc406Sopenharmony_ci { 776141cc406Sopenharmony_ci SANE_Int left; 777141cc406Sopenharmony_ci SANE_Int width; 778141cc406Sopenharmony_ci }; 779141cc406Sopenharmony_ci 780141cc406Sopenharmony_ci struct st_reg 781141cc406Sopenharmony_ci { 782141cc406Sopenharmony_ci SANE_Int resolution; 783141cc406Sopenharmony_ci struct st_ofst values[3]; 784141cc406Sopenharmony_ci }; 785141cc406Sopenharmony_ci 786141cc406Sopenharmony_ci struct st_reg myreg[] = 787141cc406Sopenharmony_ci { 788141cc406Sopenharmony_ci /*res , {ref(L,W), tma(L,W), neg(L,W)} */ 789141cc406Sopenharmony_ci { 2400, {{15, 20}, {15, 20}, {15, 20}}}, 790141cc406Sopenharmony_ci { 1200, {{10, 10}, {10, 10}, {10, 10}}}, 791141cc406Sopenharmony_ci { 600, {{ 2, 10}, { 5, 10}, { 5, 10}}}, 792141cc406Sopenharmony_ci { 300, {{ 1, 5}, { 1, 5}, { 1, 5}}}, 793141cc406Sopenharmony_ci { 150, {{ 0, 3}, { 0, 3}, { 0, 3}}} 794141cc406Sopenharmony_ci }; 795141cc406Sopenharmony_ci 796141cc406Sopenharmony_ci if ((left != NULL)&&(width != NULL)) 797141cc406Sopenharmony_ci { 798141cc406Sopenharmony_ci SANE_Int a; 799141cc406Sopenharmony_ci SANE_Int count = sizeof(myreg) / sizeof(struct st_reg); 800141cc406Sopenharmony_ci 801141cc406Sopenharmony_ci for (a = 0; a < count; a++) 802141cc406Sopenharmony_ci { 803141cc406Sopenharmony_ci if (myreg[a].resolution == resolution) 804141cc406Sopenharmony_ci { 805141cc406Sopenharmony_ci scantype--; 806141cc406Sopenharmony_ci 807141cc406Sopenharmony_ci *left = myreg[a].values[scantype].left; 808141cc406Sopenharmony_ci *width = myreg[a].values[scantype].width; 809141cc406Sopenharmony_ci 810141cc406Sopenharmony_ci break; 811141cc406Sopenharmony_ci } 812141cc406Sopenharmony_ci } 813141cc406Sopenharmony_ci } 814141cc406Sopenharmony_ci} 815141cc406Sopenharmony_ci 816141cc406Sopenharmony_cistatic void hp3970_offset(SANE_Int sensor, SANE_Int resolution, SANE_Int scantype, SANE_Int *left, SANE_Int *width) 817141cc406Sopenharmony_ci{ 818141cc406Sopenharmony_ci /* this function provides left coordinate and width to calculate offset */ 819141cc406Sopenharmony_ci 820141cc406Sopenharmony_ci struct st_ofst 821141cc406Sopenharmony_ci { 822141cc406Sopenharmony_ci SANE_Int left; 823141cc406Sopenharmony_ci SANE_Int width; 824141cc406Sopenharmony_ci }; 825141cc406Sopenharmony_ci 826141cc406Sopenharmony_ci struct st_reg 827141cc406Sopenharmony_ci { 828141cc406Sopenharmony_ci SANE_Int sensor; 829141cc406Sopenharmony_ci SANE_Int resolution; 830141cc406Sopenharmony_ci struct st_ofst values[3]; 831141cc406Sopenharmony_ci }; 832141cc406Sopenharmony_ci 833141cc406Sopenharmony_ci struct st_reg myreg[] = 834141cc406Sopenharmony_ci { 835141cc406Sopenharmony_ci /* sensor , res , {ref(L,W), tma(L,W), neg(L,W)} */ 836141cc406Sopenharmony_ci {CCD_SENSOR, 2400, {{16, 20}, {16, 20}, {16, 20}}}, 837141cc406Sopenharmony_ci {CCD_SENSOR, 1200, {{16, 10}, {16, 10}, {16, 10}}}, 838141cc406Sopenharmony_ci {CCD_SENSOR, 600, {{15, 10}, {15, 10}, {15, 10}}}, 839141cc406Sopenharmony_ci {CCD_SENSOR, 300, {{ 7, 5}, { 7, 5}, { 7, 5}}}, 840141cc406Sopenharmony_ci {CCD_SENSOR, 200, {{ 7, 3}, { 7, 3}, { 7, 3}}}, 841141cc406Sopenharmony_ci {CCD_SENSOR, 100, {{ 3, 3}, { 3, 3}, { 3, 3}}}, 842141cc406Sopenharmony_ci 843141cc406Sopenharmony_ci /* sensor , res , {ref(L,W), tma(L,W), neg(L,W)} */ 844141cc406Sopenharmony_ci {CIS_SENSOR, 2400, {{84, 20}, {84, 20}, {84, 20}}}, 845141cc406Sopenharmony_ci {CIS_SENSOR, 1200, {{54, 10}, {54, 10}, {54, 10}}}, 846141cc406Sopenharmony_ci {CIS_SENSOR, 600, {{28, 10}, {28, 10}, {28, 10}}}, 847141cc406Sopenharmony_ci {CIS_SENSOR, 300, {{15, 5}, {15, 5}, {15, 5}}}, 848141cc406Sopenharmony_ci {CIS_SENSOR, 200, {{ 5, 3}, { 5, 3}, { 5, 3}}}, 849141cc406Sopenharmony_ci {CIS_SENSOR, 100, {{ 2, 3}, { 2, 3}, { 2, 3}}} 850141cc406Sopenharmony_ci }; 851141cc406Sopenharmony_ci 852141cc406Sopenharmony_ci if ((left != NULL)&&(width != NULL)) 853141cc406Sopenharmony_ci { 854141cc406Sopenharmony_ci SANE_Int a; 855141cc406Sopenharmony_ci SANE_Int count = sizeof(myreg) / sizeof(struct st_reg); 856141cc406Sopenharmony_ci 857141cc406Sopenharmony_ci for (a = 0; a < count; a++) 858141cc406Sopenharmony_ci { 859141cc406Sopenharmony_ci if ((myreg[a].sensor == sensor)&&(myreg[a].resolution == resolution)) 860141cc406Sopenharmony_ci { 861141cc406Sopenharmony_ci scantype--; 862141cc406Sopenharmony_ci 863141cc406Sopenharmony_ci *left = myreg[a].values[scantype].left; 864141cc406Sopenharmony_ci *width = myreg[a].values[scantype].width; 865141cc406Sopenharmony_ci 866141cc406Sopenharmony_ci break; 867141cc406Sopenharmony_ci } 868141cc406Sopenharmony_ci } 869141cc406Sopenharmony_ci } 870141cc406Sopenharmony_ci} 871141cc406Sopenharmony_ci 872141cc406Sopenharmony_cistatic void hp4370_offset(SANE_Int resolution, SANE_Int scantype, SANE_Int *left, SANE_Int *width) 873141cc406Sopenharmony_ci{ 874141cc406Sopenharmony_ci /* this function provides left coordinate and width to calculate offset */ 875141cc406Sopenharmony_ci 876141cc406Sopenharmony_ci struct st_ofst 877141cc406Sopenharmony_ci { 878141cc406Sopenharmony_ci SANE_Int left; 879141cc406Sopenharmony_ci SANE_Int width; 880141cc406Sopenharmony_ci }; 881141cc406Sopenharmony_ci 882141cc406Sopenharmony_ci struct st_reg 883141cc406Sopenharmony_ci { 884141cc406Sopenharmony_ci SANE_Int resolution; 885141cc406Sopenharmony_ci struct st_ofst values[3]; 886141cc406Sopenharmony_ci }; 887141cc406Sopenharmony_ci 888141cc406Sopenharmony_ci struct st_reg myreg[] = 889141cc406Sopenharmony_ci { 890141cc406Sopenharmony_ci /* res, {ref(L,W), tma(L,W), neg(L,W)} */ 891141cc406Sopenharmony_ci { 4800, {{42, 20}, {42, 20}, {52, 26}}}, 892141cc406Sopenharmony_ci { 2400, {{14, 20}, {14, 20}, {14, 26}}}, 893141cc406Sopenharmony_ci { 1200, {{ 8, 14}, { 8, 14}, { 8, 14}}}, 894141cc406Sopenharmony_ci { 600, {{ 4, 8}, { 4, 8}, { 4, 8}}}, 895141cc406Sopenharmony_ci { 300, {{ 2, 4}, { 2, 4}, { 2, 4}}}, 896141cc406Sopenharmony_ci { 150, {{ 1, 2}, { 1, 2}, { 1, 2}}} 897141cc406Sopenharmony_ci }; 898141cc406Sopenharmony_ci 899141cc406Sopenharmony_ci if ((left != NULL)&&(width != NULL)) 900141cc406Sopenharmony_ci { 901141cc406Sopenharmony_ci SANE_Int a; 902141cc406Sopenharmony_ci SANE_Int count = sizeof(myreg) / sizeof(struct st_reg); 903141cc406Sopenharmony_ci 904141cc406Sopenharmony_ci for (a = 0; a < count; a++) 905141cc406Sopenharmony_ci { 906141cc406Sopenharmony_ci if (myreg[a].resolution == resolution) 907141cc406Sopenharmony_ci { 908141cc406Sopenharmony_ci scantype--; 909141cc406Sopenharmony_ci 910141cc406Sopenharmony_ci *left = myreg[a].values[scantype].left; 911141cc406Sopenharmony_ci *width = myreg[a].values[scantype].width; 912141cc406Sopenharmony_ci 913141cc406Sopenharmony_ci break; 914141cc406Sopenharmony_ci } 915141cc406Sopenharmony_ci } 916141cc406Sopenharmony_ci } 917141cc406Sopenharmony_ci} 918141cc406Sopenharmony_ci 919141cc406Sopenharmony_cistatic void ua4900_offset(SANE_Int resolution, SANE_Int scantype, SANE_Int *left, SANE_Int *width) 920141cc406Sopenharmony_ci{ 921141cc406Sopenharmony_ci /* this function provides left coordinate and width to calculate offset */ 922141cc406Sopenharmony_ci 923141cc406Sopenharmony_ci struct st_ofst 924141cc406Sopenharmony_ci { 925141cc406Sopenharmony_ci SANE_Int left; 926141cc406Sopenharmony_ci SANE_Int width; 927141cc406Sopenharmony_ci }; 928141cc406Sopenharmony_ci 929141cc406Sopenharmony_ci struct st_reg 930141cc406Sopenharmony_ci { 931141cc406Sopenharmony_ci SANE_Int resolution; 932141cc406Sopenharmony_ci struct st_ofst values[3]; 933141cc406Sopenharmony_ci }; 934141cc406Sopenharmony_ci 935141cc406Sopenharmony_ci struct st_reg myreg[] = 936141cc406Sopenharmony_ci { 937141cc406Sopenharmony_ci /* res , {ref(L,W), tma(L,W), neg(L,W)} */ 938141cc406Sopenharmony_ci { 2400, {{20, 20}, {16, 20}, {16, 20}}}, 939141cc406Sopenharmony_ci { 1200, {{20, 10}, {10, 10}, {10, 10}}}, 940141cc406Sopenharmony_ci { 600, {{ 7, 10}, {15, 10}, {15, 10}}}, 941141cc406Sopenharmony_ci { 300, {{ 5, 10}, { 7, 8}, { 7, 8}}}, 942141cc406Sopenharmony_ci { 200, {{ 2, 10}, { 7, 6}, { 7, 6}}}, 943141cc406Sopenharmony_ci { 100, {{ 0, 10}, { 3, 4}, { 3, 4}}} 944141cc406Sopenharmony_ci }; 945141cc406Sopenharmony_ci 946141cc406Sopenharmony_ci if ((left != NULL)&&(width != NULL)) 947141cc406Sopenharmony_ci { 948141cc406Sopenharmony_ci SANE_Int a; 949141cc406Sopenharmony_ci SANE_Int count = sizeof(myreg) / sizeof(struct st_reg); 950141cc406Sopenharmony_ci 951141cc406Sopenharmony_ci for (a = 0; a < count; a++) 952141cc406Sopenharmony_ci { 953141cc406Sopenharmony_ci if (myreg[a].resolution == resolution) 954141cc406Sopenharmony_ci { 955141cc406Sopenharmony_ci scantype--; 956141cc406Sopenharmony_ci 957141cc406Sopenharmony_ci *left = myreg[a].values[scantype].left; 958141cc406Sopenharmony_ci *width = myreg[a].values[scantype].width; 959141cc406Sopenharmony_ci 960141cc406Sopenharmony_ci break; 961141cc406Sopenharmony_ci } 962141cc406Sopenharmony_ci } 963141cc406Sopenharmony_ci } 964141cc406Sopenharmony_ci} 965141cc406Sopenharmony_ci 966141cc406Sopenharmony_cistatic void cfg_offset_get(SANE_Int sensortype, SANE_Int resolution, SANE_Int scantype, SANE_Int *left, SANE_Int *width) 967141cc406Sopenharmony_ci{ 968141cc406Sopenharmony_ci switch(RTS_Debug->dev_model) 969141cc406Sopenharmony_ci { 970141cc406Sopenharmony_ci case UA4900: 971141cc406Sopenharmony_ci ua4900_offset(resolution, scantype, left, width); 972141cc406Sopenharmony_ci break; 973141cc406Sopenharmony_ci 974141cc406Sopenharmony_ci case HP3800: 975141cc406Sopenharmony_ci case HPG2710: 976141cc406Sopenharmony_ci hp3800_offset(resolution, scantype, left, width); 977141cc406Sopenharmony_ci break; 978141cc406Sopenharmony_ci 979141cc406Sopenharmony_ci case HPG3010: 980141cc406Sopenharmony_ci case HPG3110: 981141cc406Sopenharmony_ci case HP4370: 982141cc406Sopenharmony_ci hp4370_offset(resolution, scantype, left, width); 983141cc406Sopenharmony_ci break; 984141cc406Sopenharmony_ci 985141cc406Sopenharmony_ci default: 986141cc406Sopenharmony_ci hp3970_offset(sensortype, resolution, scantype, left, width); 987141cc406Sopenharmony_ci break; 988141cc406Sopenharmony_ci } 989141cc406Sopenharmony_ci} 990141cc406Sopenharmony_ci 991141cc406Sopenharmony_ci/** SEC: Device constraints ---------- */ 992141cc406Sopenharmony_ci 993141cc406Sopenharmony_cistatic SANE_Int cfg_constrains_get(struct st_constrains *constrain) 994141cc406Sopenharmony_ci{ 995141cc406Sopenharmony_ci SANE_Int rst = ERROR; 996141cc406Sopenharmony_ci 997141cc406Sopenharmony_ci struct st_reg 998141cc406Sopenharmony_ci { 999141cc406Sopenharmony_ci SANE_Int device; 1000141cc406Sopenharmony_ci struct st_constrains constrain; 1001141cc406Sopenharmony_ci }; 1002141cc406Sopenharmony_ci 1003141cc406Sopenharmony_ci struct st_reg reg[] = 1004141cc406Sopenharmony_ci { 1005141cc406Sopenharmony_ci /* constraints are set in millimeters */ 1006141cc406Sopenharmony_ci /*device , reflective , negative , transparent */ 1007141cc406Sopenharmony_ci /* , {{left, width, top, height}, {left, width, top, height}, {left, width, top, height}}}, */ 1008141cc406Sopenharmony_ci { BQ5550 , {{ 0, 220, 0, 300}, { 88, 42, 0, 83}, { 88, 42, 0, 83}}}, 1009141cc406Sopenharmony_ci { HP3800 , {{ 0, 220, 0, 300}, { 89, 45, 0, 85}, { 89, 45, 0, 100}}}, 1010141cc406Sopenharmony_ci {HPG2710 , {{ 0, 220, 0, 300}, { 89, 45, 0, 85}, { 89, 45, 0, 100}}}, 1011141cc406Sopenharmony_ci { HP3970 , {{ 0, 220, 0, 300}, { 88, 42, 0, 83}, { 88, 42, 0, 83}}}, 1012141cc406Sopenharmony_ci { HP4070 , {{ 0, 220, 0, 300}, { 58, 99, 0, 197}, { 58, 99, 0, 197}}}, 1013141cc406Sopenharmony_ci { HP4370 , {{ 0, 220, 0, 300}, { 90, 45, 0, 85}, { 90, 45, 0, 100}}}, 1014141cc406Sopenharmony_ci { UA4900 , {{ 0, 220, 0, 300}, { 88, 42, 0, 83}, { 88, 42, 0, 83}}}, 1015141cc406Sopenharmony_ci {HPG3010 , {{ 0, 220, 0, 300}, { 90, 45, 0, 85}, { 89, 45, 0, 100}}}, 1016141cc406Sopenharmony_ci {HPG3110 , {{ 0, 220, 0, 300}, { 92, 28, 0, 190}, { 85, 44, 0, 190}}} 1017141cc406Sopenharmony_ci }; 1018141cc406Sopenharmony_ci 1019141cc406Sopenharmony_ci if (constrain != NULL) 1020141cc406Sopenharmony_ci { 1021141cc406Sopenharmony_ci SANE_Int a; 1022141cc406Sopenharmony_ci SANE_Int count = sizeof(reg) / sizeof(struct st_reg); 1023141cc406Sopenharmony_ci 1024141cc406Sopenharmony_ci for (a = 0; a < count; a++) 1025141cc406Sopenharmony_ci { 1026141cc406Sopenharmony_ci if (reg[a].device == RTS_Debug->dev_model) 1027141cc406Sopenharmony_ci { 1028141cc406Sopenharmony_ci memcpy(constrain, ®[a].constrain, sizeof(struct st_constrains)); 1029141cc406Sopenharmony_ci rst = OK; 1030141cc406Sopenharmony_ci break; 1031141cc406Sopenharmony_ci } 1032141cc406Sopenharmony_ci } 1033141cc406Sopenharmony_ci } 1034141cc406Sopenharmony_ci 1035141cc406Sopenharmony_ci return rst; 1036141cc406Sopenharmony_ci} 1037141cc406Sopenharmony_ci 1038141cc406Sopenharmony_ci/** SEC: Motor resource ------------------- */ 1039141cc406Sopenharmony_cistatic SANE_Byte *cfg_motor_resource_get(SANE_Byte *size) 1040141cc406Sopenharmony_ci{ 1041141cc406Sopenharmony_ci /* this function returns the proper motor resources for a given device */ 1042141cc406Sopenharmony_ci SANE_Byte *rst = NULL; 1043141cc406Sopenharmony_ci 1044141cc406Sopenharmony_ci /* Until now, resource size is always 32 bytes */ 1045141cc406Sopenharmony_ci rst = (SANE_Byte *)malloc(sizeof(SANE_Byte) * 32); 1046141cc406Sopenharmony_ci if (size != NULL) 1047141cc406Sopenharmony_ci *size = 0; 1048141cc406Sopenharmony_ci 1049141cc406Sopenharmony_ci if (rst != NULL) 1050141cc406Sopenharmony_ci { 1051141cc406Sopenharmony_ci memset(rst, 0, sizeof(SANE_Byte) * 32); 1052141cc406Sopenharmony_ci 1053141cc406Sopenharmony_ci switch(RTS_Debug->dev_model) 1054141cc406Sopenharmony_ci { 1055141cc406Sopenharmony_ci case BQ5550: 1056141cc406Sopenharmony_ci { 1057141cc406Sopenharmony_ci SANE_Byte Resource[] = {0xff, 0xb4, 0xb0, 0xd4, 0xd0, 0x70, 0x50, 0x54, 0x30, 0x34, 0x14, 0x38, 0x18, 0x0c, 0x08, 0x28, 0x04, 0x24, 0x20, 0x44, 0x40, 0xe0, 0xc0, 0xc4, 0xa0, 0xa4, 0x84, 0xa8, 0x88, 0x9c, 0x98, 0xb8}; 1058141cc406Sopenharmony_ci memcpy(rst, &Resource, sizeof(SANE_Byte) * 32); 1059141cc406Sopenharmony_ci if (size != NULL) 1060141cc406Sopenharmony_ci *size = 32; 1061141cc406Sopenharmony_ci } 1062141cc406Sopenharmony_ci break; 1063141cc406Sopenharmony_ci default: 1064141cc406Sopenharmony_ci { 1065141cc406Sopenharmony_ci SANE_Byte Resource[] = {0xff, 0x90, 0xb0, 0xd4, 0xd0, 0x70, 0x50, 0x54, 0x30, 0x10, 0x14, 0x38, 0x18, 0x0c, 0x08, 0x28, 0x04, 0x00, 0x20, 0x44, 0x40, 0xe0, 0xc0, 0xc4, 0xa0, 0x80, 0x84, 0xa8, 0x88, 0x9c, 0x98, 0xb8}; 1066141cc406Sopenharmony_ci memcpy(rst, &Resource, sizeof(SANE_Byte) * 32); 1067141cc406Sopenharmony_ci if (size != NULL) 1068141cc406Sopenharmony_ci *size = 32; 1069141cc406Sopenharmony_ci } 1070141cc406Sopenharmony_ci break; 1071141cc406Sopenharmony_ci } 1072141cc406Sopenharmony_ci } 1073141cc406Sopenharmony_ci 1074141cc406Sopenharmony_ci return rst; 1075141cc406Sopenharmony_ci} 1076141cc406Sopenharmony_ci 1077141cc406Sopenharmony_ci/** SEC: Auto reference position ---------- */ 1078141cc406Sopenharmony_ci 1079141cc406Sopenharmony_cistatic void cfg_autoref_get(struct st_autoref *reg) 1080141cc406Sopenharmony_ci{ 1081141cc406Sopenharmony_ci if (reg != NULL) 1082141cc406Sopenharmony_ci { 1083141cc406Sopenharmony_ci struct st_reg 1084141cc406Sopenharmony_ci { 1085141cc406Sopenharmony_ci SANE_Int device; 1086141cc406Sopenharmony_ci struct st_autoref value; 1087141cc406Sopenharmony_ci }; 1088141cc406Sopenharmony_ci 1089141cc406Sopenharmony_ci struct st_reg myreg[] = 1090141cc406Sopenharmony_ci { 1091141cc406Sopenharmony_ci /* x and y offsets are based on 2400 dpi */ 1092141cc406Sopenharmony_ci /* device, { type , x , y , resolution, extern_boundary}*/ 1093141cc406Sopenharmony_ci { BQ5550 , {REF_NONE , -40, -40, 600 , 40}}, 1094141cc406Sopenharmony_ci { UA4900 , {REF_NONE , -40, -40, 600 , 40}}, 1095141cc406Sopenharmony_ci { HP3800 , {REF_TAKEFROMSCANNER, 88, 624, 600 , 40}}, 1096141cc406Sopenharmony_ci {HPG2710 , {REF_TAKEFROMSCANNER, 88, 624, 600 , 40}}, 1097141cc406Sopenharmony_ci { HP3970 , {REF_TAKEFROMSCANNER, 88, 717, 600 , 40}}, 1098141cc406Sopenharmony_ci { HP4070 , {REF_TAKEFROMSCANNER, 88, 717, 600 , 40}}, 1099141cc406Sopenharmony_ci { HP4370 , {REF_TAKEFROMSCANNER, 88, 717, 600 , 40}}, 1100141cc406Sopenharmony_ci {HPG3010 , {REF_TAKEFROMSCANNER, 88, 717, 600 , 40}}, 1101141cc406Sopenharmony_ci {HPG3110 , {REF_TAKEFROMSCANNER, 88, 717, 600 , 40}} 1102141cc406Sopenharmony_ci }; 1103141cc406Sopenharmony_ci 1104141cc406Sopenharmony_ci SANE_Int a; 1105141cc406Sopenharmony_ci SANE_Int count = sizeof(myreg) / sizeof(struct st_reg); 1106141cc406Sopenharmony_ci 1107141cc406Sopenharmony_ci for (a = 0; a < count; a++) 1108141cc406Sopenharmony_ci { 1109141cc406Sopenharmony_ci if (myreg[a].device == RTS_Debug->dev_model) 1110141cc406Sopenharmony_ci { 1111141cc406Sopenharmony_ci memcpy(reg, &myreg[a].value, sizeof(struct st_autoref)); 1112141cc406Sopenharmony_ci break; 1113141cc406Sopenharmony_ci } 1114141cc406Sopenharmony_ci } 1115141cc406Sopenharmony_ci } 1116141cc406Sopenharmony_ci} 1117141cc406Sopenharmony_ci 1118141cc406Sopenharmony_cistatic SANE_Int hp3800_effectivepixel(SANE_Int resolution) 1119141cc406Sopenharmony_ci{ 1120141cc406Sopenharmony_ci struct st_reg 1121141cc406Sopenharmony_ci { 1122141cc406Sopenharmony_ci SANE_Int resolution; 1123141cc406Sopenharmony_ci SANE_Int pixel; 1124141cc406Sopenharmony_ci }; 1125141cc406Sopenharmony_ci 1126141cc406Sopenharmony_ci struct st_reg reg[] = 1127141cc406Sopenharmony_ci { 1128141cc406Sopenharmony_ci /* res , pixel */ 1129141cc406Sopenharmony_ci { 2400, 134 }, 1130141cc406Sopenharmony_ci { 1200, 134 }, 1131141cc406Sopenharmony_ci { 600, 230 }, 1132141cc406Sopenharmony_ci { 300, 172 }, 1133141cc406Sopenharmony_ci { 200, 230 }, 1134141cc406Sopenharmony_ci { 100, 230 } 1135141cc406Sopenharmony_ci }; 1136141cc406Sopenharmony_ci 1137141cc406Sopenharmony_ci SANE_Int a; 1138141cc406Sopenharmony_ci SANE_Int count = sizeof(reg) / sizeof(struct st_reg); 1139141cc406Sopenharmony_ci SANE_Int rst = 230; /* default */ 1140141cc406Sopenharmony_ci 1141141cc406Sopenharmony_ci for (a = 0; a < count; a++) 1142141cc406Sopenharmony_ci { 1143141cc406Sopenharmony_ci if (reg[a].resolution == resolution) 1144141cc406Sopenharmony_ci { 1145141cc406Sopenharmony_ci rst = reg[a].pixel; 1146141cc406Sopenharmony_ci break; 1147141cc406Sopenharmony_ci } 1148141cc406Sopenharmony_ci } 1149141cc406Sopenharmony_ci 1150141cc406Sopenharmony_ci return rst; 1151141cc406Sopenharmony_ci} 1152141cc406Sopenharmony_ci 1153141cc406Sopenharmony_cistatic SANE_Int hp3970_effectivepixel(SANE_Int sensor, SANE_Int resolution) 1154141cc406Sopenharmony_ci{ 1155141cc406Sopenharmony_ci struct st_reg 1156141cc406Sopenharmony_ci { 1157141cc406Sopenharmony_ci SANE_Int resolution; 1158141cc406Sopenharmony_ci SANE_Int pixel[2]; 1159141cc406Sopenharmony_ci }; 1160141cc406Sopenharmony_ci 1161141cc406Sopenharmony_ci struct st_reg reg[] = 1162141cc406Sopenharmony_ci { 1163141cc406Sopenharmony_ci /* res , {Toshiba, sony}} */ 1164141cc406Sopenharmony_ci { 2400, {134 , 218 }}, 1165141cc406Sopenharmony_ci { 1200, {134 , 240 }}, 1166141cc406Sopenharmony_ci { 600, {230 , 242 }}, 1167141cc406Sopenharmony_ci { 300, {160 , 172 }}, 1168141cc406Sopenharmony_ci { 200, {230 , 242 }}, 1169141cc406Sopenharmony_ci { 100, {230 , 242 }} 1170141cc406Sopenharmony_ci }; 1171141cc406Sopenharmony_ci 1172141cc406Sopenharmony_ci SANE_Int a; 1173141cc406Sopenharmony_ci SANE_Int count = sizeof(reg) / sizeof(struct st_reg); 1174141cc406Sopenharmony_ci SANE_Int rst = 230; /* default */ 1175141cc406Sopenharmony_ci 1176141cc406Sopenharmony_ci for (a = 0; a < count; a++) 1177141cc406Sopenharmony_ci { 1178141cc406Sopenharmony_ci if (reg[a].resolution == resolution) 1179141cc406Sopenharmony_ci { 1180141cc406Sopenharmony_ci rst = (sensor == CCD_SENSOR)? reg[a].pixel[0] : reg[a].pixel[1]; 1181141cc406Sopenharmony_ci break; 1182141cc406Sopenharmony_ci } 1183141cc406Sopenharmony_ci } 1184141cc406Sopenharmony_ci 1185141cc406Sopenharmony_ci return rst; 1186141cc406Sopenharmony_ci} 1187141cc406Sopenharmony_ci 1188141cc406Sopenharmony_cistatic SANE_Int hp4370_effectivepixel(SANE_Int resolution) 1189141cc406Sopenharmony_ci{ 1190141cc406Sopenharmony_ci struct st_reg 1191141cc406Sopenharmony_ci { 1192141cc406Sopenharmony_ci SANE_Int resolution; 1193141cc406Sopenharmony_ci SANE_Int pixel; 1194141cc406Sopenharmony_ci }; 1195141cc406Sopenharmony_ci 1196141cc406Sopenharmony_ci struct st_reg reg[] = 1197141cc406Sopenharmony_ci { 1198141cc406Sopenharmony_ci /* res , pxl */ 1199141cc406Sopenharmony_ci { 4800, 134}, 1200141cc406Sopenharmony_ci { 2400, 134}, 1201141cc406Sopenharmony_ci { 1200, 134}, 1202141cc406Sopenharmony_ci { 600, 230}, 1203141cc406Sopenharmony_ci { 300, 230}, 1204141cc406Sopenharmony_ci { 150, 230} 1205141cc406Sopenharmony_ci }; 1206141cc406Sopenharmony_ci 1207141cc406Sopenharmony_ci SANE_Int a; 1208141cc406Sopenharmony_ci SANE_Int count = sizeof(reg) / sizeof(struct st_reg); 1209141cc406Sopenharmony_ci SANE_Int rst = 230; /* default */ 1210141cc406Sopenharmony_ci 1211141cc406Sopenharmony_ci for (a = 0; a < count; a++) 1212141cc406Sopenharmony_ci { 1213141cc406Sopenharmony_ci if (reg[a].resolution == resolution) 1214141cc406Sopenharmony_ci { 1215141cc406Sopenharmony_ci rst = reg[a].pixel; 1216141cc406Sopenharmony_ci break; 1217141cc406Sopenharmony_ci } 1218141cc406Sopenharmony_ci } 1219141cc406Sopenharmony_ci 1220141cc406Sopenharmony_ci return rst; 1221141cc406Sopenharmony_ci} 1222141cc406Sopenharmony_ci 1223141cc406Sopenharmony_cistatic SANE_Int ua4900_effectivepixel(SANE_Int resolution) 1224141cc406Sopenharmony_ci{ 1225141cc406Sopenharmony_ci struct st_reg 1226141cc406Sopenharmony_ci { 1227141cc406Sopenharmony_ci SANE_Int resolution; 1228141cc406Sopenharmony_ci SANE_Int pixel; 1229141cc406Sopenharmony_ci }; 1230141cc406Sopenharmony_ci 1231141cc406Sopenharmony_ci struct st_reg reg[] = 1232141cc406Sopenharmony_ci { 1233141cc406Sopenharmony_ci /* res , pixel */ 1234141cc406Sopenharmony_ci { 2400, 134 }, 1235141cc406Sopenharmony_ci { 1200, 134 }, 1236141cc406Sopenharmony_ci { 600, 230 }, 1237141cc406Sopenharmony_ci { 300, 172 }, 1238141cc406Sopenharmony_ci { 200, 230 }, 1239141cc406Sopenharmony_ci { 100, 230 } 1240141cc406Sopenharmony_ci }; 1241141cc406Sopenharmony_ci 1242141cc406Sopenharmony_ci SANE_Int a; 1243141cc406Sopenharmony_ci SANE_Int count = sizeof(reg) / sizeof(struct st_reg); 1244141cc406Sopenharmony_ci SANE_Int rst = 230; /* default */ 1245141cc406Sopenharmony_ci 1246141cc406Sopenharmony_ci for (a = 0; a < count; a++) 1247141cc406Sopenharmony_ci { 1248141cc406Sopenharmony_ci if (reg[a].resolution == resolution) 1249141cc406Sopenharmony_ci { 1250141cc406Sopenharmony_ci rst = reg[a].pixel; 1251141cc406Sopenharmony_ci break; 1252141cc406Sopenharmony_ci } 1253141cc406Sopenharmony_ci } 1254141cc406Sopenharmony_ci 1255141cc406Sopenharmony_ci return rst; 1256141cc406Sopenharmony_ci} 1257141cc406Sopenharmony_ci 1258141cc406Sopenharmony_cistatic SANE_Int cfg_effectivepixel_get(SANE_Int sensortype, SANE_Int resolution) 1259141cc406Sopenharmony_ci{ 1260141cc406Sopenharmony_ci SANE_Int rst; 1261141cc406Sopenharmony_ci 1262141cc406Sopenharmony_ci switch(RTS_Debug->dev_model) 1263141cc406Sopenharmony_ci { 1264141cc406Sopenharmony_ci case UA4900: 1265141cc406Sopenharmony_ci rst = ua4900_effectivepixel(resolution); 1266141cc406Sopenharmony_ci break; 1267141cc406Sopenharmony_ci 1268141cc406Sopenharmony_ci case HP3800: 1269141cc406Sopenharmony_ci case HPG2710: 1270141cc406Sopenharmony_ci rst = hp3800_effectivepixel(resolution); 1271141cc406Sopenharmony_ci break; 1272141cc406Sopenharmony_ci 1273141cc406Sopenharmony_ci case HP4370: 1274141cc406Sopenharmony_ci case HPG3010: 1275141cc406Sopenharmony_ci case HPG3110: 1276141cc406Sopenharmony_ci rst = hp4370_effectivepixel(resolution); 1277141cc406Sopenharmony_ci break; 1278141cc406Sopenharmony_ci 1279141cc406Sopenharmony_ci default: 1280141cc406Sopenharmony_ci rst = hp3970_effectivepixel(sensortype, resolution); 1281141cc406Sopenharmony_ci break; 1282141cc406Sopenharmony_ci } 1283141cc406Sopenharmony_ci 1284141cc406Sopenharmony_ci return rst; 1285141cc406Sopenharmony_ci} 1286141cc406Sopenharmony_ci 1287141cc406Sopenharmony_ci/** SEC: Gain and offset values ---------- */ 1288141cc406Sopenharmony_ci 1289141cc406Sopenharmony_cistatic SANE_Int bq5550_gainoffset(SANE_Int usb, struct st_gain_offset *myreg) 1290141cc406Sopenharmony_ci{ 1291141cc406Sopenharmony_ci struct st_reg 1292141cc406Sopenharmony_ci { 1293141cc406Sopenharmony_ci SANE_Int usb; 1294141cc406Sopenharmony_ci struct st_gain_offset values; 1295141cc406Sopenharmony_ci }; 1296141cc406Sopenharmony_ci 1297141cc406Sopenharmony_ci struct st_reg reg[] = 1298141cc406Sopenharmony_ci { 1299141cc406Sopenharmony_ci /* usb , {{edcg1 }, {edcg2 }, {odcg1 }, {odcg2 }, {pag }, {vgag1 }, {vgag2 }}} */ 1300141cc406Sopenharmony_ci { USB20, {{264, 264, 264}, {0, 0, 0}, {262, 262, 262}, {0, 0, 0}, {3, 3, 3}, {27, 27, 27}, {4, 4, 4}}}, 1301141cc406Sopenharmony_ci { USB11, {{264, 264, 264}, {0, 0, 0}, {262, 262, 262}, {0, 0, 0}, {3, 3, 3}, {27, 27, 27}, {4, 4, 4}}} 1302141cc406Sopenharmony_ci }; 1303141cc406Sopenharmony_ci 1304141cc406Sopenharmony_ci SANE_Int rst = ERROR; 1305141cc406Sopenharmony_ci 1306141cc406Sopenharmony_ci if (myreg != NULL) 1307141cc406Sopenharmony_ci { 1308141cc406Sopenharmony_ci SANE_Int a; 1309141cc406Sopenharmony_ci SANE_Int count = sizeof(reg) / sizeof(struct st_reg); 1310141cc406Sopenharmony_ci 1311141cc406Sopenharmony_ci for (a = 0; a < count; a++) 1312141cc406Sopenharmony_ci { 1313141cc406Sopenharmony_ci if (reg[a].usb == usb) 1314141cc406Sopenharmony_ci { 1315141cc406Sopenharmony_ci memcpy(myreg, ®[a].values, sizeof(struct st_gain_offset)); 1316141cc406Sopenharmony_ci rst = OK; 1317141cc406Sopenharmony_ci break; 1318141cc406Sopenharmony_ci } 1319141cc406Sopenharmony_ci } 1320141cc406Sopenharmony_ci } 1321141cc406Sopenharmony_ci 1322141cc406Sopenharmony_ci return rst; 1323141cc406Sopenharmony_ci} 1324141cc406Sopenharmony_ci 1325141cc406Sopenharmony_cistatic SANE_Int hp3800_gainoffset(SANE_Int usb, struct st_gain_offset *myreg) 1326141cc406Sopenharmony_ci{ 1327141cc406Sopenharmony_ci struct st_reg 1328141cc406Sopenharmony_ci { 1329141cc406Sopenharmony_ci SANE_Int usb; 1330141cc406Sopenharmony_ci struct st_gain_offset values; 1331141cc406Sopenharmony_ci }; 1332141cc406Sopenharmony_ci 1333141cc406Sopenharmony_ci struct st_reg reg[] = 1334141cc406Sopenharmony_ci { 1335141cc406Sopenharmony_ci /* usb , {{edcg1 }, {edcg2 }, {odcg1 }, {odcg2 }, {pag }, {vgag1 }, {vgag2 }}} */ 1336141cc406Sopenharmony_ci { USB20, {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {2, 2, 2}, {4, 4, 4}, {4, 4, 4}}}, 1337141cc406Sopenharmony_ci { USB11, {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {2, 2, 2}, {4, 4, 4}, {4, 4, 4}}} 1338141cc406Sopenharmony_ci }; 1339141cc406Sopenharmony_ci 1340141cc406Sopenharmony_ci SANE_Int rst = ERROR; 1341141cc406Sopenharmony_ci 1342141cc406Sopenharmony_ci if (myreg != NULL) 1343141cc406Sopenharmony_ci { 1344141cc406Sopenharmony_ci SANE_Int a; 1345141cc406Sopenharmony_ci SANE_Int count = sizeof(reg) / sizeof(struct st_reg); 1346141cc406Sopenharmony_ci 1347141cc406Sopenharmony_ci for (a = 0; a < count; a++) 1348141cc406Sopenharmony_ci { 1349141cc406Sopenharmony_ci if (reg[a].usb == usb) 1350141cc406Sopenharmony_ci { 1351141cc406Sopenharmony_ci memcpy(myreg, ®[a].values, sizeof(struct st_gain_offset)); 1352141cc406Sopenharmony_ci rst = OK; 1353141cc406Sopenharmony_ci break; 1354141cc406Sopenharmony_ci } 1355141cc406Sopenharmony_ci } 1356141cc406Sopenharmony_ci } 1357141cc406Sopenharmony_ci 1358141cc406Sopenharmony_ci return rst; 1359141cc406Sopenharmony_ci} 1360141cc406Sopenharmony_ci 1361141cc406Sopenharmony_cistatic SANE_Int hp3970_gainoffset(SANE_Int usb, SANE_Int sensor, struct st_gain_offset *myreg) 1362141cc406Sopenharmony_ci{ 1363141cc406Sopenharmony_ci struct st_reg 1364141cc406Sopenharmony_ci { 1365141cc406Sopenharmony_ci SANE_Int usb; 1366141cc406Sopenharmony_ci SANE_Int sensor; 1367141cc406Sopenharmony_ci struct st_gain_offset values; 1368141cc406Sopenharmony_ci }; 1369141cc406Sopenharmony_ci 1370141cc406Sopenharmony_ci struct st_reg reg[] = 1371141cc406Sopenharmony_ci { 1372141cc406Sopenharmony_ci /* usb , sensor , {{edcg1 }, {edcg2 }, {odcg1 }, {odcg2 }, {pag }, {vgag1 }, {vgag2 }}} */ 1373141cc406Sopenharmony_ci { USB20, CCD_SENSOR, {{280, 266, 286}, {0, 0, 0}, {280, 266, 286}, {0, 0, 0}, {3, 3, 3}, {7, 4, 4}, {7, 4, 4}}}, 1374141cc406Sopenharmony_ci { USB11, CCD_SENSOR, {{280, 266, 286}, {0, 0, 0}, {280, 266, 286}, {0, 0, 0}, {3, 3, 3}, {7, 4, 4}, {7, 4, 4}}}, 1375141cc406Sopenharmony_ci 1376141cc406Sopenharmony_ci { USB20, CIS_SENSOR, {{280, 266, 286}, {0, 0, 0}, {280, 266, 286}, {0, 0, 0}, {3, 3, 3}, {7, 4, 4}, {7, 4, 4}}}, 1377141cc406Sopenharmony_ci { USB11, CIS_SENSOR, {{280, 266, 286}, {0, 0, 0}, {280, 266, 286}, {0, 0, 0}, {3, 3, 3}, {7, 4, 4}, {7, 4, 4}}} 1378141cc406Sopenharmony_ci }; 1379141cc406Sopenharmony_ci 1380141cc406Sopenharmony_ci SANE_Int rst = ERROR; 1381141cc406Sopenharmony_ci 1382141cc406Sopenharmony_ci if (myreg != NULL) 1383141cc406Sopenharmony_ci { 1384141cc406Sopenharmony_ci SANE_Int a; 1385141cc406Sopenharmony_ci SANE_Int count = sizeof(reg) / sizeof(struct st_reg); 1386141cc406Sopenharmony_ci 1387141cc406Sopenharmony_ci for (a = 0; count < 4; a++) 1388141cc406Sopenharmony_ci { 1389141cc406Sopenharmony_ci if ((reg[a].usb == usb)&&(reg[a].sensor == sensor)) 1390141cc406Sopenharmony_ci { 1391141cc406Sopenharmony_ci memcpy(myreg, ®[a].values, sizeof(struct st_gain_offset)); 1392141cc406Sopenharmony_ci rst = OK; 1393141cc406Sopenharmony_ci break; 1394141cc406Sopenharmony_ci } 1395141cc406Sopenharmony_ci } 1396141cc406Sopenharmony_ci } 1397141cc406Sopenharmony_ci 1398141cc406Sopenharmony_ci return rst; 1399141cc406Sopenharmony_ci} 1400141cc406Sopenharmony_ci 1401141cc406Sopenharmony_cistatic SANE_Int hp4370_gainoffset(SANE_Int usb, struct st_gain_offset *myreg) 1402141cc406Sopenharmony_ci{ 1403141cc406Sopenharmony_ci struct st_reg 1404141cc406Sopenharmony_ci { 1405141cc406Sopenharmony_ci SANE_Int usb; 1406141cc406Sopenharmony_ci struct st_gain_offset values; 1407141cc406Sopenharmony_ci }; 1408141cc406Sopenharmony_ci 1409141cc406Sopenharmony_ci struct st_reg reg[] = 1410141cc406Sopenharmony_ci { 1411141cc406Sopenharmony_ci /* usb , {{edcg1 }, {edcg2 }, {odcg1 }, {odcg2 }, {pag }, {vgag1 }, {vgag2 }} */ 1412141cc406Sopenharmony_ci { USB20, {{280, 266, 286}, {0, 0, 0}, {280, 266, 286}, {0, 0, 0}, {3, 3, 3}, {7, 4, 4}, {7, 4, 4}}}, 1413141cc406Sopenharmony_ci { USB11, {{280, 266, 286}, {0, 0, 0}, {280, 266, 286}, {0, 0, 0}, {3, 3, 3}, {7, 4, 4}, {7, 4, 4}}} 1414141cc406Sopenharmony_ci }; 1415141cc406Sopenharmony_ci 1416141cc406Sopenharmony_ci SANE_Int rst = ERROR; 1417141cc406Sopenharmony_ci 1418141cc406Sopenharmony_ci if (myreg != NULL) 1419141cc406Sopenharmony_ci { 1420141cc406Sopenharmony_ci SANE_Int a; 1421141cc406Sopenharmony_ci SANE_Int count = sizeof(reg) / sizeof(struct st_reg); 1422141cc406Sopenharmony_ci 1423141cc406Sopenharmony_ci for (a = 0; a < count; a++) 1424141cc406Sopenharmony_ci { 1425141cc406Sopenharmony_ci if (reg[a].usb == usb) 1426141cc406Sopenharmony_ci { 1427141cc406Sopenharmony_ci memcpy(myreg, ®[a].values, sizeof(struct st_gain_offset)); 1428141cc406Sopenharmony_ci rst = OK; 1429141cc406Sopenharmony_ci break; 1430141cc406Sopenharmony_ci } 1431141cc406Sopenharmony_ci } 1432141cc406Sopenharmony_ci } 1433141cc406Sopenharmony_ci 1434141cc406Sopenharmony_ci return rst; 1435141cc406Sopenharmony_ci} 1436141cc406Sopenharmony_ci 1437141cc406Sopenharmony_cistatic SANE_Int ua4900_gainoffset(SANE_Int usb, struct st_gain_offset *myreg) 1438141cc406Sopenharmony_ci{ 1439141cc406Sopenharmony_ci struct st_reg 1440141cc406Sopenharmony_ci { 1441141cc406Sopenharmony_ci SANE_Int usb; 1442141cc406Sopenharmony_ci struct st_gain_offset values; 1443141cc406Sopenharmony_ci }; 1444141cc406Sopenharmony_ci 1445141cc406Sopenharmony_ci struct st_reg reg[] = 1446141cc406Sopenharmony_ci { 1447141cc406Sopenharmony_ci /* usb , {{edcg1 }, {edcg2 }, {odcg1 }, {odcg2 }, {pag }, {vgag1 }, {vgag2 }}} */ 1448141cc406Sopenharmony_ci { USB20, {{321, 321, 321}, {0, 0, 0}, {321, 321, 321}, {0, 0, 0}, {0, 0, 0}, {24, 21, 19}, {8, 8, 8}}}, 1449141cc406Sopenharmony_ci { USB11, {{321, 321, 321}, {0, 0, 0}, {321, 321, 321}, {0, 0, 0}, {0, 0, 0}, {16, 16, 16}, {4, 4, 4}}} 1450141cc406Sopenharmony_ci }; 1451141cc406Sopenharmony_ci 1452141cc406Sopenharmony_ci SANE_Int rst = ERROR; 1453141cc406Sopenharmony_ci 1454141cc406Sopenharmony_ci if (myreg != NULL) 1455141cc406Sopenharmony_ci { 1456141cc406Sopenharmony_ci SANE_Int a; 1457141cc406Sopenharmony_ci SANE_Int count = sizeof(reg) / sizeof(struct st_reg); 1458141cc406Sopenharmony_ci 1459141cc406Sopenharmony_ci for (a = 0; a < count; a++) 1460141cc406Sopenharmony_ci { 1461141cc406Sopenharmony_ci if (reg[a].usb == usb) 1462141cc406Sopenharmony_ci { 1463141cc406Sopenharmony_ci memcpy(myreg, ®[a].values, sizeof(struct st_gain_offset)); 1464141cc406Sopenharmony_ci rst = OK; 1465141cc406Sopenharmony_ci break; 1466141cc406Sopenharmony_ci } 1467141cc406Sopenharmony_ci } 1468141cc406Sopenharmony_ci } 1469141cc406Sopenharmony_ci 1470141cc406Sopenharmony_ci return rst; 1471141cc406Sopenharmony_ci} 1472141cc406Sopenharmony_ci 1473141cc406Sopenharmony_cistatic SANE_Int cfg_gainoffset_get(SANE_Int sensortype, struct st_gain_offset *reg) 1474141cc406Sopenharmony_ci{ 1475141cc406Sopenharmony_ci SANE_Int rst; 1476141cc406Sopenharmony_ci 1477141cc406Sopenharmony_ci switch(RTS_Debug->dev_model) 1478141cc406Sopenharmony_ci { 1479141cc406Sopenharmony_ci case BQ5550: 1480141cc406Sopenharmony_ci rst = bq5550_gainoffset(RTS_Debug->usbtype, reg); 1481141cc406Sopenharmony_ci break; 1482141cc406Sopenharmony_ci 1483141cc406Sopenharmony_ci case UA4900: 1484141cc406Sopenharmony_ci rst = ua4900_gainoffset(RTS_Debug->usbtype, reg); 1485141cc406Sopenharmony_ci break; 1486141cc406Sopenharmony_ci 1487141cc406Sopenharmony_ci case HP3800: 1488141cc406Sopenharmony_ci case HPG2710: 1489141cc406Sopenharmony_ci rst = hp3800_gainoffset(RTS_Debug->usbtype, reg); 1490141cc406Sopenharmony_ci break; 1491141cc406Sopenharmony_ci 1492141cc406Sopenharmony_ci case HP4370: 1493141cc406Sopenharmony_ci case HPG3010: 1494141cc406Sopenharmony_ci case HPG3110: 1495141cc406Sopenharmony_ci rst = hp4370_gainoffset(RTS_Debug->usbtype, reg); 1496141cc406Sopenharmony_ci break; 1497141cc406Sopenharmony_ci 1498141cc406Sopenharmony_ci default: 1499141cc406Sopenharmony_ci rst = hp3970_gainoffset(RTS_Debug->usbtype, sensortype, reg); 1500141cc406Sopenharmony_ci break; 1501141cc406Sopenharmony_ci } 1502141cc406Sopenharmony_ci 1503141cc406Sopenharmony_ci return rst; 1504141cc406Sopenharmony_ci} 1505141cc406Sopenharmony_ci 1506141cc406Sopenharmony_ci/** SEC: Pulse-width modulation check stable ---------- */ 1507141cc406Sopenharmony_ci 1508141cc406Sopenharmony_cistatic SANE_Int hp3800_checkstable(SANE_Int lamp, struct st_checkstable *check) 1509141cc406Sopenharmony_ci{ 1510141cc406Sopenharmony_ci struct st_reg 1511141cc406Sopenharmony_ci { 1512141cc406Sopenharmony_ci SANE_Int lamp; 1513141cc406Sopenharmony_ci struct st_checkstable values; 1514141cc406Sopenharmony_ci }; 1515141cc406Sopenharmony_ci 1516141cc406Sopenharmony_ci struct st_reg reg[] = 1517141cc406Sopenharmony_ci { 1518141cc406Sopenharmony_ci /* lamp , { diff, interval, tottime } */ 1519141cc406Sopenharmony_ci { 0 , { 100., 200, 10000}}, 1520141cc406Sopenharmony_ci { FLB_LAMP, { 100., 200, 10000}}, 1521141cc406Sopenharmony_ci { TMA_LAMP, { 100., 200, 10000}} 1522141cc406Sopenharmony_ci }; 1523141cc406Sopenharmony_ci 1524141cc406Sopenharmony_ci SANE_Int rst = ERROR; 1525141cc406Sopenharmony_ci 1526141cc406Sopenharmony_ci SANE_Int a; 1527141cc406Sopenharmony_ci SANE_Int count = sizeof(reg) / sizeof(struct st_reg); 1528141cc406Sopenharmony_ci 1529141cc406Sopenharmony_ci for (a = 0; a < count; a++) 1530141cc406Sopenharmony_ci { 1531141cc406Sopenharmony_ci if (reg[a].lamp == lamp) 1532141cc406Sopenharmony_ci { 1533141cc406Sopenharmony_ci memcpy(check, ®[a].values, sizeof(struct st_checkstable)); 1534141cc406Sopenharmony_ci rst = OK; 1535141cc406Sopenharmony_ci break; 1536141cc406Sopenharmony_ci } 1537141cc406Sopenharmony_ci } 1538141cc406Sopenharmony_ci 1539141cc406Sopenharmony_ci return rst; 1540141cc406Sopenharmony_ci} 1541141cc406Sopenharmony_ci 1542141cc406Sopenharmony_cistatic SANE_Int hp3970_checkstable(SANE_Int lamp, struct st_checkstable *check) 1543141cc406Sopenharmony_ci{ 1544141cc406Sopenharmony_ci struct st_reg 1545141cc406Sopenharmony_ci { 1546141cc406Sopenharmony_ci SANE_Int lamp; 1547141cc406Sopenharmony_ci struct st_checkstable values; 1548141cc406Sopenharmony_ci }; 1549141cc406Sopenharmony_ci 1550141cc406Sopenharmony_ci struct st_reg reg[] = 1551141cc406Sopenharmony_ci { 1552141cc406Sopenharmony_ci /* lamp , { diff, interval, tottime } */ 1553141cc406Sopenharmony_ci { 0 , {1000., 200, 5000}}, 1554141cc406Sopenharmony_ci { FLB_LAMP, { 500., 200, 5000}}, 1555141cc406Sopenharmony_ci { TMA_LAMP, { 500., 200, 5000}} 1556141cc406Sopenharmony_ci }; 1557141cc406Sopenharmony_ci 1558141cc406Sopenharmony_ci SANE_Int rst = ERROR; 1559141cc406Sopenharmony_ci 1560141cc406Sopenharmony_ci SANE_Int a; 1561141cc406Sopenharmony_ci SANE_Int count = sizeof(reg) / sizeof(struct st_reg); 1562141cc406Sopenharmony_ci 1563141cc406Sopenharmony_ci for (a = 0; a < count; a++) 1564141cc406Sopenharmony_ci { 1565141cc406Sopenharmony_ci if (reg[a].lamp == lamp) 1566141cc406Sopenharmony_ci { 1567141cc406Sopenharmony_ci memcpy(check, ®[a].values, sizeof(struct st_checkstable)); 1568141cc406Sopenharmony_ci rst = OK; 1569141cc406Sopenharmony_ci break; 1570141cc406Sopenharmony_ci } 1571141cc406Sopenharmony_ci } 1572141cc406Sopenharmony_ci 1573141cc406Sopenharmony_ci return rst; 1574141cc406Sopenharmony_ci} 1575141cc406Sopenharmony_ci 1576141cc406Sopenharmony_cistatic SANE_Int hp4370_checkstable(SANE_Int lamp, struct st_checkstable *check) 1577141cc406Sopenharmony_ci{ 1578141cc406Sopenharmony_ci struct st_reg 1579141cc406Sopenharmony_ci { 1580141cc406Sopenharmony_ci SANE_Int lamp; 1581141cc406Sopenharmony_ci struct st_checkstable values; 1582141cc406Sopenharmony_ci }; 1583141cc406Sopenharmony_ci 1584141cc406Sopenharmony_ci struct st_reg reg[] = 1585141cc406Sopenharmony_ci { 1586141cc406Sopenharmony_ci /* lamp , { diff, interval, tottime } */ 1587141cc406Sopenharmony_ci { 0 , { 100., 200, 5000}}, 1588141cc406Sopenharmony_ci { FLB_LAMP, { 300., 200, 5000}}, 1589141cc406Sopenharmony_ci { TMA_LAMP, { 0., 200, 25000}} 1590141cc406Sopenharmony_ci }; 1591141cc406Sopenharmony_ci 1592141cc406Sopenharmony_ci SANE_Int rst = ERROR; 1593141cc406Sopenharmony_ci 1594141cc406Sopenharmony_ci SANE_Int a; 1595141cc406Sopenharmony_ci SANE_Int count = sizeof(reg) / sizeof(struct st_reg); 1596141cc406Sopenharmony_ci 1597141cc406Sopenharmony_ci for (a = 0; a < count; a++) 1598141cc406Sopenharmony_ci { 1599141cc406Sopenharmony_ci if (reg[a].lamp == lamp) 1600141cc406Sopenharmony_ci { 1601141cc406Sopenharmony_ci memcpy(check, ®[a].values, sizeof(struct st_checkstable)); 1602141cc406Sopenharmony_ci rst = OK; 1603141cc406Sopenharmony_ci break; 1604141cc406Sopenharmony_ci } 1605141cc406Sopenharmony_ci } 1606141cc406Sopenharmony_ci 1607141cc406Sopenharmony_ci return rst; 1608141cc406Sopenharmony_ci} 1609141cc406Sopenharmony_ci 1610141cc406Sopenharmony_cistatic SANE_Int ua4900_checkstable(SANE_Int lamp, struct st_checkstable *check) 1611141cc406Sopenharmony_ci{ 1612141cc406Sopenharmony_ci struct st_reg 1613141cc406Sopenharmony_ci { 1614141cc406Sopenharmony_ci SANE_Int lamp; 1615141cc406Sopenharmony_ci struct st_checkstable values; 1616141cc406Sopenharmony_ci }; 1617141cc406Sopenharmony_ci 1618141cc406Sopenharmony_ci struct st_reg reg[] = 1619141cc406Sopenharmony_ci { 1620141cc406Sopenharmony_ci /* lamp , { diff, interval, tottime } */ 1621141cc406Sopenharmony_ci { 0 , { 100., 200, 5000}}, 1622141cc406Sopenharmony_ci { FLB_LAMP, { 10., 200, 5000}}, 1623141cc406Sopenharmony_ci { TMA_LAMP, { 10., 200, 25000}} 1624141cc406Sopenharmony_ci }; 1625141cc406Sopenharmony_ci 1626141cc406Sopenharmony_ci SANE_Int rst = ERROR; 1627141cc406Sopenharmony_ci 1628141cc406Sopenharmony_ci SANE_Int a; 1629141cc406Sopenharmony_ci SANE_Int count = sizeof(reg) / sizeof(struct st_reg); 1630141cc406Sopenharmony_ci 1631141cc406Sopenharmony_ci for (a = 0; a < count; a++) 1632141cc406Sopenharmony_ci { 1633141cc406Sopenharmony_ci if (reg[a].lamp == lamp) 1634141cc406Sopenharmony_ci { 1635141cc406Sopenharmony_ci memcpy(check, ®[a].values, sizeof(struct st_checkstable)); 1636141cc406Sopenharmony_ci rst = OK; 1637141cc406Sopenharmony_ci break; 1638141cc406Sopenharmony_ci } 1639141cc406Sopenharmony_ci } 1640141cc406Sopenharmony_ci 1641141cc406Sopenharmony_ci return rst; 1642141cc406Sopenharmony_ci} 1643141cc406Sopenharmony_ci 1644141cc406Sopenharmony_cistatic SANE_Int cfg_checkstable_get(SANE_Int lamp, struct st_checkstable *check) 1645141cc406Sopenharmony_ci{ 1646141cc406Sopenharmony_ci SANE_Int rst; 1647141cc406Sopenharmony_ci 1648141cc406Sopenharmony_ci switch(RTS_Debug->dev_model) 1649141cc406Sopenharmony_ci { 1650141cc406Sopenharmony_ci case UA4900: 1651141cc406Sopenharmony_ci rst = ua4900_checkstable(lamp, check); 1652141cc406Sopenharmony_ci break; 1653141cc406Sopenharmony_ci 1654141cc406Sopenharmony_ci case HP3800: 1655141cc406Sopenharmony_ci case HPG2710: 1656141cc406Sopenharmony_ci rst = hp3800_checkstable(lamp, check); 1657141cc406Sopenharmony_ci break; 1658141cc406Sopenharmony_ci 1659141cc406Sopenharmony_ci case HP4370: 1660141cc406Sopenharmony_ci case HPG3010: 1661141cc406Sopenharmony_ci case HPG3110: 1662141cc406Sopenharmony_ci rst = hp4370_checkstable(lamp, check); 1663141cc406Sopenharmony_ci break; 1664141cc406Sopenharmony_ci 1665141cc406Sopenharmony_ci default: 1666141cc406Sopenharmony_ci rst = hp3970_checkstable(lamp, check); 1667141cc406Sopenharmony_ci break; 1668141cc406Sopenharmony_ci } 1669141cc406Sopenharmony_ci 1670141cc406Sopenharmony_ci return rst; 1671141cc406Sopenharmony_ci} 1672141cc406Sopenharmony_ci 1673141cc406Sopenharmony_ci/** SEC: Fixed pulse-width modulation values ---------- */ 1674141cc406Sopenharmony_ci 1675141cc406Sopenharmony_cistatic SANE_Int hp3800_fixedpwm(SANE_Int scantype, SANE_Int usb) 1676141cc406Sopenharmony_ci{ 1677141cc406Sopenharmony_ci struct st_reg 1678141cc406Sopenharmony_ci { 1679141cc406Sopenharmony_ci SANE_Int usb; 1680141cc406Sopenharmony_ci SANE_Int pwm[3]; 1681141cc406Sopenharmony_ci }; 1682141cc406Sopenharmony_ci 1683141cc406Sopenharmony_ci struct st_reg reg[] = 1684141cc406Sopenharmony_ci { 1685141cc406Sopenharmony_ci /* usb , { ST_NORMAL, ST_TA, ST_NEG} */ 1686141cc406Sopenharmony_ci { USB20, { 0, 0, 0}}, 1687141cc406Sopenharmony_ci { USB11, { 0, 0, 0}} 1688141cc406Sopenharmony_ci }; 1689141cc406Sopenharmony_ci 1690141cc406Sopenharmony_ci SANE_Int a, rst = 0x16; 1691141cc406Sopenharmony_ci SANE_Int count = sizeof(reg) / sizeof(struct st_reg); 1692141cc406Sopenharmony_ci 1693141cc406Sopenharmony_ci for (a = 0; a < count; a++) 1694141cc406Sopenharmony_ci { 1695141cc406Sopenharmony_ci if (reg[a].usb == usb) 1696141cc406Sopenharmony_ci { 1697141cc406Sopenharmony_ci if ((scantype < ST_NORMAL)||(scantype > ST_NEG)) 1698141cc406Sopenharmony_ci scantype = ST_NORMAL; 1699141cc406Sopenharmony_ci 1700141cc406Sopenharmony_ci rst = reg[a].pwm[scantype - 1]; 1701141cc406Sopenharmony_ci break; 1702141cc406Sopenharmony_ci } 1703141cc406Sopenharmony_ci } 1704141cc406Sopenharmony_ci 1705141cc406Sopenharmony_ci return rst; 1706141cc406Sopenharmony_ci} 1707141cc406Sopenharmony_ci 1708141cc406Sopenharmony_cistatic SANE_Int hp3970_fixedpwm(SANE_Int scantype, SANE_Int usb, SANE_Int sensor) 1709141cc406Sopenharmony_ci{ 1710141cc406Sopenharmony_ci struct st_reg 1711141cc406Sopenharmony_ci { 1712141cc406Sopenharmony_ci SANE_Int usb; 1713141cc406Sopenharmony_ci SANE_Int sensor; 1714141cc406Sopenharmony_ci SANE_Int pwm[3]; 1715141cc406Sopenharmony_ci }; 1716141cc406Sopenharmony_ci 1717141cc406Sopenharmony_ci struct st_reg reg[] = 1718141cc406Sopenharmony_ci { 1719141cc406Sopenharmony_ci /* usb , sensor , { ST_NORMAL, ST_TA, ST_NEG} */ 1720141cc406Sopenharmony_ci { USB20, CCD_SENSOR, { 22, 22, 22}}, 1721141cc406Sopenharmony_ci { USB11, CCD_SENSOR, { 22, 22, 22}}, 1722141cc406Sopenharmony_ci 1723141cc406Sopenharmony_ci { USB20, CIS_SENSOR, { 22, 22, 22}}, 1724141cc406Sopenharmony_ci { USB11, CIS_SENSOR, { 22, 22, 22}} 1725141cc406Sopenharmony_ci }; 1726141cc406Sopenharmony_ci 1727141cc406Sopenharmony_ci SANE_Int a, rst = 0x16; 1728141cc406Sopenharmony_ci SANE_Int count = sizeof(reg) / sizeof(struct st_reg); 1729141cc406Sopenharmony_ci 1730141cc406Sopenharmony_ci for (a = 0; a < count; a++) 1731141cc406Sopenharmony_ci { 1732141cc406Sopenharmony_ci if ((reg[a].usb == usb)&&(reg[a].sensor == sensor)) 1733141cc406Sopenharmony_ci { 1734141cc406Sopenharmony_ci if ((scantype < ST_NORMAL)||(scantype > ST_NEG)) 1735141cc406Sopenharmony_ci scantype = ST_NORMAL; 1736141cc406Sopenharmony_ci 1737141cc406Sopenharmony_ci rst = reg[a].pwm[scantype - 1]; 1738141cc406Sopenharmony_ci break; 1739141cc406Sopenharmony_ci } 1740141cc406Sopenharmony_ci } 1741141cc406Sopenharmony_ci 1742141cc406Sopenharmony_ci return rst; 1743141cc406Sopenharmony_ci} 1744141cc406Sopenharmony_ci 1745141cc406Sopenharmony_cistatic SANE_Int hp4370_fixedpwm(SANE_Int scantype, SANE_Int usb) 1746141cc406Sopenharmony_ci{ 1747141cc406Sopenharmony_ci struct st_reg 1748141cc406Sopenharmony_ci { 1749141cc406Sopenharmony_ci SANE_Int usb; 1750141cc406Sopenharmony_ci SANE_Int pwm[3]; 1751141cc406Sopenharmony_ci }; 1752141cc406Sopenharmony_ci 1753141cc406Sopenharmony_ci struct st_reg reg[] = 1754141cc406Sopenharmony_ci { 1755141cc406Sopenharmony_ci /* usb , { ST_NORMAL, ST_TA, ST_NEG} */ 1756141cc406Sopenharmony_ci { USB20, { 20, 28, 28}}, 1757141cc406Sopenharmony_ci { USB11, { 20, 28, 28}} 1758141cc406Sopenharmony_ci }; 1759141cc406Sopenharmony_ci 1760141cc406Sopenharmony_ci SANE_Int a, rst = 0x16; 1761141cc406Sopenharmony_ci SANE_Int count = sizeof(reg) / sizeof(struct st_reg); 1762141cc406Sopenharmony_ci 1763141cc406Sopenharmony_ci for (a = 0; a < count; a++) 1764141cc406Sopenharmony_ci { 1765141cc406Sopenharmony_ci if (reg[a].usb == usb) 1766141cc406Sopenharmony_ci { 1767141cc406Sopenharmony_ci if ((scantype < ST_NORMAL)||(scantype > ST_NEG)) 1768141cc406Sopenharmony_ci scantype = ST_NORMAL; 1769141cc406Sopenharmony_ci 1770141cc406Sopenharmony_ci rst = reg[a].pwm[scantype - 1]; 1771141cc406Sopenharmony_ci break; 1772141cc406Sopenharmony_ci } 1773141cc406Sopenharmony_ci } 1774141cc406Sopenharmony_ci 1775141cc406Sopenharmony_ci return rst; 1776141cc406Sopenharmony_ci} 1777141cc406Sopenharmony_ci 1778141cc406Sopenharmony_cistatic SANE_Int ua4900_fixedpwm(SANE_Int scantype, SANE_Int usb) 1779141cc406Sopenharmony_ci{ 1780141cc406Sopenharmony_ci struct st_reg 1781141cc406Sopenharmony_ci { 1782141cc406Sopenharmony_ci SANE_Int usb; 1783141cc406Sopenharmony_ci SANE_Int pwm[3]; 1784141cc406Sopenharmony_ci }; 1785141cc406Sopenharmony_ci 1786141cc406Sopenharmony_ci struct st_reg reg[] = 1787141cc406Sopenharmony_ci { 1788141cc406Sopenharmony_ci /* usb , { ST_NORMAL, ST_TA, ST_NEG} */ 1789141cc406Sopenharmony_ci { USB20, { 20, 28, 28}}, 1790141cc406Sopenharmony_ci { USB11, { 20, 28, 28}} 1791141cc406Sopenharmony_ci }; 1792141cc406Sopenharmony_ci 1793141cc406Sopenharmony_ci SANE_Int a, rst = 0x16; 1794141cc406Sopenharmony_ci SANE_Int count = sizeof(reg) / sizeof(struct st_reg); 1795141cc406Sopenharmony_ci 1796141cc406Sopenharmony_ci for (a = 0; a < count; a++) 1797141cc406Sopenharmony_ci { 1798141cc406Sopenharmony_ci if (reg[a].usb == usb) 1799141cc406Sopenharmony_ci { 1800141cc406Sopenharmony_ci if ((scantype < ST_NORMAL)||(scantype > ST_NEG)) 1801141cc406Sopenharmony_ci scantype = ST_NORMAL; 1802141cc406Sopenharmony_ci 1803141cc406Sopenharmony_ci rst = reg[a].pwm[scantype - 1]; 1804141cc406Sopenharmony_ci break; 1805141cc406Sopenharmony_ci } 1806141cc406Sopenharmony_ci } 1807141cc406Sopenharmony_ci 1808141cc406Sopenharmony_ci return rst; 1809141cc406Sopenharmony_ci} 1810141cc406Sopenharmony_ci 1811141cc406Sopenharmony_cistatic SANE_Int cfg_fixedpwm_get(SANE_Int sensortype, SANE_Int scantype) 1812141cc406Sopenharmony_ci{ 1813141cc406Sopenharmony_ci SANE_Int rst; 1814141cc406Sopenharmony_ci 1815141cc406Sopenharmony_ci switch(RTS_Debug->dev_model) 1816141cc406Sopenharmony_ci { 1817141cc406Sopenharmony_ci case UA4900: 1818141cc406Sopenharmony_ci rst = ua4900_fixedpwm(scantype, RTS_Debug->usbtype); 1819141cc406Sopenharmony_ci break; 1820141cc406Sopenharmony_ci 1821141cc406Sopenharmony_ci case HP3800: 1822141cc406Sopenharmony_ci case HPG2710: 1823141cc406Sopenharmony_ci rst = hp3800_fixedpwm(scantype, RTS_Debug->usbtype); 1824141cc406Sopenharmony_ci break; 1825141cc406Sopenharmony_ci 1826141cc406Sopenharmony_ci case HP4370: 1827141cc406Sopenharmony_ci case HPG3010: 1828141cc406Sopenharmony_ci case HPG3110: 1829141cc406Sopenharmony_ci rst = hp4370_fixedpwm(scantype, RTS_Debug->usbtype); 1830141cc406Sopenharmony_ci break; 1831141cc406Sopenharmony_ci 1832141cc406Sopenharmony_ci default: 1833141cc406Sopenharmony_ci rst = hp3970_fixedpwm(scantype, RTS_Debug->usbtype, sensortype); 1834141cc406Sopenharmony_ci break; 1835141cc406Sopenharmony_ci } 1836141cc406Sopenharmony_ci 1837141cc406Sopenharmony_ci return rst; 1838141cc406Sopenharmony_ci} 1839141cc406Sopenharmony_ci 1840141cc406Sopenharmony_ci/** SEC: Fixed reference positions ---------- */ 1841141cc406Sopenharmony_ci 1842141cc406Sopenharmony_cistatic void cfg_vrefs_get(SANE_Int sensortype, SANE_Int res, SANE_Int *ser, SANE_Int *ler) 1843141cc406Sopenharmony_ci{ 1844141cc406Sopenharmony_ci switch(RTS_Debug->dev_model) 1845141cc406Sopenharmony_ci { 1846141cc406Sopenharmony_ci case HP3800: 1847141cc406Sopenharmony_ci case HPG2710: 1848141cc406Sopenharmony_ci hp3800_vrefs(res, ser, ler); 1849141cc406Sopenharmony_ci break; 1850141cc406Sopenharmony_ci 1851141cc406Sopenharmony_ci case HP4370: 1852141cc406Sopenharmony_ci case HPG3010: 1853141cc406Sopenharmony_ci case HPG3110: 1854141cc406Sopenharmony_ci hp4370_vrefs(res, ser, ler); 1855141cc406Sopenharmony_ci break; 1856141cc406Sopenharmony_ci 1857141cc406Sopenharmony_ci default: 1858141cc406Sopenharmony_ci hp3970_vrefs(RTS_Debug->usbtype, sensortype, res, ser, ler); 1859141cc406Sopenharmony_ci break; 1860141cc406Sopenharmony_ci } 1861141cc406Sopenharmony_ci} 1862141cc406Sopenharmony_ci 1863141cc406Sopenharmony_cistatic void hp3800_vrefs(SANE_Int res, SANE_Int *ser, SANE_Int *ler) 1864141cc406Sopenharmony_ci{ 1865141cc406Sopenharmony_ci struct st_reg 1866141cc406Sopenharmony_ci { 1867141cc406Sopenharmony_ci SANE_Int resolution; 1868141cc406Sopenharmony_ci SANE_Int vref[2]; 1869141cc406Sopenharmony_ci }; 1870141cc406Sopenharmony_ci 1871141cc406Sopenharmony_ci struct st_reg reg[] = 1872141cc406Sopenharmony_ci { 1873141cc406Sopenharmony_ci /* res, { ser, ler} */ 1874141cc406Sopenharmony_ci { 150, { 25, 50}}, 1875141cc406Sopenharmony_ci { 300, { 50, 101}}, 1876141cc406Sopenharmony_ci { 600, { 102, 202}}, 1877141cc406Sopenharmony_ci { 1200, { 204, 404}}, 1878141cc406Sopenharmony_ci { 2400, { 408, 808}} 1879141cc406Sopenharmony_ci }; 1880141cc406Sopenharmony_ci 1881141cc406Sopenharmony_ci if ((ser != NULL)&&(ler != NULL)) 1882141cc406Sopenharmony_ci { 1883141cc406Sopenharmony_ci SANE_Int a; 1884141cc406Sopenharmony_ci SANE_Int count = sizeof(reg) / sizeof(struct st_reg); 1885141cc406Sopenharmony_ci 1886141cc406Sopenharmony_ci /* values by default */ 1887141cc406Sopenharmony_ci *ser = *ler = 0; 1888141cc406Sopenharmony_ci 1889141cc406Sopenharmony_ci for (a = 0; a < count; a++) 1890141cc406Sopenharmony_ci { 1891141cc406Sopenharmony_ci if (reg[a].resolution == res) 1892141cc406Sopenharmony_ci { 1893141cc406Sopenharmony_ci *ser = reg[a].vref[0]; 1894141cc406Sopenharmony_ci *ler = reg[a].vref[1]; 1895141cc406Sopenharmony_ci break; 1896141cc406Sopenharmony_ci } 1897141cc406Sopenharmony_ci } 1898141cc406Sopenharmony_ci } 1899141cc406Sopenharmony_ci} 1900141cc406Sopenharmony_ci 1901141cc406Sopenharmony_cistatic void hp3970_vrefs(SANE_Int usb, SANE_Int sensor, SANE_Int res, SANE_Int *ser, SANE_Int *ler) 1902141cc406Sopenharmony_ci{ 1903141cc406Sopenharmony_ci struct st_reg 1904141cc406Sopenharmony_ci { 1905141cc406Sopenharmony_ci SANE_Int usb; 1906141cc406Sopenharmony_ci SANE_Int sensor; 1907141cc406Sopenharmony_ci SANE_Int resolution; 1908141cc406Sopenharmony_ci SANE_Int vref[2]; 1909141cc406Sopenharmony_ci }; 1910141cc406Sopenharmony_ci 1911141cc406Sopenharmony_ci /* I think these references should be the same in all usb versions and in 1912141cc406Sopenharmony_ci all sensor types but windows driver has some different values in some cases. 1913141cc406Sopenharmony_ci */ 1914141cc406Sopenharmony_ci 1915141cc406Sopenharmony_ci struct st_reg reg[] = 1916141cc406Sopenharmony_ci { 1917141cc406Sopenharmony_ci /* usb , sensor , res, { ser, ler} */ 1918141cc406Sopenharmony_ci { USB20, CCD_SENSOR, 100, { 28, 60}}, 1919141cc406Sopenharmony_ci { USB20, CCD_SENSOR, 200, { 37, 117}}, 1920141cc406Sopenharmony_ci { USB20, CCD_SENSOR, 300, { 52, 162}}, 1921141cc406Sopenharmony_ci { USB20, CCD_SENSOR, 600, { 103, 344}}, 1922141cc406Sopenharmony_ci { USB20, CCD_SENSOR, 1200, { 156, 660}}, 1923141cc406Sopenharmony_ci { USB20, CCD_SENSOR, 2400, { 309, 1262}}, 1924141cc406Sopenharmony_ci 1925141cc406Sopenharmony_ci /* usb , sensor , res, { ser, ler} */ 1926141cc406Sopenharmony_ci { USB11, CCD_SENSOR, 100, { 28, 60}}, 1927141cc406Sopenharmony_ci { USB11, CCD_SENSOR, 200, { 37, 117}}, 1928141cc406Sopenharmony_ci { USB11, CCD_SENSOR, 300, { 52, 162}}, 1929141cc406Sopenharmony_ci { USB11, CCD_SENSOR, 600, { 103, 344}}, 1930141cc406Sopenharmony_ci { USB11, CCD_SENSOR, 1200, { 156, 660}}, 1931141cc406Sopenharmony_ci { USB11, CCD_SENSOR, 2400, { 309, 1262}}, 1932141cc406Sopenharmony_ci 1933141cc406Sopenharmony_ci /* usb , sensor , res, { ser, ler} */ 1934141cc406Sopenharmony_ci { USB20, CIS_SENSOR, 100, { 15, 60}}, 1935141cc406Sopenharmony_ci { USB20, CIS_SENSOR, 200, { 39, 117}}, 1936141cc406Sopenharmony_ci { USB20, CIS_SENSOR, 300, { 56, 161}}, 1937141cc406Sopenharmony_ci { USB20, CIS_SENSOR, 600, { 108, 342}}, 1938141cc406Sopenharmony_ci { USB20, CIS_SENSOR, 1200, { 221, 642}}, 1939141cc406Sopenharmony_ci { USB20, CIS_SENSOR, 2400, { 407, 1285}}, 1940141cc406Sopenharmony_ci 1941141cc406Sopenharmony_ci /* usb , sensor , res, { ser, ler} */ 1942141cc406Sopenharmony_ci { USB11, CIS_SENSOR, 100, { 15, 60}}, 1943141cc406Sopenharmony_ci { USB11, CIS_SENSOR, 200, { 39, 117}}, 1944141cc406Sopenharmony_ci { USB11, CIS_SENSOR, 300, { 56, 161}}, 1945141cc406Sopenharmony_ci { USB11, CIS_SENSOR, 600, { 108, 342}}, 1946141cc406Sopenharmony_ci { USB11, CIS_SENSOR, 1200, { 221, 642}}, 1947141cc406Sopenharmony_ci { USB11, CIS_SENSOR, 2400, { 407, 1285}} 1948141cc406Sopenharmony_ci }; 1949141cc406Sopenharmony_ci 1950141cc406Sopenharmony_ci if ((ser != NULL)&&(ler != NULL)) 1951141cc406Sopenharmony_ci { 1952141cc406Sopenharmony_ci SANE_Int a; 1953141cc406Sopenharmony_ci SANE_Int count = sizeof(reg) / sizeof(struct st_reg); 1954141cc406Sopenharmony_ci 1955141cc406Sopenharmony_ci /* values by default */ 1956141cc406Sopenharmony_ci *ser = *ler = 0; 1957141cc406Sopenharmony_ci 1958141cc406Sopenharmony_ci for (a = 0; a < count; a++) 1959141cc406Sopenharmony_ci { 1960141cc406Sopenharmony_ci if ((reg[a].usb == usb)&&(reg[a].sensor == sensor)&&(reg[a].resolution == res)) 1961141cc406Sopenharmony_ci { 1962141cc406Sopenharmony_ci *ser = reg[a].vref[0]; 1963141cc406Sopenharmony_ci *ler = reg[a].vref[1]; 1964141cc406Sopenharmony_ci break; 1965141cc406Sopenharmony_ci } 1966141cc406Sopenharmony_ci } 1967141cc406Sopenharmony_ci } 1968141cc406Sopenharmony_ci} 1969141cc406Sopenharmony_ci 1970141cc406Sopenharmony_cistatic void hp4370_vrefs(SANE_Int res, SANE_Int *ser, SANE_Int *ler) 1971141cc406Sopenharmony_ci{ 1972141cc406Sopenharmony_ci struct st_reg 1973141cc406Sopenharmony_ci { 1974141cc406Sopenharmony_ci SANE_Int resolution; 1975141cc406Sopenharmony_ci SANE_Int vref[2]; 1976141cc406Sopenharmony_ci }; 1977141cc406Sopenharmony_ci 1978141cc406Sopenharmony_ci struct st_reg reg[] = 1979141cc406Sopenharmony_ci { 1980141cc406Sopenharmony_ci /* res, { ser, ler} */ 1981141cc406Sopenharmony_ci { 150, { 31, 81}}, 1982141cc406Sopenharmony_ci { 300, { 61, 162}}, 1983141cc406Sopenharmony_ci { 600, { 122, 324}}, 1984141cc406Sopenharmony_ci { 1200, { 244, 648}}, 1985141cc406Sopenharmony_ci { 2400, { 488, 1256}}, 1986141cc406Sopenharmony_ci { 4800, { 976, 2512}} 1987141cc406Sopenharmony_ci }; 1988141cc406Sopenharmony_ci 1989141cc406Sopenharmony_ci if ((ser != NULL)&&(ler != NULL)) 1990141cc406Sopenharmony_ci { 1991141cc406Sopenharmony_ci SANE_Int a; 1992141cc406Sopenharmony_ci SANE_Int count = sizeof(reg) / sizeof(struct st_reg); 1993141cc406Sopenharmony_ci 1994141cc406Sopenharmony_ci /* values by default */ 1995141cc406Sopenharmony_ci *ser = *ler = 0; 1996141cc406Sopenharmony_ci 1997141cc406Sopenharmony_ci for (a = 0; a < count; a++) 1998141cc406Sopenharmony_ci { 1999141cc406Sopenharmony_ci if (reg[a].resolution == res) 2000141cc406Sopenharmony_ci { 2001141cc406Sopenharmony_ci *ser = reg[a].vref[0]; 2002141cc406Sopenharmony_ci *ler = reg[a].vref[1]; 2003141cc406Sopenharmony_ci break; 2004141cc406Sopenharmony_ci } 2005141cc406Sopenharmony_ci } 2006141cc406Sopenharmony_ci } 2007141cc406Sopenharmony_ci} 2008141cc406Sopenharmony_ci 2009141cc406Sopenharmony_ci/** SEC: Motor movements ---------- */ 2010141cc406Sopenharmony_ci 2011141cc406Sopenharmony_cistatic SANE_Int cfg_motormove_get(SANE_Int sensortype, SANE_Int item, struct st_motormove *reg) 2012141cc406Sopenharmony_ci{ 2013141cc406Sopenharmony_ci SANE_Int rst = ERROR; 2014141cc406Sopenharmony_ci 2015141cc406Sopenharmony_ci switch(RTS_Debug->dev_model) 2016141cc406Sopenharmony_ci { 2017141cc406Sopenharmony_ci case BQ5550: 2018141cc406Sopenharmony_ci rst = bq5550_motormove(item, reg); 2019141cc406Sopenharmony_ci break; 2020141cc406Sopenharmony_ci case HP3800: 2021141cc406Sopenharmony_ci case HPG2710: 2022141cc406Sopenharmony_ci rst = hp3800_motormove(item, reg); 2023141cc406Sopenharmony_ci break; 2024141cc406Sopenharmony_ci 2025141cc406Sopenharmony_ci default: 2026141cc406Sopenharmony_ci rst = hp3970_motormove(RTS_Debug->usbtype, sensortype, item, reg); 2027141cc406Sopenharmony_ci break; 2028141cc406Sopenharmony_ci } 2029141cc406Sopenharmony_ci 2030141cc406Sopenharmony_ci return rst; 2031141cc406Sopenharmony_ci} 2032141cc406Sopenharmony_ci 2033141cc406Sopenharmony_cistatic SANE_Int bq5550_motormove(SANE_Int item, struct st_motormove *reg) 2034141cc406Sopenharmony_ci{ 2035141cc406Sopenharmony_ci SANE_Int rst = ERROR; 2036141cc406Sopenharmony_ci 2037141cc406Sopenharmony_ci /* data is the same in all usb types and sensors so those args aren't needed */ 2038141cc406Sopenharmony_ci 2039141cc406Sopenharmony_ci if (reg != NULL) 2040141cc406Sopenharmony_ci { 2041141cc406Sopenharmony_ci struct st_motormove mv[] = 2042141cc406Sopenharmony_ci { 2043141cc406Sopenharmony_ci /* systemclock, ctpc, steptype , motorcurve } */ 2044141cc406Sopenharmony_ci { 0x05 , 4059, STT_HALF , 0 }, 2045141cc406Sopenharmony_ci { 0x02 , 1200, STT_QUART, -1 } 2046141cc406Sopenharmony_ci }; 2047141cc406Sopenharmony_ci 2048141cc406Sopenharmony_ci rst = OK; 2049141cc406Sopenharmony_ci 2050141cc406Sopenharmony_ci if ((item < 2)&&(item > -1)) 2051141cc406Sopenharmony_ci memcpy(reg, &mv[item], sizeof(struct st_motormove)); 2052141cc406Sopenharmony_ci else rst = ERROR; 2053141cc406Sopenharmony_ci } 2054141cc406Sopenharmony_ci 2055141cc406Sopenharmony_ci return rst; 2056141cc406Sopenharmony_ci} 2057141cc406Sopenharmony_ci 2058141cc406Sopenharmony_cistatic SANE_Int hp3800_motormove(SANE_Int item, struct st_motormove *reg) 2059141cc406Sopenharmony_ci{ 2060141cc406Sopenharmony_ci SANE_Int rst = ERROR; 2061141cc406Sopenharmony_ci 2062141cc406Sopenharmony_ci /* data is the same in all usb types and sensors so those args aren't needed */ 2063141cc406Sopenharmony_ci 2064141cc406Sopenharmony_ci if (reg != NULL) 2065141cc406Sopenharmony_ci { 2066141cc406Sopenharmony_ci struct st_motormove mv[] = 2067141cc406Sopenharmony_ci { 2068141cc406Sopenharmony_ci /* systemclock, ctpc, steptype, motorcurve } */ 2069141cc406Sopenharmony_ci { 0x04 , 1991, STT_HALF, 2 }, 2070141cc406Sopenharmony_ci { 0x02 , 1991, STT_HALF, -1 } 2071141cc406Sopenharmony_ci }; 2072141cc406Sopenharmony_ci 2073141cc406Sopenharmony_ci rst = OK; 2074141cc406Sopenharmony_ci 2075141cc406Sopenharmony_ci if ((item < 2)&&(item > -1)) 2076141cc406Sopenharmony_ci memcpy(reg, &mv[item], sizeof(struct st_motormove)); 2077141cc406Sopenharmony_ci else rst = ERROR; 2078141cc406Sopenharmony_ci } 2079141cc406Sopenharmony_ci 2080141cc406Sopenharmony_ci return rst; 2081141cc406Sopenharmony_ci} 2082141cc406Sopenharmony_ci 2083141cc406Sopenharmony_cistatic SANE_Int hp3970_motormove(SANE_Int usb, SANE_Int ccd, SANE_Int item, struct st_motormove *reg) 2084141cc406Sopenharmony_ci{ 2085141cc406Sopenharmony_ci SANE_Int rst = ERROR; 2086141cc406Sopenharmony_ci 2087141cc406Sopenharmony_ci struct st_mtmove 2088141cc406Sopenharmony_ci { 2089141cc406Sopenharmony_ci SANE_Int usbtype; 2090141cc406Sopenharmony_ci SANE_Int sensor; 2091141cc406Sopenharmony_ci struct st_motormove move; 2092141cc406Sopenharmony_ci }; 2093141cc406Sopenharmony_ci 2094141cc406Sopenharmony_ci if (reg != NULL) 2095141cc406Sopenharmony_ci { 2096141cc406Sopenharmony_ci struct st_mtmove mv[] = 2097141cc406Sopenharmony_ci { 2098141cc406Sopenharmony_ci /* usb, sensor , {systemclock, ctpc, steptype, motorcurve } */ 2099141cc406Sopenharmony_ci {USB20, CCD_SENSOR, {0x02 , 6431, STT_HALF, 1 }}, 2100141cc406Sopenharmony_ci {USB20, CCD_SENSOR, {0x02 , 2000, STT_HALF, -1 }}, 2101141cc406Sopenharmony_ci 2102141cc406Sopenharmony_ci {USB20, CIS_SENSOR, {0x02 , 6431, STT_HALF, 1 }}, 2103141cc406Sopenharmony_ci {USB20, CIS_SENSOR, {0x02 , 2000, STT_HALF, -1 }}, 2104141cc406Sopenharmony_ci 2105141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {0x02 , 6431, STT_HALF, 1 }}, 2106141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {0x02 , 2000, STT_HALF, -1 }}, 2107141cc406Sopenharmony_ci 2108141cc406Sopenharmony_ci {USB11, CIS_SENSOR, {0x02 , 6431, STT_HALF, 1 }}, 2109141cc406Sopenharmony_ci {USB11, CIS_SENSOR, {0x02 , 2000, STT_HALF, -1 }} 2110141cc406Sopenharmony_ci }; 2111141cc406Sopenharmony_ci 2112141cc406Sopenharmony_ci if (item < 2) 2113141cc406Sopenharmony_ci { 2114141cc406Sopenharmony_ci SANE_Int a, count = 0; 2115141cc406Sopenharmony_ci SANE_Int total = sizeof(mv) / sizeof(struct st_mtmove); 2116141cc406Sopenharmony_ci 2117141cc406Sopenharmony_ci for (a = 0; a < total; a++) 2118141cc406Sopenharmony_ci { 2119141cc406Sopenharmony_ci if ((mv[a].usbtype == usb)&&(mv[a].sensor == ccd)) 2120141cc406Sopenharmony_ci { 2121141cc406Sopenharmony_ci if (item == count) 2122141cc406Sopenharmony_ci { 2123141cc406Sopenharmony_ci memcpy(reg, &mv[a].move, sizeof(struct st_motormove)); 2124141cc406Sopenharmony_ci rst = OK; 2125141cc406Sopenharmony_ci break; 2126141cc406Sopenharmony_ci } else count++; 2127141cc406Sopenharmony_ci } 2128141cc406Sopenharmony_ci } 2129141cc406Sopenharmony_ci } 2130141cc406Sopenharmony_ci } 2131141cc406Sopenharmony_ci 2132141cc406Sopenharmony_ci return rst; 2133141cc406Sopenharmony_ci} 2134141cc406Sopenharmony_ci 2135141cc406Sopenharmony_ci/** SEC: Scanning modes ---------- */ 2136141cc406Sopenharmony_ci 2137141cc406Sopenharmony_cistatic SANE_Int cfg_scanmode_get(SANE_Int sensortype, SANE_Int sm, struct st_scanmode *mymode) 2138141cc406Sopenharmony_ci{ 2139141cc406Sopenharmony_ci SANE_Int rst = ERROR; 2140141cc406Sopenharmony_ci 2141141cc406Sopenharmony_ci switch(RTS_Debug->dev_model) 2142141cc406Sopenharmony_ci { 2143141cc406Sopenharmony_ci case BQ5550: 2144141cc406Sopenharmony_ci rst = bq5550_scanmodes(RTS_Debug->usbtype, sm, mymode); 2145141cc406Sopenharmony_ci break; 2146141cc406Sopenharmony_ci 2147141cc406Sopenharmony_ci case UA4900: 2148141cc406Sopenharmony_ci rst = ua4900_scanmodes(RTS_Debug->usbtype, sm, mymode); 2149141cc406Sopenharmony_ci break; 2150141cc406Sopenharmony_ci 2151141cc406Sopenharmony_ci case HP3800: 2152141cc406Sopenharmony_ci case HPG2710: 2153141cc406Sopenharmony_ci rst = hp3800_scanmodes(RTS_Debug->usbtype, sm, mymode); 2154141cc406Sopenharmony_ci break; 2155141cc406Sopenharmony_ci 2156141cc406Sopenharmony_ci case HP4370: 2157141cc406Sopenharmony_ci case HPG3010: 2158141cc406Sopenharmony_ci case HPG3110: 2159141cc406Sopenharmony_ci rst = hp4370_scanmodes(RTS_Debug->usbtype, sm, mymode); 2160141cc406Sopenharmony_ci break; 2161141cc406Sopenharmony_ci 2162141cc406Sopenharmony_ci default: /* hp3970 hp4070 */ 2163141cc406Sopenharmony_ci rst = hp3970_scanmodes(RTS_Debug->usbtype, sensortype, sm, mymode); 2164141cc406Sopenharmony_ci break; 2165141cc406Sopenharmony_ci } 2166141cc406Sopenharmony_ci 2167141cc406Sopenharmony_ci return rst; 2168141cc406Sopenharmony_ci} 2169141cc406Sopenharmony_ci 2170141cc406Sopenharmony_cistatic SANE_Int hp3970_scanmodes(SANE_Int usb, SANE_Int ccd, SANE_Int sm, struct st_scanmode *mymode) 2171141cc406Sopenharmony_ci{ 2172141cc406Sopenharmony_ci struct st_modes 2173141cc406Sopenharmony_ci { 2174141cc406Sopenharmony_ci SANE_Int usb; 2175141cc406Sopenharmony_ci SANE_Int sensor; 2176141cc406Sopenharmony_ci struct st_scanmode mode; 2177141cc406Sopenharmony_ci }; 2178141cc406Sopenharmony_ci 2179141cc406Sopenharmony_ci struct st_modes reg[] = 2180141cc406Sopenharmony_ci { 2181141cc406Sopenharmony_ci /* usb, sensor , {scantype , colormode, res , timing, curve, samplerate, clock, ctpc , backstp, steptype, dummyline, {expt }, {mexpt }, motorplus, mexpt16, mexptfull, mexposure, mri , msi , mmtir, mmtirh, skips } */ 2182141cc406Sopenharmony_ci {USB20, CCD_SENSOR, {ST_NORMAL, CM_COLOR , 2400, 0x00 , -1 , PIXEL_RATE, 0x04 , 24499, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2183141cc406Sopenharmony_ci {USB20, CCD_SENSOR, {ST_NORMAL, CM_COLOR , 1200, 0x01 , -1 , PIXEL_RATE, 0x05 , 14667, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2184141cc406Sopenharmony_ci {USB20, CCD_SENSOR, {ST_NORMAL, CM_COLOR , 600, 0x02 , 2 , PIXEL_RATE, 0x04 , 5499, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2185141cc406Sopenharmony_ci {USB20, CCD_SENSOR, {ST_NORMAL, CM_COLOR , 300, 0x03 , 3 , PIXEL_RATE, 0x04 , 2751, 768 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2186141cc406Sopenharmony_ci {USB20, CCD_SENSOR, {ST_NORMAL, CM_COLOR , 200, 0x04 , 4 , PIXEL_RATE, 0x04 , 2255, 1856 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2187141cc406Sopenharmony_ci {USB20, CCD_SENSOR, {ST_NORMAL, CM_COLOR , 100, 0x04 , 4 , PIXEL_RATE, 0x04 , 2255, 1856 , STT_HALF, 0x02 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2188141cc406Sopenharmony_ci 2189141cc406Sopenharmony_ci {USB20, CCD_SENSOR, {ST_NORMAL, CM_GRAY , 2400, 0x05 , -1 , LINE_RATE , 0x04 , 24499, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2190141cc406Sopenharmony_ci {USB20, CCD_SENSOR, {ST_NORMAL, CM_GRAY , 1200, 0x06 , -1 , LINE_RATE , 0x05 , 14667, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2191141cc406Sopenharmony_ci {USB20, CCD_SENSOR, {ST_NORMAL, CM_GRAY , 600, 0x07 , 2 , LINE_RATE , 0x04 , 5499, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2192141cc406Sopenharmony_ci {USB20, CCD_SENSOR, {ST_NORMAL, CM_GRAY , 300, 0x08 , 3 , LINE_RATE , 0x04 , 2751, 768 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2193141cc406Sopenharmony_ci {USB20, CCD_SENSOR, {ST_NORMAL, CM_GRAY , 200, 0x09 , 4 , LINE_RATE , 0x04 , 2255, 1856 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2194141cc406Sopenharmony_ci {USB20, CCD_SENSOR, {ST_NORMAL, CM_GRAY , 100, 0x09 , 4 , LINE_RATE , 0x04 , 2255, 1856 , STT_HALF, 0x02 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2195141cc406Sopenharmony_ci 2196141cc406Sopenharmony_ci /* usb, sensor , {scantype , colormode, res , timing, curve, samplerate, clock, ctpc , backstp, steptype, dummyline, {expt }, {mexpt }, motorplus, mexpt16, mexptfull, mexposure, mri , msi , mmtir, mmtirh, skips } */ 2197141cc406Sopenharmony_ci {USB20, CCD_SENSOR, {ST_TA , CM_COLOR , 2400, 0x00 , -1 , PIXEL_RATE, 0x04 , 25599, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2198141cc406Sopenharmony_ci {USB20, CCD_SENSOR, {ST_TA , CM_COLOR , 1200, 0x01 , -1 , PIXEL_RATE, 0x03 , 10899, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2199141cc406Sopenharmony_ci {USB20, CCD_SENSOR, {ST_TA , CM_COLOR , 600, 0x02 , -1 , PIXEL_RATE, 0x01 , 5487, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2200141cc406Sopenharmony_ci {USB20, CCD_SENSOR, {ST_TA , CM_COLOR , 300, 0x03 , 3 , PIXEL_RATE, 0x04 , 8351, 512 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2201141cc406Sopenharmony_ci {USB20, CCD_SENSOR, {ST_TA , CM_COLOR , 200, 0x04 , 4 , PIXEL_RATE, 0x04 , 7343, 1024 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2202141cc406Sopenharmony_ci {USB20, CCD_SENSOR, {ST_TA , CM_COLOR , 100, 0x04 , 4 , PIXEL_RATE, 0x04 , 7343, 1024 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2203141cc406Sopenharmony_ci 2204141cc406Sopenharmony_ci {USB20, CCD_SENSOR, {ST_TA , CM_GRAY , 2400, 0x05 , -1 , LINE_RATE , 0x04 , 25599, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2205141cc406Sopenharmony_ci {USB20, CCD_SENSOR, {ST_TA , CM_GRAY , 1200, 0x06 , -1 , LINE_RATE , 0x03 , 10899, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2206141cc406Sopenharmony_ci {USB20, CCD_SENSOR, {ST_TA , CM_GRAY , 600, 0x07 , -1 , LINE_RATE , 0x01 , 5487, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2207141cc406Sopenharmony_ci {USB20, CCD_SENSOR, {ST_TA , CM_GRAY , 300, 0x08 , 3 , LINE_RATE , 0x04 , 8351, 512 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2208141cc406Sopenharmony_ci {USB20, CCD_SENSOR, {ST_TA , CM_GRAY , 200, 0x09 , 4 , LINE_RATE , 0x04 , 7343, 1024 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2209141cc406Sopenharmony_ci {USB20, CCD_SENSOR, {ST_TA , CM_GRAY , 100, 0x09 , 4 , LINE_RATE , 0x04 , 7343, 1024 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2210141cc406Sopenharmony_ci 2211141cc406Sopenharmony_ci /* usb, sensor , {scantype , colormode, res , timing, curve, samplerate, clock, ctpc , backstp, steptype, dummyline, {expt }, {mexpt }, motorplus, mexpt16, mexptfull, mexposure, mri , msi , mmtir, mmtirh, skips } */ 2212141cc406Sopenharmony_ci {USB20, CCD_SENSOR, {ST_NEG , CM_COLOR , 2400, 0x00 , -1 , PIXEL_RATE, 0x02 , 76799, 256 , STT_FULL, 0x00 , {25599, 51199, 0}, {25599, 25599, 76799}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2213141cc406Sopenharmony_ci {USB20, CCD_SENSOR, {ST_NEG , CM_COLOR , 1200, 0x01 , -1 , PIXEL_RATE, 0x03 , 36467, 256 , STT_FULL, 0x00 , {12155, 24311, 0}, {12155, 12155, 36467}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2214141cc406Sopenharmony_ci {USB20, CCD_SENSOR, {ST_NEG , CM_COLOR , 600, 0x02 , -1 , PIXEL_RATE, 0x02 , 16463, 256 , STT_FULL, 0x00 , { 5487, 10975, 0}, { 5487, 5487, 16463}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2215141cc406Sopenharmony_ci {USB20, CCD_SENSOR, {ST_NEG , CM_COLOR , 300, 0x03 , -1 , PIXEL_RATE, 0x02 , 8351, 256 , STT_HALF, 0x00 , { 2783, 5567, 0}, { 2783, 2783, 8351}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2216141cc406Sopenharmony_ci {USB20, CCD_SENSOR, {ST_NEG , CM_COLOR , 200, 0x04 , -1 , PIXEL_RATE, 0x02 , 6191, 256 , STT_HALF, 0x00 , { 2063, 4127, 0}, { 2063, 2063, 6191}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2217141cc406Sopenharmony_ci {USB20, CCD_SENSOR, {ST_NEG , CM_COLOR , 100, 0x04 , -1 , PIXEL_RATE, 0x02 , 6191, 256 , STT_HALF, 0x02 , { 2063, 4127, 0}, { 2063, 2063, 6191}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2218141cc406Sopenharmony_ci 2219141cc406Sopenharmony_ci {USB20, CCD_SENSOR, {ST_NEG , CM_GRAY , 2400, 0x05 , -1 , LINE_RATE , 0x02 , 76799, 256 , STT_FULL, 0x00 , {25599, 51199, 0}, {25599, 25599, 76799}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2220141cc406Sopenharmony_ci {USB20, CCD_SENSOR, {ST_NEG , CM_GRAY , 1200, 0x06 , -1 , LINE_RATE , 0x03 , 36467, 256 , STT_FULL, 0x00 , {12155, 24311, 0}, {12155, 12155, 36467}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2221141cc406Sopenharmony_ci {USB20, CCD_SENSOR, {ST_NEG , CM_GRAY , 600, 0x07 , -1 , LINE_RATE , 0x02 , 16463, 256 , STT_FULL, 0x00 , { 5487, 10975, 0}, { 5487, 5487, 16463}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2222141cc406Sopenharmony_ci {USB20, CCD_SENSOR, {ST_NEG , CM_GRAY , 300, 0x08 , -1 , LINE_RATE , 0x02 , 8351, 256 , STT_HALF, 0x00 , { 2783, 5567, 0}, { 2783, 2783, 8351}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2223141cc406Sopenharmony_ci {USB20, CCD_SENSOR, {ST_NEG , CM_GRAY , 200, 0x09 , -1 , LINE_RATE , 0x02 , 6191, 256 , STT_HALF, 0x00 , { 2063, 4127, 0}, { 2063, 2063, 6191}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2224141cc406Sopenharmony_ci {USB20, CCD_SENSOR, {ST_NEG , CM_GRAY , 100, 0x09 , -1 , LINE_RATE , 0x02 , 6191, 256 , STT_HALF, 0x02 , { 2063, 4127, 0}, { 2063, 2063, 6191}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2225141cc406Sopenharmony_ci 2226141cc406Sopenharmony_ci /* usb, sensor , {scantype , colormode, res , timing, curve, samplerate, clock, ctpc , backstp, steptype, dummyline, {expt }, {mexpt }, motorplus, mexpt16, mexptfull, mexposure, mri , msi , mmtir, mmtirh, skips } */ 2227141cc406Sopenharmony_ci {USB20, CIS_SENSOR, {ST_NORMAL, CM_COLOR , 2400, 0x00 , -1 , PIXEL_RATE, 0x04 , 24499, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2228141cc406Sopenharmony_ci {USB20, CIS_SENSOR, {ST_NORMAL, CM_COLOR , 1200, 0x01 , -1 , PIXEL_RATE, 0x05 , 14667, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2229141cc406Sopenharmony_ci {USB20, CIS_SENSOR, {ST_NORMAL, CM_COLOR , 600, 0x02 , 2 , PIXEL_RATE, 0x04 , 5499, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2230141cc406Sopenharmony_ci {USB20, CIS_SENSOR, {ST_NORMAL, CM_COLOR , 300, 0x03 , 3 , PIXEL_RATE, 0x04 , 2751, 768 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2231141cc406Sopenharmony_ci {USB20, CIS_SENSOR, {ST_NORMAL, CM_COLOR , 200, 0x04 , 4 , PIXEL_RATE, 0x04 , 2255, 1856 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2232141cc406Sopenharmony_ci {USB20, CIS_SENSOR, {ST_NORMAL, CM_COLOR , 100, 0x04 , 4 , PIXEL_RATE, 0x04 , 2255, 1856 , STT_HALF, 0x02 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2233141cc406Sopenharmony_ci 2234141cc406Sopenharmony_ci {USB20, CIS_SENSOR, {ST_NORMAL, CM_GRAY , 2400, 0x05 , -1 , LINE_RATE , 0x04 , 24499, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2235141cc406Sopenharmony_ci {USB20, CIS_SENSOR, {ST_NORMAL, CM_GRAY , 1200, 0x06 , -1 , LINE_RATE , 0x05 , 14667, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2236141cc406Sopenharmony_ci {USB20, CIS_SENSOR, {ST_NORMAL, CM_GRAY , 600, 0x07 , 2 , LINE_RATE , 0x04 , 5499, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2237141cc406Sopenharmony_ci {USB20, CIS_SENSOR, {ST_NORMAL, CM_GRAY , 300, 0x08 , 3 , LINE_RATE , 0x04 , 2751, 768 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2238141cc406Sopenharmony_ci {USB20, CIS_SENSOR, {ST_NORMAL, CM_GRAY , 200, 0x09 , 4 , LINE_RATE , 0x04 , 2255, 1856 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2239141cc406Sopenharmony_ci {USB20, CIS_SENSOR, {ST_NORMAL, CM_GRAY , 100, 0x09 , 4 , LINE_RATE , 0x04 , 2255, 1856 , STT_HALF, 0x02 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2240141cc406Sopenharmony_ci 2241141cc406Sopenharmony_ci /* usb, sensor , {scantype , colormode, res , timing, curve, samplerate, clock, ctpc , backstp, steptype, dummyline, {expt }, {mexpt }, motorplus, mexpt16, mexptfull, mexposure, mri , msi , mmtir, mmtirh, skips } */ 2242141cc406Sopenharmony_ci {USB20, CIS_SENSOR, {ST_TA , CM_COLOR , 2400, 0x00 , -1 , PIXEL_RATE, 0x04 , 25599, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2243141cc406Sopenharmony_ci {USB20, CIS_SENSOR, {ST_TA , CM_COLOR , 1200, 0x01 , -1 , PIXEL_RATE, 0x03 , 10899, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2244141cc406Sopenharmony_ci {USB20, CIS_SENSOR, {ST_TA , CM_COLOR , 600, 0x02 , -1 , PIXEL_RATE, 0x01 , 5487, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2245141cc406Sopenharmony_ci {USB20, CIS_SENSOR, {ST_TA , CM_COLOR , 300, 0x03 , 3 , PIXEL_RATE, 0x04 , 8351, 512 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2246141cc406Sopenharmony_ci {USB20, CIS_SENSOR, {ST_TA , CM_COLOR , 200, 0x04 , 4 , PIXEL_RATE, 0x04 , 7343, 1024 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2247141cc406Sopenharmony_ci {USB20, CIS_SENSOR, {ST_TA , CM_COLOR , 100, 0x04 , 4 , PIXEL_RATE, 0x04 , 7343, 1024 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2248141cc406Sopenharmony_ci 2249141cc406Sopenharmony_ci {USB20, CIS_SENSOR, {ST_TA , CM_GRAY , 2400, 0x05 , -1 , LINE_RATE , 0x04 , 25599, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2250141cc406Sopenharmony_ci {USB20, CIS_SENSOR, {ST_TA , CM_GRAY , 1200, 0x06 , -1 , LINE_RATE , 0x03 , 10899, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2251141cc406Sopenharmony_ci {USB20, CIS_SENSOR, {ST_TA , CM_GRAY , 600, 0x07 , -1 , LINE_RATE , 0x01 , 5487, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2252141cc406Sopenharmony_ci {USB20, CIS_SENSOR, {ST_TA , CM_GRAY , 300, 0x08 , 3 , LINE_RATE , 0x04 , 8351, 512 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2253141cc406Sopenharmony_ci {USB20, CIS_SENSOR, {ST_TA , CM_GRAY , 200, 0x09 , 4 , LINE_RATE , 0x04 , 7343, 1024 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2254141cc406Sopenharmony_ci {USB20, CIS_SENSOR, {ST_TA , CM_GRAY , 100, 0x09 , 4 , LINE_RATE , 0x04 , 7343, 1024 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2255141cc406Sopenharmony_ci 2256141cc406Sopenharmony_ci /* usb, sensor , {scantype , colormode, res , timing, curve, samplerate, clock, ctpc , backstp, steptype, dummyline, {expt }, {mexpt }, motorplus, mexpt16, mexptfull, mexposure, mri , msi , mmtir, mmtirh, skips } */ 2257141cc406Sopenharmony_ci {USB20, CIS_SENSOR, {ST_NEG , CM_COLOR , 2400, 0x00 , -1 , PIXEL_RATE, 0x02 , 76799, 256 , STT_FULL, 0x00 , {25599, 51199, 0}, {25599, 25599, 76799}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2258141cc406Sopenharmony_ci {USB20, CIS_SENSOR, {ST_NEG , CM_COLOR , 1200, 0x01 , -1 , PIXEL_RATE, 0x03 , 36467, 256 , STT_FULL, 0x00 , {12155, 24311, 0}, {12155, 12155, 36467}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2259141cc406Sopenharmony_ci {USB20, CIS_SENSOR, {ST_NEG , CM_COLOR , 600, 0x02 , -1 , PIXEL_RATE, 0x02 , 16463, 256 , STT_FULL, 0x00 , { 5487, 10975, 0}, { 5487, 5487, 16463}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2260141cc406Sopenharmony_ci {USB20, CIS_SENSOR, {ST_NEG , CM_COLOR , 300, 0x03 , -1 , PIXEL_RATE, 0x02 , 8351, 256 , STT_HALF, 0x00 , { 2783, 5567, 0}, { 2783, 2783, 8351}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2261141cc406Sopenharmony_ci {USB20, CIS_SENSOR, {ST_NEG , CM_COLOR , 200, 0x04 , -1 , PIXEL_RATE, 0x02 , 6191, 256 , STT_HALF, 0x00 , { 2063, 4127, 0}, { 2063, 2063, 6191}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2262141cc406Sopenharmony_ci {USB20, CIS_SENSOR, {ST_NEG , CM_COLOR , 100, 0x04 , -1 , PIXEL_RATE, 0x02 , 6191, 256 , STT_HALF, 0x02 , { 2063, 4127, 0}, { 2063, 2063, 6191}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2263141cc406Sopenharmony_ci 2264141cc406Sopenharmony_ci {USB20, CIS_SENSOR, {ST_NEG , CM_GRAY , 2400, 0x05 , -1 , LINE_RATE , 0x02 , 76799, 256 , STT_FULL, 0x00 , {25599, 51199, 0}, {25599, 25599, 76799}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2265141cc406Sopenharmony_ci {USB20, CIS_SENSOR, {ST_NEG , CM_GRAY , 1200, 0x06 , -1 , LINE_RATE , 0x03 , 36467, 256 , STT_FULL, 0x00 , {12155, 24311, 0}, {12155, 12155, 36467}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2266141cc406Sopenharmony_ci {USB20, CIS_SENSOR, {ST_NEG , CM_GRAY , 600, 0x07 , -1 , LINE_RATE , 0x02 , 16463, 256 , STT_FULL, 0x00 , { 5487, 10975, 0}, { 5487, 5487, 16463}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2267141cc406Sopenharmony_ci {USB20, CIS_SENSOR, {ST_NEG , CM_GRAY , 300, 0x08 , -1 , LINE_RATE , 0x02 , 8351, 256 , STT_HALF, 0x00 , { 2783, 5567, 0}, { 2783, 2783, 8351}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2268141cc406Sopenharmony_ci {USB20, CIS_SENSOR, {ST_NEG , CM_GRAY , 200, 0x09 , -1 , LINE_RATE , 0x02 , 6191, 256 , STT_HALF, 0x00 , { 2063, 4127, 0}, { 2063, 2063, 6191}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2269141cc406Sopenharmony_ci {USB20, CIS_SENSOR, {ST_NEG , CM_GRAY , 100, 0x09 , -1 , LINE_RATE , 0x02 , 6191, 256 , STT_HALF, 0x02 , { 2063, 4127, 0}, { 2063, 2063, 6191}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2270141cc406Sopenharmony_ci 2271141cc406Sopenharmony_ci /* usb, sensor , {scantype , colormode, res , timing, curve, samplerate, clock, ctpc , backstp, steptype, dummyline, {expt }, {mexpt }, motorplus, mexpt16, mexptfull, mexposure, mri , msi , mmtir, mmtirh, skips } */ 2272141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_NORMAL, CM_COLOR , 2400, 0x00 , -1 , PIXEL_RATE, 0x03 , 21499, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2273141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_NORMAL, CM_COLOR , 1200, 0x01 , -1 , PIXEL_RATE, 0x04 , 14667, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2274141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_NORMAL, CM_COLOR , 600, 0x02 , -1 , PIXEL_RATE, 0x04 , 21999, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2275141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_NORMAL, CM_COLOR , 300, 0x03 , 3 , PIXEL_RATE, 0x04 , 10727, 768 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2276141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_NORMAL, CM_COLOR , 200, 0x04 , 4 , PIXEL_RATE, 0x04 , 5591, 1024 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2277141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_NORMAL, CM_COLOR , 100, 0x04 , 4 , PIXEL_RATE, 0x04 , 2255, 1856 , STT_HALF, 0x02 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2278141cc406Sopenharmony_ci 2279141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_NORMAL, CM_GRAY , 2400, 0x05 , -1 , LINE_RATE , 0x02 , 21499, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2280141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_NORMAL, CM_GRAY , 1200, 0x06 , -1 , LINE_RATE , 0x04 , 14667, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2281141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_NORMAL, CM_GRAY , 600, 0x07 , 2 , LINE_RATE , 0x04 , 6999, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2282141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_NORMAL, CM_GRAY , 300, 0x08 , 3 , LINE_RATE , 0x04 , 4671, 768 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2283141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_NORMAL, CM_GRAY , 200, 0x09 , 4 , LINE_RATE , 0x04 , 2255, 1856 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2284141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_NORMAL, CM_GRAY , 100, 0x09 , 4 , LINE_RATE , 0x04 , 2255, 1856 , STT_HALF, 0x02 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2285141cc406Sopenharmony_ci 2286141cc406Sopenharmony_ci /* usb, sensor , {scantype , colormode, res , timing, curve, samplerate, clock, ctpc , backstp, steptype, dummyline, {expt }, {mexpt }, motorplus, mexpt16, mexptfull, mexposure, mri , msi , mmtir, mmtirh, skips } */ 2287141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_TA , CM_COLOR , 2400, 0x00 , -1 , PIXEL_RATE, 0x04 , 25599, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2288141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_TA , CM_COLOR , 1200, 0x01 , -1 , PIXEL_RATE, 0x03 , 10899, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2289141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_TA , CM_COLOR , 600, 0x02 , -1 , PIXEL_RATE, 0x01 , 5487, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2290141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_TA , CM_COLOR , 300, 0x03 , 3 , PIXEL_RATE, 0x04 , 8351, 512 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2291141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_TA , CM_COLOR , 200, 0x04 , 4 , PIXEL_RATE, 0x04 , 7343, 1024 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2292141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_TA , CM_COLOR , 100, 0x04 , 4 , PIXEL_RATE, 0x04 , 7343, 1024 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2293141cc406Sopenharmony_ci 2294141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_TA , CM_GRAY , 2400, 0x05 , -1 , LINE_RATE , 0x04 , 25599, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2295141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_TA , CM_GRAY , 1200, 0x06 , -1 , LINE_RATE , 0x03 , 10899, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2296141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_TA , CM_GRAY , 600, 0x07 , -1 , LINE_RATE , 0x01 , 5487, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2297141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_TA , CM_GRAY , 300, 0x08 , 3 , LINE_RATE , 0x04 , 8351, 512 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2298141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_TA , CM_GRAY , 200, 0x09 , 4 , LINE_RATE , 0x04 , 7343, 1024 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2299141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_TA , CM_GRAY , 100, 0x09 , 4 , LINE_RATE , 0x04 , 7343, 1024 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2300141cc406Sopenharmony_ci 2301141cc406Sopenharmony_ci /* usb, sensor , {scantype , colormode, res , timing, curve, samplerate, clock, ctpc , backstp, steptype, dummyline, {expt }, {mexpt }, motorplus, mexpt16, mexptfull, mexposure, mri , msi , mmtir, mmtirh, skips } */ 2302141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_NEG , CM_COLOR , 2400, 0x00 , -1 , PIXEL_RATE, 0x02 , 76799, 256 , STT_FULL, 0x00 , {25599, 51199, 0}, {25599, 25599, 76799}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2303141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_NEG , CM_COLOR , 1200, 0x01 , -1 , PIXEL_RATE, 0x03 , 36467, 256 , STT_FULL, 0x00 , {12155, 24311, 0}, {12155, 12155, 36467}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2304141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_NEG , CM_COLOR , 600, 0x02 , -1 , PIXEL_RATE, 0x02 , 16463, 256 , STT_FULL, 0x00 , { 5487, 10975, 0}, { 5487, 5487, 16463}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2305141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_NEG , CM_COLOR , 300, 0x03 , -1 , PIXEL_RATE, 0x02 , 8351, 256 , STT_HALF, 0x00 , { 2783, 5567, 0}, { 2783, 2783, 8351}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2306141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_NEG , CM_COLOR , 200, 0x04 , -1 , PIXEL_RATE, 0x02 , 6191, 256 , STT_HALF, 0x00 , { 2063, 4127, 0}, { 2063, 2063, 6191}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2307141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_NEG , CM_COLOR , 100, 0x04 , -1 , PIXEL_RATE, 0x02 , 6191, 256 , STT_HALF, 0x02 , { 2063, 4127, 0}, { 2063, 2063, 6191}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2308141cc406Sopenharmony_ci 2309141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_NEG , CM_GRAY , 2400, 0x05 , -1 , LINE_RATE , 0x02 , 76799, 256 , STT_FULL, 0x00 , {25599, 51199, 0}, {25599, 25599, 76799}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2310141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_NEG , CM_GRAY , 1200, 0x06 , -1 , LINE_RATE , 0x03 , 36467, 256 , STT_FULL, 0x00 , {12155, 24311, 0}, {12155, 12155, 36467}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2311141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_NEG , CM_GRAY , 600, 0x07 , -1 , LINE_RATE , 0x02 , 16463, 256 , STT_FULL, 0x00 , { 5487, 10975, 0}, { 5487, 5487, 16463}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2312141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_NEG , CM_GRAY , 300, 0x08 , -1 , LINE_RATE , 0x02 , 8351, 256 , STT_HALF, 0x00 , { 2783, 5567, 0}, { 2783, 2783, 8351}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2313141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_NEG , CM_GRAY , 200, 0x09 , -1 , LINE_RATE , 0x02 , 6191, 256 , STT_HALF, 0x00 , { 2063, 4127, 0}, { 2063, 2063, 6191}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2314141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_NEG , CM_GRAY , 100, 0x09 , -1 , LINE_RATE , 0x02 , 6191, 256 , STT_HALF, 0x02 , { 2063, 4127, 0}, { 2063, 2063, 6191}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2315141cc406Sopenharmony_ci 2316141cc406Sopenharmony_ci /* usb, sensor , {scantype , colormode, res , timing, curve, samplerate, clock, ctpc , backstp, steptype, dummyline, {expt }, {mexpt }, motorplus, mexpt16, mexptfull, mexposure, mri , msi , mmtir, mmtirh, skips } */ 2317141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_NORMAL, CM_COLOR , 2400, 0x00 , -1 , PIXEL_RATE, 0x02 , 21499, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2318141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_NORMAL, CM_COLOR , 1200, 0x01 , -1 , PIXEL_RATE, 0x03 , 14667, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2319141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_NORMAL, CM_COLOR , 600, 0x02 , -1 , PIXEL_RATE, 0x04 , 21999, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2320141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_NORMAL, CM_COLOR , 300, 0x03 , 3 , PIXEL_RATE, 0x04 , 10727, 768 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2321141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_NORMAL, CM_COLOR , 200, 0x04 , 4 , PIXEL_RATE, 0x04 , 5591, 1024 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2322141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_NORMAL, CM_COLOR , 100, 0x04 , 4 , PIXEL_RATE, 0x04 , 2255, 1856 , STT_HALF, 0x02 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2323141cc406Sopenharmony_ci 2324141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_NORMAL, CM_GRAY , 2400, 0x05 , -1 , LINE_RATE , 0x02 , 21499, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2325141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_NORMAL, CM_GRAY , 1200, 0x06 , -1 , LINE_RATE , 0x04 , 14667, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2326141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_NORMAL, CM_GRAY , 600, 0x07 , 2 , LINE_RATE , 0x04 , 6999, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2327141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_NORMAL, CM_GRAY , 300, 0x08 , 3 , LINE_RATE , 0x04 , 4671, 768 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2328141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_NORMAL, CM_GRAY , 200, 0x09 , 4 , LINE_RATE , 0x04 , 2255, 1856 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2329141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_NORMAL, CM_GRAY , 100, 0x09 , 4 , LINE_RATE , 0x04 , 2255, 1856 , STT_HALF, 0x02 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2330141cc406Sopenharmony_ci 2331141cc406Sopenharmony_ci /* usb, sensor , {scantype , colormode, res , timing, curve, samplerate, clock, ctpc , backstp, steptype, dummyline, {expt }, {mexpt }, motorplus, mexpt16, mexptfull, mexposure, mri , msi , mmtir, mmtirh, skips } */ 2332141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_TA , CM_COLOR , 2400, 0x00 , -1 , PIXEL_RATE, 0x04 , 25599, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2333141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_TA , CM_COLOR , 1200, 0x01 , -1 , PIXEL_RATE, 0x03 , 10899, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2334141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_TA , CM_COLOR , 600, 0x02 , -1 , PIXEL_RATE, 0x01 , 5487, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2335141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_TA , CM_COLOR , 300, 0x03 , 3 , PIXEL_RATE, 0x04 , 8351, 512 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2336141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_TA , CM_COLOR , 200, 0x04 , 4 , PIXEL_RATE, 0x04 , 7343, 1024 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2337141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_TA , CM_COLOR , 100, 0x04 , 4 , PIXEL_RATE, 0x04 , 7343, 1024 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2338141cc406Sopenharmony_ci 2339141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_TA , CM_GRAY , 2400, 0x05 , -1 , LINE_RATE , 0x04 , 25599, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2340141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_TA , CM_GRAY , 1200, 0x06 , -1 , LINE_RATE , 0x03 , 10899, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2341141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_TA , CM_GRAY , 600, 0x07 , -1 , LINE_RATE , 0x01 , 5487, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2342141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_TA , CM_GRAY , 300, 0x08 , 3 , LINE_RATE , 0x04 , 8351, 512 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2343141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_TA , CM_GRAY , 200, 0x09 , 4 , LINE_RATE , 0x04 , 7343, 1024 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2344141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_TA , CM_GRAY , 100, 0x09 , 4 , LINE_RATE , 0x04 , 7343, 1024 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2345141cc406Sopenharmony_ci 2346141cc406Sopenharmony_ci /* usb, sensor , {scantype , colormode, res , timing, curve, samplerate, clock, ctpc , backstp, steptype, dummyline, {expt }, {mexpt }, motorplus, mexpt16, mexptfull, mexposure, mri , msi , mmtir, mmtirh, skips } */ 2347141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_NEG , CM_COLOR , 2400, 0x00 , -1 , PIXEL_RATE, 0x02 , 76799, 256 , STT_FULL, 0x00 , {25599, 51199, 0}, {25599, 25599, 76799}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2348141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_NEG , CM_COLOR , 1200, 0x01 , -1 , PIXEL_RATE, 0x03 , 36467, 256 , STT_FULL, 0x00 , {12155, 24311, 0}, {12155, 12155, 36467}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2349141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_NEG , CM_COLOR , 600, 0x02 , -1 , PIXEL_RATE, 0x02 , 16463, 256 , STT_FULL, 0x00 , { 5487, 10975, 0}, { 5487, 5487, 16463}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2350141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_NEG , CM_COLOR , 300, 0x03 , -1 , PIXEL_RATE, 0x02 , 8351, 256 , STT_HALF, 0x00 , { 2783, 5567, 0}, { 2783, 2783, 8351}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2351141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_NEG , CM_COLOR , 200, 0x04 , -1 , PIXEL_RATE, 0x02 , 6191, 256 , STT_HALF, 0x00 , { 2063, 4127, 0}, { 2063, 2063, 6191}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2352141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_NEG , CM_COLOR , 100, 0x04 , -1 , PIXEL_RATE, 0x02 , 6191, 256 , STT_HALF, 0x02 , { 2063, 4127, 0}, { 2063, 2063, 6191}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2353141cc406Sopenharmony_ci 2354141cc406Sopenharmony_ci {USB11, CIS_SENSOR, {ST_NEG , CM_GRAY , 2400, 0x05 , -1 , LINE_RATE , 0x02 , 76799, 256 , STT_FULL, 0x00 , {25599, 51199, 0}, {25599, 25599, 76799}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2355141cc406Sopenharmony_ci {USB11, CIS_SENSOR, {ST_NEG , CM_GRAY , 1200, 0x06 , -1 , LINE_RATE , 0x03 , 36467, 256 , STT_FULL, 0x00 , {12155, 24311, 0}, {12155, 12155, 36467}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2356141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_NEG , CM_GRAY , 600, 0x07 , -1 , LINE_RATE , 0x02 , 16463, 256 , STT_FULL, 0x00 , { 5487, 10975, 0}, { 5487, 5487, 16463}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2357141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_NEG , CM_GRAY , 300, 0x08 , -1 , LINE_RATE , 0x02 , 8351, 256 , STT_HALF, 0x00 , { 2783, 5567, 0}, { 2783, 2783, 8351}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2358141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_NEG , CM_GRAY , 200, 0x09 , -1 , LINE_RATE , 0x02 , 6191, 256 , STT_HALF, 0x00 , { 2063, 4127, 0}, { 2063, 2063, 6191}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2359141cc406Sopenharmony_ci {USB11, CCD_SENSOR, {ST_NEG , CM_GRAY , 100, 0x09 , -1 , LINE_RATE , 0x02 , 6191, 256 , STT_HALF, 0x02 , { 2063, 4127, 0}, { 2063, 2063, 6191}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }} 2360141cc406Sopenharmony_ci }; 2361141cc406Sopenharmony_ci 2362141cc406Sopenharmony_ci SANE_Int rst = ERROR; 2363141cc406Sopenharmony_ci 2364141cc406Sopenharmony_ci if (mymode != NULL) 2365141cc406Sopenharmony_ci { 2366141cc406Sopenharmony_ci SANE_Int a; 2367141cc406Sopenharmony_ci SANE_Int total = sizeof(reg) / sizeof(struct st_modes); 2368141cc406Sopenharmony_ci SANE_Int count = 0; 2369141cc406Sopenharmony_ci struct st_modes *md; 2370141cc406Sopenharmony_ci 2371141cc406Sopenharmony_ci for (a = 0; a < total; a++) 2372141cc406Sopenharmony_ci { 2373141cc406Sopenharmony_ci md = ®[a]; 2374141cc406Sopenharmony_ci if ((md->usb == usb)&&(md->sensor == ccd)) 2375141cc406Sopenharmony_ci { 2376141cc406Sopenharmony_ci if (count == sm) 2377141cc406Sopenharmony_ci { 2378141cc406Sopenharmony_ci memcpy(mymode, &md->mode, sizeof(struct st_scanmode)); 2379141cc406Sopenharmony_ci rst = OK; 2380141cc406Sopenharmony_ci break; 2381141cc406Sopenharmony_ci } 2382141cc406Sopenharmony_ci 2383141cc406Sopenharmony_ci count++; 2384141cc406Sopenharmony_ci } 2385141cc406Sopenharmony_ci } 2386141cc406Sopenharmony_ci } 2387141cc406Sopenharmony_ci 2388141cc406Sopenharmony_ci return rst; 2389141cc406Sopenharmony_ci} 2390141cc406Sopenharmony_ci 2391141cc406Sopenharmony_cistatic SANE_Int hp4370_scanmodes(SANE_Int usb, SANE_Int sm, struct st_scanmode *mymode) 2392141cc406Sopenharmony_ci{ 2393141cc406Sopenharmony_ci struct st_modes 2394141cc406Sopenharmony_ci { 2395141cc406Sopenharmony_ci SANE_Int usb; 2396141cc406Sopenharmony_ci struct st_scanmode mode; 2397141cc406Sopenharmony_ci }; 2398141cc406Sopenharmony_ci 2399141cc406Sopenharmony_ci struct st_modes reg[] = 2400141cc406Sopenharmony_ci { 2401141cc406Sopenharmony_ci /* usb, {scantype , colormode, res , timing, curve, samplerate, clock, ctpc , backstp, steptype, dummyline, {expt }, {mexpt }, motorplus, mexpt16, mexptfull, mexposure, mri , msi , mmtir, mmtirh, skips } */ 2402141cc406Sopenharmony_ci {USB20, {ST_NORMAL, CM_COLOR , 4800, 0x00 , -1 , PIXEL_RATE, 0x05 , 47799, 256 , STT_HALF, 0x00 , {23899, 23899, 23899}, {23899, 23899, 23899}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2403141cc406Sopenharmony_ci {USB20, {ST_NORMAL, CM_COLOR , 2400, 0x01 , -1 , PIXEL_RATE, 0x05 , 31849, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2404141cc406Sopenharmony_ci {USB20, {ST_NORMAL, CM_COLOR , 1200, 0x02 , -1 , PIXEL_RATE, 0x05 , 15999, 256 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2405141cc406Sopenharmony_ci {USB20, {ST_NORMAL, CM_COLOR , 600, 0x03 , 2 , PIXEL_RATE, 0x05 , 7999, 256 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2406141cc406Sopenharmony_ci {USB20, {ST_NORMAL, CM_COLOR , 300, 0x04 , 3 , PIXEL_RATE, 0x04 , 2799, 768 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2407141cc406Sopenharmony_ci {USB20, {ST_NORMAL, CM_COLOR , 150, 0x04 , 4 , PIXEL_RATE, 0x04 , 2799, 1856 , STT_HALF, 0x01 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2408141cc406Sopenharmony_ci 2409141cc406Sopenharmony_ci {USB20, {ST_NORMAL, CM_GRAY , 4800, 0x05 , -1 , LINE_RATE , 0x05 , 47799, 256 , STT_HALF, 0x00 , {23899, 23899, 23899}, {23899, 23899, 23899}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2410141cc406Sopenharmony_ci {USB20, {ST_NORMAL, CM_GRAY , 2400, 0x06 , -1 , LINE_RATE , 0x05 , 31849, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2411141cc406Sopenharmony_ci {USB20, {ST_NORMAL, CM_GRAY , 1200, 0x07 , -1 , LINE_RATE , 0x05 , 15999, 256 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2412141cc406Sopenharmony_ci {USB20, {ST_NORMAL, CM_GRAY , 600, 0x08 , 2 , LINE_RATE , 0x05 , 7999, 256 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2413141cc406Sopenharmony_ci {USB20, {ST_NORMAL, CM_GRAY , 300, 0x09 , 3 , LINE_RATE , 0x04 , 2799, 768 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2414141cc406Sopenharmony_ci {USB20, {ST_NORMAL, CM_GRAY , 150, 0x09 , 4 , LINE_RATE , 0x04 , 2799, 1856 , STT_HALF, 0x01 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2415141cc406Sopenharmony_ci 2416141cc406Sopenharmony_ci /* usb, {scantype , colormode, res , timing, curve, samplerate, clock, ctpc , backstp, steptype, dummyline, {expt }, {mexpt }, motorplus, mexpt16, mexptfull, mexposure, mri , msi , mmtir, mmtirh, skips } */ 2417141cc406Sopenharmony_ci {USB20, {ST_TA , CM_COLOR , 4800, 0x0A , -1 , PIXEL_RATE, 0x05 , 53999, 256 , STT_HALF, 0x00 , {26999, 26999, 26999}, {26999, 26999, 26999}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2418141cc406Sopenharmony_ci {USB20, {ST_TA , CM_COLOR , 2400, 0x01 , -1 , PIXEL_RATE, 0x05 , 35999, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2419141cc406Sopenharmony_ci {USB20, {ST_TA , CM_COLOR , 1200, 0x02 , -1 , PIXEL_RATE, 0x05 , 17999, 256 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2420141cc406Sopenharmony_ci {USB20, {ST_TA , CM_COLOR , 600, 0x03 , 2 , PIXEL_RATE, 0x05 , 8999, 256 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2421141cc406Sopenharmony_ci {USB20, {ST_TA , CM_COLOR , 300, 0x04 , 3 , PIXEL_RATE, 0x04 , 2959, 512 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2422141cc406Sopenharmony_ci {USB20, {ST_TA , CM_COLOR , 150, 0x04 , 4 , PIXEL_RATE, 0x04 , 2959, 1024 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2423141cc406Sopenharmony_ci 2424141cc406Sopenharmony_ci {USB20, {ST_TA , CM_GRAY , 4800, 0x0B , -1 , LINE_RATE , 0x05 , 53999, 256 , STT_HALF, 0x00 , {26999, 26999, 26999}, {26999, 26999, 26999}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2425141cc406Sopenharmony_ci {USB20, {ST_TA , CM_GRAY , 2400, 0x06 , -1 , LINE_RATE , 0x05 , 35999, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2426141cc406Sopenharmony_ci {USB20, {ST_TA , CM_GRAY , 1200, 0x07 , -1 , LINE_RATE , 0x05 , 17999, 256 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2427141cc406Sopenharmony_ci {USB20, {ST_TA , CM_GRAY , 600, 0x08 , 3 , LINE_RATE , 0x05 , 8999, 512 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2428141cc406Sopenharmony_ci {USB20, {ST_TA , CM_GRAY , 300, 0x09 , 4 , LINE_RATE , 0x04 , 2959, 1024 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2429141cc406Sopenharmony_ci {USB20, {ST_TA , CM_GRAY , 150, 0x09 , 4 , LINE_RATE , 0x05 , 2959, 1024 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2430141cc406Sopenharmony_ci 2431141cc406Sopenharmony_ci /* usb, {scantype , colormode, res , timing, curve, samplerate, clock, ctpc , backstp, steptype, dummyline, {expt }, {mexpt }, motorplus, mexpt16, mexptfull, mexposure, mri , msi , mmtir, mmtirh, skips } */ 2432141cc406Sopenharmony_ci {USB20, {ST_NEG , CM_COLOR , 4800, 0x0C , -1 , PIXEL_RATE, 0x05 , 60599, 256 , STT_HALF, 0x00 , {30299, 30299, 30299}, {30299, 30299, 30299}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2433141cc406Sopenharmony_ci {USB20, {ST_NEG , CM_COLOR , 2400, 0x01 , -1 , PIXEL_RATE, 0x05 , 145799, 256 , STT_FULL, 0x00 , {48599, 97199, 0}, {48599, 48599, 145799}, 0 , 1 , -1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2434141cc406Sopenharmony_ci {USB20, {ST_NEG , CM_COLOR , 1200, 0x02 , -1 , PIXEL_RATE, 0x05 , 89999, 256 , STT_FULL, 0x00 , {29999, 59999, 0}, {29999, 29999, 89999}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2435141cc406Sopenharmony_ci {USB20, {ST_NEG , CM_COLOR , 600, 0x03 , -1 , PIXEL_RATE, 0x05 , 45999, 256 , STT_HALF, 0x00 , {15333, 30666, 0}, {15333, 15333, 45999}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2436141cc406Sopenharmony_ci {USB20, {ST_NEG , CM_COLOR , 300, 0x04 , -1 , PIXEL_RATE, 0x04 , 14879, 256 , STT_HALF, 0x00 , { 4959, 9919, 0}, { 4959, 4959, 14879}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2437141cc406Sopenharmony_ci {USB20, {ST_NEG , CM_COLOR , 150, 0x04 , 3 , PIXEL_RATE, 0x04 , 14879, 256 , STT_HALF, 0x00 , { 4959, 9919, 0}, { 4959, 4959, 14879}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2438141cc406Sopenharmony_ci 2439141cc406Sopenharmony_ci {USB20, {ST_NEG , CM_GRAY , 4800, 0x0D , -1 , LINE_RATE , 0x05 , 60599, 256 , STT_FULL, 0x00 , {30299, 30299, 30299}, {30299, 30299, 30299}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2440141cc406Sopenharmony_ci {USB20, {ST_NEG , CM_GRAY , 2400, 0x06 , -1 , LINE_RATE , 0x05 ,145799, 256 , STT_FULL, 0x00 , {48599, 97199, 0}, {48599, 48599, 145799}, 0 , 1 , -1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2441141cc406Sopenharmony_ci {USB20, {ST_NEG , CM_GRAY , 1200, 0x07 , -1 , LINE_RATE , 0x05 , 89999, 256 , STT_FULL, 0x00 , {29999, 59999, 0}, {29999, 29999, 89999}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2442141cc406Sopenharmony_ci {USB20, {ST_NEG , CM_GRAY , 600, 0x08 , -1 , LINE_RATE , 0x05 , 45999, 256 , STT_HALF, 0x00 , {15333, 30666, 0}, {15333, 15333, 45999}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2443141cc406Sopenharmony_ci {USB20, {ST_NEG , CM_GRAY , 300, 0x09 , -1 , LINE_RATE , 0x04 , 14879, 256 , STT_HALF, 0x00 , { 4959, 9919, 0}, { 4959, 4959, 14879}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2444141cc406Sopenharmony_ci {USB20, {ST_NEG , CM_GRAY , 150, 0x09 , 3 , LINE_RATE , 0x04 , 14879, 256 , STT_HALF, 0x00 , { 4959, 9919, 0}, { 4959, 4959, 14879}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2445141cc406Sopenharmony_ci 2446141cc406Sopenharmony_ci /* usb, {scantype , colormode, res , timing, curve, samplerate, clock, ctpc , backstp, steptype, dummyline, {expt }, {mexpt }, motorplus, mexpt16, mexptfull, mexposure, mri , msi , mmtir, mmtirh, skips } */ 2447141cc406Sopenharmony_ci {USB11, {ST_NORMAL, CM_COLOR , 4800, 0x00 , -1 , PIXEL_RATE, 0x05 , 47799, 64 , STT_HALF, 0x00 , {23899, 23899, 23899}, {23899, 23899, 23899}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2448141cc406Sopenharmony_ci {USB11, {ST_NORMAL, CM_COLOR , 2400, 0x01 , -1 , PIXEL_RATE, 0x05 , 31849, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2449141cc406Sopenharmony_ci {USB11, {ST_NORMAL, CM_COLOR , 1200, 0x02 , -1 , PIXEL_RATE, 0x05 , 15999, 256 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2450141cc406Sopenharmony_ci {USB11, {ST_NORMAL, CM_COLOR , 600, 0x03 , 2 , PIXEL_RATE, 0x05 , 7999, 256 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2451141cc406Sopenharmony_ci {USB11, {ST_NORMAL, CM_COLOR , 300, 0x04 , 3 , PIXEL_RATE, 0x04 , 2799, 768 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2452141cc406Sopenharmony_ci {USB11, {ST_NORMAL, CM_COLOR , 150, 0x04 , 4 , PIXEL_RATE, 0x04 , 2799, 1856 , STT_HALF, 0x01 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2453141cc406Sopenharmony_ci 2454141cc406Sopenharmony_ci {USB11, {ST_NORMAL, CM_GRAY , 4800, 0x05 , -1 , LINE_RATE , 0x05 , 47799, 64 , STT_HALF, 0x00 , {23899, 23899, 23899}, {23899, 23899, 23899}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2455141cc406Sopenharmony_ci {USB11, {ST_NORMAL, CM_GRAY , 2400, 0x06 , -1 , LINE_RATE , 0x05 , 31849, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2456141cc406Sopenharmony_ci {USB11, {ST_NORMAL, CM_GRAY , 1200, 0x07 , -1 , LINE_RATE , 0x05 , 15999, 256 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2457141cc406Sopenharmony_ci {USB11, {ST_NORMAL, CM_GRAY , 600, 0x08 , 2 , LINE_RATE , 0x05 , 7999, 256 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2458141cc406Sopenharmony_ci {USB11, {ST_NORMAL, CM_GRAY , 300, 0x09 , 3 , LINE_RATE , 0x04 , 2799, 768 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2459141cc406Sopenharmony_ci {USB11, {ST_NORMAL, CM_GRAY , 150, 0x09 , 4 , LINE_RATE , 0x04 , 2799, 1856 , STT_HALF, 0x01 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2460141cc406Sopenharmony_ci 2461141cc406Sopenharmony_ci /* usb, {scantype , colormode, res , timing, curve, samplerate, clock, ctpc , backstp, steptype, dummyline, {expt }, {mexpt }, motorplus, mexpt16, mexptfull, mexposure, mri , msi , mmtir, mmtirh, skips } */ 2462141cc406Sopenharmony_ci {USB11, {ST_TA , CM_COLOR , 4800, 0x0A , -1 , PIXEL_RATE, 0x05 , 53999, 64 , STT_HALF, 0x00 , {26999, 26999, 26999}, {26999, 26999, 26999}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2463141cc406Sopenharmony_ci {USB11, {ST_TA , CM_COLOR , 2400, 0x01 , -1 , PIXEL_RATE, 0x05 , 35999, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2464141cc406Sopenharmony_ci {USB11, {ST_TA , CM_COLOR , 1200, 0x02 , -1 , PIXEL_RATE, 0x05 , 17999, 256 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2465141cc406Sopenharmony_ci {USB11, {ST_TA , CM_COLOR , 600, 0x03 , 2 , PIXEL_RATE, 0x05 , 8999, 256 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2466141cc406Sopenharmony_ci {USB11, {ST_TA , CM_COLOR , 300, 0x04 , 3 , PIXEL_RATE, 0x04 , 2959, 512 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2467141cc406Sopenharmony_ci {USB11, {ST_TA , CM_COLOR , 150, 0x04 , 4 , PIXEL_RATE, 0x04 , 2959, 1024 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2468141cc406Sopenharmony_ci 2469141cc406Sopenharmony_ci {USB11, {ST_TA , CM_GRAY , 4800, 0x0B , -1 , LINE_RATE , 0x05 , 53999, 64 , STT_HALF, 0x00 , {26999, 26999, 26999}, {26999, 26999, 26999}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2470141cc406Sopenharmony_ci {USB11, {ST_TA , CM_GRAY , 2400, 0x06 , -1 , LINE_RATE , 0x05 , 35999, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2471141cc406Sopenharmony_ci {USB11, {ST_TA , CM_GRAY , 1200, 0x07 , -1 , LINE_RATE , 0x05 , 17999, 256 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2472141cc406Sopenharmony_ci {USB11, {ST_TA , CM_GRAY , 600, 0x08 , 3 , LINE_RATE , 0x05 , 8999, 512 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2473141cc406Sopenharmony_ci {USB11, {ST_TA , CM_GRAY , 300, 0x09 , 4 , LINE_RATE , 0x04 , 2959, 1024 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2474141cc406Sopenharmony_ci {USB11, {ST_TA , CM_GRAY , 150, 0x09 , 4 , LINE_RATE , 0x05 , 2959, 1024 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2475141cc406Sopenharmony_ci 2476141cc406Sopenharmony_ci /* usb, {scantype , colormode, res , timing, curve, samplerate, clock, ctpc , backstp, steptype, dummyline, {expt }, {mexpt }, motorplus, mexpt16, mexptfull, mexposure, mri , msi , mmtir, mmtirh, skips } */ 2477141cc406Sopenharmony_ci {USB11, {ST_NEG , CM_COLOR , 4800, 0x0C , -1 , PIXEL_RATE, 0x05 , 60599, 64 , STT_HALF, 0x00 , {30299, 30299, 30299}, {30299, 30299, 30299}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2478141cc406Sopenharmony_ci {USB11, {ST_NEG , CM_COLOR , 2400, 0x01 , -1 , PIXEL_RATE, 0x05 ,145799, 256 , STT_FULL, 0x00 , {48599, 97199, 0}, {48599, 48599,145799}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2479141cc406Sopenharmony_ci {USB11, {ST_NEG , CM_COLOR , 1200, 0x02 , -1 , PIXEL_RATE, 0x05 , 89999, 256 , STT_FULL, 0x00 , {29999, 59999, 0}, {29999, 29999, 89999}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2480141cc406Sopenharmony_ci {USB11, {ST_NEG , CM_COLOR , 600, 0x03 , -1 , PIXEL_RATE, 0x05 , 45999, 256 , STT_HALF, 0x00 , {15333, 30666, 0}, {15333, 15333, 45999}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2481141cc406Sopenharmony_ci {USB11, {ST_NEG , CM_COLOR , 300, 0x04 , -1 , PIXEL_RATE, 0x04 , 14879, 256 , STT_HALF, 0x00 , { 4959, 9919, 0}, { 4959, 4959, 14879}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2482141cc406Sopenharmony_ci {USB11, {ST_NEG , CM_COLOR , 150, 0x04 , 3 , PIXEL_RATE, 0x04 , 14879, 256 , STT_HALF, 0x00 , { 4959, 9919, 0}, { 4959, 4959, 14879}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2483141cc406Sopenharmony_ci 2484141cc406Sopenharmony_ci {USB11, {ST_NEG , CM_GRAY , 4800, 0x0D , -1 , LINE_RATE , 0x05 , 60599, 64 , STT_FULL, 0x00 , {30299, 30299, 30299}, {30299, 30299, 30299}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2485141cc406Sopenharmony_ci {USB11, {ST_NEG , CM_GRAY , 2400, 0x06 , -1 , LINE_RATE , 0x05 ,145799, 256 , STT_FULL, 0x00 , {48599, 97199, 0}, {48599, 48599,145799}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2486141cc406Sopenharmony_ci {USB11, {ST_NEG , CM_GRAY , 1200, 0x07 , -1 , LINE_RATE , 0x05 , 89999, 256 , STT_FULL, 0x00 , {29999, 59999, 0}, {29999, 29999, 59999}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2487141cc406Sopenharmony_ci {USB11, {ST_NEG , CM_GRAY , 600, 0x08 , -1 , LINE_RATE , 0x05 , 45999, 256 , STT_HALF, 0x00 , {15333, 30666, 0}, {15333, 15333, 45999}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2488141cc406Sopenharmony_ci {USB11, {ST_NEG , CM_GRAY , 300, 0x09 , -1 , LINE_RATE , 0x04 , 14879, 256 , STT_HALF, 0x00 , { 4959, 9919, 0}, { 4959, 4959, 14879}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2489141cc406Sopenharmony_ci {USB11, {ST_NEG , CM_GRAY , 150, 0x09 , 3 , LINE_RATE , 0x04 , 14879, 256 , STT_HALF, 0x00 , { 4959, 9919, 0}, { 4959, 4959, 14879}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }} 2490141cc406Sopenharmony_ci }; 2491141cc406Sopenharmony_ci 2492141cc406Sopenharmony_ci SANE_Int rst = ERROR; 2493141cc406Sopenharmony_ci 2494141cc406Sopenharmony_ci if (mymode != NULL) 2495141cc406Sopenharmony_ci { 2496141cc406Sopenharmony_ci SANE_Int a; 2497141cc406Sopenharmony_ci SANE_Int total = sizeof(reg) / sizeof(struct st_modes); 2498141cc406Sopenharmony_ci SANE_Int count = 0; 2499141cc406Sopenharmony_ci struct st_modes *md; 2500141cc406Sopenharmony_ci 2501141cc406Sopenharmony_ci for (a = 0; a < total; a++) 2502141cc406Sopenharmony_ci { 2503141cc406Sopenharmony_ci md = ®[a]; 2504141cc406Sopenharmony_ci if (md->usb == usb) 2505141cc406Sopenharmony_ci { 2506141cc406Sopenharmony_ci if (count == sm) 2507141cc406Sopenharmony_ci { 2508141cc406Sopenharmony_ci memcpy(mymode, &md->mode, sizeof(struct st_scanmode)); 2509141cc406Sopenharmony_ci rst = OK; 2510141cc406Sopenharmony_ci break; 2511141cc406Sopenharmony_ci } 2512141cc406Sopenharmony_ci 2513141cc406Sopenharmony_ci count++; 2514141cc406Sopenharmony_ci } 2515141cc406Sopenharmony_ci } 2516141cc406Sopenharmony_ci } 2517141cc406Sopenharmony_ci 2518141cc406Sopenharmony_ci return rst; 2519141cc406Sopenharmony_ci} 2520141cc406Sopenharmony_ci 2521141cc406Sopenharmony_cistatic SANE_Int hp3800_scanmodes(SANE_Int usb, SANE_Int sm, struct st_scanmode *mymode) 2522141cc406Sopenharmony_ci{ 2523141cc406Sopenharmony_ci struct st_modes 2524141cc406Sopenharmony_ci { 2525141cc406Sopenharmony_ci SANE_Int usb; 2526141cc406Sopenharmony_ci struct st_scanmode mode; 2527141cc406Sopenharmony_ci }; 2528141cc406Sopenharmony_ci 2529141cc406Sopenharmony_ci struct st_modes reg[] = 2530141cc406Sopenharmony_ci { 2531141cc406Sopenharmony_ci /* usb, {scantype , colormode, res , timing, curve, samplerate, clock, ctpc , backstp, steptype, dummyline, {expt }, {mexpt }, motorplus, mexpt16, mexptfull, mexposure, mri , msi , mmtir, mmtirh, skips } */ 2532141cc406Sopenharmony_ci {USB20, {ST_NORMAL, CM_COLOR , 2400, 0x00 , -1 , PIXEL_RATE, 0x05 , 23999, 128 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2533141cc406Sopenharmony_ci {USB20, {ST_NORMAL, CM_COLOR , 1200, 0x01 , -1 , PIXEL_RATE, 0x05 , 23999, 96 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2534141cc406Sopenharmony_ci {USB20, {ST_NORMAL, CM_COLOR , 600, 0x02 , -1 , PIXEL_RATE, 0x04 , 7999, 128 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2535141cc406Sopenharmony_ci {USB20, {ST_NORMAL, CM_COLOR , 300, 0x03 , 9 , PIXEL_RATE, 0x04 , 4999, 256 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2536141cc406Sopenharmony_ci {USB20, {ST_NORMAL, CM_COLOR , 150, 0x03 , 10 , PIXEL_RATE, 0x04 , 2999, 1024 , STT_HALF, 0x01 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2537141cc406Sopenharmony_ci 2538141cc406Sopenharmony_ci {USB20, {ST_NORMAL, CM_GRAY , 2400, 0x05 , -1 , LINE_RATE , 0x05 , 23999, 128 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2539141cc406Sopenharmony_ci {USB20, {ST_NORMAL, CM_GRAY , 1200, 0x06 , -1 , LINE_RATE , 0x05 , 23999, 96 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2540141cc406Sopenharmony_ci {USB20, {ST_NORMAL, CM_GRAY , 600, 0x07 , -1 , LINE_RATE , 0x04 , 7999, 128 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2541141cc406Sopenharmony_ci {USB20, {ST_NORMAL, CM_GRAY , 300, 0x08 , 9 , LINE_RATE , 0x04 , 4999, 256 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2542141cc406Sopenharmony_ci {USB20, {ST_NORMAL, CM_GRAY , 150, 0x08 , 10 , LINE_RATE , 0x04 , 2999, 1024 , STT_HALF, 0x01 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2543141cc406Sopenharmony_ci 2544141cc406Sopenharmony_ci /* usb, {scantype , colormode, res , timing, curve, samplerate, clock, ctpc , backstp, steptype, dummyline, {expt }, {mexpt }, motorplus, mexpt16, mexptfull, mexposure, mri , msi , mmtir, mmtirh, skips } */ 2545141cc406Sopenharmony_ci {USB20, {ST_TA , CM_COLOR , 2400, 0x00 , -1 , PIXEL_RATE, 0x05 , 23999, 96 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2546141cc406Sopenharmony_ci {USB20, {ST_TA , CM_COLOR , 1200, 0x01 , -1 , PIXEL_RATE, 0x05 , 23999, 96 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2547141cc406Sopenharmony_ci {USB20, {ST_TA , CM_COLOR , 600, 0x09 , -1 , PIXEL_RATE, 0x04 , 5999, 128 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2548141cc406Sopenharmony_ci {USB20, {ST_TA , CM_COLOR , 300, 0x03 , 3 , PIXEL_RATE, 0x04 , 2999, 256 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2549141cc406Sopenharmony_ci {USB20, {ST_TA , CM_COLOR , 150, 0x03 , 10 , PIXEL_RATE, 0x04 , 2999, 1024 , STT_HALF, 0x01 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2550141cc406Sopenharmony_ci 2551141cc406Sopenharmony_ci {USB20, {ST_TA , CM_GRAY , 2400, 0x05 , -1 , LINE_RATE , 0x05 , 23999, 96 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2552141cc406Sopenharmony_ci {USB20, {ST_TA , CM_GRAY , 1200, 0x06 , -1 , LINE_RATE , 0x05 , 23999, 96 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2553141cc406Sopenharmony_ci {USB20, {ST_TA , CM_GRAY , 600, 0x07 , -1 , LINE_RATE , 0x04 , 5999, 128 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2554141cc406Sopenharmony_ci {USB20, {ST_TA , CM_GRAY , 300, 0x08 , 3 , LINE_RATE , 0x04 , 2999, 256 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2555141cc406Sopenharmony_ci {USB20, {ST_TA , CM_GRAY , 150, 0x08 , 10 , LINE_RATE , 0x04 , 2999, 1024 , STT_HALF, 0x01 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2556141cc406Sopenharmony_ci 2557141cc406Sopenharmony_ci /* usb, {scantype , colormode, res , timing, curve, samplerate, clock, ctpc , backstp, steptype, dummyline, {expt }, {mexpt }, motorplus, mexpt16, mexptfull, mexposure, mri , msi , mmtir, mmtirh, skips } */ 2558141cc406Sopenharmony_ci {USB20, {ST_NEG , CM_COLOR , 2400, 0x0A , -1 , PIXEL_RATE, 0x04 ,127999, 96 , STT_HALF, 0x00 , { 0, 0, 0}, {127999,127999,127999}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2559141cc406Sopenharmony_ci {USB20, {ST_NEG , CM_COLOR , 1200, 0x0B , -1 , PIXEL_RATE, 0x05 ,127999, 128 , STT_HALF, 0x00 , { 0, 0, 0}, {127999,127999,127999}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2560141cc406Sopenharmony_ci {USB20, {ST_NEG , CM_COLOR , 600, 0x0C , -1 , PIXEL_RATE, 0x04 , 31999, 128 , STT_HALF, 0x00 , { 0, 0, 0}, { 31999, 31999, 31999}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2561141cc406Sopenharmony_ci {USB20, {ST_NEG , CM_COLOR , 300, 0x0D , -1 , PIXEL_RATE, 0x04 , 15999, 256 , STT_HALF, 0x00 , { 0, 0, 0}, { 15999, 15999, 15999}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2562141cc406Sopenharmony_ci {USB20, {ST_NEG , CM_COLOR , 150, 0x0D , 10 , PIXEL_RATE, 0x04 , 15999, 1024 , STT_HALF, 0x01 , { 0, 0, 0}, { 15999, 15999, 15999}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2563141cc406Sopenharmony_ci 2564141cc406Sopenharmony_ci {USB20, {ST_NEG , CM_GRAY , 2400, 0x0F , -1 , LINE_RATE , 0x05 ,127999, 96 , STT_HALF, 0x00 , { 0, 0, 0}, {127999,127999,127999}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2565141cc406Sopenharmony_ci {USB20, {ST_NEG , CM_GRAY , 1200, 0x10 , -1 , LINE_RATE , 0x05 ,127999, 96 , STT_HALF, 0x00 , { 0, 0, 0}, {127999,127999,127999}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2566141cc406Sopenharmony_ci {USB20, {ST_NEG , CM_GRAY , 600, 0x11 , -1 , LINE_RATE , 0x04 , 31999, 128 , STT_HALF, 0x00 , { 0, 0, 0}, { 31999, 31999, 31999}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2567141cc406Sopenharmony_ci {USB20, {ST_NEG , CM_GRAY , 300, 0x12 , -1 , LINE_RATE , 0x04 , 15999, 256 , STT_HALF, 0x00 , { 0, 0, 0}, { 15999, 15999, 15999}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2568141cc406Sopenharmony_ci {USB20, {ST_NEG , CM_GRAY , 150, 0x12 , 10 , LINE_RATE , 0x04 , 15999, 1024 , STT_HALF, 0x01 , { 0, 0, 0}, { 15999, 15999, 15999}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2569141cc406Sopenharmony_ci 2570141cc406Sopenharmony_ci /* usb, {scantype , colormode, res , timing, curve, samplerate, clock, ctpc , backstp, steptype, dummyline, {expt }, {mexpt }, motorplus, mexpt16, mexptfull, mexposure, mri , msi , mmtir, mmtirh, skips } */ 2571141cc406Sopenharmony_ci {USB11, {ST_NORMAL, CM_COLOR , 2400, 0x00 , -1 , PIXEL_RATE, 0x05 , 23999, 128 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 2 , 5 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2572141cc406Sopenharmony_ci {USB11, {ST_NORMAL, CM_COLOR , 1200, 0x01 , -1 , PIXEL_RATE, 0x05 , 23999, 96 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 2 , 3 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2573141cc406Sopenharmony_ci {USB11, {ST_NORMAL, CM_COLOR , 600, 0x02 , -1 , PIXEL_RATE, 0x04 , 7999, 128 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2574141cc406Sopenharmony_ci {USB11, {ST_NORMAL, CM_COLOR , 300, 0x03 , 9 , PIXEL_RATE, 0x04 , 4999, 256 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2575141cc406Sopenharmony_ci {USB11, {ST_NORMAL, CM_COLOR , 150, 0x03 , 10 , PIXEL_RATE, 0x04 , 2999, 1024 , STT_HALF, 0x01 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2576141cc406Sopenharmony_ci 2577141cc406Sopenharmony_ci {USB11, {ST_NORMAL, CM_GRAY , 2400, 0x05 , -1 , LINE_RATE , 0x05 , 23999, 128 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 2 , 2 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2578141cc406Sopenharmony_ci {USB11, {ST_NORMAL, CM_GRAY , 1200, 0x06 , -1 , LINE_RATE , 0x05 , 23999, 96 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 2 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2579141cc406Sopenharmony_ci {USB11, {ST_NORMAL, CM_GRAY , 600, 0x07 , -1 , LINE_RATE , 0x04 , 7999, 128 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2580141cc406Sopenharmony_ci {USB11, {ST_NORMAL, CM_GRAY , 300, 0x08 , 9 , LINE_RATE , 0x04 , 4999, 256 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2581141cc406Sopenharmony_ci {USB11, {ST_NORMAL, CM_GRAY , 150, 0x08 , 10 , LINE_RATE , 0x04 , 2999, 1024 , STT_HALF, 0x01 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2582141cc406Sopenharmony_ci 2583141cc406Sopenharmony_ci /* usb, {scantype , colormode, res , timing, curve, samplerate, clock, ctpc , backstp, steptype, dummyline, {expt }, {mexpt }, motorplus, mexpt16, mexptfull, mexposure, mri , msi , mmtir, mmtirh, skips } */ 2584141cc406Sopenharmony_ci {USB11, {ST_TA , CM_COLOR , 2400, 0x00 , -1 , PIXEL_RATE, 0x05 , 23999, 96 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2585141cc406Sopenharmony_ci {USB11, {ST_TA , CM_COLOR , 1200, 0x01 , -1 , PIXEL_RATE, 0x05 , 23999, 96 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2586141cc406Sopenharmony_ci {USB11, {ST_TA , CM_COLOR , 600, 0x09 , -1 , PIXEL_RATE, 0x04 , 5999, 128 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2587141cc406Sopenharmony_ci {USB11, {ST_TA , CM_COLOR , 300, 0x03 , 3 , PIXEL_RATE, 0x04 , 2999, 256 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2588141cc406Sopenharmony_ci {USB11, {ST_TA , CM_COLOR , 150, 0x03 , 10 , PIXEL_RATE, 0x04 , 2999, 1024 , STT_HALF, 0x01 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2589141cc406Sopenharmony_ci 2590141cc406Sopenharmony_ci {USB11, {ST_TA , CM_GRAY , 2400, 0x05 , -1 , LINE_RATE , 0x05 , 23999, 96 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2591141cc406Sopenharmony_ci {USB11, {ST_TA , CM_GRAY , 1200, 0x06 , -1 , LINE_RATE , 0x05 , 23999, 96 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2592141cc406Sopenharmony_ci {USB11, {ST_TA , CM_GRAY , 600, 0x07 , -1 , LINE_RATE , 0x04 , 5999, 128 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2593141cc406Sopenharmony_ci {USB11, {ST_TA , CM_GRAY , 300, 0x08 , 3 , LINE_RATE , 0x04 , 2999, 256 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2594141cc406Sopenharmony_ci {USB11, {ST_TA , CM_GRAY , 150, 0x08 , 10 , LINE_RATE , 0x04 , 2999, 1024 , STT_HALF, 0x01 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2595141cc406Sopenharmony_ci 2596141cc406Sopenharmony_ci /* usb, {scantype , colormode, res , timing, curve, samplerate, clock, ctpc , backstp, steptype, dummyline, {expt }, {mexpt }, motorplus, mexpt16, mexptfull, mexposure, mri , msi , mmtir, mmtirh, skips } */ 2597141cc406Sopenharmony_ci {USB11, {ST_NEG , CM_COLOR , 2400, 0x0A , -1 , PIXEL_RATE, 0x04 ,127999, 96 , STT_HALF, 0x00 , { 0, 0, 0}, {127999,127999,127999}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2598141cc406Sopenharmony_ci {USB11, {ST_NEG , CM_COLOR , 1200, 0x0B , -1 , PIXEL_RATE, 0x05 ,127999, 128 , STT_HALF, 0x00 , { 0, 0, 0}, {127999,127999,127999}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2599141cc406Sopenharmony_ci {USB11, {ST_NEG , CM_COLOR , 600, 0x0C , -1 , PIXEL_RATE, 0x04 , 31999, 128 , STT_HALF, 0x00 , { 0, 0, 0}, { 31999, 31999, 31999}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2600141cc406Sopenharmony_ci {USB11, {ST_NEG , CM_COLOR , 300, 0x0D , -1 , PIXEL_RATE, 0x04 , 15999, 256 , STT_HALF, 0x00 , { 0, 0, 0}, { 15999, 15999, 15999}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2601141cc406Sopenharmony_ci {USB11, {ST_NEG , CM_COLOR , 150, 0x0D , 10 , PIXEL_RATE, 0x04 , 15999, 1024 , STT_HALF, 0x01 , { 0, 0, 0}, { 15999, 15999, 15999}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2602141cc406Sopenharmony_ci 2603141cc406Sopenharmony_ci {USB11, {ST_NEG , CM_GRAY , 2400, 0x0F , -1 , LINE_RATE , 0x05 ,127999, 96 , STT_HALF, 0x00 , { 0, 0, 0}, {127999,127999,127999}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2604141cc406Sopenharmony_ci {USB11, {ST_NEG , CM_GRAY , 1200, 0x10 , -1 , LINE_RATE , 0x05 ,127999, 96 , STT_HALF, 0x00 , { 0, 0, 0}, {127999,127999,127999}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2605141cc406Sopenharmony_ci {USB11, {ST_NEG , CM_GRAY , 600, 0x11 , -1 , LINE_RATE , 0x04 , 31999, 128 , STT_HALF, 0x00 , { 0, 0, 0}, { 31999, 31999, 31999}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2606141cc406Sopenharmony_ci {USB11, {ST_NEG , CM_GRAY , 300, 0x12 , -1 , LINE_RATE , 0x04 , 15999, 256 , STT_HALF, 0x00 , { 0, 0, 0}, { 15999, 15999, 15999}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2607141cc406Sopenharmony_ci {USB11, {ST_NEG , CM_GRAY , 150, 0x12 , 10 , LINE_RATE , 0x04 , 15999, 1024 , STT_HALF, 0x01 , { 0, 0, 0}, { 15999, 15999, 15999}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }} 2608141cc406Sopenharmony_ci }; 2609141cc406Sopenharmony_ci 2610141cc406Sopenharmony_ci SANE_Int rst = ERROR; 2611141cc406Sopenharmony_ci 2612141cc406Sopenharmony_ci if (mymode != NULL) 2613141cc406Sopenharmony_ci { 2614141cc406Sopenharmony_ci SANE_Int a; 2615141cc406Sopenharmony_ci SANE_Int total = sizeof(reg) / sizeof(struct st_modes); 2616141cc406Sopenharmony_ci SANE_Int count = 0; 2617141cc406Sopenharmony_ci struct st_modes *md; 2618141cc406Sopenharmony_ci 2619141cc406Sopenharmony_ci for (a = 0; a < total; a++) 2620141cc406Sopenharmony_ci { 2621141cc406Sopenharmony_ci md = ®[a]; 2622141cc406Sopenharmony_ci if (md->usb == usb) 2623141cc406Sopenharmony_ci { 2624141cc406Sopenharmony_ci if (count == sm) 2625141cc406Sopenharmony_ci { 2626141cc406Sopenharmony_ci memcpy(mymode, &md->mode, sizeof(struct st_scanmode)); 2627141cc406Sopenharmony_ci rst = OK; 2628141cc406Sopenharmony_ci break; 2629141cc406Sopenharmony_ci } 2630141cc406Sopenharmony_ci 2631141cc406Sopenharmony_ci count++; 2632141cc406Sopenharmony_ci } 2633141cc406Sopenharmony_ci } 2634141cc406Sopenharmony_ci } 2635141cc406Sopenharmony_ci 2636141cc406Sopenharmony_ci return rst; 2637141cc406Sopenharmony_ci} 2638141cc406Sopenharmony_ci 2639141cc406Sopenharmony_cistatic SANE_Int bq5550_scanmodes(SANE_Int usb, SANE_Int sm, struct st_scanmode *mymode) 2640141cc406Sopenharmony_ci{ 2641141cc406Sopenharmony_ci struct st_modes 2642141cc406Sopenharmony_ci { 2643141cc406Sopenharmony_ci SANE_Int usb; 2644141cc406Sopenharmony_ci struct st_scanmode mode; 2645141cc406Sopenharmony_ci }; 2646141cc406Sopenharmony_ci 2647141cc406Sopenharmony_ci struct st_modes reg[] = 2648141cc406Sopenharmony_ci { 2649141cc406Sopenharmony_ci /* usb, {scantype , colormode , res , timing, curve, samplerate, clock, ctpc , backstp, steptype , dummyline, {expt }, {mexpt }, motorplus, mexpt16, mexptfull, mexposure, mri , msi , mmtir, mmtirh, skips } */ 2650141cc406Sopenharmony_ci {USB20, {ST_NORMAL, CM_COLOR , 1200, 0x00 , -1 , PIXEL_RATE, 0x05 , 12999, 10 , STT_QUART, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 3 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2651141cc406Sopenharmony_ci {USB20, {ST_NORMAL, CM_COLOR , 600, 0x01 , -1 , PIXEL_RATE, 0x05 , 6999, 32 , STT_HALF , 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 5 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2652141cc406Sopenharmony_ci {USB20, {ST_NORMAL, CM_COLOR , 300, 0x02 , 0 , PIXEL_RATE, 0x05 , 5599, 128 , STT_HALF , 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 3 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2653141cc406Sopenharmony_ci {USB20, {ST_NORMAL, CM_COLOR , 150, 0x02 , 0 , PIXEL_RATE, 0x05 , 6439, 128 , STT_FULL , 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 2 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2654141cc406Sopenharmony_ci {USB20, {ST_NORMAL, CM_COLOR , 100, 0x02 , 0 , PIXEL_RATE, 0x05 , 5759, 128 , STT_FULL , 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2655141cc406Sopenharmony_ci 2656141cc406Sopenharmony_ci {USB20, {ST_NORMAL, CM_GRAY , 1200, 0x03 , -1 , LINE_RATE , 0x05 , 12999, 10 , STT_QUART, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 3 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2657141cc406Sopenharmony_ci {USB20, {ST_NORMAL, CM_GRAY , 600, 0x04 , -1 , LINE_RATE , 0x05 , 7199, 32 , STT_HALF , 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 2 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2658141cc406Sopenharmony_ci {USB20, {ST_NORMAL, CM_GRAY , 300, 0x05 , 0 , LINE_RATE , 0x05 , 5599, 128 , STT_HALF , 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2659141cc406Sopenharmony_ci {USB20, {ST_NORMAL, CM_GRAY , 150, 0x05 , 0 , LINE_RATE , 0x05 , 6239, 128 , STT_FULL , 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2660141cc406Sopenharmony_ci {USB20, {ST_NORMAL, CM_GRAY , 100, 0x05 , 0 , LINE_RATE , 0x05 , 5759, 128 , STT_FULL , 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2661141cc406Sopenharmony_ci 2662141cc406Sopenharmony_ci {USB20, {ST_NORMAL, CM_LINEART, 1200, 0x03 , -1 , LINE_RATE , 0x05 , 12999, 10 , STT_QUART, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 3 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2663141cc406Sopenharmony_ci {USB20, {ST_NORMAL, CM_LINEART, 600, 0x04 , -1 , LINE_RATE , 0x05 , 7199, 32 , STT_HALF , 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 2 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2664141cc406Sopenharmony_ci {USB20, {ST_NORMAL, CM_LINEART, 300, 0x05 , 0 , LINE_RATE , 0x05 , 5599, 128 , STT_HALF , 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2665141cc406Sopenharmony_ci {USB20, {ST_NORMAL, CM_LINEART, 150, 0x05 , 0 , LINE_RATE , 0x05 , 6239, 128 , STT_FULL , 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2666141cc406Sopenharmony_ci {USB20, {ST_NORMAL, CM_LINEART, 100, 0x05 , 0 , LINE_RATE , 0x05 , 5759, 128 , STT_FULL , 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2667141cc406Sopenharmony_ci 2668141cc406Sopenharmony_ci /* usb, {scantype , colormode , res , timing, curve, samplerate, clock, ctpc , backstp, steptype , dummyline, {expt }, {mexpt }, motorplus, mexpt16, mexptfull, mexposure, mri , msi , mmtir, mmtirh, skips } */ 2669141cc406Sopenharmony_ci {USB20, {ST_TA , CM_COLOR , 1200, 0x00 , -1 , PIXEL_RATE, 0x05 , 9899, 10 , STT_QUART, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2670141cc406Sopenharmony_ci {USB20, {ST_TA , CM_COLOR , 600, 0x01 , -1 , PIXEL_RATE, 0x05 , 9999, 32 , STT_HALF , 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2671141cc406Sopenharmony_ci {USB20, {ST_TA , CM_COLOR , 300, 0x02 , 0 , PIXEL_RATE, 0x05 , 4799, 128 , STT_HALF , 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2672141cc406Sopenharmony_ci {USB20, {ST_TA , CM_COLOR , 150, 0x02 , 0 , PIXEL_RATE, 0x05 , 4959, 128 , STT_FULL , 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2673141cc406Sopenharmony_ci {USB20, {ST_TA , CM_COLOR , 100, 0x02 , 0 , PIXEL_RATE, 0x05 , 5059, 128 , STT_FULL , 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2674141cc406Sopenharmony_ci 2675141cc406Sopenharmony_ci {USB20, {ST_TA , CM_GRAY , 1200, 0x03 , -1 , LINE_RATE , 0x05 , 9899, 10 , STT_QUART, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2676141cc406Sopenharmony_ci {USB20, {ST_TA , CM_GRAY , 600, 0x04 , -1 , LINE_RATE , 0x05 , 9999, 32 , STT_HALF , 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2677141cc406Sopenharmony_ci {USB20, {ST_TA , CM_GRAY , 300, 0x05 , 0 , LINE_RATE , 0x05 , 4799, 128 , STT_HALF , 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2678141cc406Sopenharmony_ci {USB20, {ST_TA , CM_GRAY , 150, 0x05 , 0 , LINE_RATE , 0x05 , 4959, 128 , STT_FULL , 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2679141cc406Sopenharmony_ci {USB20, {ST_TA , CM_GRAY , 100, 0x05 , 0 , LINE_RATE , 0x05 , 5059, 128 , STT_FULL , 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2680141cc406Sopenharmony_ci 2681141cc406Sopenharmony_ci {USB20, {ST_TA , CM_LINEART, 1200, 0x03 , -1 , LINE_RATE , 0x05 , 9899, 10 , STT_QUART, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2682141cc406Sopenharmony_ci {USB20, {ST_TA , CM_LINEART, 600, 0x04 , -1 , LINE_RATE , 0x05 , 9999, 32 , STT_HALF , 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2683141cc406Sopenharmony_ci {USB20, {ST_TA , CM_LINEART, 300, 0x05 , 0 , LINE_RATE , 0x05 , 4799, 128 , STT_HALF , 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2684141cc406Sopenharmony_ci {USB20, {ST_TA , CM_LINEART, 150, 0x05 , 0 , LINE_RATE , 0x05 , 4959, 128 , STT_FULL , 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2685141cc406Sopenharmony_ci {USB20, {ST_TA , CM_LINEART, 100, 0x05 , 0 , LINE_RATE , 0x05 , 5059, 128 , STT_FULL , 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2686141cc406Sopenharmony_ci 2687141cc406Sopenharmony_ci /* usb, {scantype , colormode , res , timing, curve, samplerate, clock, ctpc , backstp, steptype , dummyline, {expt }, {mexpt }, motorplus, mexpt16, mexptfull, mexposure, mri , msi , mmtir, mmtirh, skips } */ 2688141cc406Sopenharmony_ci {USB20, {ST_NEG , CM_COLOR , 1200, 0x00 , -1 , PIXEL_RATE, 0x05 , 51899, 10 , STT_QUART, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2689141cc406Sopenharmony_ci {USB20, {ST_NEG , CM_COLOR , 600, 0x01 , -1 , PIXEL_RATE, 0x05 , 51799, 32 , STT_HALF , 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2690141cc406Sopenharmony_ci {USB20, {ST_NEG , CM_COLOR , 300, 0x02 , 0 , PIXEL_RATE, 0x05 , 25899, 128 , STT_FULL , 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2691141cc406Sopenharmony_ci {USB20, {ST_NEG , CM_COLOR , 150, 0x02 , 0 , PIXEL_RATE, 0x05 , 25899, 128 , STT_HALF , 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2692141cc406Sopenharmony_ci {USB20, {ST_NEG , CM_COLOR , 100, 0x02 , 0 , PIXEL_RATE, 0x05 , 25499, 128 , STT_HALF , 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2693141cc406Sopenharmony_ci 2694141cc406Sopenharmony_ci {USB20, {ST_NEG , CM_GRAY , 1200, 0x03 , -1 , LINE_RATE , 0x05 , 51899, 10 , STT_QUART, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2695141cc406Sopenharmony_ci {USB20, {ST_NEG , CM_GRAY , 600, 0x04 , -1 , LINE_RATE , 0x05 , 51799, 32 , STT_HALF , 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2696141cc406Sopenharmony_ci {USB20, {ST_NEG , CM_GRAY , 300, 0x05 , 0 , LINE_RATE , 0x05 , 25899, 128 , STT_FULL , 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2697141cc406Sopenharmony_ci {USB20, {ST_NEG , CM_GRAY , 150, 0x05 , 0 , LINE_RATE , 0x05 , 25899, 128 , STT_HALF , 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2698141cc406Sopenharmony_ci {USB20, {ST_NEG , CM_GRAY , 100, 0x05 , 0 , LINE_RATE , 0x05 , 25499, 128 , STT_HALF , 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2699141cc406Sopenharmony_ci 2700141cc406Sopenharmony_ci {USB20, {ST_NEG , CM_LINEART, 1200, 0x03 , -1 , LINE_RATE , 0x05 , 51899, 10 , STT_QUART, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2701141cc406Sopenharmony_ci {USB20, {ST_NEG , CM_LINEART, 600, 0x04 , -1 , LINE_RATE , 0x05 , 51799, 32 , STT_HALF , 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2702141cc406Sopenharmony_ci {USB20, {ST_NEG , CM_LINEART, 300, 0x05 , 0 , LINE_RATE , 0x05 , 25899, 128 , STT_FULL , 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2703141cc406Sopenharmony_ci {USB20, {ST_NEG , CM_LINEART, 150, 0x05 , 0 , LINE_RATE , 0x05 , 25899, 128 , STT_HALF , 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2704141cc406Sopenharmony_ci {USB20, {ST_NEG , CM_LINEART, 100, 0x05 , 0 , LINE_RATE , 0x05 , 25499, 128 , STT_HALF , 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }} 2705141cc406Sopenharmony_ci }; 2706141cc406Sopenharmony_ci 2707141cc406Sopenharmony_ci SANE_Int rst = ERROR; 2708141cc406Sopenharmony_ci 2709141cc406Sopenharmony_ci /* silence compiler */ 2710141cc406Sopenharmony_ci (void) usb; 2711141cc406Sopenharmony_ci 2712141cc406Sopenharmony_ci if (mymode != NULL) 2713141cc406Sopenharmony_ci { 2714141cc406Sopenharmony_ci SANE_Int a; 2715141cc406Sopenharmony_ci SANE_Int total = sizeof(reg) / sizeof(struct st_modes); 2716141cc406Sopenharmony_ci SANE_Int count = 0; 2717141cc406Sopenharmony_ci struct st_modes *md; 2718141cc406Sopenharmony_ci 2719141cc406Sopenharmony_ci for (a = 0; a < total; a++) 2720141cc406Sopenharmony_ci { 2721141cc406Sopenharmony_ci md = ®[a]; 2722141cc406Sopenharmony_ci if (count == sm) 2723141cc406Sopenharmony_ci { 2724141cc406Sopenharmony_ci memcpy(mymode, &md->mode, sizeof(struct st_scanmode)); 2725141cc406Sopenharmony_ci rst = OK; 2726141cc406Sopenharmony_ci break; 2727141cc406Sopenharmony_ci } 2728141cc406Sopenharmony_ci 2729141cc406Sopenharmony_ci count++; 2730141cc406Sopenharmony_ci } 2731141cc406Sopenharmony_ci } 2732141cc406Sopenharmony_ci 2733141cc406Sopenharmony_ci return rst; 2734141cc406Sopenharmony_ci} 2735141cc406Sopenharmony_ci 2736141cc406Sopenharmony_cistatic SANE_Int ua4900_scanmodes(SANE_Int usb, SANE_Int sm, struct st_scanmode *mymode) 2737141cc406Sopenharmony_ci{ 2738141cc406Sopenharmony_ci struct st_modes 2739141cc406Sopenharmony_ci { 2740141cc406Sopenharmony_ci SANE_Int usb; 2741141cc406Sopenharmony_ci struct st_scanmode mode; 2742141cc406Sopenharmony_ci }; 2743141cc406Sopenharmony_ci 2744141cc406Sopenharmony_ci struct st_modes reg[] = 2745141cc406Sopenharmony_ci { 2746141cc406Sopenharmony_ci /* usb, {scantype , colormode, res , timing, curve, samplerate, clock, ctpc , backstp, steptype, dummyline, {expt }, {mexpt }, motorplus, mexpt16, mexptfull, mexposure, mri , msi , mmtir, mmtirh, skips } */ 2747141cc406Sopenharmony_ci {USB20, {ST_NORMAL, CM_COLOR , 1200, 0x00 , -1 , PIXEL_RATE, 0x05 , 14667, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2748141cc406Sopenharmony_ci {USB20, {ST_NORMAL, CM_COLOR , 600, 0x01 , 2 , PIXEL_RATE, 0x04 , 5499, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2749141cc406Sopenharmony_ci {USB20, {ST_NORMAL, CM_COLOR , 300, 0x02 , 3 , PIXEL_RATE, 0x04 , 2751, 768 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2750141cc406Sopenharmony_ci {USB20, {ST_NORMAL, CM_COLOR , 200, 0x03 , 4 , PIXEL_RATE, 0x04 , 2255, 1856 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2751141cc406Sopenharmony_ci {USB20, {ST_NORMAL, CM_COLOR , 100, 0x04 , 4 , PIXEL_RATE, 0x04 , 2255, 1856 , STT_HALF, 0x02 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2752141cc406Sopenharmony_ci 2753141cc406Sopenharmony_ci {USB20, {ST_NORMAL, CM_GRAY , 1200, 0x05 , -1 , LINE_RATE , 0x05 , 14667, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2754141cc406Sopenharmony_ci {USB20, {ST_NORMAL, CM_GRAY , 600, 0x06 , 2 , LINE_RATE , 0x04 , 5499, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2755141cc406Sopenharmony_ci {USB20, {ST_NORMAL, CM_GRAY , 300, 0x07 , 3 , LINE_RATE , 0x04 , 2751, 768 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2756141cc406Sopenharmony_ci {USB20, {ST_NORMAL, CM_GRAY , 200, 0x08 , 4 , LINE_RATE , 0x04 , 2255, 1856 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2757141cc406Sopenharmony_ci {USB20, {ST_NORMAL, CM_GRAY , 100, 0x09 , 4 , LINE_RATE , 0x04 , 2255, 1856 , STT_HALF, 0x02 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2758141cc406Sopenharmony_ci 2759141cc406Sopenharmony_ci /* usb, {scantype , colormode, res , timing, curve, samplerate, clock, ctpc , backstp, steptype, dummyline, {expt }, {mexpt }, motorplus, mexpt16, mexptfull, mexposure, mri , msi , mmtir, mmtirh, skips } */ 2760141cc406Sopenharmony_ci {USB20, {ST_TA , CM_COLOR , 1200, 0x00 , -1 , PIXEL_RATE, 0x03 , 10899, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2761141cc406Sopenharmony_ci {USB20, {ST_TA , CM_COLOR , 600, 0x01 , -1 , PIXEL_RATE, 0x01 , 5487, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2762141cc406Sopenharmony_ci {USB20, {ST_TA , CM_COLOR , 300, 0x02 , 3 , PIXEL_RATE, 0x04 , 8351, 512 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2763141cc406Sopenharmony_ci {USB20, {ST_TA , CM_COLOR , 200, 0x03 , 4 , PIXEL_RATE, 0x04 , 7343, 1024 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2764141cc406Sopenharmony_ci {USB20, {ST_TA , CM_COLOR , 100, 0x04 , 4 , PIXEL_RATE, 0x04 , 7343, 1024 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2765141cc406Sopenharmony_ci 2766141cc406Sopenharmony_ci {USB20, {ST_TA , CM_GRAY , 1200, 0x05 , -1 , LINE_RATE , 0x03 , 10899, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2767141cc406Sopenharmony_ci {USB20, {ST_TA , CM_GRAY , 600, 0x06 , -1 , LINE_RATE , 0x01 , 5487, 256 , STT_FULL, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2768141cc406Sopenharmony_ci {USB20, {ST_TA , CM_GRAY , 300, 0x07 , 3 , LINE_RATE , 0x04 , 8351, 512 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2769141cc406Sopenharmony_ci {USB20, {ST_TA , CM_GRAY , 200, 0x08 , 4 , LINE_RATE , 0x04 , 7343, 1024 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2770141cc406Sopenharmony_ci {USB20, {ST_TA , CM_GRAY , 100, 0x09 , 4 , LINE_RATE , 0x04 , 7343, 1024 , STT_HALF, 0x00 , { 0, 0, 0}, { 0, 0, 0}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2771141cc406Sopenharmony_ci 2772141cc406Sopenharmony_ci /* usb, {scantype , colormode, res , timing, curve, samplerate, clock, ctpc , backstp, steptype, dummyline, {expt }, {mexpt }, motorplus, mexpt16, mexptfull, mexposure, mri , msi , mmtir, mmtirh, skips } */ 2773141cc406Sopenharmony_ci {USB20, {ST_NEG , CM_COLOR , 1200, 0x00 , -1 , PIXEL_RATE, 0x03 , 36467, 256 , STT_FULL, 0x00 , {12155, 24311, 0}, {12155, 12155, 36467}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2774141cc406Sopenharmony_ci {USB20, {ST_NEG , CM_COLOR , 600, 0x01 , -1 , PIXEL_RATE, 0x02 , 16463, 256 , STT_FULL, 0x00 , { 5487, 10975, 0}, { 5487, 5487, 16463}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2775141cc406Sopenharmony_ci {USB20, {ST_NEG , CM_COLOR , 300, 0x02 , -1 , PIXEL_RATE, 0x02 , 8351, 256 , STT_HALF, 0x00 , { 2783, 5567, 0}, { 2783, 2783, 8351}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2776141cc406Sopenharmony_ci {USB20, {ST_NEG , CM_COLOR , 200, 0x03 , -1 , PIXEL_RATE, 0x02 , 6191, 256 , STT_HALF, 0x00 , { 2063, 4127, 0}, { 2063, 2063, 6191}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2777141cc406Sopenharmony_ci {USB20, {ST_NEG , CM_COLOR , 100, 0x04 , -1 , PIXEL_RATE, 0x02 , 6191, 256 , STT_HALF, 0x02 , { 2063, 4127, 0}, { 2063, 2063, 6191}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2778141cc406Sopenharmony_ci 2779141cc406Sopenharmony_ci {USB20, {ST_NEG , CM_GRAY , 1200, 0x05 , -1 , LINE_RATE , 0x03 , 36467, 256 , STT_FULL, 0x00 , {12155, 24311, 0}, {12155, 12155, 36467}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2780141cc406Sopenharmony_ci {USB20, {ST_NEG , CM_GRAY , 600, 0x06 , -1 , LINE_RATE , 0x02 , 16463, 256 , STT_FULL, 0x00 , { 5487, 10975, 0}, { 5487, 5487, 16463}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2781141cc406Sopenharmony_ci {USB20, {ST_NEG , CM_GRAY , 300, 0x07 , -1 , LINE_RATE , 0x02 , 8351, 256 , STT_HALF, 0x00 , { 2783, 5567, 0}, { 2783, 2783, 8351}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2782141cc406Sopenharmony_ci {USB20, {ST_NEG , CM_GRAY , 200, 0x08 , -1 , LINE_RATE , 0x02 , 6191, 256 , STT_HALF, 0x00 , { 2063, 4127, 0}, { 2063, 2063, 6191}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }}, 2783141cc406Sopenharmony_ci {USB20, {ST_NEG , CM_GRAY , 100, 0x09 , -1 , LINE_RATE , 0x02 , 6191, 256 , STT_HALF, 0x02 , { 2063, 4127, 0}, { 2063, 2063, 6191}, 0 , 1 , 1 , 0x01 , 0x01, 0x10, 0x02 , 0x02 , 0x00 }} 2784141cc406Sopenharmony_ci }; 2785141cc406Sopenharmony_ci 2786141cc406Sopenharmony_ci SANE_Int rst = ERROR; 2787141cc406Sopenharmony_ci 2788141cc406Sopenharmony_ci if (mymode != NULL) 2789141cc406Sopenharmony_ci { 2790141cc406Sopenharmony_ci SANE_Int a; 2791141cc406Sopenharmony_ci SANE_Int total = sizeof(reg) / sizeof(struct st_modes); 2792141cc406Sopenharmony_ci SANE_Int count = 0; 2793141cc406Sopenharmony_ci struct st_modes *md; 2794141cc406Sopenharmony_ci 2795141cc406Sopenharmony_ci for (a = 0; a < total; a++) 2796141cc406Sopenharmony_ci { 2797141cc406Sopenharmony_ci md = ®[a]; 2798141cc406Sopenharmony_ci if (md->usb == usb) 2799141cc406Sopenharmony_ci { 2800141cc406Sopenharmony_ci if (count == sm) 2801141cc406Sopenharmony_ci { 2802141cc406Sopenharmony_ci memcpy(mymode, &md->mode, sizeof(struct st_scanmode)); 2803141cc406Sopenharmony_ci rst = OK; 2804141cc406Sopenharmony_ci break; 2805141cc406Sopenharmony_ci } 2806141cc406Sopenharmony_ci 2807141cc406Sopenharmony_ci count++; 2808141cc406Sopenharmony_ci } 2809141cc406Sopenharmony_ci } 2810141cc406Sopenharmony_ci } 2811141cc406Sopenharmony_ci 2812141cc406Sopenharmony_ci return rst; 2813141cc406Sopenharmony_ci} 2814141cc406Sopenharmony_ci 2815141cc406Sopenharmony_ci/** SEC: Calibration wreferences ---------- */ 2816141cc406Sopenharmony_ci 2817141cc406Sopenharmony_cistatic void hp3970_wrefs(SANE_Int usb, SANE_Int ccd, SANE_Int depth, SANE_Int res, SANE_Int scantype, SANE_Int *red, SANE_Int *green, SANE_Int *blue) 2818141cc406Sopenharmony_ci{ 2819141cc406Sopenharmony_ci struct st_wref 2820141cc406Sopenharmony_ci { 2821141cc406Sopenharmony_ci SANE_Int usb; 2822141cc406Sopenharmony_ci SANE_Int sensor; 2823141cc406Sopenharmony_ci SANE_Int depth; 2824141cc406Sopenharmony_ci SANE_Int res; 2825141cc406Sopenharmony_ci SANE_Int transparent[3]; 2826141cc406Sopenharmony_ci SANE_Int negative[3]; 2827141cc406Sopenharmony_ci }; 2828141cc406Sopenharmony_ci 2829141cc406Sopenharmony_ci struct st_wref wrefs[] = 2830141cc406Sopenharmony_ci { 2831141cc406Sopenharmony_ci /*usb , sensor , depth, res , {transparent }, {negative} */ 2832141cc406Sopenharmony_ci {USB20, CCD_SENSOR, 8 , 2400, { 78, 78, 68}, {120, 136, 157}}, 2833141cc406Sopenharmony_ci {USB20, CCD_SENSOR, 8 , 1200, { 78, 78, 68}, {120, 136, 157}}, 2834141cc406Sopenharmony_ci {USB20, CCD_SENSOR, 8 , 600 , { 79, 80, 70}, {119, 136, 157}}, 2835141cc406Sopenharmony_ci {USB20, CCD_SENSOR, 8 , 300 , { 79, 80, 70}, {119, 136, 157}}, 2836141cc406Sopenharmony_ci {USB20, CCD_SENSOR, 8 , 200 , { 79, 80, 70}, {119, 136, 157}}, 2837141cc406Sopenharmony_ci {USB20, CCD_SENSOR, 8 , 100 , { 79, 80, 70}, {119, 136, 157}}, 2838141cc406Sopenharmony_ci 2839141cc406Sopenharmony_ci {USB20, CCD_SENSOR, 16 , 2400, { 81, 81, 71}, {119, 137, 158}}, 2840141cc406Sopenharmony_ci {USB20, CCD_SENSOR, 16 , 1200, { 81, 81, 71}, {119, 137, 158}}, 2841141cc406Sopenharmony_ci {USB20, CCD_SENSOR, 16 , 600 , { 81, 82, 72}, {119, 137, 158}}, 2842141cc406Sopenharmony_ci {USB20, CCD_SENSOR, 16 , 300 , { 81, 82, 72}, {119, 137, 158}}, 2843141cc406Sopenharmony_ci {USB20, CCD_SENSOR, 16 , 200 , { 81, 82, 72}, {119, 137, 158}}, 2844141cc406Sopenharmony_ci {USB20, CCD_SENSOR, 16 , 100 , { 81, 82, 72}, {119, 137, 158}}, 2845141cc406Sopenharmony_ci 2846141cc406Sopenharmony_ci /*usb , sensor , depth, res , {transparent }, {negative } */ 2847141cc406Sopenharmony_ci {USB20, CIS_SENSOR, 8 , 2400, { 94, 85, 78}, { 94, 85, 78}}, 2848141cc406Sopenharmony_ci {USB20, CIS_SENSOR, 8 , 1200, { 83, 82, 75}, {140, 155, 155}}, 2849141cc406Sopenharmony_ci {USB20, CIS_SENSOR, 8 , 600 , { 84, 84, 76}, {145, 155, 165}}, 2850141cc406Sopenharmony_ci {USB20, CIS_SENSOR, 8 , 300 , {146, 166, 166}, {146, 166, 166}}, 2851141cc406Sopenharmony_ci {USB20, CIS_SENSOR, 8 , 200 , {145, 310, 160}, {145, 310, 160}}, 2852141cc406Sopenharmony_ci {USB20, CIS_SENSOR, 8 , 100 , {140, 300, 155}, {140, 300, 155}}, 2853141cc406Sopenharmony_ci 2854141cc406Sopenharmony_ci {USB20, CIS_SENSOR, 16 , 2400, { 94, 85, 78}, { 94, 85, 78}}, 2855141cc406Sopenharmony_ci {USB20, CIS_SENSOR, 16 , 1200, { 83, 82, 75}, {140, 155, 155}}, 2856141cc406Sopenharmony_ci {USB20, CIS_SENSOR, 16 , 600 , { 84, 84, 76}, {145, 155, 165}}, 2857141cc406Sopenharmony_ci {USB20, CIS_SENSOR, 16 , 300 , {146, 166, 166}, {146, 166, 166}}, 2858141cc406Sopenharmony_ci {USB20, CIS_SENSOR, 16 , 200 , {145, 310, 160}, {145, 310, 160}}, 2859141cc406Sopenharmony_ci {USB20, CIS_SENSOR, 16 , 100 , {140, 300, 155}, {140, 300, 155}}, 2860141cc406Sopenharmony_ci 2861141cc406Sopenharmony_ci /*usb , sensor , depth, res , {transparent }, {negative } */ 2862141cc406Sopenharmony_ci {USB11, CCD_SENSOR, 8 , 2400, { 78, 78, 68}, {120, 137, 158}}, 2863141cc406Sopenharmony_ci {USB11, CCD_SENSOR, 8 , 1200, { 78, 78, 68}, {120, 137, 158}}, 2864141cc406Sopenharmony_ci {USB11, CCD_SENSOR, 8 , 600 , { 79, 79, 70}, {120, 137, 158}}, 2865141cc406Sopenharmony_ci {USB11, CCD_SENSOR, 8 , 300 , { 79, 79, 70}, {120, 137, 158}}, 2866141cc406Sopenharmony_ci {USB11, CCD_SENSOR, 8 , 200 , { 79, 79, 70}, {120, 137, 158}}, 2867141cc406Sopenharmony_ci {USB11, CCD_SENSOR, 8 , 100 , { 79, 79, 70}, {120, 137, 158}}, 2868141cc406Sopenharmony_ci 2869141cc406Sopenharmony_ci {USB11, CCD_SENSOR, 16 , 2400, { 80, 80, 70}, {120, 137, 158}}, 2870141cc406Sopenharmony_ci {USB11, CCD_SENSOR, 16 , 1200, { 80, 80, 70}, {120, 137, 158}}, 2871141cc406Sopenharmony_ci {USB11, CCD_SENSOR, 16 , 600 , { 80, 81, 71}, {120, 137, 158}}, 2872141cc406Sopenharmony_ci {USB11, CCD_SENSOR, 16 , 300 , { 80, 81, 71}, {120, 137, 158}}, 2873141cc406Sopenharmony_ci {USB11, CCD_SENSOR, 16 , 200 , { 80, 81, 71}, {120, 137, 158}}, 2874141cc406Sopenharmony_ci {USB11, CCD_SENSOR, 16 , 100 , { 80, 81, 71}, {120, 137, 158}}, 2875141cc406Sopenharmony_ci 2876141cc406Sopenharmony_ci /*usb , sensor , depth, res , {transparent }, {negative} */ 2877141cc406Sopenharmony_ci {USB11, CIS_SENSOR, 8 , 2400, { 94, 85, 78}, {94 , 85 , 78}}, 2878141cc406Sopenharmony_ci {USB11, CIS_SENSOR, 8 , 1200, { 83, 82, 75}, {140, 155, 155}}, 2879141cc406Sopenharmony_ci {USB11, CIS_SENSOR, 8 , 600 , { 84, 84, 76}, {145, 155, 165}}, 2880141cc406Sopenharmony_ci {USB11, CIS_SENSOR, 8 , 300 , {146, 166, 166}, {146, 166, 166}}, 2881141cc406Sopenharmony_ci {USB11, CIS_SENSOR, 8 , 200 , {145, 310, 160}, {145, 310, 160}}, 2882141cc406Sopenharmony_ci {USB11, CIS_SENSOR, 8 , 100 , {140, 300, 155}, {140, 300, 155}}, 2883141cc406Sopenharmony_ci 2884141cc406Sopenharmony_ci {USB11, CIS_SENSOR, 16 , 2400, { 94, 85, 78}, { 94, 85, 78}}, 2885141cc406Sopenharmony_ci {USB11, CIS_SENSOR, 16 , 1200, { 83, 82, 75}, {140, 155, 155}}, 2886141cc406Sopenharmony_ci {USB11, CIS_SENSOR, 16 , 600 , { 84, 84, 76}, {145, 155, 165}}, 2887141cc406Sopenharmony_ci {USB11, CIS_SENSOR, 16 , 300 , {146, 166, 166}, {146, 166, 166}}, 2888141cc406Sopenharmony_ci {USB11, CIS_SENSOR, 16 , 200 , {145, 310, 160}, {145, 310, 160}}, 2889141cc406Sopenharmony_ci {USB11, CIS_SENSOR, 16 , 100 , {140, 300, 155}, {140, 300, 155}} 2890141cc406Sopenharmony_ci }; 2891141cc406Sopenharmony_ci 2892141cc406Sopenharmony_ci struct st_wref *rf; 2893141cc406Sopenharmony_ci 2894141cc406Sopenharmony_ci *red = *green = *blue = 0x50; 2895141cc406Sopenharmony_ci 2896141cc406Sopenharmony_ci if (res <= 100) 2897141cc406Sopenharmony_ci res = 100; 2898141cc406Sopenharmony_ci else if (res <= 200) 2899141cc406Sopenharmony_ci res = 200; 2900141cc406Sopenharmony_ci else if (res <= 300) 2901141cc406Sopenharmony_ci res = 300; 2902141cc406Sopenharmony_ci else if (res <= 600) 2903141cc406Sopenharmony_ci res = 600; 2904141cc406Sopenharmony_ci else if (res <= 1200) 2905141cc406Sopenharmony_ci res = 1200; 2906141cc406Sopenharmony_ci else res = 2400; 2907141cc406Sopenharmony_ci 2908141cc406Sopenharmony_ci if (scantype != ST_NORMAL) 2909141cc406Sopenharmony_ci { 2910141cc406Sopenharmony_ci SANE_Int a; 2911141cc406Sopenharmony_ci SANE_Int count = sizeof(wrefs) / sizeof(struct st_wref); 2912141cc406Sopenharmony_ci 2913141cc406Sopenharmony_ci for (a = 0; a < count; a++) 2914141cc406Sopenharmony_ci { 2915141cc406Sopenharmony_ci rf = &wrefs[a]; 2916141cc406Sopenharmony_ci if ((rf->usb == usb)&&(rf->sensor == ccd)&&(rf->depth == depth)&&(rf->res == res)) 2917141cc406Sopenharmony_ci { 2918141cc406Sopenharmony_ci switch(scantype) 2919141cc406Sopenharmony_ci { 2920141cc406Sopenharmony_ci case ST_NEG: 2921141cc406Sopenharmony_ci *red = rf->negative[CL_RED]; 2922141cc406Sopenharmony_ci *green = rf->negative[CL_GREEN]; 2923141cc406Sopenharmony_ci *blue = rf->negative[CL_BLUE]; 2924141cc406Sopenharmony_ci break; 2925141cc406Sopenharmony_ci case ST_TA: 2926141cc406Sopenharmony_ci *red = rf->transparent[CL_RED]; 2927141cc406Sopenharmony_ci *green = rf->transparent[CL_GREEN]; 2928141cc406Sopenharmony_ci *blue = rf->transparent[CL_BLUE]; 2929141cc406Sopenharmony_ci break; 2930141cc406Sopenharmony_ci } 2931141cc406Sopenharmony_ci 2932141cc406Sopenharmony_ci break; 2933141cc406Sopenharmony_ci } 2934141cc406Sopenharmony_ci } 2935141cc406Sopenharmony_ci } else 2936141cc406Sopenharmony_ci { 2937141cc406Sopenharmony_ci /* reflective mode */ 2938141cc406Sopenharmony_ci *red = 233; 2939141cc406Sopenharmony_ci *green = 230; 2940141cc406Sopenharmony_ci *blue = 222; 2941141cc406Sopenharmony_ci } 2942141cc406Sopenharmony_ci} 2943141cc406Sopenharmony_ci 2944141cc406Sopenharmony_cistatic void ua4900_wrefs(SANE_Int usb, SANE_Int depth, SANE_Int res, SANE_Int scantype, SANE_Int *red, SANE_Int *green, SANE_Int *blue) 2945141cc406Sopenharmony_ci{ 2946141cc406Sopenharmony_ci struct st_wref 2947141cc406Sopenharmony_ci { 2948141cc406Sopenharmony_ci SANE_Int usb; 2949141cc406Sopenharmony_ci SANE_Int depth; 2950141cc406Sopenharmony_ci SANE_Int res; 2951141cc406Sopenharmony_ci SANE_Int transparent[3]; 2952141cc406Sopenharmony_ci SANE_Int negative[3]; 2953141cc406Sopenharmony_ci }; 2954141cc406Sopenharmony_ci 2955141cc406Sopenharmony_ci struct st_wref wrefs[] = 2956141cc406Sopenharmony_ci { 2957141cc406Sopenharmony_ci /*usb , depth, res , {transparent }, {negative } */ 2958141cc406Sopenharmony_ci {USB20, 8 , 1200, {136, 131, 121}, {215, 210, 260}}, 2959141cc406Sopenharmony_ci {USB20, 8 , 600 , {133, 129, 118}, {219, 215, 264}}, 2960141cc406Sopenharmony_ci {USB20, 8 , 300 , {133, 129, 119}, {218, 215, 261}}, 2961141cc406Sopenharmony_ci {USB20, 8 , 200 , {133, 130, 119}, {218, 215, 261}}, 2962141cc406Sopenharmony_ci {USB20, 8 , 100 , {132, 128, 118}, {218, 215, 261}}, 2963141cc406Sopenharmony_ci 2964141cc406Sopenharmony_ci {USB20, 16 , 1200, {264, 263, 266}, { 0, 0, 0}}, 2965141cc406Sopenharmony_ci {USB20, 16 , 600 , {264, 265, 268}, { 0, 0, 0}}, 2966141cc406Sopenharmony_ci {USB20, 16 , 300 , {264, 260, 263}, { 0, 0, 0}}, 2967141cc406Sopenharmony_ci {USB20, 16 , 200 , {257, 255, 253}, { 0, 0, 0}}, 2968141cc406Sopenharmony_ci {USB20, 16 , 100 , {258, 259, 256}, { 0, 0, 0}}, 2969141cc406Sopenharmony_ci 2970141cc406Sopenharmony_ci /*usb , depth, res , {transparent }, {negative } */ 2971141cc406Sopenharmony_ci {USB11, 8 , 1200, {135, 130, 119}, {220, 215, 264}}, 2972141cc406Sopenharmony_ci {USB11, 8 , 600 , {132, 128, 117}, {217, 213, 259}}, 2973141cc406Sopenharmony_ci {USB11, 8 , 300 , {132, 128, 117}, {216, 211, 259}}, 2974141cc406Sopenharmony_ci {USB11, 8 , 200 , {132, 128, 118}, {215, 352, 259}}, 2975141cc406Sopenharmony_ci {USB11, 8 , 100 , {266, 264, 264}, {215, 352, 259}}, 2976141cc406Sopenharmony_ci 2977141cc406Sopenharmony_ci {USB11, 16 , 1200, {264, 263, 266}, { 0, 0, 0}}, 2978141cc406Sopenharmony_ci {USB11, 16 , 600 , {257, 256, 253}, { 0, 0, 0}}, 2979141cc406Sopenharmony_ci {USB11, 16 , 300 , {259, 252, 254}, { 0, 0, 0}}, 2980141cc406Sopenharmony_ci {USB11, 16 , 200 , {257, 255, 253}, { 0, 0, 0}}, 2981141cc406Sopenharmony_ci {USB11, 16 , 100 , {258, 259, 256}, { 0, 0, 0}} 2982141cc406Sopenharmony_ci }; 2983141cc406Sopenharmony_ci 2984141cc406Sopenharmony_ci struct st_wref *rf; 2985141cc406Sopenharmony_ci 2986141cc406Sopenharmony_ci *red = *green = *blue = 0x50; 2987141cc406Sopenharmony_ci 2988141cc406Sopenharmony_ci if (res <= 100) 2989141cc406Sopenharmony_ci res = 100; 2990141cc406Sopenharmony_ci else if (res <= 200) 2991141cc406Sopenharmony_ci res = 200; 2992141cc406Sopenharmony_ci else if (res <= 300) 2993141cc406Sopenharmony_ci res = 300; 2994141cc406Sopenharmony_ci else if (res <= 600) 2995141cc406Sopenharmony_ci res = 600; 2996141cc406Sopenharmony_ci else res = 1200; 2997141cc406Sopenharmony_ci 2998141cc406Sopenharmony_ci if (scantype != ST_NORMAL) 2999141cc406Sopenharmony_ci { 3000141cc406Sopenharmony_ci SANE_Int a; 3001141cc406Sopenharmony_ci SANE_Int count = sizeof(wrefs) / sizeof(struct st_wref); 3002141cc406Sopenharmony_ci 3003141cc406Sopenharmony_ci for (a = 0; a < count; a++) 3004141cc406Sopenharmony_ci { 3005141cc406Sopenharmony_ci rf = &wrefs[a]; 3006141cc406Sopenharmony_ci if ((rf->usb == usb)&&(rf->depth == depth)&&(rf->res == res)) 3007141cc406Sopenharmony_ci { 3008141cc406Sopenharmony_ci switch(scantype) 3009141cc406Sopenharmony_ci { 3010141cc406Sopenharmony_ci case ST_NEG: 3011141cc406Sopenharmony_ci *red = rf->negative[CL_RED]; 3012141cc406Sopenharmony_ci *green = rf->negative[CL_GREEN]; 3013141cc406Sopenharmony_ci *blue = rf->negative[CL_BLUE]; 3014141cc406Sopenharmony_ci break; 3015141cc406Sopenharmony_ci case ST_TA: 3016141cc406Sopenharmony_ci *red = rf->transparent[CL_RED]; 3017141cc406Sopenharmony_ci *green = rf->transparent[CL_GREEN]; 3018141cc406Sopenharmony_ci *blue = rf->transparent[CL_BLUE]; 3019141cc406Sopenharmony_ci break; 3020141cc406Sopenharmony_ci } 3021141cc406Sopenharmony_ci 3022141cc406Sopenharmony_ci break; 3023141cc406Sopenharmony_ci } 3024141cc406Sopenharmony_ci } 3025141cc406Sopenharmony_ci } else 3026141cc406Sopenharmony_ci { 3027141cc406Sopenharmony_ci /* reflective mode */ 3028141cc406Sopenharmony_ci *red = 233; 3029141cc406Sopenharmony_ci *green = 230; 3030141cc406Sopenharmony_ci *blue = 222; 3031141cc406Sopenharmony_ci } 3032141cc406Sopenharmony_ci} 3033141cc406Sopenharmony_ci 3034141cc406Sopenharmony_cistatic void hp3800_wrefs(SANE_Int res, SANE_Int scantype, SANE_Int *red, SANE_Int *green, SANE_Int *blue) 3035141cc406Sopenharmony_ci{ 3036141cc406Sopenharmony_ci /* in this scanner, values are the same in all usb versions and depths */ 3037141cc406Sopenharmony_ci struct st_wref 3038141cc406Sopenharmony_ci { 3039141cc406Sopenharmony_ci SANE_Int res; 3040141cc406Sopenharmony_ci SANE_Int transparent[3]; 3041141cc406Sopenharmony_ci SANE_Int negative[3]; 3042141cc406Sopenharmony_ci }; 3043141cc406Sopenharmony_ci 3044141cc406Sopenharmony_ci struct st_wref wrefs[] = 3045141cc406Sopenharmony_ci { 3046141cc406Sopenharmony_ci /* res , {transparent }, {negative } */ 3047141cc406Sopenharmony_ci { 2400, {276, 279, 243}, { 98, 162, 229}}, 3048141cc406Sopenharmony_ci { 1200, {276, 279, 243}, { 98, 162, 229}}, 3049141cc406Sopenharmony_ci { 600, {276, 279, 243}, {100, 162, 229}}, 3050141cc406Sopenharmony_ci { 300, {276, 279, 243}, {100, 162, 229}}, 3051141cc406Sopenharmony_ci { 150, {276, 279, 243}, {100, 162, 229}}, 3052141cc406Sopenharmony_ci }; 3053141cc406Sopenharmony_ci 3054141cc406Sopenharmony_ci struct st_wref *rf; 3055141cc406Sopenharmony_ci 3056141cc406Sopenharmony_ci *red = *green = *blue = 0x50; 3057141cc406Sopenharmony_ci 3058141cc406Sopenharmony_ci if (res <= 150) 3059141cc406Sopenharmony_ci res = 150; 3060141cc406Sopenharmony_ci else if (res <= 300) 3061141cc406Sopenharmony_ci res = 300; 3062141cc406Sopenharmony_ci else if (res <= 600) 3063141cc406Sopenharmony_ci res = 600; 3064141cc406Sopenharmony_ci else if (res <= 1200) 3065141cc406Sopenharmony_ci res = 1200; 3066141cc406Sopenharmony_ci else res = 2400; 3067141cc406Sopenharmony_ci 3068141cc406Sopenharmony_ci if (scantype != ST_NORMAL) 3069141cc406Sopenharmony_ci { 3070141cc406Sopenharmony_ci SANE_Int a; 3071141cc406Sopenharmony_ci SANE_Int count = sizeof(wrefs) / sizeof(struct st_wref); 3072141cc406Sopenharmony_ci 3073141cc406Sopenharmony_ci for (a = 0; a < count; a++) 3074141cc406Sopenharmony_ci { 3075141cc406Sopenharmony_ci rf = &wrefs[a]; 3076141cc406Sopenharmony_ci if (rf->res == res) 3077141cc406Sopenharmony_ci { 3078141cc406Sopenharmony_ci switch(scantype) 3079141cc406Sopenharmony_ci { 3080141cc406Sopenharmony_ci case ST_NEG: 3081141cc406Sopenharmony_ci *red = rf->negative[CL_RED]; 3082141cc406Sopenharmony_ci *green = rf->negative[CL_GREEN]; 3083141cc406Sopenharmony_ci *blue = rf->negative[CL_BLUE]; 3084141cc406Sopenharmony_ci break; 3085141cc406Sopenharmony_ci case ST_TA: 3086141cc406Sopenharmony_ci *red = rf->transparent[CL_RED]; 3087141cc406Sopenharmony_ci *green = rf->transparent[CL_GREEN]; 3088141cc406Sopenharmony_ci *blue = rf->transparent[CL_BLUE]; 3089141cc406Sopenharmony_ci break; 3090141cc406Sopenharmony_ci } 3091141cc406Sopenharmony_ci 3092141cc406Sopenharmony_ci break; 3093141cc406Sopenharmony_ci } 3094141cc406Sopenharmony_ci } 3095141cc406Sopenharmony_ci } else 3096141cc406Sopenharmony_ci { 3097141cc406Sopenharmony_ci /* reflective mode */ 3098141cc406Sopenharmony_ci *red = 248; 3099141cc406Sopenharmony_ci *green = 250; 3100141cc406Sopenharmony_ci *blue = 248; 3101141cc406Sopenharmony_ci } 3102141cc406Sopenharmony_ci} 3103141cc406Sopenharmony_ci 3104141cc406Sopenharmony_cistatic void hp4370_wrefs(SANE_Int res, SANE_Int scantype, SANE_Int *red, SANE_Int *green, SANE_Int *blue) 3105141cc406Sopenharmony_ci{ 3106141cc406Sopenharmony_ci struct st_wref 3107141cc406Sopenharmony_ci { 3108141cc406Sopenharmony_ci SANE_Int res; 3109141cc406Sopenharmony_ci SANE_Int transparent[3]; 3110141cc406Sopenharmony_ci SANE_Int negative[3]; 3111141cc406Sopenharmony_ci }; 3112141cc406Sopenharmony_ci 3113141cc406Sopenharmony_ci /* values are the same in all usb versions and depths */ 3114141cc406Sopenharmony_ci 3115141cc406Sopenharmony_ci struct st_wref wrefs[] = 3116141cc406Sopenharmony_ci { 3117141cc406Sopenharmony_ci /* res, {transparent }, {negative} */ 3118141cc406Sopenharmony_ci { 4800, { 93, 93, 82}, {156, 308, 454}}, 3119141cc406Sopenharmony_ci { 2400, { 93, 93, 82}, {156, 156, 153}}, 3120141cc406Sopenharmony_ci { 1200, { 93, 93, 82}, {156, 156, 153}}, 3121141cc406Sopenharmony_ci { 600, { 93, 93, 82}, {155, 155, 152}}, 3122141cc406Sopenharmony_ci { 300, { 94, 94, 83}, {155, 155, 152}}, 3123141cc406Sopenharmony_ci { 150, { 86, 87, 77}, {148, 145, 138}} 3124141cc406Sopenharmony_ci }; 3125141cc406Sopenharmony_ci 3126141cc406Sopenharmony_ci struct st_wref *rf; 3127141cc406Sopenharmony_ci 3128141cc406Sopenharmony_ci SANE_Int a; 3129141cc406Sopenharmony_ci 3130141cc406Sopenharmony_ci *red = *green = *blue = 0x50; 3131141cc406Sopenharmony_ci 3132141cc406Sopenharmony_ci if (res <= 150) 3133141cc406Sopenharmony_ci res = 150; 3134141cc406Sopenharmony_ci else if (res <= 300) 3135141cc406Sopenharmony_ci res = 300; 3136141cc406Sopenharmony_ci else if (res <= 600) 3137141cc406Sopenharmony_ci res = 600; 3138141cc406Sopenharmony_ci else if (res <= 1200) 3139141cc406Sopenharmony_ci res = 1200; 3140141cc406Sopenharmony_ci else if (res <= 2400) 3141141cc406Sopenharmony_ci res = 2400; 3142141cc406Sopenharmony_ci else res = 4800; 3143141cc406Sopenharmony_ci 3144141cc406Sopenharmony_ci if (scantype != ST_NORMAL) 3145141cc406Sopenharmony_ci { 3146141cc406Sopenharmony_ci SANE_Int count = sizeof(wrefs) / sizeof(struct st_wref); 3147141cc406Sopenharmony_ci 3148141cc406Sopenharmony_ci for (a = 0; a < count; a++) 3149141cc406Sopenharmony_ci { 3150141cc406Sopenharmony_ci rf = &wrefs[a]; 3151141cc406Sopenharmony_ci if (rf->res == res) 3152141cc406Sopenharmony_ci { 3153141cc406Sopenharmony_ci switch(scantype) 3154141cc406Sopenharmony_ci { 3155141cc406Sopenharmony_ci case ST_NEG: 3156141cc406Sopenharmony_ci *red = rf->negative[CL_RED]; 3157141cc406Sopenharmony_ci *green = rf->negative[CL_GREEN]; 3158141cc406Sopenharmony_ci *blue = rf->negative[CL_BLUE]; 3159141cc406Sopenharmony_ci break; 3160141cc406Sopenharmony_ci case ST_TA: 3161141cc406Sopenharmony_ci *red = rf->transparent[CL_RED]; 3162141cc406Sopenharmony_ci *green = rf->transparent[CL_GREEN]; 3163141cc406Sopenharmony_ci *blue = rf->transparent[CL_BLUE]; 3164141cc406Sopenharmony_ci break; 3165141cc406Sopenharmony_ci } 3166141cc406Sopenharmony_ci 3167141cc406Sopenharmony_ci break; 3168141cc406Sopenharmony_ci } 3169141cc406Sopenharmony_ci } 3170141cc406Sopenharmony_ci } else 3171141cc406Sopenharmony_ci { 3172141cc406Sopenharmony_ci /* reflective mode */ 3173141cc406Sopenharmony_ci *red = 233; 3174141cc406Sopenharmony_ci *green = 232; 3175141cc406Sopenharmony_ci *blue = 223; 3176141cc406Sopenharmony_ci } 3177141cc406Sopenharmony_ci} 3178141cc406Sopenharmony_ci 3179141cc406Sopenharmony_cistatic void cfg_wrefs_get(SANE_Int sensortype, SANE_Int depth, SANE_Int res, SANE_Int scantype, SANE_Int *red, SANE_Int *green, SANE_Int *blue) 3180141cc406Sopenharmony_ci{ 3181141cc406Sopenharmony_ci switch(RTS_Debug->dev_model) 3182141cc406Sopenharmony_ci { 3183141cc406Sopenharmony_ci case UA4900: 3184141cc406Sopenharmony_ci ua4900_wrefs(RTS_Debug->usbtype, depth, res, scantype, red, green, blue); 3185141cc406Sopenharmony_ci break; 3186141cc406Sopenharmony_ci 3187141cc406Sopenharmony_ci case HP3800: 3188141cc406Sopenharmony_ci case HPG2710: 3189141cc406Sopenharmony_ci hp3800_wrefs(res, scantype, red, green, blue); 3190141cc406Sopenharmony_ci break; 3191141cc406Sopenharmony_ci 3192141cc406Sopenharmony_ci case HP4370: 3193141cc406Sopenharmony_ci case HPG3010: 3194141cc406Sopenharmony_ci case HPG3110: 3195141cc406Sopenharmony_ci hp4370_wrefs(res, scantype, red, green, blue); 3196141cc406Sopenharmony_ci break; 3197141cc406Sopenharmony_ci 3198141cc406Sopenharmony_ci default: 3199141cc406Sopenharmony_ci /* hp3970 and hp4070 */ 3200141cc406Sopenharmony_ci hp3970_wrefs(RTS_Debug->usbtype, sensortype, depth, res, scantype, red, green, blue); 3201141cc406Sopenharmony_ci break; 3202141cc406Sopenharmony_ci } 3203141cc406Sopenharmony_ci} 3204141cc406Sopenharmony_ci 3205141cc406Sopenharmony_cistatic void hp3800_shading_cut(SANE_Int res, SANE_Int scantype, SANE_Int *red, SANE_Int *green, SANE_Int *blue) 3206141cc406Sopenharmony_ci{ 3207141cc406Sopenharmony_ci /* values are the same in all usb versions and depths */ 3208141cc406Sopenharmony_ci struct st_cut 3209141cc406Sopenharmony_ci { 3210141cc406Sopenharmony_ci SANE_Int res; 3211141cc406Sopenharmony_ci SANE_Int reflective[3]; 3212141cc406Sopenharmony_ci SANE_Int transparent[3]; 3213141cc406Sopenharmony_ci SANE_Int negative[3]; 3214141cc406Sopenharmony_ci }; 3215141cc406Sopenharmony_ci 3216141cc406Sopenharmony_ci struct st_cut cuts[] = 3217141cc406Sopenharmony_ci { 3218141cc406Sopenharmony_ci /* res, {reflective }, {transparent }, {negative } */ 3219141cc406Sopenharmony_ci { 2400, { -6, -6, -6}, {-75, -75, -75}, {440, -300, -250}}, 3220141cc406Sopenharmony_ci { 1200, { -6, -6, -6}, {-75, -75, -75}, {440, -300, -250}}, 3221141cc406Sopenharmony_ci { 600, { 10, 9, 12}, {-75, -75, -75}, {440, -300, -250}}, 3222141cc406Sopenharmony_ci { 300, { -6, -6, -6}, {-75, -75, -75}, {440, -300, -250}}, 3223141cc406Sopenharmony_ci { 150, { -6, -6, -6}, {-75, -75, -75}, {440, -300, -250}} 3224141cc406Sopenharmony_ci }; 3225141cc406Sopenharmony_ci 3226141cc406Sopenharmony_ci struct st_cut *ct; 3227141cc406Sopenharmony_ci 3228141cc406Sopenharmony_ci SANE_Int a; 3229141cc406Sopenharmony_ci SANE_Int count = sizeof(cuts) / sizeof(struct st_cut); 3230141cc406Sopenharmony_ci 3231141cc406Sopenharmony_ci *red = *green = *blue = 0; 3232141cc406Sopenharmony_ci 3233141cc406Sopenharmony_ci if (res <= 150) 3234141cc406Sopenharmony_ci res = 150; 3235141cc406Sopenharmony_ci else if (res <= 300) 3236141cc406Sopenharmony_ci res = 300; 3237141cc406Sopenharmony_ci else if (res <= 600) 3238141cc406Sopenharmony_ci res = 600; 3239141cc406Sopenharmony_ci else if (res <= 1200) 3240141cc406Sopenharmony_ci res = 1200; 3241141cc406Sopenharmony_ci else res = 2400; 3242141cc406Sopenharmony_ci 3243141cc406Sopenharmony_ci for (a = 0; a < count; a++) 3244141cc406Sopenharmony_ci { 3245141cc406Sopenharmony_ci ct = &cuts[a]; 3246141cc406Sopenharmony_ci if (ct->res == res) 3247141cc406Sopenharmony_ci { 3248141cc406Sopenharmony_ci switch(scantype) 3249141cc406Sopenharmony_ci { 3250141cc406Sopenharmony_ci case ST_NEG: 3251141cc406Sopenharmony_ci *red = ct->negative[CL_RED]; 3252141cc406Sopenharmony_ci *green = ct->negative[CL_GREEN]; 3253141cc406Sopenharmony_ci *blue = ct->negative[CL_BLUE]; 3254141cc406Sopenharmony_ci break; 3255141cc406Sopenharmony_ci case ST_TA: 3256141cc406Sopenharmony_ci *red = ct->transparent[CL_RED]; 3257141cc406Sopenharmony_ci *green = ct->transparent[CL_GREEN]; 3258141cc406Sopenharmony_ci *blue = ct->transparent[CL_BLUE]; 3259141cc406Sopenharmony_ci break; 3260141cc406Sopenharmony_ci default: /* reflective */ 3261141cc406Sopenharmony_ci *red = ct->reflective[CL_RED]; 3262141cc406Sopenharmony_ci *green = ct->reflective[CL_GREEN]; 3263141cc406Sopenharmony_ci *blue = ct->reflective[CL_BLUE]; 3264141cc406Sopenharmony_ci break; 3265141cc406Sopenharmony_ci } 3266141cc406Sopenharmony_ci break; 3267141cc406Sopenharmony_ci } 3268141cc406Sopenharmony_ci } 3269141cc406Sopenharmony_ci} 3270141cc406Sopenharmony_ci 3271141cc406Sopenharmony_cistatic void hp3970_shading_cut(SANE_Int usb, SANE_Int ccd, SANE_Int depth, SANE_Int res, SANE_Int scantype, SANE_Int *red, SANE_Int *green, SANE_Int *blue) 3272141cc406Sopenharmony_ci{ 3273141cc406Sopenharmony_ci struct st_cut 3274141cc406Sopenharmony_ci { 3275141cc406Sopenharmony_ci SANE_Int usb; 3276141cc406Sopenharmony_ci SANE_Int sensor; 3277141cc406Sopenharmony_ci SANE_Int depth; 3278141cc406Sopenharmony_ci SANE_Int res; 3279141cc406Sopenharmony_ci SANE_Int reflective[3]; 3280141cc406Sopenharmony_ci SANE_Int transparent[3]; 3281141cc406Sopenharmony_ci SANE_Int negative[3]; 3282141cc406Sopenharmony_ci }; 3283141cc406Sopenharmony_ci 3284141cc406Sopenharmony_ci struct st_cut cuts[] = 3285141cc406Sopenharmony_ci { 3286141cc406Sopenharmony_ci /*usb , sensor , depth, res , {reflective }, {transparent }, {negative} */ 3287141cc406Sopenharmony_ci {USB20, CCD_SENSOR, 8 , 2400, {-15, -15, -15}, { 0, 0, 0}, {63, 0, 3}}, 3288141cc406Sopenharmony_ci {USB20, CCD_SENSOR, 8 , 1200, {-15, -15, -15}, { 0, 0, 0}, {63, 0, 5}}, 3289141cc406Sopenharmony_ci {USB20, CCD_SENSOR, 8 , 600 , {-15, -15, -15}, { 0, 0, 0}, {75, 0, 5}}, 3290141cc406Sopenharmony_ci {USB20, CCD_SENSOR, 8 , 300 , {-15, -15, -15}, { 0, 0, 0}, {75, 0, 5}}, 3291141cc406Sopenharmony_ci {USB20, CCD_SENSOR, 8 , 200 , {-15, -15, -15}, { 0, 0, 0}, {75, 0, 5}}, 3292141cc406Sopenharmony_ci {USB20, CCD_SENSOR, 8 , 100 , {-15, -15, -15}, { 0, 0, 0}, {75, 0, 5}}, 3293141cc406Sopenharmony_ci 3294141cc406Sopenharmony_ci {USB20, CCD_SENSOR, 16 , 2400, {-15, -15, -15}, { -7, -7, -7}, {43, 0, 3}}, 3295141cc406Sopenharmony_ci {USB20, CCD_SENSOR, 16 , 1200, {-15, -15, -15}, {-15, -15, -15}, {63, 0, 5}}, 3296141cc406Sopenharmony_ci {USB20, CCD_SENSOR, 16 , 600 , {-15, -15, -15}, {-15, -15, -15}, {75, 0, 5}}, 3297141cc406Sopenharmony_ci {USB20, CCD_SENSOR, 16 , 300 , {-15, -15, -15}, {-15, -15, -15}, {75, 0, 5}}, 3298141cc406Sopenharmony_ci {USB20, CCD_SENSOR, 16 , 200 , {-15, -15, -15}, {-15, -15, -15}, {75, 0, 5}}, 3299141cc406Sopenharmony_ci {USB20, CCD_SENSOR, 16 , 100 , {-15, -15, -15}, {-15, -15, -15}, {75, 0, 5}}, 3300141cc406Sopenharmony_ci 3301141cc406Sopenharmony_ci /*usb , sensor , depth, res , {reflective }, {transparent }, {negative} */ 3302141cc406Sopenharmony_ci {USB20, CIS_SENSOR, 8 , 2400, {-15, -15, -15}, {-68, -37, -43}, { 0, 0, 0}}, 3303141cc406Sopenharmony_ci {USB20, CIS_SENSOR, 8 , 1200, {-15, -15, -15}, {-20, -20, -28}, { 0, 0, 0}}, 3304141cc406Sopenharmony_ci {USB20, CIS_SENSOR, 8 , 600 , {-15, -15, -15}, { 0, 0, 0}, { 0, 0, 0}}, 3305141cc406Sopenharmony_ci {USB20, CIS_SENSOR, 8 , 300 , {-15, -15, -15}, { 0, 0, 0}, { 0, 0, 0}}, 3306141cc406Sopenharmony_ci {USB20, CIS_SENSOR, 8 , 200 , {-15, -15, -15}, { 0, 0, 0}, { 0, 0, 0}}, 3307141cc406Sopenharmony_ci {USB20, CIS_SENSOR, 8 , 100 , {-15, -15, -15}, { 0, 0, 0}, { 0, 0, 0}}, 3308141cc406Sopenharmony_ci 3309141cc406Sopenharmony_ci {USB20, CIS_SENSOR, 16 , 2400, {-15, -15, -15}, {-68, -37, -43}, { 0, 0, 0}}, 3310141cc406Sopenharmony_ci {USB20, CIS_SENSOR, 16 , 1200, {-15, -15, -15}, {-20, -20, -28}, { 0, 0, 0}}, 3311141cc406Sopenharmony_ci {USB20, CIS_SENSOR, 16 , 600 , {-15, -15, -15}, { 0, 0, 0}, { 0, 0, 0}}, 3312141cc406Sopenharmony_ci {USB20, CIS_SENSOR, 16 , 300 , {-15, -15, -15}, { 0, 0, 0}, { 0, 0, 0}}, 3313141cc406Sopenharmony_ci {USB20, CIS_SENSOR, 16 , 200 , {-15, -15, -15}, { 0, 0, 0}, { 0, 0, 0}}, 3314141cc406Sopenharmony_ci {USB20, CIS_SENSOR, 16 , 100 , {-15, -15, -15}, { 0, 0, 0}, { 0, 0, 0}}, 3315141cc406Sopenharmony_ci 3316141cc406Sopenharmony_ci /*usb , sensor , depth, res , {reflective }, {transparent }, {negative} */ 3317141cc406Sopenharmony_ci {USB11, CCD_SENSOR, 8 , 2400, {-15, -15, -15}, { 0, 0, 0}, {63, 0, 3}}, 3318141cc406Sopenharmony_ci {USB11, CCD_SENSOR, 8 , 1200, {-15, -15, -15}, { 0, 0, 0}, {63, 0, 5}}, 3319141cc406Sopenharmony_ci {USB11, CCD_SENSOR, 8 , 600 , {-15, -15, -15}, { 0, 0, 0}, {50, 0, 5}}, 3320141cc406Sopenharmony_ci {USB11, CCD_SENSOR, 8 , 300 , {-15, -15, -15}, { 0, 0, 0}, {50, 0, 5}}, 3321141cc406Sopenharmony_ci {USB11, CCD_SENSOR, 8 , 200 , {-15, -15, -15}, { 0, 0, 0}, {50, 0, 5}}, 3322141cc406Sopenharmony_ci {USB11, CCD_SENSOR, 8 , 100 , {-15, -15, -15}, { 0, 0, 0}, {50, 0, 5}}, 3323141cc406Sopenharmony_ci 3324141cc406Sopenharmony_ci {USB11, CCD_SENSOR, 16 , 2400, {-15, -15, -15}, { -7, -7, -7}, {43, 0, 3}}, 3325141cc406Sopenharmony_ci {USB11, CCD_SENSOR, 16 , 1200, {-15, -15, -15}, {-15, -15, -15}, {63, 0, 5}}, 3326141cc406Sopenharmony_ci {USB11, CCD_SENSOR, 16 , 600 , {-15, -15, -15}, {-15, -15, -15}, {50, 0, 5}}, 3327141cc406Sopenharmony_ci {USB11, CCD_SENSOR, 16 , 300 , {-15, -15, -15}, {-15, -15, -15}, {50, 0, 5}}, 3328141cc406Sopenharmony_ci {USB11, CCD_SENSOR, 16 , 200 , {-15, -15, -15}, {-15, -15, -15}, {50, 0, 5}}, 3329141cc406Sopenharmony_ci {USB11, CCD_SENSOR, 16 , 100 , {-15, -15, -15}, {-15, -15, -15}, {50, 0, 5}}, 3330141cc406Sopenharmony_ci 3331141cc406Sopenharmony_ci /*usb , sensor , depth, res , {reflective }, {transparent }, {negative} */ 3332141cc406Sopenharmony_ci {USB11, CIS_SENSOR, 8 , 2400, {-15, -15, -15}, {-68, -37, -43}, { 0, 0, 0}}, 3333141cc406Sopenharmony_ci {USB11, CIS_SENSOR, 8 , 1200, {-15, -15, -15}, {-20, -20, -28}, { 0, 0, 0}}, 3334141cc406Sopenharmony_ci {USB11, CIS_SENSOR, 8 , 600 , {-15, -15, -15}, { 0, 0, 0}, { 0, 0, 0}}, 3335141cc406Sopenharmony_ci {USB11, CIS_SENSOR, 8 , 300 , {-15, -15, -15}, { 0, 0, 0}, { 0, 0, 0}}, 3336141cc406Sopenharmony_ci {USB11, CIS_SENSOR, 8 , 200 , {-15, -15, -15}, { 0, 0, 0}, { 0, 0, 0}}, 3337141cc406Sopenharmony_ci {USB11, CIS_SENSOR, 8 , 100 , {-15, -15, -15}, { 0, 0, 0}, { 0, 0, 0}}, 3338141cc406Sopenharmony_ci 3339141cc406Sopenharmony_ci {USB11, CIS_SENSOR, 16 , 2400, {-15, -15, -15}, {-68, -37, -43}, { 0, 0, 0}}, 3340141cc406Sopenharmony_ci {USB11, CIS_SENSOR, 16 , 1200, {-15, -15, -15}, {-20, -20, -28}, { 0, 0, 0}}, 3341141cc406Sopenharmony_ci {USB11, CIS_SENSOR, 16 , 600 , {-15, -15, -15}, { 0, 0, 0}, { 0, 0, 0}}, 3342141cc406Sopenharmony_ci {USB11, CIS_SENSOR, 16 , 300 , {-15, -15, -15}, { 0, 0, 0}, { 0, 0, 0}}, 3343141cc406Sopenharmony_ci {USB11, CIS_SENSOR, 16 , 200 , {-15, -15, -15}, { 0, 0, 0}, { 0, 0, 0}}, 3344141cc406Sopenharmony_ci {USB11, CIS_SENSOR, 16 , 100 , {-15, -15, -15}, { 0, 0, 0}, { 0, 0, 0}} 3345141cc406Sopenharmony_ci }; 3346141cc406Sopenharmony_ci 3347141cc406Sopenharmony_ci struct st_cut *ct; 3348141cc406Sopenharmony_ci 3349141cc406Sopenharmony_ci SANE_Int a; 3350141cc406Sopenharmony_ci SANE_Int count = sizeof(cuts) / sizeof(struct st_cut); 3351141cc406Sopenharmony_ci 3352141cc406Sopenharmony_ci *red = *green = *blue = 0; 3353141cc406Sopenharmony_ci 3354141cc406Sopenharmony_ci if (res <= 100) 3355141cc406Sopenharmony_ci res = 100; 3356141cc406Sopenharmony_ci else if (res <= 200) 3357141cc406Sopenharmony_ci res = 200; 3358141cc406Sopenharmony_ci else if (res <= 300) 3359141cc406Sopenharmony_ci res = 300; 3360141cc406Sopenharmony_ci else if (res <= 600) 3361141cc406Sopenharmony_ci res = 600; 3362141cc406Sopenharmony_ci else if (res <= 1200) 3363141cc406Sopenharmony_ci res = 1200; 3364141cc406Sopenharmony_ci else res = 2400; 3365141cc406Sopenharmony_ci 3366141cc406Sopenharmony_ci for (a = 0; a < count; a++) 3367141cc406Sopenharmony_ci { 3368141cc406Sopenharmony_ci ct = &cuts[a]; 3369141cc406Sopenharmony_ci if ((ct->usb == usb)&&(ct->sensor == ccd)&&(ct->depth == depth)&&(ct->res == res)) 3370141cc406Sopenharmony_ci { 3371141cc406Sopenharmony_ci switch(scantype) 3372141cc406Sopenharmony_ci { 3373141cc406Sopenharmony_ci case ST_NEG: 3374141cc406Sopenharmony_ci *red = ct->negative[CL_RED]; 3375141cc406Sopenharmony_ci *green = ct->negative[CL_GREEN]; 3376141cc406Sopenharmony_ci *blue = ct->negative[CL_BLUE]; 3377141cc406Sopenharmony_ci break; 3378141cc406Sopenharmony_ci case ST_TA: 3379141cc406Sopenharmony_ci *red = ct->transparent[CL_RED]; 3380141cc406Sopenharmony_ci *green = ct->transparent[CL_GREEN]; 3381141cc406Sopenharmony_ci *blue = ct->transparent[CL_BLUE]; 3382141cc406Sopenharmony_ci break; 3383141cc406Sopenharmony_ci default: /* reflective */ 3384141cc406Sopenharmony_ci *red = ct->reflective[CL_RED]; 3385141cc406Sopenharmony_ci *green = ct->reflective[CL_GREEN]; 3386141cc406Sopenharmony_ci *blue = ct->reflective[CL_BLUE]; 3387141cc406Sopenharmony_ci break; 3388141cc406Sopenharmony_ci } 3389141cc406Sopenharmony_ci break; 3390141cc406Sopenharmony_ci } 3391141cc406Sopenharmony_ci } 3392141cc406Sopenharmony_ci} 3393141cc406Sopenharmony_ci 3394141cc406Sopenharmony_cistatic void hp4370_shading_cut(SANE_Int depth, SANE_Int res, SANE_Int scantype, SANE_Int *red, SANE_Int *green, SANE_Int *blue) 3395141cc406Sopenharmony_ci{ 3396141cc406Sopenharmony_ci struct st_cut 3397141cc406Sopenharmony_ci { 3398141cc406Sopenharmony_ci SANE_Int depth; 3399141cc406Sopenharmony_ci SANE_Int res; 3400141cc406Sopenharmony_ci SANE_Int reflective[3]; 3401141cc406Sopenharmony_ci SANE_Int transparent[3]; 3402141cc406Sopenharmony_ci SANE_Int negative[3]; 3403141cc406Sopenharmony_ci }; 3404141cc406Sopenharmony_ci 3405141cc406Sopenharmony_ci /* values are the same in all usb versions for each depth */ 3406141cc406Sopenharmony_ci struct st_cut cuts[] = 3407141cc406Sopenharmony_ci { 3408141cc406Sopenharmony_ci /* depth, res , {reflective }, {transparent }, {negative } */ 3409141cc406Sopenharmony_ci { 8 , 4800, { 0, 0, 0}, { -3, -3, -3}, {35, -10, -7}}, 3410141cc406Sopenharmony_ci { 8 , 2400, {-15, -15, -15}, { -3, -3, -3}, {35, -10, -7}}, 3411141cc406Sopenharmony_ci { 8 , 1200, {-15, -15, -15}, { -3, -3, -3}, {35, -10, -22}}, 3412141cc406Sopenharmony_ci { 8 , 600 , {-15, -15, -15}, { -2, -2, -2}, {38, -10, -22}}, 3413141cc406Sopenharmony_ci { 8 , 300 , {-15, -15, -15}, { -2, -2, -2}, {38, -10, -22}}, 3414141cc406Sopenharmony_ci { 8 , 150 , {-15, -15, -15}, { 0, 0, 0}, {50, -23, -14}}, 3415141cc406Sopenharmony_ci 3416141cc406Sopenharmony_ci { 16 , 4800, { 0, 0, 0}, { -3, -3, -3}, {35, -10, -7}}, 3417141cc406Sopenharmony_ci { 16 , 2400, {-15, -15, -15}, { -3, -3, -3}, {35, -10, -7}}, 3418141cc406Sopenharmony_ci { 16 , 1200, {-15, -15, -15}, { -3, -3, -3}, {35, -10, -22}}, 3419141cc406Sopenharmony_ci { 16 , 600 , {-15, -15, -15}, { -2, -2, -2}, {38, -10, -22}}, 3420141cc406Sopenharmony_ci { 16 , 300 , {-15, -15, -15}, { -2, -2, -2}, {38, -10, -22}}, 3421141cc406Sopenharmony_ci { 16 , 150 , {-15, -15, -15}, {-15, -15, -15}, {40, -15, -5}} 3422141cc406Sopenharmony_ci }; 3423141cc406Sopenharmony_ci 3424141cc406Sopenharmony_ci struct st_cut *ct; 3425141cc406Sopenharmony_ci 3426141cc406Sopenharmony_ci SANE_Int a; 3427141cc406Sopenharmony_ci SANE_Int count = sizeof(cuts) / sizeof(struct st_cut); 3428141cc406Sopenharmony_ci 3429141cc406Sopenharmony_ci *red = *green = *blue = 0; 3430141cc406Sopenharmony_ci 3431141cc406Sopenharmony_ci if (res <= 150) 3432141cc406Sopenharmony_ci res = 150; 3433141cc406Sopenharmony_ci else if (res <= 300) 3434141cc406Sopenharmony_ci res = 300; 3435141cc406Sopenharmony_ci else if (res <= 600) 3436141cc406Sopenharmony_ci res = 600; 3437141cc406Sopenharmony_ci else if (res <= 1200) 3438141cc406Sopenharmony_ci res = 1200; 3439141cc406Sopenharmony_ci else if (res <= 2400) 3440141cc406Sopenharmony_ci res = 2400; 3441141cc406Sopenharmony_ci else res = 4800; 3442141cc406Sopenharmony_ci 3443141cc406Sopenharmony_ci for (a = 0; a < count; a++) 3444141cc406Sopenharmony_ci { 3445141cc406Sopenharmony_ci ct = &cuts[a]; 3446141cc406Sopenharmony_ci if ((ct->depth == depth)&&(ct->res == res)) 3447141cc406Sopenharmony_ci { 3448141cc406Sopenharmony_ci switch(scantype) 3449141cc406Sopenharmony_ci { 3450141cc406Sopenharmony_ci case ST_NEG: 3451141cc406Sopenharmony_ci *red = ct->negative[CL_RED]; 3452141cc406Sopenharmony_ci *green = ct->negative[CL_GREEN]; 3453141cc406Sopenharmony_ci *blue = ct->negative[CL_BLUE]; 3454141cc406Sopenharmony_ci break; 3455141cc406Sopenharmony_ci case ST_TA: 3456141cc406Sopenharmony_ci *red = ct->transparent[CL_RED]; 3457141cc406Sopenharmony_ci *green = ct->transparent[CL_GREEN]; 3458141cc406Sopenharmony_ci *blue = ct->transparent[CL_BLUE]; 3459141cc406Sopenharmony_ci break; 3460141cc406Sopenharmony_ci default: /* reflective */ 3461141cc406Sopenharmony_ci *red = ct->reflective[CL_RED]; 3462141cc406Sopenharmony_ci *green = ct->reflective[CL_GREEN]; 3463141cc406Sopenharmony_ci *blue = ct->reflective[CL_BLUE]; 3464141cc406Sopenharmony_ci break; 3465141cc406Sopenharmony_ci } 3466141cc406Sopenharmony_ci break; 3467141cc406Sopenharmony_ci } 3468141cc406Sopenharmony_ci } 3469141cc406Sopenharmony_ci} 3470141cc406Sopenharmony_ci 3471141cc406Sopenharmony_cistatic void ua4900_shading_cut(SANE_Int usb, SANE_Int depth, SANE_Int res, SANE_Int scantype, SANE_Int *red, SANE_Int *green, SANE_Int *blue) 3472141cc406Sopenharmony_ci{ 3473141cc406Sopenharmony_ci struct st_cut 3474141cc406Sopenharmony_ci { 3475141cc406Sopenharmony_ci SANE_Int usb; 3476141cc406Sopenharmony_ci SANE_Int depth; 3477141cc406Sopenharmony_ci SANE_Int res; 3478141cc406Sopenharmony_ci SANE_Int reflective[3]; 3479141cc406Sopenharmony_ci SANE_Int transparent[3]; 3480141cc406Sopenharmony_ci SANE_Int negative[3]; 3481141cc406Sopenharmony_ci }; 3482141cc406Sopenharmony_ci 3483141cc406Sopenharmony_ci struct st_cut cuts[] = 3484141cc406Sopenharmony_ci { 3485141cc406Sopenharmony_ci /*usb , depth, res , {reflective }, {transparent }, {negative } */ 3486141cc406Sopenharmony_ci {USB20, 8 , 1200, {-15, -17, -13}, { 6, 0, 0}, {110, 15, 250}}, 3487141cc406Sopenharmony_ci {USB20, 8 , 600 , {-16, -15, -15}, { 6, 7, 5}, {105, 11, 20}}, 3488141cc406Sopenharmony_ci {USB20, 8 , 300 , {-15, -15, -15}, { 6, 7, 5}, {105, 10, 25}}, 3489141cc406Sopenharmony_ci {USB20, 8 , 200 , {-15, -15, -15}, { 5, 5, 5}, {110, 15, 32}}, 3490141cc406Sopenharmony_ci {USB20, 8 , 100 , {-15, -15, -15}, { 5, 5, 5}, {110, 15, 32}}, 3491141cc406Sopenharmony_ci 3492141cc406Sopenharmony_ci {USB20, 16 , 1200, {-15, -15, -15}, { 5, 5, 5}, { 0, 0, 0}}, 3493141cc406Sopenharmony_ci {USB20, 16 , 600 , {-15, -15, -15}, { 5, 5, 5}, { 0, 0, 0}}, 3494141cc406Sopenharmony_ci {USB20, 16 , 300 , {-15, -15, -15}, { 5, 5, 5}, { 0, 0, 0}}, 3495141cc406Sopenharmony_ci {USB20, 16 , 200 , {-15, -15, -15}, { 5, 5, 5}, { 0, 0, 0}}, 3496141cc406Sopenharmony_ci {USB20, 16 , 100 , {-15, -15, -15}, { 5, 5, 5}, { 0, 0, 0}}, 3497141cc406Sopenharmony_ci 3498141cc406Sopenharmony_ci /*usb , depth, res , {reflective }, {transparent }, {negative } */ 3499141cc406Sopenharmony_ci {USB11, 8 , 1200, {-15, -17, -13}, { 5, 5, 5}, {105, 12, 23}}, 3500141cc406Sopenharmony_ci {USB11, 8 , 600 , {-17, -15, -16}, { 8, 8, 8}, {105, 12, 20}}, 3501141cc406Sopenharmony_ci {USB11, 8 , 300 , {-15, -15, -15}, { 8, 8, 8}, {105, 15, 25}}, 3502141cc406Sopenharmony_ci {USB11, 8 , 200 , {-15, -15, -15}, { 8, 8, 8}, {105, 40, 25}}, 3503141cc406Sopenharmony_ci {USB11, 8 , 100 , {-15, -15, -15}, { 8, 8, 8}, {-20, 50, 23}}, 3504141cc406Sopenharmony_ci 3505141cc406Sopenharmony_ci {USB11, 16 , 1200, {-15, -15, -15}, { 5, 5, 5}, { 0, 0, 0}}, 3506141cc406Sopenharmony_ci {USB11, 16 , 600 , {-15, -15, -15}, { 5, 5, 5}, { 0, 0, 0}}, 3507141cc406Sopenharmony_ci {USB11, 16 , 300 , {-15, -15, -15}, { 5, 5, 5}, { 0, 0, 0}}, 3508141cc406Sopenharmony_ci {USB11, 16 , 200 , {-15, -15, -15}, { 5, 5, 5}, { 0, 0, 0}}, 3509141cc406Sopenharmony_ci {USB11, 16 , 100 , {-15, -15, -15}, { 5, 5, 5}, { 0, 0, 0}} 3510141cc406Sopenharmony_ci }; 3511141cc406Sopenharmony_ci 3512141cc406Sopenharmony_ci struct st_cut *ct; 3513141cc406Sopenharmony_ci 3514141cc406Sopenharmony_ci SANE_Int a; 3515141cc406Sopenharmony_ci SANE_Int count = sizeof(cuts) / sizeof(struct st_cut); 3516141cc406Sopenharmony_ci 3517141cc406Sopenharmony_ci *red = *green = *blue = 0; 3518141cc406Sopenharmony_ci 3519141cc406Sopenharmony_ci if (res <= 100) 3520141cc406Sopenharmony_ci res = 100; 3521141cc406Sopenharmony_ci else if (res <= 200) 3522141cc406Sopenharmony_ci res = 200; 3523141cc406Sopenharmony_ci else if (res <= 300) 3524141cc406Sopenharmony_ci res = 300; 3525141cc406Sopenharmony_ci else if (res <= 600) 3526141cc406Sopenharmony_ci res = 600; 3527141cc406Sopenharmony_ci else res = 1200; 3528141cc406Sopenharmony_ci 3529141cc406Sopenharmony_ci for (a = 0; a < count; a++) 3530141cc406Sopenharmony_ci { 3531141cc406Sopenharmony_ci ct = &cuts[a]; 3532141cc406Sopenharmony_ci if ((ct->usb == usb)&&(ct->depth == depth)&&(ct->res == res)) 3533141cc406Sopenharmony_ci { 3534141cc406Sopenharmony_ci switch(scantype) 3535141cc406Sopenharmony_ci { 3536141cc406Sopenharmony_ci case ST_NEG: 3537141cc406Sopenharmony_ci *red = ct->negative[CL_RED]; 3538141cc406Sopenharmony_ci *green = ct->negative[CL_GREEN]; 3539141cc406Sopenharmony_ci *blue = ct->negative[CL_BLUE]; 3540141cc406Sopenharmony_ci break; 3541141cc406Sopenharmony_ci case ST_TA: 3542141cc406Sopenharmony_ci *red = ct->transparent[CL_RED]; 3543141cc406Sopenharmony_ci *green = ct->transparent[CL_GREEN]; 3544141cc406Sopenharmony_ci *blue = ct->transparent[CL_BLUE]; 3545141cc406Sopenharmony_ci break; 3546141cc406Sopenharmony_ci default: /* reflective */ 3547141cc406Sopenharmony_ci *red = ct->reflective[CL_RED]; 3548141cc406Sopenharmony_ci *green = ct->reflective[CL_GREEN]; 3549141cc406Sopenharmony_ci *blue = ct->reflective[CL_BLUE]; 3550141cc406Sopenharmony_ci break; 3551141cc406Sopenharmony_ci } 3552141cc406Sopenharmony_ci break; 3553141cc406Sopenharmony_ci } 3554141cc406Sopenharmony_ci } 3555141cc406Sopenharmony_ci} 3556141cc406Sopenharmony_ci 3557141cc406Sopenharmony_cistatic void cfg_shading_cut_get(SANE_Int sensortype, SANE_Int depth, SANE_Int res, SANE_Int scantype, SANE_Int *red, SANE_Int *green, SANE_Int *blue) 3558141cc406Sopenharmony_ci{ 3559141cc406Sopenharmony_ci switch(RTS_Debug->dev_model) 3560141cc406Sopenharmony_ci { 3561141cc406Sopenharmony_ci case UA4900: 3562141cc406Sopenharmony_ci ua4900_shading_cut(RTS_Debug->usbtype, depth, res, scantype, red, green, blue); 3563141cc406Sopenharmony_ci break; 3564141cc406Sopenharmony_ci 3565141cc406Sopenharmony_ci case HP3800: 3566141cc406Sopenharmony_ci case HPG2710: 3567141cc406Sopenharmony_ci hp3800_shading_cut(res, scantype, red, green, blue); 3568141cc406Sopenharmony_ci break; 3569141cc406Sopenharmony_ci 3570141cc406Sopenharmony_ci case HP4370: 3571141cc406Sopenharmony_ci case HPG3010: 3572141cc406Sopenharmony_ci case HPG3110: 3573141cc406Sopenharmony_ci hp4370_shading_cut(depth, res, scantype, red, green, blue); 3574141cc406Sopenharmony_ci break; 3575141cc406Sopenharmony_ci 3576141cc406Sopenharmony_ci default: 3577141cc406Sopenharmony_ci /* hp3970 and hp4070 */ 3578141cc406Sopenharmony_ci hp3970_shading_cut(RTS_Debug->usbtype, sensortype, depth, res, scantype, red, green, blue); 3579141cc406Sopenharmony_ci break; 3580141cc406Sopenharmony_ci } 3581141cc406Sopenharmony_ci} 3582141cc406Sopenharmony_ci 3583141cc406Sopenharmony_ci/** SEC: Sensor Timings ---------- */ 3584141cc406Sopenharmony_ci 3585141cc406Sopenharmony_ci/* ccd timing values for bq5550 scanner */ 3586141cc406Sopenharmony_cistatic SANE_Int bq5550_timing_get(SANE_Int tm, struct st_timing *reg) 3587141cc406Sopenharmony_ci{ 3588141cc406Sopenharmony_ci SANE_Int rst = ERROR; 3589141cc406Sopenharmony_ci 3590141cc406Sopenharmony_ci if ((tm < 7)&&(reg != NULL)) 3591141cc406Sopenharmony_ci { 3592141cc406Sopenharmony_ci /* bq5550 sensor timing values for each resolution and color mode */ 3593141cc406Sopenharmony_ci 3594141cc406Sopenharmony_ci struct st_timing data[] = 3595141cc406Sopenharmony_ci { 3596141cc406Sopenharmony_ci /* res , cnpp, {cvtrp 1 2 3 }, cvtrw, cvtrfpw, cvtrbpw, {{cphp1 , cphp2 , cphps, cphge, cphgo}, {cphp1 , cphp2 , cphps, cphge, cphgo}, {cphp1 , cphp2 , cphps, cphge, cphgo}, {cphp1 , cphp2 , cphps, cphge, cphgo}, {cphp1 , cphp2, cphps, cphge, cphgo}, {cphp1 , cphp2, cphps, cphge, cphgo}}, cphbp2s, cphbp2e, clamps, clampe , {cdss1, cdss2}, {cdsc1, cdsc2}, {cdscs1, cdscs2}, {adcclkp 1 y 2 }, adcclkp2e */ 3597141cc406Sopenharmony_ci {0x04B0, 0x23, {0x00, 0x00, 0x00}, 0x16 , 0x02 , 0x02 , {{67645734915., 0. , 0x00 , 0x01 , 0x00 }, {132120576. , 0. , 0x00 , 0x01 , 0x00 }, {68585259519., 0. , 0x01 , 0x01 , 0x00 }, {134217216. , 0. , 0x01 , 0x01 , 0x01 }, {68585259519., 0. , 0x01 , 0x01 , 0x00 }, {134217216. , 0. , 0x01 , 0x01 , 0x01 }}, 0x00 , 0x00 , 0x01 , 0x11000, {0x0F , 0x1F }, {0x12 , 0x22 }, {0x00 , 0x00 }, {4228890876. , 0. }, 0x00}, 3598141cc406Sopenharmony_ci {0x0258, 0x23, {0x00, 0x00, 0x00}, 0x16 , 0x02 , 0x02 , {{66571993091., 0. , 0x00 , 0x01 , 0x00 }, {132120576. , 0. , 0x00 , 0x01 , 0x00 }, {131071. , 0. , 0x00 , 0x01 , 0x00 }, {68719345664., 0. , 0x00 , 0x01 , 0x01 }, {131071. , 0. , 0x00 , 0x01 , 0x00 }, {68719345664., 0. , 0x00 , 0x01 , 0x01 }}, 0x00 , 0x00 , 0x01 , 0x11000, {0x10 , 0x1F }, {0x13 , 0x22 }, {0x00 , 0x00 }, {4228890876. , 0. }, 0x00}, 3599141cc406Sopenharmony_ci {0x012C, 0x23, {0x00, 0x00, 0x00}, 0x16 , 0x02 , 0x02 , {{67645734915., 0. , 0x00 , 0x01 , 0x00 }, {125829120. , 0. , 0x00 , 0x01 , 0x00 }, {67654057987., 0. , 0x00 , 0x01 , 0x00 }, {1065418748. , 0. , 0x00 , 0x01 , 0x01 }, {16383. , 0. , 0x00 , 0x01 , 0x00 }, {68182605824., 0. , 0x00 , 0x01 , 0x01 }}, 0x00 , 0x00 , 0x01 , 0x11000, {0x10 , 0x1F }, {0x13 , 0x22 }, {0x00 , 0x00 }, {4228890876. , 0. }, 0x00}, 3600141cc406Sopenharmony_ci {0x04B0, 0x23, {0x00, 0x00, 0x00}, 0x16 , 0x02 , 0x02 , {{67645734915., 0. , 0x00 , 0x01 , 0x00 }, {132120576. , 0. , 0x00 , 0x01 , 0x00 }, {68585259519., 0. , 0x01 , 0x01 , 0x00 }, {134217216. , 0. , 0x01 , 0x01 , 0x01 }, {68585259519., 0. , 0x01 , 0x01 , 0x00 }, {134217216. , 0. , 0x01 , 0x01 , 0x01 }}, 0x00 , 0x00 , 0x01 , 0x11000, {0x0F , 0x1F }, {0x12 , 0x22 }, {0x00 , 0x00 }, {262140. , 0. }, 0x00}, 3601141cc406Sopenharmony_ci {0x0258, 0x23, {0x00, 0x00, 0x00}, 0x16 , 0x02 , 0x02 , {{66571993091., 0. , 0x00 , 0x01 , 0x00 }, {132120576. , 0. , 0x00 , 0x01 , 0x00 }, {131071. , 0. , 0x00 , 0x01 , 0x00 }, {68719345664., 0. , 0x00 , 0x01 , 0x01 }, {131071. , 0. , 0x00 , 0x01 , 0x00 }, {68719345664., 0. , 0x00 , 0x01 , 0x01 }}, 0x00 , 0x00 , 0x01 , 0x11000, {0x10 , 0x1F }, {0x13 , 0x22 }, {0x00 , 0x00 }, {262140. , 0. }, 0x00}, 3602141cc406Sopenharmony_ci {0x012C, 0x23, {0x00, 0x00, 0x00}, 0x16 , 0x02 , 0x02 , {{67645734915., 0. , 0x00 , 0x01 , 0x00 }, {125829120. , 0. , 0x00 , 0x01 , 0x00 }, {67654057987., 0. , 0x00 , 0x01 , 0x00 }, {1065418748. , 0. , 0x00 , 0x01 , 0x01 }, {16383. , 0. , 0x00 , 0x01 , 0x00 }, {68182605824., 0. , 0x00 , 0x01 , 0x01 }}, 0x00 , 0x00 , 0x01 , 0x11000, {0x10 , 0x1F }, {0x13 , 0x22 }, {0x00 , 0x00 }, {524284. , 0. }, 0x00} 3603141cc406Sopenharmony_ci }; 3604141cc406Sopenharmony_ci 3605141cc406Sopenharmony_ci memcpy(reg, &data[tm], sizeof(struct st_timing)); 3606141cc406Sopenharmony_ci rst = OK; 3607141cc406Sopenharmony_ci } 3608141cc406Sopenharmony_ci 3609141cc406Sopenharmony_ci return rst; 3610141cc406Sopenharmony_ci} 3611141cc406Sopenharmony_ci 3612141cc406Sopenharmony_ci/* ccd timing values for hp3800 scanner */ 3613141cc406Sopenharmony_cistatic SANE_Int hp3800_timing_get(SANE_Int tm, struct st_timing *reg) 3614141cc406Sopenharmony_ci{ 3615141cc406Sopenharmony_ci SANE_Int rst = ERROR; 3616141cc406Sopenharmony_ci 3617141cc406Sopenharmony_ci if ((tm < 20)&&(reg != NULL)) 3618141cc406Sopenharmony_ci { 3619141cc406Sopenharmony_ci /* Toshiba T2905 sensor timing values for each resolution and color mode */ 3620141cc406Sopenharmony_ci 3621141cc406Sopenharmony_ci struct st_timing data[] = 3622141cc406Sopenharmony_ci { 3623141cc406Sopenharmony_ci /* res , cnpp, {cvtrp 1 2 3 }, cvtrw, cvtrfpw, cvtrbpw, {{cphp1 , cphp2 , cphps, cphge, cphgo}, {cphp1 , cphp2 , cphps, cphge, cphgo}, {cphp1 , cphp2 , cphps, cphge, cphgo}, {cphp1 , cphp2 , cphps, cphge, cphgo}, {cphp1 , cphp2, cphps, cphge, cphgo}, {cphp1 , cphp2, cphps, cphge, cphgo}}, cphbp2s, cphbp2e, clamps, clampe , {cdss1, cdss2}, {cdsc1, cdsc2}, {cdscs1, cdscs2}, {adcclkp 1 y 2 }, adcclkp2e */ 3624141cc406Sopenharmony_ci {0x0960, 0x23, {0x00, 0x00, 0x00}, 0x0F , 0x04 , 0x04 , {{8589934588. , 0. , 0x00 , 0x01 , 0x01 }, {68719476732., 0. , 0x00 , 0x01 , 0x01 }, {134217216. , 0. , 0x01 , 0x01 , 0x00 }, {68585259519., 0. , 0x01 , 0x01 , 0x01 }, {68719476735., 0. , 0x00 , 0x00 , 0x00 }, {68719476735., 0. , 0x00 , 0x00 , 0x00 }}, 0x00 , 0x00 , 0x01 , -1 , {0x0F , 0x20 }, {0x11 , 0x22 }, {0x00 , 0x00 }, {4228890876. , 0. }, 0x00}, 3625141cc406Sopenharmony_ci {0x04B0, 0x23, {0x00, 0x00, 0x00}, 0x0F , 0x04 , 0x04 , {{64692944895., 0. , 0x00 , 0x01 , 0x01 }, {66571993087., 0. , 0x00 , 0x01 , 0x01 }, {524287. , 0. , 0x00 , 0x01 , 0x00 }, {68718952448., 0. , 0x00 , 0x01 , 0x01 }, {68719476735., 0. , 0x00 , 0x00 , 0x00 }, {68719476735., 0. , 0x00 , 0x00 , 0x00 }}, 0x00 , 0x00 , 0x01 , -1 , {0x10 , 0x20 }, {0x11 , 0x22 }, {0x00 , 0x00 }, {4228890876. , 0. }, 0x00}, 3626141cc406Sopenharmony_ci {0x0258, 0x23, {0x00, 0x00, 0x00}, 0x0F , 0x04 , 0x04 , {{68719476732., 0. , 0x00 , 0x01 , 0x01 }, {68719476733., 0. , 0x00 , 0x01 , 0x01 }, {1069563840. , 0. , 0x00 , 0x01 , 0x00 }, {67649912895., 0. , 0x00 , 0x01 , 0x01 }, {68719476735., 0. , 0x00 , 0x00 , 0x00 }, {68719476735., 0. , 0x00 , 0x00 , 0x00 }}, 0x00 , 0x00 , 0x01 , -1 , {0x02 , 0x21 }, {0x03 , 0x22 }, {0x00 , 0x00 }, {4228890876. , 0. }, 0x00}, 3627141cc406Sopenharmony_ci {0x012C, 0x23, {0x00, 0x00, 0x00}, 0x0F , 0x04 , 0x04 , {{68719476732., 0. , 0x00 , 0x01 , 0x01 }, {68719476733., 0. , 0x00 , 0x01 , 0x01 }, {477225440. , 0. , 0x00 , 0x01 , 0x00 }, {68242251295., 0. , 0x00 , 0x01 , 0x01 }, {68719476735., 0. , 0x00 , 0x00 , 0x00 }, {68719476735., 0. , 0x00 , 0x00 , 0x00 }}, 0x00 , 0x00 , 0x01 , -1 , {0x02 , 0x21 }, {0x04 , 0x22 }, {0x00 , 0x00 }, {4228890876. , 0. }, 0x00}, 3628141cc406Sopenharmony_ci {0x0096, 0x23, {0x00, 0x00, 0x00}, 0x0F , 0x04 , 0x04 , {{68719476732., 0. , 0x00 , 0x01 , 0x01 }, {68719476733., 0. , 0x00 , 0x01 , 0x01 }, {13743895344., 0. , 0x00 , 0x01 , 0x00 }, {54975581391., 0. , 0x00 , 0x01 , 0x01 }, {68719476735., 0. , 0x00 , 0x00 , 0x00 }, {68719476735., 0. , 0x00 , 0x00 , 0x00 }}, 0x00 , 0x00 , 0x01 , -1 , {0x01 , 0x21 }, {0x02 , 0x22 }, {0x00 , 0x00 }, {4228890876. , 0. }, 0x00}, 3629141cc406Sopenharmony_ci 3630141cc406Sopenharmony_ci {0x0960, 0x23, {0x00, 0x00, 0x00}, 0x0F , 0x04 , 0x04 , {{8589934588. , 0. , 0x00 , 0x01 , 0x01 }, {68719476732., 0. , 0x00 , 0x01 , 0x01 }, {134217216. , 0. , 0x01 , 0x01 , 0x00 }, {68585259519., 0. , 0x01 , 0x01 , 0x01 }, {68719476735., 0. , 0x00 , 0x00 , 0x00 }, {68719476735., 0. , 0x00 , 0x00 , 0x00 }}, 0x00 , 0x00 , 0x01 , -1 , {0x0F , 0x20 }, {0x11 , 0x22 }, {0x00 , 0x00 }, {1048572. , 0. }, 0x00}, 3631141cc406Sopenharmony_ci {0x04B0, 0x23, {0x00, 0x00, 0x00}, 0x0F , 0x04 , 0x04 , {{64692944895., 0. , 0x00 , 0x01 , 0x01 }, {66571993087., 0. , 0x00 , 0x01 , 0x01 }, {524287. , 0. , 0x00 , 0x01 , 0x00 }, {68718952448., 0. , 0x00 , 0x01 , 0x01 }, {68719476735., 0. , 0x00 , 0x00 , 0x00 }, {68719476735., 0. , 0x00 , 0x00 , 0x00 }}, 0x00 , 0x00 , 0x01 , -1 , {0x10 , 0x20 }, {0x11 , 0x22 }, {0x00 , 0x00 }, {1048572. , 0. }, 0x00}, 3632141cc406Sopenharmony_ci {0x0258, 0x23, {0x00, 0x00, 0x00}, 0x0F , 0x04 , 0x04 , {{68719476732., 0. , 0x00 , 0x01 , 0x01 }, {68719476733., 0. , 0x00 , 0x01 , 0x01 }, {1069563840. , 0. , 0x00 , 0x01 , 0x00 }, {67649912895., 0. , 0x00 , 0x01 , 0x01 }, {68719476735., 0. , 0x00 , 0x00 , 0x00 }, {68719476735., 0. , 0x00 , 0x00 , 0x00 }}, 0x00 , 0x00 , 0x01 , -1 , {0x02 , 0x21 }, {0x03 , 0x22 }, {0x00 , 0x00 }, {1048572. , 0. }, 0x00}, 3633141cc406Sopenharmony_ci {0x012C, 0x23, {0x00, 0x00, 0x00}, 0x0F , 0x04 , 0x04 , {{68719476732., 0. , 0x00 , 0x01 , 0x01 }, {68719476733., 0. , 0x00 , 0x01 , 0x01 }, {477225440. , 0. , 0x00 , 0x01 , 0x00 }, {68242251295., 0. , 0x00 , 0x01 , 0x01 }, {68719476735., 0. , 0x00 , 0x00 , 0x00 }, {68719476735., 0. , 0x00 , 0x00 , 0x00 }}, 0x00 , 0x00 , 0x01 , -1 , {0x02 , 0x21 }, {0x04 , 0x22 }, {0x00 , 0x00 }, {1048572. , 0. }, 0x00}, 3634141cc406Sopenharmony_ci {0x0258, 0x23, {0x00, 0x00, 0x00}, 0x0F , 0x04 , 0x04 , {{68719476732., 0. , 0x00 , 0x01 , 0x01 }, {68719476733., 0. , 0x00 , 0x01 , 0x01 }, {266346464. , 0. , 0x00 , 0x01 , 0x00 }, {68453130271., 0. , 0x00 , 0x01 , 0x01 }, {68719476735., 0. , 0x00 , 0x00 , 0x00 }, {68719476735., 0. , 0x00 , 0x00 , 0x00 }}, 0x00 , 0x00 , 0x01 , -1 , {0x04 , 0x21 }, {0x06 , 0x22 }, {0x00 , 0x00 }, {4228890876. , 0. }, 0x00}, 3635141cc406Sopenharmony_ci 3636141cc406Sopenharmony_ci {0x0960, 0x23, {0x00, 0x00, 0x00}, 0x0F , 0x04 , 0x04 , {{8589934588. , 8589934588. , 0x00 , 0x01 , 0x01 }, {68719476732., 68719476732., 0x00 , 0x01 , 0x01 }, {134217216. , 134217216. , 0x01 , 0x01 , 0x00 }, {68585259519., 68585259519., 0x01 , 0x01 , 0x01 }, {68719476735., 0. , 0x00 , 0x00 , 0x00 }, {68719476735., 0. , 0x00 , 0x00 , 0x00 }}, 0xFF , 0x80FF , 0x01 , -1 , {0x0F , 0x20 }, {0x11 , 0x22 }, {0x00 , 0x00 }, {4228890876. , 0. }, 0x00}, 3637141cc406Sopenharmony_ci {0x04B0, 0x23, {0x00, 0x00, 0x00}, 0x0F , 0x04 , 0x04 , {{64692944895., 64692944895., 0x00 , 0x01 , 0x01 }, {66571993087., 66571993087., 0x00 , 0x01 , 0x01 }, {524287. , 524287. , 0x00 , 0x01 , 0x00 }, {68718952448., 68718952448., 0x00 , 0x01 , 0x01 }, {68719476735., 0. , 0x00 , 0x00 , 0x00 }, {68719476735., 0. , 0x00 , 0x00 , 0x00 }}, 0xFF , 0x80FF , 0x01 , -1 , {0x10 , 0x20 }, {0x11 , 0x22 }, {0x00 , 0x00 }, {4228890876. , 0. }, 0x00}, 3638141cc406Sopenharmony_ci {0x0258, 0x23, {0x00, 0x00, 0x00}, 0x0F , 0x04 , 0x04 , {{68719476732., 68719476732., 0x00 , 0x01 , 0x01 }, {68719476733., 68719476733., 0x00 , 0x01 , 0x01 }, {534781920. , 534781920. , 0x00 , 0x01 , 0x00 }, {68184694815., 68184694815., 0x00 , 0x01 , 0x01 }, {68719476735., 0. , 0x00 , 0x00 , 0x00 }, {68719476735., 0. , 0x00 , 0x00 , 0x00 }}, 0xFF , 0x20FF , 0x01 , -1 , {0x05 , 0x21 }, {0x07 , 0x22 }, {0x00 , 0x00 }, {4228890876. , 0. }, 0x00}, 3639141cc406Sopenharmony_ci {0x012C, 0x23, {0x00, 0x00, 0x00}, 0x0F , 0x04 , 0x04 , {{68719476732., 68719476732., 0x00 , 0x01 , 0x01 }, {68719476733., 68719476733., 0x00 , 0x01 , 0x01 }, {477225440. , 477225440. , 0x00 , 0x01 , 0x00 }, {68242251295., 68242251295., 0x00 , 0x01 , 0x01 }, {68719476735., 0. , 0x00 , 0x00 , 0x00 }, {68719476735., 0. , 0x00 , 0x00 , 0x00 }}, 0xFF , 0x11FF , 0x01 , -1 , {0x02 , 0x21 }, {0x04 , 0x22 }, {0x00 , 0x00 }, {4228890876. , 0. }, 0x00}, 3640141cc406Sopenharmony_ci {0x0096, 0x23, {0x00, 0x00, 0x00}, 0x0F , 0x04 , 0x04 , {{68719476732., 68719476732., 0x00 , 0x01 , 0x01 }, {68719476733., 68719476733., 0x00 , 0x01 , 0x01 }, {13743895344., 13743895344., 0x00 , 0x01 , 0x00 }, {54975581391., 54975581391., 0x00 , 0x01 , 0x01 }, {68719476735., 0. , 0x00 , 0x00 , 0x00 }, {68719476735., 0. , 0x00 , 0x00 , 0x00 }}, 0xFF , 0x110F , 0x01 , -1 , {0x01 , 0x21 }, {0x02 , 0x22 }, {0x00 , 0x00 }, {4228890876. , 0. }, 0x00}, 3641141cc406Sopenharmony_ci 3642141cc406Sopenharmony_ci {0x0960, 0x23, {0x00, 0x00, 0x00}, 0x0F , 0x04 , 0x04 , {{8589934588. , 8589934588. , 0x00 , 0x01 , 0x01 }, {68719476732., 68719476732., 0x00 , 0x01 , 0x01 }, {134217216. , 134217216. , 0x01 , 0x01 , 0x00 }, {68585259519., 68585259519., 0x01 , 0x01 , 0x01 }, {68719476735., 0. , 0x00 , 0x00 , 0x00 }, {68719476735., 0. , 0x00 , 0x00 , 0x00 }}, 0xFF , 0x80FF , 0x01 , -1 , {0x0F , 0x20 }, {0x11 , 0x22 }, {0x00 , 0x00 }, {1048572. , 0. }, 0x00}, 3643141cc406Sopenharmony_ci {0x04B0, 0x23, {0x00, 0x00, 0x00}, 0x0F , 0x04 , 0x04 , {{64692944895., 64692944895., 0x00 , 0x01 , 0x01 }, {66571993087., 66571993087., 0x00 , 0x01 , 0x01 }, {524287. , 524287. , 0x00 , 0x01 , 0x00 }, {68718952448., 68718952448., 0x00 , 0x01 , 0x01 }, {68719476735., 0. , 0x00 , 0x00 , 0x00 }, {68719476735., 0. , 0x00 , 0x00 , 0x00 }}, 0xFF , 0x80FF , 0x01 , -1 , {0x10 , 0x20 }, {0x11 , 0x22 }, {0x00 , 0x00 }, {1048572. , 0. }, 0x00}, 3644141cc406Sopenharmony_ci {0x0258, 0x23, {0x00, 0x00, 0x00}, 0x0F , 0x04 , 0x04 , {{68719476732., 68719476732., 0x00 , 0x01 , 0x01 }, {68719476733., 68719476733., 0x00 , 0x01 , 0x01 }, {534781920. , 534781920. , 0x00 , 0x01 , 0x00 }, {68184694815., 68184694815., 0x00 , 0x01 , 0x01 }, {68719476735., 0. , 0x00 , 0x00 , 0x00 }, {68719476735., 0. , 0x00 , 0x00 , 0x00 }}, 0xFF , 0x20FF , 0x01 , -1 , {0x05 , 0x21 }, {0x07 , 0x22 }, {0x00 , 0x00 }, {1048572. , 0. }, 0x00}, 3645141cc406Sopenharmony_ci {0x012C, 0x23, {0x00, 0x00, 0x00}, 0x0F , 0x04 , 0x04 , {{68719476732., 68719476732., 0x00 , 0x01 , 0x01 }, {68719476733., 68719476733., 0x00 , 0x01 , 0x01 }, {477225440. , 477225440. , 0x00 , 0x01 , 0x00 }, {68242251295., 68242251295., 0x00 , 0x01 , 0x01 }, {68719476735., 0. , 0x00 , 0x00 , 0x00 }, {68719476735., 0. , 0x00 , 0x00 , 0x00 }}, 0xFF , 0x110F , 0x01 , -1 , {0x02 , 0x21 }, {0x04 , 0x22 }, {0x00 , 0x00 }, {1048572. , 0. }, 0x00}, 3646141cc406Sopenharmony_ci {0x0096, 0x23, {0x00, 0x00, 0x00}, 0x0F , 0x04 , 0x04 , {{68719476732., 68719476732., 0x00 , 0x01 , 0x01 }, {68719476733., 68719476733., 0x00 , 0x01 , 0x01 }, {13743895344., 13743895344., 0x00 , 0x01 , 0x00 }, {54975581391., 54975581391., 0x00 , 0x01 , 0x01 }, {68719476735., 0. , 0x00 , 0x00 , 0x00 }, {68719476735., 0. , 0x00 , 0x00 , 0x00 }}, 0xFF , 0x110F , 0x01 , -1 , {0x01 , 0x21 }, {0x02 , 0x22 }, {0x00 , 0x00 }, {1048572. , 0. }, 0x00}, 3647141cc406Sopenharmony_ci }; 3648141cc406Sopenharmony_ci 3649141cc406Sopenharmony_ci memcpy(reg, &data[tm], sizeof(struct st_timing)); 3650141cc406Sopenharmony_ci rst = OK; 3651141cc406Sopenharmony_ci } 3652141cc406Sopenharmony_ci 3653141cc406Sopenharmony_ci return rst; 3654141cc406Sopenharmony_ci} 3655141cc406Sopenharmony_ci 3656141cc406Sopenharmony_ci/* ccd timing values for hp3970 scanner */ 3657141cc406Sopenharmony_cistatic SANE_Int hp3970_timing_get(SANE_Int sensortype, SANE_Int tm, struct st_timing *reg) 3658141cc406Sopenharmony_ci{ 3659141cc406Sopenharmony_ci SANE_Int rst = ERROR; 3660141cc406Sopenharmony_ci 3661141cc406Sopenharmony_ci if ((tm < 12)&&(reg != NULL)) 3662141cc406Sopenharmony_ci { 3663141cc406Sopenharmony_ci rst = OK; 3664141cc406Sopenharmony_ci if (sensortype == CCD_SENSOR) 3665141cc406Sopenharmony_ci { 3666141cc406Sopenharmony_ci /* Toshiba T2952 sensor timing values for each resolution and color mode */ 3667141cc406Sopenharmony_ci struct st_timing data[] = 3668141cc406Sopenharmony_ci { 3669141cc406Sopenharmony_ci /* res , cnpp, {cvtrp 1 2 3 }, cvtrw, cvtrfpw, cvtrbpw, {{cphp1 , cphp2, cphps, cphge, cphgo}, {cphp1 , cphp2, cphps, cphge, cphgo}, {cphp1 , cphp2, cphps, cphge, cphgo}, {cphp1 , cphp2, cphps, cphge, cphgo}, {cphp1 , cphp2, cphps, cphge, cphgo}, {cphp1 , cphp2, cphps, cphge, cphgo}}, cphbp2s, cphbp2e, clamps, clampe , {cdss1, cdss2}, {cdsc1, cdsc2}, {cdscs1, cdscs2}, {adcclkp 1 y 2 }, adcclkp2e */ 3670141cc406Sopenharmony_ci {0x0960, 0x0B, {0x00, 0x00, 0x00}, 0x0F , 0x04 , 0x04 , {{0. , 0. , 0x00 , 0x01 , 0x00 }, {34376515584., 0. , 0x00 , 0x01 , 0x00 }, {8455716864. , 0. , 0x01 , 0x01 , 0x00 }, {60246982656., 0. , 0x01 , 0x01 , 0x01 }, {68719214592., 0. , 0x00 , 0x01 , 0x01 }, {68719214592., 0. , 0x00 , 0x01 , 0x01 }}, 0x00 , 0x00 , 0x01 , 0x24000, {0x04 , 0x09 }, {0x06 , 0x0B }, {0x00 , 0x00 }, {27481079808., 0. }, 0x00}, 3671141cc406Sopenharmony_ci {0x04B0, 0x1A, {0x00, 0x00, 0x00}, 0x0F , 0x04 , 0x04 , {{0. , 0. , 0x00 , 0x01 , 0x00 }, {64424511232., 0. , 0x00 , 0x01 , 0x00 }, {68711088128., 0. , 0x00 , 0x01 , 0x00 }, {8388352. , 0. , 0x00 , 0x01 , 0x01 }, {68719476480., 0. , 0x00 , 0x01 , 0x01 }, {68719476480., 0. , 0x00 , 0x01 , 0x01 }}, 0x00 , 0x00 , 0x01 , 0x11000, {0x08 , 0x15 }, {0x0C , 0x18 }, {0x00 , 0x00 }, {33351135232., 33351135232.}, 0x01}, 3672141cc406Sopenharmony_ci {0x0258, 0x17, {0x00, 0x00, 0x00}, 0x0F , 0x04 , 0x04 , {{0. , 0. , 0x00 , 0x01 , 0x00 }, {60129570816., 0. , 0x00 , 0x01 , 0x00 }, {68719472640., 0. , 0x00 , 0x01 , 0x01 }, {68719472640., 0. , 0x00 , 0x01 , 0x01 }, {16773120. , 0. , 0x00 , 0x01 , 0x00 }, {68702699520., 0. , 0x00 , 0x01 , 0x01 }}, 0x00 , 0x00 , 0x01 , 0x05500, {0x09 , 0x12 }, {0x0C , 0x14 }, {0x00 , 0x00 }, {64677150720., 0. }, 0x00}, 3673141cc406Sopenharmony_ci {0x012C, 0x17, {0x00, 0x00, 0x00}, 0x0F , 0x04 , 0x04 , {{0. , 0. , 0x00 , 0x01 , 0x00 }, {51539611648., 0. , 0x00 , 0x01 , 0x00 }, {68719472640., 0. , 0x00 , 0x01 , 0x01 }, {68719472640., 0. , 0x00 , 0x01 , 0x01 }, {1057222656. , 0. , 0x00 , 0x01 , 0x00 }, {67662249984., 0. , 0x00 , 0x01 , 0x01 }}, 0x00 , 0x00 , 0x01 , 0x05500, {0x04 , 0x15 }, {0x06 , 0x17 }, {0x00 , 0x00 }, {8084643840. , 0. }, 0x00}, 3674141cc406Sopenharmony_ci {0x00C8, 0x1D, {0x00, 0x00, 0x00}, 0x0F , 0x04 , 0x04 , {{0. , 0. , 0x00 , 0x01 , 0x00 }, {68182605888., 0. , 0x00 , 0x01 , 0x00 }, {68719476720., 0. , 0x00 , 0x01 , 0x01 }, {68719476720., 0. , 0x00 , 0x01 , 0x01 }, {16659267072., 0. , 0x00 , 0x01 , 0x00 }, {52060209600., 0. , 0x00 , 0x01 , 0x01 }}, 0x00 , 0x00 , 0x01 , 0x05500, {0x0A , 0x1B }, {0x0C , 0x1D }, {0x00 , 0x00 }, {4164816768. , 0. }, 0x00}, 3675141cc406Sopenharmony_ci {0x0960, 0x0B, {0x00, 0x00, 0x00}, 0x0F , 0x04 , 0x04 , {{0. , 0. , 0x00 , 0x01 , 0x00 }, {34376515584., 0. , 0x00 , 0x01 , 0x00 }, {8455716864. , 0. , 0x01 , 0x01 , 0x00 }, {60246982656., 0. , 0x01 , 0x01 , 0x01 }, {68719214592., 0. , 0x00 , 0x01 , 0x01 }, {68719214592., 0. , 0x00 , 0x01 , 0x01 }}, 0x00 , 0x00 , 0x01 , 0x24000, {0x04 , 0x09 }, {0x06 , 0x0B }, {0x00 , 0x00 }, {2113929216. , 0. }, 0x00}, 3676141cc406Sopenharmony_ci {0x04B0, 0x1A, {0x00, 0x00, 0x00}, 0x0F , 0x04 , 0x04 , {{0. , 0. , 0x00 , 0x01 , 0x00 }, {64424511232., 0. , 0x00 , 0x01 , 0x00 }, {68711088128., 0. , 0x00 , 0x01 , 0x00 }, {8388352. , 0. , 0x00 , 0x01 , 0x01 }, {68719476480., 0. , 0x00 , 0x01 , 0x01 }, {68719476480., 0. , 0x00 , 0x01 , 0x01 }}, 0x00 , 0x00 , 0x01 , 0x11000, {0x08 , 0x15 }, {0x0C , 0x18 }, {0x00 , 0x00 }, {67104768. , 67104768. }, 0x01}, 3677141cc406Sopenharmony_ci {0x0258, 0x17, {0x00, 0x00, 0x00}, 0x0F , 0x04 , 0x04 , {{0. , 0. , 0x00 , 0x01 , 0x00 }, {60129570816., 0. , 0x00 , 0x01 , 0x00 }, {68719472640., 0. , 0x00 , 0x01 , 0x01 }, {68719472640., 0. , 0x00 , 0x01 , 0x01 }, {16773120. , 0. , 0x00 , 0x01 , 0x00 }, {68702699520., 0. , 0x00 , 0x01 , 0x01 }}, 0x00 , 0x00 , 0x01 , 0x05500, {0x09 , 0x12 }, {0x0C , 0x14 }, {0x00 , 0x00 }, {268369920. , 0. }, 0x00}, 3678141cc406Sopenharmony_ci {0x012C, 0x17, {0x00, 0x00, 0x00}, 0x0F , 0x04 , 0x04 , {{0. , 0. , 0x00 , 0x01 , 0x00 }, {51539611648., 0. , 0x00 , 0x01 , 0x00 }, {68719472640., 0. , 0x00 , 0x01 , 0x01 }, {68719472640., 0. , 0x00 , 0x01 , 0x01 }, {1057222656. , 0. , 0x00 , 0x01 , 0x00 }, {67662249984., 0. , 0x00 , 0x01 , 0x01 }}, 0x00 , 0x00 , 0x01 , 0x05500, {0x04 , 0x15 }, {0x06 , 0x17 }, {0x00 , 0x00 }, {33546240. , 0. }, 0x00}, 3679141cc406Sopenharmony_ci {0x00C8, 0x1D, {0x00, 0x00, 0x00}, 0x1E , 0x01 , 0x0F , {{68585258944., 0. , 0x00 , 0x01 , 0x00 }, {536870784. , 0. , 0x00 , 0x01 , 0x00 }, {16659267072., 0. , 0x00 , 0x01 , 0x00 }, {52060209600., 0. , 0x00 , 0x01 , 0x01 }, {0. , 0. , 0x00 , 0x01 , 0x00 }, {0. , 0. , 0x00 , 0x01 , 0x01 }}, 0x00 , 0x00 , 0x01 , 0x05500, {0x0A , 0x1B }, {0x0C , 0x1C }, {0x00 , 0x00 }, {4194176. , 0. }, 0x00}, 3680141cc406Sopenharmony_ci {0x0064, 0x23, {0x00, 0x00, 0x00}, 0x0F , 0x04 , 0x04 , {{0. , 0. , 0x00 , 0x01 , 0x00 }, {34359738368., 0. , 0x00 , 0x01 , 0x00 }, {68719476735., 0. , 0x00 , 0x01 , 0x01 }, {68719476735., 0. , 0x00 , 0x01 , 0x01 }, {7635497415. , 0. , 0x00 , 0x01 , 0x00 }, {61083979320., 0. , 0x00 , 0x01 , 0x01 }}, 0x00 , 0x00 , 0x01 , 0x11000, {0x02 , 0x22 }, {0x03 , 0x23 }, {0x00 , 0x00 }, {2114445438. , 0. }, 0x00}, 3681141cc406Sopenharmony_ci {0x0064, 0x23, {0x00, 0x00, 0x00}, 0x0F , 0x04 , 0x04 , {{0. , 0. , 0x00 , 0x01 , 0x00 }, {34359738368., 0. , 0x00 , 0x01 , 0x00 }, {68719476735., 0. , 0x00 , 0x01 , 0x01 }, {68719476735., 0. , 0x00 , 0x01 , 0x01 }, {7635497415. , 0. , 0x00 , 0x01 , 0x00 }, {61083979320., 0. , 0x00 , 0x01 , 0x01 }}, 0x00 , 0x00 , 0x01 , 0x11000, {0x02 , 0x22 }, {0x03 , 0x23 }, {0x00 , 0x00 }, {524286. , 0. }, 0x00} 3682141cc406Sopenharmony_ci }; 3683141cc406Sopenharmony_ci 3684141cc406Sopenharmony_ci memcpy(reg, &data[tm], sizeof(struct st_timing)); 3685141cc406Sopenharmony_ci } else 3686141cc406Sopenharmony_ci { 3687141cc406Sopenharmony_ci /* Sony S575 sensor timing values for each resolution and color mode 3688141cc406Sopenharmony_ci I haven't found any hp3970 scanner using sony sensor but windows drivers support this case */ 3689141cc406Sopenharmony_ci struct st_timing data[] = 3690141cc406Sopenharmony_ci { 3691141cc406Sopenharmony_ci /* res , cnpp, {cvtrp1 2 3 }, cvtrw, cvtrfpw, cvtrbpw, {{cphp1 , cphp2, cphps, cphge, cphgo}, {cphp1 , cphp2, cphps, cphge, cphgo}, {cphp1 , cphp2, cphps, cphge, cphgo}, {cphp1 , cphp2, cphps, cphge, cphgo}, {cphp1 , cphp2, cphps, cphge, cphgo}, {cphp1 , cphp2, cphps, cphge, cphgo}}, cphbp2s, cphbp2e, clamps, clampe , {cdss1, cdss2}, {cdsc1, cdsc2}, {cdscs1, cdscs2}, {adcclkp 1 y 2 }, adcclkp2e */ 3692141cc406Sopenharmony_ci {0x0960, 0x0B, {0x00, 0x00, 0x00}, 0x1E , 0x01 , 0x0F , {{60112764928., 0. , 0x00 , 0x01 , 0x00 }, {34326183936., 0. , 0x00 , 0x01 , 0x00 }, {1056964608. , 0. , 0x01 , 0x01 , 0x00 }, {67645734912., 0. , 0x01 , 0x01 , 0x01 }, {1056964608. , 0. , 0x00 , 0x01 , 0x00 }, {67645734912., 0. , 0x00 , 0x01 , 0x01 }}, 0x00 , 0x00 , 0x01 , 0x24000, {0x05 , 0x09 }, {0x07 , 0x0b }, {0x00 , 0x00 }, {27481079808., 0. }, 0x00}, 3693141cc406Sopenharmony_ci {0x04B0, 0x1A, {0x00, 0x00, 0x00}, 0x1E , 0x01 , 0x0F , {{68316823296., 0. , 0x00 , 0x01 , 0x00 }, {42949672704., 0. , 0x00 , 0x01 , 0x00 }, {4194048. , 0. , 0x00 , 0x01 , 0x00 }, {68715282432., 0. , 0x00 , 0x01 , 0x01 }, {4194048. , 0. , 0x00 , 0x01 , 0x00 }, {68715282432., 0. , 0x00 , 0x01 , 0x01 }}, 0x00 , 0x00 , 0x01 , 0x11000, {0x0B , 0x17 }, {0x0D , 0x19 }, {0x00 , 0x00 }, {16675567616., 16675567616.}, 0x01}, 3694141cc406Sopenharmony_ci {0x0258, 0x17, {0x00, 0x00, 0x00}, 0x1E , 0x01 , 0x0F , {{67914166272., 0. , 0x00 , 0x01 , 0x00 }, {42949668864., 0. , 0x00 , 0x01 , 0x00 }, {16773120. , 0. , 0x00 , 0x01 , 0x00 }, {68702699520., 0. , 0x00 , 0x01 , 0x01 }, {0. , 0. , 0x00 , 0x01 , 0x00 }, {0. , 0. , 0x00 , 0x01 , 0x01 }}, 0x00 , 0x00 , 0x01 , 0x05500, {0x09 , 0x15 }, {0x0B , 0x17 }, {0x00 , 0x00 }, {8084643840. , 0. }, 0x00}, 3695141cc406Sopenharmony_ci {0x012C, 0x17, {0x00, 0x00, 0x00}, 0x1E , 0x01 , 0x0F , {{60129538048., 0. , 0x00 , 0x01 , 0x00 }, {34359730176., 0. , 0x00 , 0x01 , 0x00 }, {1057222656. , 0. , 0x00 , 0x01 , 0x00 }, {67662249984., 0. , 0x00 , 0x01 , 0x01 }, {0. , 0. , 0x00 , 0x01 , 0x00 }, {0. , 0. , 0x00 , 0x01 , 0x01 }}, 0x00 , 0x00 , 0x01 , 0x05500, {0x04 , 0x15 }, {0x06 , 0x17 }, {0x00 , 0x00 }, {8084643840. , 0. }, 0x00}, 3696141cc406Sopenharmony_ci {0x00C8, 0x1D, {0x00, 0x00, 0x00}, 0x1E , 0x01 , 0x0F , {{68585258944., 0. , 0x00 , 0x01 , 0x00 }, {536870784. , 0. , 0x00 , 0x01 , 0x00 }, {16659267072., 0. , 0x00 , 0x01 , 0x00 }, {52060209600., 0. , 0x00 , 0x01 , 0x01 }, {0. , 0. , 0x00 , 0x01 , 0x00 }, {0. , 0. , 0x00 , 0x01 , 0x01 }}, 0x00 , 0x00 , 0x01 , 0x05500, {0x0A , 0x1A }, {0x0C , 0x1C }, {0x00 , 0x00 }, {8329633536. , 0. }, 0x00}, 3697141cc406Sopenharmony_ci {0x0960, 0x0B, {0x00, 0x00, 0x00}, 0x1E , 0x01 , 0x0F , {{60112764928., 0. , 0x00 , 0x01 , 0x00 }, {34326183936., 0. , 0x00 , 0x01 , 0x00 }, {1056964608. , 0. , 0x01 , 0x01 , 0x00 }, {67645734912., 0. , 0x01 , 0x01 , 0x01 }, {1056964608. , 0. , 0x00 , 0x01 , 0x00 }, {67645734912., 0. , 0x00 , 0x01 , 0x01 }}, 0x00 , 0x00 , 0x01 , 0x24000, {0x05 , 0x09 }, {0x07 , 0x0B }, {0x00 , 0x00 }, {2113929216. , 0. }, 0x00}, 3698141cc406Sopenharmony_ci {0x04B0, 0x1A, {0x00, 0x00, 0x00}, 0x1E , 0x01 , 0x0F , {{68316823296., 0. , 0x00 , 0x01 , 0x00 }, {42949672704., 0. , 0x00 , 0x01 , 0x00 }, {4194048. , 0. , 0x00 , 0x01 , 0x00 }, {68715282432., 0. , 0x00 , 0x01 , 0x01 }, {4194048. , 0. , 0x00 , 0x01 , 0x00 }, {68715282432., 0. , 0x00 , 0x01 , 0x01 }}, 0x00 , 0x00 , 0x01 , 0x11000, {0x0B , 0x17 }, {0x0D , 0x19 }, {0x00 , 0x00 }, {33552384. , 33552384. }, 0x01}, 3699141cc406Sopenharmony_ci {0x0258, 0x17, {0x00, 0x00, 0x00}, 0x1E , 0x01 , 0x0F , {{67914166272., 0. , 0x00 , 0x01 , 0x00 }, {42949668864., 0. , 0x00 , 0x01 , 0x00 }, {16773120. , 0. , 0x00 , 0x01 , 0x00 }, {68702699520., 0. , 0x00 , 0x01 , 0x01 }, {0. , 0. , 0x00 , 0x01 , 0x00 }, {0. , 0. , 0x00 , 0x01 , 0x01 }}, 0x00 , 0x00 , 0x01 , 0x05500, {0x09 , 0x15 }, {0x0B , 0x17 }, {0x00 , 0x00 }, {33546240. , 0. }, 0x00}, 3700141cc406Sopenharmony_ci {0x012C, 0x17, {0x00, 0x00, 0x00}, 0x1E , 0x01 , 0x0F , {{60129538048., 0. , 0x00 , 0x01 , 0x00 }, {34359730176., 0. , 0x00 , 0x01 , 0x00 }, {34359730176., 0. , 0x00 , 0x01 , 0x00 }, {67662249984., 0. , 0x00 , 0x01 , 0x01 }, {0. , 0. , 0x00 , 0x01 , 0x00 }, {0. , 0. , 0x00 , 0x01 , 0x01 }}, 0x00 , 0x00 , 0x01 , 0x05500, {0x04 , 0x15 }, {0x06 , 0x17 }, {0x00 , 0x00 }, {33546240. , 0. }, 0x00}, 3701141cc406Sopenharmony_ci {0x00C8, 0x1D, {0x00, 0x00, 0x00}, 0x0F , 0x04 , 0x04 , {{0. , 0. , 0x00 , 0x01 , 0x00 }, {68182605888., 0. , 0x00 , 0x01 , 0x00 }, {68719476720., 0. , 0x00 , 0x01 , 0x01 }, {68719476720., 0. , 0x00 , 0x01 , 0x01 }, {16659267072., 0. , 0x00 , 0x01 , 0x00 }, {52060209600., 0. , 0x00 , 0x01 , 0x01 }}, 0x00 , 0x00 , 0x01 , 0x05500, {0x0A , 0x1A }, {0x0C , 0x1D }, {0x00 , 0x00 }, {4194176. , 0. }, 0x00}, 3702141cc406Sopenharmony_ci {0x0064, 0x23, {0x00, 0x00, 0x00}, 0x1E , 0x01 , 0x0F , {{51539607551., 0. , 0x00 , 0x01 , 0x00 }, {34359738366., 0. , 0x00 , 0x01 , 0x00 }, {7635497415. , 0. , 0x00 , 0x01 , 0x00 }, {61083979320., 0. , 0x00 , 0x01 , 0x01 }, {0. , 0. , 0x00 , 0x01 , 0x00 }, {0. , 0. , 0x00 , 0x01 , 0x01 }}, 0x00 , 0x00 , 0x01 , 0x02700, {0x02 , 0x22 }, {0x03 , 0x23 }, {0x00 , 0x00 }, {2114445438. , 0. }, 0x00}, 3703141cc406Sopenharmony_ci {0x0064, 0x23, {0x00, 0x00, 0x00}, 0x1E , 0x01 , 0x0F , {{51539607551., 0. , 0x00 , 0x01 , 0x00 }, {34359738366., 0. , 0x00 , 0x01 , 0x00 }, {7635497415. , 0. , 0x00 , 0x01 , 0x00 }, {61083979320., 0. , 0x00 , 0x01 , 0x01 }, {0. , 0. , 0x00 , 0x01 , 0x00 }, {0. , 0. , 0x00 , 0x01 , 0x01 }}, 0x00 , 0x00 , 0x01 , 0x02700, {0x02 , 0x22 }, {0x03 , 0x23 }, {0x00 , 0x00 }, {524286. , 0. }, 0x00} 3704141cc406Sopenharmony_ci }; 3705141cc406Sopenharmony_ci 3706141cc406Sopenharmony_ci memcpy(reg, &data[tm], sizeof(struct st_timing)); 3707141cc406Sopenharmony_ci } 3708141cc406Sopenharmony_ci } 3709141cc406Sopenharmony_ci 3710141cc406Sopenharmony_ci return rst; 3711141cc406Sopenharmony_ci} 3712141cc406Sopenharmony_ci 3713141cc406Sopenharmony_ci/* ccd timing values for hp4370 scanner */ 3714141cc406Sopenharmony_cistatic SANE_Int hp4370_timing_get(SANE_Int tm, struct st_timing *reg) 3715141cc406Sopenharmony_ci{ 3716141cc406Sopenharmony_ci SANE_Int rst = ERROR; 3717141cc406Sopenharmony_ci 3718141cc406Sopenharmony_ci if ((reg != NULL)&&(tm < 14)) 3719141cc406Sopenharmony_ci { 3720141cc406Sopenharmony_ci /* Toshiba T2958 sensor timing values for each resolution and color mode */ 3721141cc406Sopenharmony_ci 3722141cc406Sopenharmony_ci struct st_timing data[] = 3723141cc406Sopenharmony_ci { 3724141cc406Sopenharmony_ci /* res , cnpp, {cvtrp 1 2 3 }, cvtrw, cvtrfpw, cvtrbpw, {{cphp1 , cphp2, cphps, cphge, cphgo}, {cphp1 , cphp2 , cphps, cphge, cphgo}, {cphp1 , cphp2 , cphps, cphge, cphgo}, {cphp1 , cphp2 , cphps, cphge, cphgo}, {cphp1 , cphp2, cphps, cphge, cphgo}, {cphp1 , cphp2, cphps, cphge, cphgo}}, cphbp2s, cphbp2e, clamps, clampe , {cdss1, cdss2}, {cdsc1, cdsc2}, {cdscs1, cdscs2}, {adcclkp 1 y 2 }, adcclkp2e */ 3725141cc406Sopenharmony_ci {0x12C0, 0x17, {0x00, 0x00, 0x00}, 0x0F , 0x05 , 0x0E , {{0. , 0. , 0x00 , 0x01 , 0x01 }, {17179869183., 17179869183., 0x00 , 0x01 , 0x01 }, {1073479680. , 1073479680., 0x01 , 0x01 , 0x00 }, {67645997055., 67645997055., 0x01 , 0x01 , 0x01 }, {68719476735., 0. , 0x00 , 0x00 , 0x00 }, {68719476735., 0. , 0x00 , 0x00 , 0x00 }}, 0x5D5B , 0xBAB7 , 0x1A , -1 , {0x08 , 0x15 }, {0x0A , 0x17 }, {0x00 , 0x00 }, {8084644321. , 8084644321. }, 0x00}, 3726141cc406Sopenharmony_ci {0x0960, 0x23, {0x00, 0x00, 0x00}, 0x0F , 0x05 , 0x0E , {{0. , 0. , 0x00 , 0x01 , 0x01 }, {17179869182., 0. , 0x00 , 0x01 , 0x01 }, {268434432. , 0. , 0x01 , 0x01 , 0x00 }, {68451042303., 0. , 0x01 , 0x01 , 0x01 }, {0. , 0. , 0x00 , 0x00 , 0x00 }, {0. , 0. , 0x00 , 0x00 , 0x00 }}, 0x00 , 0x00 , 0x1A , -1 , {0x07 , 0x18 }, {0x0B , 0x1E }, {0x00 , 0x00 }, {67662254016., 0. }, 0x00}, 3727141cc406Sopenharmony_ci {0x04B0, 0x23, {0x00, 0x00, 0x00}, 0x0F , 0x04 , 0x04 , {{0. , 0. , 0x00 , 0x01 , 0x00 }, {68719475967., 0. , 0x00 , 0x01 , 0x01 }, {1048572. , 0. , 0x00 , 0x01 , 0x01 }, {68718428163., 0. , 0x00 , 0x01 , 0x01 }, {0. , 0. , 0x00 , 0x01 , 0x00 }, {0. , 0. , 0x00 , 0x01 , 0x00 }}, 0x00 , 0x00 , 0x01 , 0x11000, {0x1F , 0x17 }, {0x21 , 0x19 }, {0x01 , 0x01 }, {34888349727., 0. }, 0x00}, 3728141cc406Sopenharmony_ci {0x0258, 0x23, {0x00, 0x00, 0x00}, 0x0F , 0x04 , 0x04 , {{0. , 0. , 0x00 , 0x01 , 0x00 }, {68719476731., 0. , 0x00 , 0x01 , 0x01 }, {4261672960. , 0. , 0x00 , 0x01 , 0x00 }, {64457803775., 0. , 0x00 , 0x01 , 0x01 }, {0. , 0. , 0x00 , 0x00 , 0x00 }, {0. , 0. , 0x00 , 0x00 , 0x00 }}, 0x00 , 0x00 , 0x1A , 0x05500, {0x00 , 0x1F }, {0x03 , 0x21 }, {0x00 , 0x00 }, {8457781752. , 0. }, 0x00}, 3729141cc406Sopenharmony_ci {0x012C, 0x23, {0x00, 0x00, 0x00}, 0x0F , 0x04 , 0x04 , {{0. , 0. , 0x00 , 0x01 , 0x00 }, {51808043007., 0. , 0x00 , 0x01 , 0x01 }, {8084644320. , 0. , 0x00 , 0x01 , 0x00 }, {60634832415., 0. , 0x00 , 0x01 , 0x01 }, {0. , 0. , 0x00 , 0x00 , 0x00 }, {0. , 0. , 0x00 , 0x00 , 0x00 }}, 0x00 , 0x00 , 0x1A , 0x05500, {0x09 , 0x20 }, {0x0A , 0x22 }, {0x00 , 0x00 }, {4228890876. , 0. }, 0x00}, 3730141cc406Sopenharmony_ci {0x12C0, 0x17, {0x00, 0x00, 0x00}, 0x0F , 0x05 , 0x0E , {{0. , 0. , 0x00 , 0x01 , 0x01 }, {17179869183., 17179869183., 0x00 , 0x01 , 0x01 }, {1073479680. , 1073479680., 0x01 , 0x01 , 0x00 }, {67645997055., 67645997055., 0x01 , 0x01 , 0x01 }, {68719476735., 0. , 0x00 , 0x00 , 0x00 }, {68719476735., 0. , 0x00 , 0x00 , 0x00 }}, 0x5D5B , 0xBAB7 , 0x1A , -1 , {0x08 , 0x15 }, {0x0A , 0x17 }, {0x00 , 0x00 }, {33546240. , 33546240. }, 0x00}, 3731141cc406Sopenharmony_ci {0x0960, 0x23, {0x00, 0x00, 0x00}, 0x0F , 0x05 , 0x0E , {{0. , 0. , 0x00 , 0x01 , 0x01 }, {17179869182., 0. , 0x00 , 0x01 , 0x01 }, {268434432. , 0. , 0x01 , 0x01 , 0x00 }, {68451042303., 0. , 0x01 , 0x01 , 0x01 }, {0. , 0. , 0x00 , 0x00 , 0x00 }, {0. , 0. , 0x00 , 0x00 , 0x00 }}, 0x00 , 0x00 , 0x1A , -1 , {0x07 , 0x18 }, {0x0B , 0x1E }, {0x00 , 0x00 }, {16777152. , 0. }, 0x00}, 3732141cc406Sopenharmony_ci {0x04B0, 0x23, {0x00, 0x00, 0x00}, 0x0F , 0x04 , 0x04 , {{0. , 0. , 0x00 , 0x01 , 0x00 }, {68719475967., 0. , 0x00 , 0x01 , 0x01 }, {1048572. , 0. , 0x00 , 0x01 , 0x01 }, {68718428163., 0. , 0x00 , 0x01 , 0x01 }, {0. , 0. , 0x00 , 0x01 , 0x00 }, {0. , 0. , 0x00 , 0x01 , 0x00 }}, 0x00 , 0x00 , 0x01 , 0x11000, {0x1F , 0x17 }, {0x21 , 0x19 }, {0x01 , 0x01 }, {536868864. , 0. }, 0x00}, 3733141cc406Sopenharmony_ci {0x0258, 0x23, {0x00, 0x00, 0x00}, 0x0F , 0x04 , 0x04 , {{0. , 0. , 0x00 , 0x01 , 0x00 }, {68719476731., 0. , 0x00 , 0x01 , 0x01 }, {4261672960. , 0. , 0x00 , 0x01 , 0x00 }, {64457803775., 0. , 0x00 , 0x01 , 0x01 }, {0. , 0. , 0x00 , 0x00 , 0x00 }, {0. , 0. , 0x00 , 0x00 , 0x00 }}, 0x00 , 0x00 , 0x1A , 0x05500, {0x00 , 0x1F }, {0x03 , 0x21 }, {0x00 , 0x00 }, {2097144. , 0. }, 0x00}, 3734141cc406Sopenharmony_ci {0x012C, 0x23, {0x00, 0x00, 0x00}, 0x0F , 0x04 , 0x04 , {{0. , 0. , 0x00 , 0x01 , 0x00 }, {51808043007., 0. , 0x00 , 0x01 , 0x01 }, {8084644320. , 0. , 0x00 , 0x01 , 0x00 }, {60634832415., 0. , 0x00 , 0x01 , 0x01 }, {0. , 0. , 0x00 , 0x00 , 0x00 }, {0. , 0. , 0x00 , 0x00 , 0x00 }}, 0x00 , 0x00 , 0x1A , 0x05500, {0x09 , 0x20 }, {0x0A , 0x22 }, {0x00 , 0x00 }, {1048572. , 0. }, 0x00}, 3735141cc406Sopenharmony_ci {0x12C0, 0x17, {0x00, 0x00, 0x00}, 0x0F , 0x05 , 0x0E , {{0. , 0. , 0x00 , 0x01 , 0x01 }, {17179869183., 17179869183., 0x00 , 0x01 , 0x01 }, {1073479680. , 1073479680., 0x01 , 0x01 , 0x00 }, {67645997055., 67645997055., 0x01 , 0x01 , 0x01 }, {68719476735., 0. , 0x00 , 0x00 , 0x00 }, {68719476735., 0. , 0x00 , 0x00 , 0x00 }}, 0x6977 , 0xD2EF , 0x1A , -1 , {0x07 , 0x15 }, {0x0A , 0x17 }, {0x00 , 0x00 }, {8084644321. , 8084644321. }, 0x00}, 3736141cc406Sopenharmony_ci {0x12C0, 0x17, {0x00, 0x00, 0x00}, 0x0F , 0x05 , 0x0E , {{0. , 0. , 0x00 , 0x01 , 0x01 }, {17179869183., 17179869183., 0x00 , 0x01 , 0x01 }, {1073479680. , 1073479680., 0x01 , 0x01 , 0x00 }, {67645997055., 67645997055., 0x01 , 0x01 , 0x01 }, {68719476735., 0. , 0x00 , 0x00 , 0x00 }, {68719476735., 0. , 0x00 , 0x00 , 0x00 }}, 0x6977 , 0xD2EF , 0x1A , -1 , {0x07 , 0x15 }, {0x0A , 0x17 }, {0x00 , 0x00 }, {33546240. , 33546240. }, 0x00}, 3737141cc406Sopenharmony_ci {0x12C0, 0x23, {0x00, 0x00, 0x00}, 0x0F , 0x05 , 0x0E , {{0. , 0. , 0x00 , 0x01 , 0x01 }, {8589934591. , 8589934591. , 0x00 , 0x01 , 0x01 }, {134217216. , 134217216. , 0x01 , 0x01 , 0x00 }, {68585259519., 68585259519., 0x01 , 0x01 , 0x01 }, {68719476735., 0. , 0x00 , 0x00 , 0x00 }, {68719476735., 0. , 0x00 , 0x00 , 0x00 }}, 0x765B , 0xECB7 , 0x1A , -1 , {0x07 , 0x1B }, {0x0D , 0x21 }, {0x00 , 0x00 }, {8457781752. , 8457781752. }, 0x00}, 3738141cc406Sopenharmony_ci {0x12C0, 0x23, {0x00, 0x00, 0x00}, 0x0F , 0x05 , 0x0E , {{0. , 0. , 0x00 , 0x01 , 0x01 }, {8589934591. , 8589934591. , 0x00 , 0x01 , 0x01 }, {134217216. , 134217216. , 0x01 , 0x01 , 0x00 }, {68585259519., 68585259519., 0x01 , 0x01 , 0x01 }, {68719476735., 0. , 0x00 , 0x00 , 0x00 }, {68719476735., 0. , 0x00 , 0x00 , 0x00 }}, 0x765B , 0xECB7 , 0x1A , -1 , {0x07 , 0x1B }, {0x0D , 0x21 }, {0x00 , 0x00 }, {2097144. , 2097144. }, 0x00} 3739141cc406Sopenharmony_ci }; 3740141cc406Sopenharmony_ci 3741141cc406Sopenharmony_ci memcpy(reg, &data[tm], sizeof(struct st_timing)); 3742141cc406Sopenharmony_ci rst = OK; 3743141cc406Sopenharmony_ci } 3744141cc406Sopenharmony_ci 3745141cc406Sopenharmony_ci return rst; 3746141cc406Sopenharmony_ci} 3747141cc406Sopenharmony_ci 3748141cc406Sopenharmony_ci/* ccd timing values for ua4900 scanner */ 3749141cc406Sopenharmony_cistatic SANE_Int ua4900_timing_get(SANE_Int tm, struct st_timing *reg) 3750141cc406Sopenharmony_ci{ 3751141cc406Sopenharmony_ci SANE_Int rst = ERROR; 3752141cc406Sopenharmony_ci 3753141cc406Sopenharmony_ci if ((tm < 10)&&(reg != NULL)) 3754141cc406Sopenharmony_ci { 3755141cc406Sopenharmony_ci /* Sony S575 sensor timing values for each resolution and color mode */ 3756141cc406Sopenharmony_ci struct st_timing data[] = 3757141cc406Sopenharmony_ci { 3758141cc406Sopenharmony_ci /* res , cnpp, {cvtrp1 2 3 }, cvtrw, cvtrfpw, cvtrbpw, {{cphp1 , cphp2, cphps, cphge, cphgo}, {cphp1 , cphp2, cphps, cphge, cphgo}, {cphp1 , cphp2, cphps, cphge, cphgo}, {cphp1 , cphp2, cphps, cphge, cphgo}, {cphp1 , cphp2, cphps, cphge, cphgo}, {cphp1 , cphp2, cphps, cphge, cphgo}}, cphbp2s, cphbp2e, clamps, clampe , {cdss1, cdss2}, {cdsc1, cdsc2}, {cdscs1, cdscs2}, {adcclkp 1 y 2 }, adcclkp2e */ 3759141cc406Sopenharmony_ci {0x04b0, 0x23, {0x00, 0x00, 0x00}, 0x1E , 0x03 , 0x03 , {{ 1073737728., 0. , 0x01 , 0x01 , 0x00 }, {67645739007., 0. , 0x01 , 0x01 , 0x01 }, {67645739007., 0. , 0x01 , 0x01 , 0x01 }, { 1073737728., 0. , 0x01 , 0x01 , 0x00 }, {25769803776., 0. , 0x00 , 0x01 , 0x00 }, { 62., 0. , 0x00 , 0x01 , 0x00 }}, 0x00 , 0x00 , 0x01 , 0x11000, {0x08 , 0x1c }, {0x0A , 0x1e }, {0x00 , 0x00 }, {67662254016., 0. }, 0x00}, 3760141cc406Sopenharmony_ci {0x0258, 0x23, {0x00, 0x00, 0x00}, 0x0F , 0x03 , 0x03 , {{ 262143., 0. , 0x00 , 0x01 , 0x00 }, {68719214592., 0. , 0x00 , 0x01 , 0x01 }, {68719214592., 0. , 0x00 , 0x01 , 0x01 }, { 262143., 3. , 0x00 , 0x01 , 0x00 }, { 2080374784., 0. , 0x00 , 0x01 , 0x00 }, {64424509455., 0. , 0x00 , 0x01 , 0x00 }}, 0x00 , 0x00 , 0x01 , 0x05500, {0x10 , 0x1d }, {0x12 , 0x1f }, {0x00 , 0x00 }, {33831127008., 0. }, 0x00}, 3761141cc406Sopenharmony_ci {0x012c, 0x23, {0x00, 0x00, 0x00}, 0x1E , 0x03 , 0x03 , {{ 32767., 0. , 0x00 , 0x01 , 0x00 }, {68182605824., 0. , 0x00 , 0x01 , 0x01 }, { 2130837500., 0. , 0x00 , 0x01 , 0x01 }, {66588639235., 0. , 0x00 , 0x01 , 0x00 }, { 117440512., 0. , 0x00 , 0x01 , 0x00 }, {68182605825., 0. , 0x00 , 0x01 , 0x00 }}, 0x00 , 0x00 , 0x01 , 0x02700, {0x12 , 0x1f }, {0x14 , 0x21 }, {0x00 , 0x00 }, { 8457781752., 0. }, 0x00}, 3762141cc406Sopenharmony_ci {0x00c8, 0x23, {0x00, 0x00, 0x00}, 0x1E , 0x03 , 0x03 , {{51539608575., 0. , 0x00 , 0x01 , 0x00 }, {16642998272., 0. , 0x00 , 0x01 , 0x01 }, { 2082408447., 0. , 0x00 , 0x01 , 0x01 }, {66637068288., 0. , 0x00 , 0x01 , 0x00 }, { 14680064., 0. , 0x00 , 0x01 , 0x00 }, {68652367872., 0. , 0x00 , 0x01 , 0x00 }}, 0x00 , 0x00 , 0x01 , 0x02700, {0x10 , 0x1f }, {0x12 , 0x21 }, {0x00 , 0x00 }, { 8457781752., 0. }, 0x00}, 3763141cc406Sopenharmony_ci {0x0064, 0x23, {0x00, 0x00, 0x00}, 0x1E , 0x03 , 0x03 , {{51539608575., 0. , 0x00 , 0x01 , 0x00 }, {16642998272., 0. , 0x00 , 0x01 , 0x01 }, { 2082408447., 0. , 0x00 , 0x01 , 0x01 }, {66637068288., 0. , 0x00 , 0x01 , 0x00 }, { 14680064., 0. , 0x00 , 0x01 , 0x00 }, {68652367872., 0. , 0x00 , 0x01 , 0x00 }}, 0x00 , 0x00 , 0x01 , 0x02700, {0x10 , 0x1f }, {0x12 , 0x21 }, {0x00 , 0x00 }, { 8457781752., 0. }, 0x00}, 3764141cc406Sopenharmony_ci {0x04b0, 0x23, {0x00, 0x00, 0x00}, 0x1E , 0x03 , 0x03 , {{ 268434432., 0. , 0x01 , 0x01 , 0x00 }, {68451042303., 0. , 0x01 , 0x01 , 0x01 }, {68451042303., 0. , 0x01 , 0x01 , 0x01 }, { 268434432., 0. , 0x01 , 0x01 , 0x00 }, {51539607552., 0. , 0x00 , 0x01 , 0x00 }, {30. , 0. , 0x00 , 0x01 , 0x00 }}, 0x00 , 0x00 , 0x01 , 0x11000, {0x08 , 0x1d }, {0x09 , 0x1e }, {0x00 , 0x00 }, {16777152. , 0. }, 0x00}, 3765141cc406Sopenharmony_ci {0x0258, 0x1d, {0x00, 0x00, 0x00}, 0x0f , 0x03 , 0x03 , {{ 2097088., 0. , 0x00 , 0x01 , 0x00 }, {68717379632., 0. , 0x00 , 0x01 , 0x01 }, {68717379632., 0. , 0x00 , 0x01 , 0x01 }, { 2097088., 3. , 0x00 , 0x01 , 0x00 }, { 1879048192., 0. , 0x00 , 0x01 , 0x00 }, {60129542592., 0. , 0x00 , 0x01 , 0x00 }}, 0x00 , 0x00 , 0x01 , 0x05500, {0x0d , 0x16 }, {0x0f , 0x18 }, {0x00 , 0x00 }, {134213632. , 0. }, 0x00}, 3766141cc406Sopenharmony_ci {0x012c, 0x23, {0x00, 0x00, 0x00}, 0x1E , 0x03 , 0x03 , {{64424510463., 0. , 0x00 , 0x01 , 0x00 }, { 4278190080., 0. , 0x00 , 0x01 , 0x01 }, { 267390975., 0. , 0x00 , 0x01 , 0x01 }, {68452085760., 0. , 0x00 , 0x01 , 0x00 }, { 6291456., 0. , 0x00 , 0x01 , 0x00 }, {68652367872., 0. , 0x00 , 0x01 , 0x00 }}, 0x00 , 0x00 , 0x01 , 0x02700, {0x15 , 0x1f }, {0x17 , 0x21 }, {0x00 , 0x00 }, {2097144. , 0. }, 0x00}, 3767141cc406Sopenharmony_ci {0x00C8, 0x23, {0x00, 0x00, 0x00}, 0x1E , 0x03 , 0x03 , {{51539608575., 0. , 0x00 , 0x01 , 0x00 }, {16642998272., 0. , 0x00 , 0x01 , 0x01 }, { 2082408447., 0. , 0x00 , 0x01 , 0x01 }, {66637068288., 0. , 0x00 , 0x01 , 0x00 }, { 14680064., 0. , 0x00 , 0x01 , 0x00 }, {68652367872., 0. , 0x00 , 0x01 , 0x00 }}, 0x00 , 0x00 , 0x01 , 0x02700, {0x17 , 0x1f }, {0x19 , 0x21 }, {0x00 , 0x00 }, {2097144. , 0. }, 0x00}, 3768141cc406Sopenharmony_ci {0x0064, 0x23, {0x00, 0x00, 0x00}, 0x1E , 0x03 , 0x03 , {{51539608575., 0. , 0x00 , 0x01 , 0x00 }, {16642998272., 0. , 0x00 , 0x01 , 0x01 }, { 2082408447., 0. , 0x00 , 0x01 , 0x01 }, {66637068288., 0. , 0x00 , 0x01 , 0x00 }, { 14680064., 0. , 0x00 , 0x01 , 0x00 }, {68652367872., 0. , 0x00 , 0x01 , 0x00 }}, 0x00 , 0x00 , 0x01 , 0x02700, {0x17 , 0x1f }, {0x19 , 0x21 }, {0x00 , 0x00 }, {2097144. , 0. }, 0x00} 3769141cc406Sopenharmony_ci }; 3770141cc406Sopenharmony_ci 3771141cc406Sopenharmony_ci memcpy(reg, &data[tm], sizeof(struct st_timing)); 3772141cc406Sopenharmony_ci rst = OK; 3773141cc406Sopenharmony_ci } 3774141cc406Sopenharmony_ci 3775141cc406Sopenharmony_ci return rst; 3776141cc406Sopenharmony_ci} 3777141cc406Sopenharmony_ci 3778141cc406Sopenharmony_cistatic SANE_Int cfg_timing_get(SANE_Int sensortype, SANE_Int tm, struct st_timing *reg) 3779141cc406Sopenharmony_ci{ 3780141cc406Sopenharmony_ci /* return timing values for current device */ 3781141cc406Sopenharmony_ci 3782141cc406Sopenharmony_ci SANE_Int rst = ERROR; 3783141cc406Sopenharmony_ci 3784141cc406Sopenharmony_ci switch(RTS_Debug->dev_model) 3785141cc406Sopenharmony_ci { 3786141cc406Sopenharmony_ci case BQ5550: 3787141cc406Sopenharmony_ci rst = bq5550_timing_get(tm, reg); 3788141cc406Sopenharmony_ci break; 3789141cc406Sopenharmony_ci 3790141cc406Sopenharmony_ci case UA4900: 3791141cc406Sopenharmony_ci rst = ua4900_timing_get(tm, reg); 3792141cc406Sopenharmony_ci break; 3793141cc406Sopenharmony_ci 3794141cc406Sopenharmony_ci case HP4370: 3795141cc406Sopenharmony_ci case HPG3010: 3796141cc406Sopenharmony_ci case HPG3110: 3797141cc406Sopenharmony_ci rst = hp4370_timing_get(tm, reg); 3798141cc406Sopenharmony_ci break; 3799141cc406Sopenharmony_ci 3800141cc406Sopenharmony_ci case HP3800: 3801141cc406Sopenharmony_ci case HPG2710: 3802141cc406Sopenharmony_ci rst = hp3800_timing_get(tm, reg); 3803141cc406Sopenharmony_ci break; 3804141cc406Sopenharmony_ci 3805141cc406Sopenharmony_ci default: 3806141cc406Sopenharmony_ci /* hp3970 and hp4070 */ 3807141cc406Sopenharmony_ci rst = hp3970_timing_get(sensortype, tm, reg); 3808141cc406Sopenharmony_ci break; 3809141cc406Sopenharmony_ci } 3810141cc406Sopenharmony_ci 3811141cc406Sopenharmony_ci return rst; 3812141cc406Sopenharmony_ci} 3813141cc406Sopenharmony_ci 3814141cc406Sopenharmony_ci/** SEC: Motor curves ---------- */ 3815141cc406Sopenharmony_ci 3816141cc406Sopenharmony_cistatic SANE_Int *bq5550_motor() 3817141cc406Sopenharmony_ci{ 3818141cc406Sopenharmony_ci SANE_Int *rst = NULL; 3819141cc406Sopenharmony_ci SANE_Int steps[] = 3820141cc406Sopenharmony_ci { 3821141cc406Sopenharmony_ci /* motorcurve 1 */ 3822141cc406Sopenharmony_ci 1, 1, 1, 0, /* mri, msi, skiplinecount, motorbackstep */ 3823141cc406Sopenharmony_ci ACC_CURVE,CRV_NORMALSCAN, 20000 ,6323 ,4095 ,3270 ,2823 ,2533 ,2318 ,2151 ,2016 ,1905 ,1811 ,1730 ,1660 ,1599 ,1544 ,1494 ,1450 ,1409 ,1373 ,1339 ,1307 ,1278 ,1251 ,1225 ,1201 ,1179 ,1158 ,1138 ,1119 ,1101 ,1084 ,1067 ,1052 ,1037 ,1023 ,1009 ,996 ,984 ,972 ,960 ,949 ,938 ,928 ,918 ,909 ,899 ,890 ,882 ,873 ,865 ,857 ,849 ,842 ,835 ,828 ,821 ,814 ,807 ,801 ,795 ,789 ,783 ,777 ,772 ,766 ,761 ,756 ,751 ,746 ,741 ,736 ,731 ,727 ,722 ,718 ,714 ,709 ,705 ,701 ,697 ,693 ,690 ,686 ,682 ,678 ,675 ,671 ,668 ,665 ,661 ,658 ,655 ,652 ,649 ,645 ,642 ,640 ,637 ,634 ,631 ,628 ,625 ,623 ,620 ,617 ,615 ,612 ,610 ,607 ,605 ,602 ,600 ,597 ,595 ,593 ,591 ,588 ,586 ,584 ,582 ,580 ,577 ,575 ,573 ,571 ,569 ,567 ,565 ,563 ,562 ,560 ,558 ,556 ,554 ,552 ,550 ,549 ,547 ,545 ,543 ,542 ,540 ,538 ,537 ,535 ,534 ,532 ,530 ,529 ,527 ,526 ,524 ,523 ,521 ,520 ,518 ,517 ,515 ,514 ,513 ,511 ,510 ,508 ,507 ,506 ,504 ,503 ,502 ,501 ,499 ,498 ,497 ,495 ,494 ,493 ,492 ,491 ,489 ,488 ,487 ,486 ,485 ,484 ,482 ,481 ,480 ,479 ,478 ,477 ,476 ,475 ,474 ,473 ,472 ,470 ,469 ,468 ,467 ,466 ,465 ,464 ,463 ,462 ,461 ,460 ,460 ,459 ,458 ,457 ,456 ,455 ,454 ,453 ,452 ,451 ,450 ,449 ,449 ,448 ,447 ,446 ,445 ,444 ,443 ,443 ,442 ,441 ,440 ,439 ,438 ,438 ,437 ,436 ,435 ,434 ,434 ,433 ,432 ,431 ,431 ,430 ,429 ,428 ,428 ,427 ,426 ,425 ,425 ,424 ,423 ,422 ,422 ,421 ,420 ,420 ,419 ,418 ,418 ,417 ,416 ,416 ,415 ,414 ,414 ,413 ,412 ,412 ,411 ,410 ,410 ,409 ,408 ,408 ,407 ,407 ,406 ,405 ,405 ,404 ,404 ,403 ,402 ,402 ,401 ,401 ,400 ,399 ,399 ,398 ,398 ,397 ,397 ,396 ,395 ,395 ,394 ,394 ,393 ,393 ,392 ,392 ,391 ,390 ,390 ,389 ,389 ,388 ,388 ,387 ,387 ,386 ,386 ,385 ,385 ,384 ,384 ,383 ,383 ,382 ,382 ,381 ,381 ,380 ,380 ,379 ,379 ,378 ,378 ,377 ,377 ,377 ,376 ,376 ,375 ,375 ,374 ,374 ,373 ,373 ,372 ,372 ,372 ,371 ,371 ,370 ,370 ,369 ,369 ,368 ,368 ,368 ,367 ,367 ,366 ,366 ,365 ,365 ,365 ,364 ,364 ,363 ,363 ,363 ,362 ,362 ,361 ,361 ,361 ,360 ,360 ,359 ,359 ,359 ,358 ,358 ,357 ,357 ,357 ,356 ,356 ,356 ,355 ,355 ,354 ,354 ,354 ,353 ,353 ,353 ,352 ,352 ,351 ,351 ,351 ,350 ,350 ,350 ,349 ,349 ,349 ,348 ,348 ,348 ,347 ,347 ,347 ,346 ,346 ,346 ,345 ,345 ,345 ,344 ,344 ,344 ,343 ,343 ,343 ,342 ,342 ,342 ,341 ,341 ,341 ,340 ,340 ,340 ,339 ,339 ,339 ,338 ,338 ,338 ,337 ,337 ,337 ,337 ,336 ,336 ,336 ,335 ,335 ,335 ,334 ,334 ,334 ,334 ,333 ,333 ,333 ,332 ,332 ,332 ,332 ,331 ,331 ,331 ,330 ,330 ,330 ,330 ,329 ,329 ,329 ,328 ,328 ,328 ,328 ,327 ,327 ,327 ,326 ,326 ,326 ,326 ,325 ,325 ,325 ,325 ,324 ,324 ,324 ,324 ,323 ,323 ,323 ,323 ,322 ,322 ,322 ,321 ,321 ,321 ,321 ,320 ,320 ,320 ,320 ,319 ,319 ,319 ,319 ,318 ,318 ,318 ,318 ,317 ,317 ,317 ,317 ,317 ,316 ,316 ,316 ,316 ,315 ,315 ,315 ,315 ,314 ,314 ,314 ,314 ,313 ,313 ,313 ,313 ,313 ,312 ,312 ,312 ,312 ,311 ,311 ,311 ,311 ,311 ,310 ,310 ,310 ,310 ,309 ,309 ,309 ,309 ,309 ,308 ,308 ,308 ,308 ,307 ,307 ,307 ,307 ,307 ,306 ,306 ,306 ,306 ,306 ,305 ,305 ,305 ,305 ,305 ,304 ,304 ,304 ,304 ,303 ,303 ,303 ,303 ,303 ,302 ,302 ,302 ,302 ,302 ,301 ,301 ,301 ,301 ,301 ,300 ,300 ,300 ,300 ,300 ,300 ,299 ,299 ,299 ,299 ,299 ,298 ,298 ,298 ,298 ,298 ,297 ,297 ,297 ,297 ,297 ,297 ,296 ,296 ,296 ,296 ,296 ,295 ,295 ,295 ,295 ,295 ,295 ,294 ,294 ,294 ,294 ,294 ,293 ,293 ,293 ,293 ,293 ,293 ,292 ,292 ,292 ,292 ,292 ,292 ,291 ,291 ,291 ,291 ,291 ,290 ,290 ,290 ,290 ,290 ,290 ,289 ,289 ,289 ,289 ,289 ,289 ,288 ,288 ,288 ,288 ,288 ,288 ,288 ,287 ,287 ,287 ,287 ,287 ,287 ,286 ,286 ,286 ,286 ,286 ,286 ,285 ,285 ,285 ,285 ,285 ,285, 0, 3824141cc406Sopenharmony_ci ACC_CURVE,CRV_SMEARING , 4000, 3877, 3377, 2777, 2127, 1724, 1449, 1250, 0, 3825141cc406Sopenharmony_ci DEC_CURVE,CRV_NORMALSCAN, 479 ,500 ,547 ,607 ,682 ,766 ,865 ,950 ,1040 ,1200 ,1369 ,1580 ,1810 ,2087 ,2500 ,3048 ,3877 ,4818 ,5822 ,6896, 0, 3826141cc406Sopenharmony_ci DEC_CURVE,CRV_SMEARING , 1250, 1449, 1724, 2127, 2777, 3377, 3877, 4000, 0, 3827141cc406Sopenharmony_ci DEC_CURVE,CRV_BUFFERFULL, 479 ,500 ,547 ,607 ,682 ,766 ,865 ,950 ,1040 ,1200 ,1369 ,1580 ,1810 ,2087 ,2500 ,3048 ,3877 ,4818 ,5822 ,6896, 0, 3828141cc406Sopenharmony_ci -1 3829141cc406Sopenharmony_ci }; 3830141cc406Sopenharmony_ci 3831141cc406Sopenharmony_ci rst = (SANE_Int *)malloc(sizeof(steps)); 3832141cc406Sopenharmony_ci if (rst != NULL) 3833141cc406Sopenharmony_ci memcpy(rst, &steps, sizeof(steps)); 3834141cc406Sopenharmony_ci 3835141cc406Sopenharmony_ci return rst; 3836141cc406Sopenharmony_ci} 3837141cc406Sopenharmony_ci 3838141cc406Sopenharmony_cistatic SANE_Int *hp4370_motor() 3839141cc406Sopenharmony_ci{ 3840141cc406Sopenharmony_ci SANE_Int *rst = NULL; 3841141cc406Sopenharmony_ci SANE_Int steps[] = 3842141cc406Sopenharmony_ci { 3843141cc406Sopenharmony_ci /* motorcurve 1 */ 3844141cc406Sopenharmony_ci 1, 1, 1, 0, /* mri, msi, skiplinecount, motorbackstep */ 3845141cc406Sopenharmony_ci ACC_CURVE,CRV_NORMALSCAN, 2000, 1984, 1968, 1953, 1937, 1921, 1906, 1890, 1874, 1859, 1843, 1827, 1812, 1796, 1781, 1765, 1749, 1734, 1715, 1700, 1684, 1669, 1653, 1637, 1622, 1606, 1590, 1572, 1556, 1541, 1525, 1510, 1494, 1478, 1463, 1447, 1431, 1416, 1400, 1384, 1366, 1351, 1335, 1319, 1304, 1288, 1272, 1257, 1241, 1225, 1210, 1194, 1179, 1160, 1145, 1129, 1113, 1098, 1082, 1066, 1051, 1035, 1017, 1001, 986, 970, 954, 939, 923, 907, 892, 876, 861, 845, 829, 814, 798, 782, 767, 749, 0, 3846141cc406Sopenharmony_ci ACC_CURVE,CRV_PARKHOME , 4705, 2913, 2253, 1894, 1662, 1498, 1374, 1276, 1196, 1129, 1073, 1024, 981, 944, 910, 880, 852, 827, 804, 783, 764, 746, 729, 713, 699, 685, 672, 659, 648, 637, 626, 616, 607, 598, 589, 581, 573, 565, 558, 551, 544, 538, 532, 526, 520, 514, 509, 503, 500, 0, 3847141cc406Sopenharmony_ci ACC_CURVE,CRV_SMEARING , 200, 12, 14, 16, 0, 3848141cc406Sopenharmony_ci DEC_CURVE,CRV_NORMALSCAN, 749, 1166, 1583, 2000, 0, 3849141cc406Sopenharmony_ci DEC_CURVE,CRV_PARKHOME , 500, 503, 509, 514, 520, 526, 532, 538, 544, 551, 558, 565, 573, 581, 589, 598, 607, 616, 626, 637, 648, 659, 672, 685, 699, 713, 729, 746, 764, 783, 804, 827, 852, 880, 910, 944, 981, 1024, 1073, 1129, 1196, 1276, 1374, 1498, 1662, 1894, 2253, 2913, 4705, 0, 3850141cc406Sopenharmony_ci DEC_CURVE,CRV_SMEARING , 300, 234, 167, 100, 0, 3851141cc406Sopenharmony_ci DEC_CURVE,CRV_BUFFERFULL, 1100, 867, 633, 400, 0, 3852141cc406Sopenharmony_ci -2, 3853141cc406Sopenharmony_ci 3854141cc406Sopenharmony_ci /* motorcurve 2 */ 3855141cc406Sopenharmony_ci 1, 1, 1, 0, /* mri, msi, skiplinecount, motorbackstep */ 3856141cc406Sopenharmony_ci ACC_CURVE,CRV_NORMALSCAN, 4705, 2664, 2061, 1732, 1521, 1370, 1257, 1167, 1094, 1033, 982, 937, 898, 864, 833, 805, 780, 757, 736, 717, 699, 683, 667, 653, 640, 627, 615, 604, 593, 583, 574, 564, 556, 547, 540, 532, 525, 518, 511, 505, 499, 493, 487, 481, 476, 471, 466, 461, 456, 452, 447, 443, 439, 435, 431, 427, 424, 420, 417, 413, 410, 407, 403, 400, 397, 394, 391, 389, 386, 383, 381, 378, 375, 373, 371, 368, 366, 364, 361, 359, 357, 355, 353, 351, 349, 347, 345, 343, 341, 339, 338, 336, 334, 332, 331, 329, 327, 326, 324, 323, 321, 320, 318, 317, 315, 314, 312, 311, 310, 308, 307, 306, 304, 303, 302, 301, 299, 298, 297, 296, 295, 293, 292, 291, 290, 289, 288, 287, 286, 285, 284, 283, 282, 281, 280, 279, 278, 277, 276, 275, 274, 273, 272, 271, 270, 270, 269, 268, 267, 266, 265, 264, 264, 263, 262, 261, 260, 260, 259, 258, 257, 257, 256, 255, 255, 254, 253, 252, 252, 251, 250, 250, 249, 248, 248, 247, 246, 246, 245, 244, 244, 243, 242, 242, 241, 241, 240, 239, 239, 238, 238, 237, 237, 236, 235, 235, 234, 234, 233, 233, 232, 232, 231, 231, 230, 230, 229, 229, 228, 227, 227, 227, 226, 226, 225, 225, 224, 224, 223, 223, 222, 222, 221, 221, 220, 220, 219, 219, 219, 218, 218, 217, 217, 216, 216, 216, 215, 215, 214, 214, 214, 213, 213, 212, 212, 212, 211, 211, 210, 210, 210, 209, 209, 208, 208, 208, 207, 207, 207, 206, 206, 206, 205, 205, 204, 204, 204, 203, 203, 203, 202, 202, 202, 201, 201, 201, 200, 200, 200, 199, 199, 199, 198, 198, 198, 197, 197, 197, 197, 196, 196, 196, 195, 195, 195, 194, 194, 194, 194, 193, 193, 193, 192, 192, 192, 192, 191, 191, 191, 190, 190, 190, 190, 189, 189, 189, 188, 188, 188, 188, 187, 187, 187, 187, 186, 186, 186, 186, 185, 185, 185, 185, 184, 184, 184, 184, 183, 183, 183, 183, 182, 182, 182, 182, 181, 181, 181, 181, 181, 180, 180, 180, 180, 179, 179, 179, 179, 178, 178, 178, 178, 178, 177, 177, 177, 177, 177, 176, 176, 176, 176, 175, 175, 175, 175, 175, 174, 174, 174, 174, 174, 173, 173, 173, 173, 173, 172, 172, 172, 172, 172, 171, 171, 171, 0, 3857141cc406Sopenharmony_ci ACC_CURVE,CRV_PARKHOME , 4705, 2913, 2253, 1894, 1662, 1498, 1374, 1276, 1196, 1129, 1073, 1024, 981, 944, 910, 880, 852, 827, 804, 783, 764, 746, 729, 713, 699, 685, 672, 659, 648, 637, 626, 616, 607, 598, 589, 581, 573, 565, 558, 551, 544, 538, 532, 526, 520, 514, 509, 503, 500, 0, 3858141cc406Sopenharmony_ci ACC_CURVE,CRV_SMEARING , 200, 12, 14, 16, 0, 3859141cc406Sopenharmony_ci DEC_CURVE,CRV_NORMALSCAN, 171, 172, 172, 173, 174, 174, 175, 176, 176, 177, 178, 178, 179, 180, 181, 181, 182, 183, 184, 184, 185, 186, 187, 188, 189, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 207, 208, 209, 210, 211, 213, 214, 215, 217, 218, 219, 221, 222, 224, 225, 227, 228, 230, 232, 233, 235, 237, 239, 241, 243, 245, 247, 249, 251, 253, 255, 258, 260, 262, 265, 268, 270, 273, 276, 279, 282, 285, 289, 292, 296, 299, 303, 307, 311, 316, 320, 325, 330, 335, 341, 347, 353, 359, 366, 373, 381, 390, 398, 408, 418, 429, 441, 455, 469, 485, 503, 523, 545, 571, 601, 636, 678, 730, 796, 883, 1005, 1195, 1544, 4705, 0, 3860141cc406Sopenharmony_ci DEC_CURVE,CRV_PARKHOME , 500, 503, 509, 514, 520, 526, 532, 538, 544, 551, 558, 565, 573, 581, 589, 598, 607, 616, 626, 637, 648, 659, 672, 685, 699, 713, 729, 746, 764, 783, 804, 827, 852, 880, 910, 944, 981, 1024, 1073, 1129, 1196, 1276, 1374, 1498, 1662, 1894, 2253, 2913, 4705, 0, 3861141cc406Sopenharmony_ci DEC_CURVE,CRV_SMEARING , 300, 234, 167, 100, 0, 3862141cc406Sopenharmony_ci DEC_CURVE,CRV_BUFFERFULL, 1100, 867, 633, 400, 0, 3863141cc406Sopenharmony_ci -2, 3864141cc406Sopenharmony_ci 3865141cc406Sopenharmony_ci /* motorcurve 3 */ 3866141cc406Sopenharmony_ci 1, 1, 1, 0, /* mri, msi, skiplinecount, motorbackstep */ 3867141cc406Sopenharmony_ci ACC_CURVE,CRV_NORMALSCAN, 5360, 3655, 2855, 2422, 2142, 1944, 1795, 1678, 1582, 1503, 1434, 1374, 0, 3868141cc406Sopenharmony_ci ACC_CURVE,CRV_PARKHOME , 5360, 3362, 2628, 2229, 1973, 1791, 1654, 1547, 1458, 1384, 1319, 1264, 1214, 1170, 1131, 1096, 1063, 1034, 1006, 981, 958, 937, 916, 897, 880, 863, 847, 832, 818, 805, 792, 780, 769, 758, 747, 737, 727, 718, 709, 700, 692, 684, 677, 669, 662, 655, 648, 642, 636, 629, 624, 618, 612, 607, 602, 596, 591, 587, 582, 577, 573, 568, 564, 560, 556, 552, 548, 544, 540, 537, 533, 530, 526, 523, 520, 516, 513, 510, 507, 504, 501, 498, 496, 493, 490, 488, 485, 482, 480, 477, 475, 472, 470, 468, 466, 463, 461, 459, 457, 455, 453, 450, 448, 446, 444, 443, 441, 439, 437, 435, 433, 431, 430, 428, 426, 425, 423, 421, 420, 418, 416, 415, 413, 412, 410, 409, 407, 406, 405, 403, 402, 400, 399, 398, 396, 395, 394, 392, 391, 390, 389, 387, 386, 385, 384, 382, 381, 380, 379, 378, 377, 376, 374, 373, 372, 371, 370, 369, 368, 367, 366, 365, 364, 363, 362, 361, 360, 359, 358, 357, 356, 355, 354, 353, 353, 352, 351, 350, 349, 348, 0, 3869141cc406Sopenharmony_ci ACC_CURVE,CRV_SMEARING , 5360, 3362, 2628, 2229, 1973, 1791, 1654, 1547, 0, 3870141cc406Sopenharmony_ci DEC_CURVE,CRV_NORMALSCAN, 1374, 1434, 1503, 1582, 1678, 1795, 1944, 2142, 2422, 2855, 3655, 5360, 0, 3871141cc406Sopenharmony_ci DEC_CURVE,CRV_PARKHOME , 348, 351, 353, 356, 359, 362, 365, 368, 371, 374, 378, 381, 385, 389, 392, 396, 400, 405, 409, 413, 418, 423, 428, 433, 439, 444, 450, 457, 463, 470, 477, 485, 493, 501, 510, 520, 530, 540, 552, 564, 577, 591, 607, 624, 642, 662, 684, 709, 737, 769, 805, 847, 897, 958, 1034, 1131, 1264, 1458, 1791, 2628, 5360, 0, 3872141cc406Sopenharmony_ci DEC_CURVE,CRV_SMEARING , 1547, 1654, 1791, 1973, 2229, 2628, 3362, 5360, 0, 3873141cc406Sopenharmony_ci DEC_CURVE,CRV_BUFFERFULL, 1374, 1434, 1503, 1582, 1678, 1795, 1944, 2142, 2422, 2855, 3655, 5360, 0, 3874141cc406Sopenharmony_ci -2, 3875141cc406Sopenharmony_ci 3876141cc406Sopenharmony_ci /* motorcurve 4 */ 3877141cc406Sopenharmony_ci 1, 1, 1, 0, /* mri, msi, skiplinecount, motorbackstep */ 3878141cc406Sopenharmony_ci ACC_CURVE,CRV_NORMALSCAN, 4705, 2664, 2061, 1732, 1521, 1370, 1257, 1167, 1094, 1033, 982, 937, 898, 864, 833, 805, 780, 757, 736, 717, 699, 683, 667, 653, 640, 627, 615, 604, 593, 583, 574, 564, 556, 547, 540, 532, 525, 518, 511, 505, 499, 493, 487, 481, 476, 471, 466, 461, 456, 452, 447, 443, 439, 435, 431, 427, 424, 420, 417, 413, 410, 407, 403, 400, 397, 394, 391, 389, 386, 383, 381, 378, 375, 373, 371, 368, 366, 364, 361, 359, 357, 355, 353, 351, 349, 347, 345, 343, 341, 339, 338, 336, 334, 332, 331, 329, 327, 326, 324, 323, 321, 320, 318, 317, 315, 314, 312, 311, 310, 308, 307, 306, 304, 303, 302, 301, 299, 298, 297, 296, 295, 293, 292, 291, 290, 289, 288, 287, 286, 285, 284, 283, 282, 281, 280, 279, 278, 277, 276, 275, 274, 273, 272, 271, 270, 270, 269, 268, 267, 266, 265, 264, 264, 263, 262, 261, 260, 260, 259, 258, 257, 257, 256, 255, 255, 254, 253, 252, 252, 251, 250, 250, 249, 248, 248, 247, 246, 246, 245, 244, 244, 243, 242, 242, 241, 241, 240, 239, 239, 238, 238, 237, 237, 236, 235, 235, 234, 234, 233, 233, 232, 232, 231, 231, 230, 230, 229, 229, 228, 227, 227, 227, 226, 226, 225, 225, 224, 224, 223, 223, 222, 222, 221, 221, 220, 220, 219, 219, 219, 218, 218, 217, 217, 216, 216, 216, 215, 215, 214, 214, 214, 213, 213, 212, 212, 212, 211, 211, 210, 210, 210, 209, 209, 208, 208, 208, 207, 207, 207, 206, 206, 206, 205, 205, 204, 204, 204, 203, 203, 203, 202, 202, 202, 201, 201, 201, 200, 200, 200, 199, 199, 199, 198, 198, 198, 197, 197, 197, 197, 196, 196, 196, 195, 195, 195, 194, 194, 194, 194, 193, 193, 193, 192, 192, 192, 192, 191, 191, 191, 190, 190, 190, 190, 189, 189, 189, 188, 188, 188, 188, 187, 187, 187, 187, 186, 186, 186, 186, 185, 185, 185, 185, 184, 184, 184, 184, 183, 183, 183, 183, 182, 182, 182, 182, 181, 181, 181, 181, 181, 180, 180, 180, 180, 179, 179, 179, 179, 178, 178, 178, 178, 178, 177, 177, 177, 177, 177, 176, 176, 176, 176, 175, 175, 175, 175, 175, 174, 174, 174, 174, 174, 173, 173, 173, 173, 173, 172, 172, 172, 172, 172, 171, 171, 171, 0, 3879141cc406Sopenharmony_ci ACC_CURVE,CRV_PARKHOME , 4705, 2888, 2234, 1878, 1648, 1485, 1362, 1265, 1186, 1120, 1064, 1016, 973, 936, 903, 873, 845, 821, 798, 777, 758, 740, 723, 708, 693, 679, 666, 654, 643, 632, 621, 612, 602, 593, 585, 576, 569, 561, 554, 547, 540, 534, 528, 522, 516, 510, 505, 499, 494, 490, 485, 480, 476, 471, 467, 463, 459, 455, 451, 448, 444, 440, 437, 434, 430, 427, 424, 421, 418, 415, 412, 409, 407, 404, 401, 399, 396, 394, 391, 389, 387, 384, 382, 380, 378, 376, 374, 371, 369, 367, 366, 364, 362, 360, 358, 356, 354, 353, 351, 349, 348, 346, 344, 343, 341, 340, 338, 337, 335, 334, 332, 331, 329, 328, 327, 325, 324, 323, 321, 320, 319, 318, 316, 315, 314, 313, 312, 311, 309, 308, 307, 306, 305, 304, 303, 302, 301, 300, 299, 298, 297, 296, 295, 294, 293, 292, 291, 290, 289, 288, 287, 286, 285, 285, 284, 283, 282, 281, 280, 279, 279, 278, 277, 276, 275, 275, 274, 273, 272, 272, 271, 270, 269, 269, 268, 267, 267, 266, 265, 264, 264, 263, 262, 262, 261, 260, 260, 259, 259, 258, 257, 257, 256, 255, 255, 254, 254, 253, 252, 252, 251, 251, 250, 249, 249, 248, 248, 247, 247, 246, 246, 245, 245, 244, 243, 243, 242, 242, 241, 241, 240, 240, 239, 239, 238, 238, 237, 237, 237, 236, 236, 235, 235, 234, 234, 233, 233, 232, 232, 231, 231, 231, 230, 230, 229, 229, 228, 228, 228, 227, 227, 226, 226, 225, 225, 225, 224, 224, 223, 223, 223, 222, 222, 222, 221, 221, 220, 220, 220, 219, 219, 219, 218, 218, 217, 217, 217, 216, 216, 216, 215, 215, 215, 214, 214, 214, 213, 213, 213, 212, 212, 212, 211, 211, 211, 210, 210, 210, 209, 209, 209, 208, 208, 208, 207, 207, 207, 207, 206, 206, 206, 205, 205, 205, 204, 204, 204, 204, 203, 203, 203, 202, 202, 202, 202, 201, 201, 201, 200, 200, 200, 200, 199, 199, 199, 199, 198, 198, 198, 198, 197, 197, 197, 196, 196, 196, 196, 195, 195, 195, 195, 194, 194, 194, 194, 193, 193, 193, 193, 192, 192, 192, 192, 192, 191, 191, 191, 191, 190, 190, 190, 190, 189, 189, 189, 189, 189, 188, 188, 188, 188, 187, 187, 187, 187, 187, 186, 186, 186, 186, 186, 185, 185, 185, 185, 184, 184, 184, 184, 184, 183, 183, 183, 183, 183, 182, 182, 182, 182, 182, 181, 181, 181, 181, 181, 180, 180, 180, 180, 180, 180, 179, 179, 179, 179, 179, 178, 178, 178, 178, 178, 177, 177, 177, 177, 177, 177, 176, 176, 176, 176, 176, 176, 175, 175, 175, 175, 175, 174, 174, 174, 174, 174, 174, 173, 173, 173, 173, 173, 173, 172, 172, 172, 172, 172, 172, 171, 171, 171, 171, 0, 3880141cc406Sopenharmony_ci ACC_CURVE,CRV_SMEARING , 4705, 3056, 2724, 2497, 1498, 1498, 1374, 1276, 1196, 1130, 1073, 1025, 982, 944, 911, 880, 853, 828, 805, 784, 764, 746, 730, 714, 699, 685, 675, 0, 3881141cc406Sopenharmony_ci DEC_CURVE,CRV_NORMALSCAN, 171, 172, 172, 173, 174, 174, 175, 176, 176, 177, 178, 178, 179, 180, 181, 181, 182, 183, 184, 184, 185, 186, 187, 188, 189, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 207, 208, 209, 210, 211, 213, 214, 215, 217, 218, 219, 221, 222, 224, 225, 227, 228, 230, 232, 233, 235, 237, 239, 241, 243, 245, 247, 249, 251, 253, 255, 258, 260, 262, 265, 268, 270, 273, 276, 279, 282, 285, 289, 292, 296, 299, 303, 307, 311, 316, 320, 325, 330, 335, 341, 347, 353, 359, 366, 373, 381, 390, 398, 408, 418, 429, 441, 455, 469, 485, 503, 523, 545, 571, 601, 636, 678, 730, 796, 883, 1005, 1195, 1544, 4705, 0, 3882141cc406Sopenharmony_ci DEC_CURVE,CRV_PARKHOME , 171, 172, 172, 173, 173, 174, 174, 175, 175, 176, 176, 177, 177, 178, 179, 179, 180, 180, 181, 182, 182, 183, 183, 184, 185, 185, 186, 187, 187, 188, 189, 189, 190, 191, 192, 192, 193, 194, 195, 195, 196, 197, 198, 199, 199, 200, 201, 202, 203, 204, 205, 206, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 217, 218, 219, 220, 221, 222, 223, 225, 226, 227, 228, 230, 231, 232, 234, 235, 237, 238, 240, 241, 243, 244, 246, 247, 249, 251, 253, 254, 256, 258, 260, 262, 264, 266, 268, 271, 273, 275, 278, 280, 282, 285, 288, 290, 293, 296, 299, 302, 305, 309, 312, 316, 319, 323, 327, 331, 336, 340, 345, 350, 355, 360, 365, 371, 377, 384, 391, 398, 406, 414, 422, 432, 441, 452, 463, 476, 489, 504, 520, 538, 558, 580, 605, 633, 667, 706, 752, 810, 883, 979, 1116, 1326, 1714, 4705, 0, 3883141cc406Sopenharmony_ci DEC_CURVE,CRV_SMEARING , 675, 685, 699, 714, 730, 746, 764, 784, 805, 828, 853, 880, 911, 944, 982, 1025, 1073, 1130, 1196, 1276, 1374, 1498, 1498, 2497, 2724, 3056, 4705, 0, 3884141cc406Sopenharmony_ci DEC_CURVE,CRV_BUFFERFULL, 171, 172, 172, 173, 174, 174, 175, 176, 176, 177, 178, 178, 179, 180, 181, 181, 182, 183, 184, 184, 185, 186, 187, 188, 189, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 207, 208, 209, 210, 211, 213, 214, 215, 217, 218, 219, 221, 222, 224, 225, 227, 228, 230, 232, 233, 235, 237, 239, 241, 243, 245, 247, 249, 251, 253, 255, 258, 260, 262, 265, 268, 270, 273, 276, 279, 282, 285, 289, 292, 296, 299, 303, 307, 311, 316, 320, 325, 330, 335, 341, 347, 353, 359, 366, 373, 381, 390, 398, 408, 418, 429, 441, 455, 469, 485, 503, 523, 545, 571, 601, 636, 678, 730, 796, 883, 1005, 1195, 1544, 4705, 0, 3885141cc406Sopenharmony_ci -2, 3886141cc406Sopenharmony_ci 3887141cc406Sopenharmony_ci /* motorcurve 5 */ 3888141cc406Sopenharmony_ci 1, 1, 1, 0, /* mri, msi, skiplinecount, motorbackstep */ 3889141cc406Sopenharmony_ci ACC_CURVE,CRV_NORMALSCAN, 3763, 3763, 3763, 3763, 3763, 3763, 2444, 2178, 1997, 1198, 1198, 1098, 1020, 956, 903, 858, 819, 785, 754, 727, 703, 681, 662, 644, 626, 610, 596, 582, 571, 558, 547, 537, 527, 518, 509, 500, 492, 485, 478, 471, 464, 458, 452, 446, 440, 435, 430, 425, 420, 415, 410, 407, 402, 398, 394, 391, 386, 383, 380, 376, 373, 369, 366, 364, 360, 357, 355, 352, 349, 347, 344, 341, 338, 337, 334, 332, 329, 328, 325, 323, 321, 319, 317, 315, 313, 311, 310, 308, 306, 304, 302, 301, 299, 297, 295, 294, 293, 291, 290, 288, 286, 285, 284, 283, 281, 280, 278, 277, 275, 275, 274, 272, 271, 270, 268, 267, 266, 265, 264, 263, 262, 261, 259, 258, 257, 257, 256, 255, 254, 253, 251, 250, 249, 248, 248, 247, 246, 245, 244, 243, 243, 242, 241, 240, 239, 239, 238, 237, 236, 235, 235, 234, 233, 232, 231, 230, 230, 230, 229, 228, 228, 227, 226, 225, 225,224, 223, 222, 222, 221, 221, 221, 220, 219, 219, 218, 217, 217, 216, 215, 215, 214, 213, 213, 212, 212, 212, 211, 211, 210, 209, 209, 208, 208, 207, 207, 206, 206, 205, 204, 204, 203, 203, 203, 203, 202, 202, 201, 201, 200, 200, 199, 199, 198, 198, 197, 197, 196, 196, 195, 195, 194, 194, 194, 194, 194, 193, 193, 192, 192, 191, 191, 190, 190, 190, 189, 189, 188, 188, 188, 187, 187, 186, 186, 185, 185, 185, 185, 185, 185, 184, 184, 183, 183, 183, 182, 182, 182, 181, 181, 180, 180, 180, 179, 179, 179, 178, 178, 178, 177, 177, 177, 176, 176, 176, 176, 176, 176, 175, 175, 175, 174, 174, 174, 173, 173, 173, 172, 172, 172, 171, 171, 171, 171, 170, 170, 170, 169, 169, 169, 169, 168, 168, 168, 167, 167, 167, 167, 167, 167, 167, 166, 166, 166, 166, 165, 165, 165, 165, 164, 164, 164, 163, 163, 163, 163, 162, 162, 162, 162, 161, 161, 161, 161, 160, 160, 160, 160, 159, 159, 159, 159, 159, 158, 158, 158, 158, 158, 158, 158, 158, 157, 157, 157, 157, 157, 156, 156, 156, 156, 155, 155, 155, 155, 155, 154, 154, 154, 154, 154, 153, 153, 153, 153, 152, 152, 152, 152, 152, 151, 151, 151, 151, 151, 150, 150, 150, 150, 150, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 148, 148, 148, 148, 148, 147, 147, 147, 147, 147, 147, 146, 146, 146, 146, 146, 145, 145, 145, 145, 145, 145, 144, 144, 144, 144, 144, 144, 143, 143, 143, 143, 143, 143, 142, 142, 142, 142, 142, 142, 141, 141, 141, 141, 141, 141, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 139, 139, 139, 139, 139, 139, 139, 138, 138, 138, 138, 138, 138, 138, 137, 137, 137, 137, 137, 137, 137, 136, 136, 136, 136, 136, 136, 136, 135, 135, 135, 135, 135, 135, 135, 134, 134, 134, 134, 134, 134, 134, 134, 133, 133, 133, 133, 133, 133, 133, 133, 132, 132, 132, 132, 132, 132, 132, 132, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 130, 130, 130, 130, 130, 130, 130, 130, 129, 129, 129, 129, 129, 129, 129, 129, 129, 128, 128, 128, 128, 128, 128, 128, 128, 128, 127, 127, 127, 127, 127, 127, 127, 127, 127, 126, 126, 126, 126, 126, 126, 126, 126, 126, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 101, 101, 101, 101, 101, 101, 101, 101, 101,101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 0, 3890141cc406Sopenharmony_ci ACC_CURVE,CRV_PARKHOME , 3763, 2330, 1803, 1515, 1330, 1198, 1099, 1021, 957, 904, 859, 819, 785, 755, 728, 704, 682, 662, 644, 626, 611, 597, 583, 571, 559, 548, 537, 527, 518, 509, 501, 493, 485, 478, 472, 464, 458, 453, 446, 441, 436, 430, 425, 420, 416, 411, 407, 402, 399, 394, 391, 387, 383, 380, 376, 374, 370, 366, 364, 361, 358, 355, 352, 349, 347, 344, 342, 339, 337, 335, 332, 330, 328, 326, 323, 321, 320, 318, 315, 313, 311, 310, 308, 306, 304, 302, 301, 300, 298, 296, 294, 293, 292, 290, 289, 287, 285, 284, 283, 282, 280, 279, 277, 276, 275, 274, 273, 271, 270, 269, 267, 266, 266, 265, 263, 262, 261, 260, 259, 258, 257, 256, 255, 254, 253, 252, 251, 250, 249, 248, 248, 247, 246, 245, 244, 243, 242, 241, 240, 239, 239, 239, 238, 237, 236, 235, 234, 233, 233, 232, 231, 230, 230, 230, 229, 228, 227, 227, 226, 225, 224, 224, 223, 222, 221, 221, 221, 220, 220, 219, 218, 218, 217, 216, 216, 215, 214, 214, 213, 213, 212, 212, 212, 211, 211, 210, 209, 209, 208, 208, 207, 207, 206, 205, 205, 204, 204, 203, 203, 203, 203, 202, 202, 201, 201, 200, 200, 199, 199, 198, 198, 197, 197, 196, 196, 195, 195, 194, 194, 194, 194, 194, 193, 193, 192, 192, 191, 191, 191, 190, 190, 189, 189, 188, 188, 188, 187, 187, 186, 186, 186, 185, 185, 185, 185, 185, 184, 184, 184, 183, 183, 182, 182, 182, 181, 181, 181, 180, 180, 180, 179, 179, 178, 178, 178, 177, 177, 177, 176, 176, 176, 176, 176, 176, 175, 175, 175, 174, 174, 174, 174, 173, 173, 173, 172, 172, 172, 171, 171, 171, 170, 170, 170, 170, 169, 169, 169, 168, 168, 168, 168, 167, 167, 167, 167, 167, 167, 167, 166, 166, 166, 166, 165, 165, 165, 165, 164, 164, 164, 163, 163, 163, 163, 162, 162, 162, 162, 161, 161, 161, 161, 160, 160, 160, 160, 160, 159, 159, 159, 159, 158, 158, 158, 158, 158, 158, 158, 158, 157, 157, 157, 157, 157, 156, 156, 156, 156, 155, 155, 155, 155, 155, 154, 154, 154, 154, 154, 153, 153, 153, 153, 153, 152, 152, 152, 152, 152, 151, 151, 151, 151, 151, 150, 150, 150, 150, 150, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 148, 148, 148, 148, 148, 148, 147, 147, 147, 147, 147, 147, 146, 146, 146, 146, 146, 145, 145, 145, 145, 145, 145, 144, 144, 144, 144, 144, 144, 143, 143, 143, 143, 143, 143, 142, 142, 142, 142, 142, 142, 141, 141, 141, 141, 141, 141, 141, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 139, 139, 139, 139, 139, 139, 139, 138, 0, 3891141cc406Sopenharmony_ci ACC_CURVE,CRV_SMEARING , 3763, 2330, 1803, 1515, 1330, 1198, 1099, 1021, 957, 904, 859, 819, 785, 755, 728, 704, 682, 662, 644, 626, 611, 597, 583, 571, 559, 548, 537, 527, 518, 509, 501, 493, 485, 478, 472, 464, 458, 453, 446, 441, 436, 430, 425, 420, 416, 411, 407, 402, 399, 394, 391, 387, 383, 380, 376, 374, 370, 366, 364, 361, 358, 355, 352, 349, 347, 344, 342, 339, 337, 335, 332, 330, 328, 326, 323, 321, 320, 318, 315, 313, 311, 310, 308, 306, 304, 302, 301, 300, 298, 296, 294, 293, 292, 290, 289, 287, 285, 284, 283, 282, 280, 279, 277, 276, 275, 274, 273, 271, 270, 269, 267, 266, 266, 265, 263, 262, 261, 260, 259, 258, 257, 256, 255, 254, 253, 252, 251, 250, 249, 248, 248, 247, 246, 245, 244, 243, 242, 241, 240, 239, 239, 239, 238, 237, 236, 235, 234, 233, 233, 232, 231, 230, 230, 230, 229, 228, 227, 227, 226, 225, 224, 224, 223, 222, 221, 221, 221, 220, 220, 219, 218, 218, 217, 216, 216, 215, 214, 214, 213, 213, 212, 212, 212, 211, 211, 210, 209, 209, 208, 208, 207, 207, 206, 205, 205, 204, 204, 203, 203, 203, 203, 202, 202, 201, 201, 200, 200, 199, 199, 198, 198, 197, 197, 196, 196, 195, 195, 194, 194, 194, 194, 194, 193, 193, 192, 192, 191, 191, 191, 190, 190, 189, 189, 188, 188, 188, 187, 187, 186, 186, 186, 185, 185, 185, 185, 185, 184, 184, 184, 183, 183, 182, 182, 182, 181, 181, 181, 180, 180, 180, 179, 179, 178, 178, 178, 177, 177, 177, 176, 176, 176, 176, 176, 176, 175, 175, 175, 174, 174, 174, 174, 173, 173, 173, 172, 172, 172, 171, 171, 171, 170, 170, 170, 170, 169, 169, 169, 168, 168, 168, 168, 167, 167, 167, 167, 167, 167, 167, 166, 166, 166, 166, 165, 165, 165, 165, 164, 164, 164, 163, 163, 163, 163, 162, 162, 162, 162, 161, 161, 161, 161, 160, 160, 160, 160, 160, 159, 159, 159, 159, 158, 158, 158, 158, 158, 158, 158, 158, 157, 157, 157, 157, 157, 156, 156, 156, 156, 155, 155, 155, 155, 155, 154, 154, 154, 154, 154, 153, 153, 153, 153, 153, 152, 152, 152, 152, 152, 151, 151, 151, 151, 151, 150, 150, 150, 150, 150, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 148, 148, 148, 148, 148, 148, 147, 147, 147, 147, 147, 147, 146, 146, 146, 146, 146, 145, 145, 145, 145, 145, 145, 144, 144, 144, 144, 144, 144, 143, 143, 143, 143, 143, 143, 142, 142, 142, 142, 142, 142, 141, 141, 141, 141, 141, 141, 141, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 139, 139, 139, 139, 139, 139, 139, 138, 0, 3892141cc406Sopenharmony_ci DEC_CURVE,CRV_NORMALSCAN, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 278, 280, 282, 284, 286, 288, 290, 292, 294, 296, 298, 300, 302, 304, 306, 308, 310, 312, 314, 316, 318, 320, 322, 324, 326, 328, 330, 332, 334, 336, 338, 340, 342, 345, 348, 351, 354, 357, 360, 363, 366, 369, 372, 375, 378, 381, 384, 387, 391, 395, 399, 403, 407, 411, 415, 419, 422, 425, 429, 433, 437, 441, 445, 449, 453, 458, 463, 468, 473, 478, 483, 489, 495, 501, 507, 514, 521, 528, 536, 544, 553, 562, 572, 582, 593, 604, 616, 629, 643, 658, 674, 692, 711, 732, 755, 781, 810, 843, 880, 923, 974,1035, 1110, 1205, 1331, 1510, 1796, 2368, 3400, 4922, 0, 3893141cc406Sopenharmony_ci DEC_CURVE,CRV_PARKHOME , 138, 142, 146, 149, 153, 158, 162, 167, 171, 176, 180, 186, 193, 202, 209, 216, 223, 232, 243, 254, 266, 279, 292, 306, 320, 335, 337, 351, 367, 380, 396, 414, 437, 464, 493, 520, 549, 583, 611, 644, 675, 711, 755, 785, 819, 859, 904, 957, 1021, 1099, 1198, 1330, 1515, 1803, 2330, 3763, 0, 3894141cc406Sopenharmony_ci DEC_CURVE,CRV_SMEARING , 138, 139, 139, 139, 139, 139, 139, 139, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 141, 141, 141, 141, 141, 141, 141, 142, 142, 142, 142, 142, 142, 143, 143, 143, 143, 143, 143, 144, 144, 144, 144, 144, 144, 145, 145, 145, 145, 145, 145, 146, 146, 146, 146, 146, 147, 147, 147, 147, 147, 147, 148, 148, 148, 148, 148, 148, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 150, 150, 150, 150, 150, 151, 151, 151, 151, 151, 152, 152, 152, 152, 152, 153, 153, 153, 153, 153, 154, 154, 154, 154, 154, 155, 155, 155, 155, 155, 156, 156, 156, 156, 157, 157, 157, 157, 157, 158, 158, 158, 158, 158, 158, 158, 158, 159, 159, 159, 159, 160, 160, 160, 160, 160, 161, 161, 161, 161, 162, 162, 162, 162, 163, 163, 163, 163, 164, 164, 164, 165, 165, 165, 165, 166, 166, 166, 166, 167, 167, 167, 167, 167, 167, 167, 168, 168, 168, 168, 169, 169, 169, 170, 170, 170, 170, 171, 171, 171, 172, 172, 172, 173, 173, 173, 174, 174, 174, 174, 175, 175, 175, 176, 176, 176, 176, 176, 176, 177, 177, 177, 178, 178, 178, 179, 179, 180, 180, 180, 181, 181, 181, 182, 182, 182, 183, 183, 184, 184, 184, 185, 185, 185, 185, 185, 186, 186, 186, 187, 187, 188, 188, 188, 189, 189, 190, 190, 191, 191, 191, 192, 192, 193, 193, 194, 194, 194, 194, 194, 195, 195, 196, 196, 197, 197, 198, 198, 199, 199, 200, 200, 201, 201, 202, 202, 203, 203, 203, 203, 204, 204, 205, 205, 206, 207, 207, 208, 208, 209, 209, 210, 211, 211, 212, 212, 212, 213, 213, 214, 214, 215, 216, 216, 217, 218, 218, 219, 220, 220, 221, 221, 221, 222, 223, 224, 224, 225, 226, 227, 227, 228, 229, 230, 230, 230, 231, 232, 233, 233, 234, 235, 236, 237, 238, 239, 239, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 265, 266, 266, 267, 269, 270, 271, 273, 274, 275, 276, 277, 279, 280, 282, 283, 284, 285, 287, 289, 290, 292, 293, 294, 296, 298, 300, 301, 302, 304, 306, 308, 310, 311, 313, 315, 318, 320, 321, 323, 326, 328, 330, 332, 335, 337, 339, 342, 344, 347, 349, 352, 355, 358, 361, 364, 366, 370, 374, 376, 380, 383, 387, 391, 394, 399, 402, 407, 411, 416, 420, 425, 430, 436, 441, 446, 453, 458, 464, 472, 478, 485, 493, 501, 509, 518, 527, 537, 548, 559, 571, 583, 597, 611, 626, 644, 662, 682, 704, 728, 755, 785, 819, 859, 904, 957, 1021, 1099, 1198, 1330, 1515, 1803, 2330, 3763, 0, 3895141cc406Sopenharmony_ci DEC_CURVE,CRV_BUFFERFULL, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 94, 94, 94, 95, 95, 95, 95, 95, 96, 96, 97, 97, 98, 98, 99, 99, 100, 100, 101, 101, 102, 102, 103, 104, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 113, 115, 117, 119, 121, 122, 124, 127, 130, 132, 135, 139, 142, 146, 149, 153, 158, 162, 167, 171, 176, 180, 186, 193, 202, 209, 216, 223, 232, 243, 254, 266, 279, 292, 306, 320, 335, 337, 351, 367, 380, 396, 414, 437, 464, 493, 520, 549, 583, 611, 644, 675, 711, 755, 785, 819, 859, 904, 957, 1021, 1099, 1198, 1330, 1515, 1803, 2330, 3763, 0, 3896141cc406Sopenharmony_ci -2, 3897141cc406Sopenharmony_ci 3898141cc406Sopenharmony_ci /* motorcurve 6 */ 3899141cc406Sopenharmony_ci 1, 1, 1, 0, /* mri, msi, skiplinecount, motorbackstep */ 3900141cc406Sopenharmony_ci ACC_CURVE,CRV_NORMALSCAN, 4705, 2664, 2061, 1732, 1521, 1370, 1257, 1167, 1094, 1033, 982, 937, 898, 864, 833, 805, 780, 757, 736, 717, 699, 683, 667, 653, 640, 627, 615, 604, 593, 583, 574, 564, 556, 547, 540, 532, 525, 518, 511, 505, 499, 493, 487, 481, 476, 471, 466, 461, 456, 452, 447, 443, 439, 435, 431, 427, 424, 420, 417, 413, 410, 407, 403, 400, 397, 394, 391, 389, 386, 383, 381, 378, 375, 373, 371, 368, 366, 364, 361, 359, 357, 355, 353, 351, 349, 347, 345, 343, 341, 339, 338, 336, 334, 332, 331, 329, 327, 326, 324, 323, 321, 320, 318, 317, 315, 314, 312, 311, 310, 308, 307, 306, 304, 303, 302, 301, 299, 298, 297, 296, 295, 293, 292, 291, 290, 289, 288, 287, 286, 285, 284, 283, 282, 281, 280, 279, 278, 277, 276, 275, 274, 273, 272, 271, 270, 270, 269, 268, 267, 266, 265, 264, 264, 263, 262, 261, 260, 260, 259, 258, 257, 257, 256, 255, 255, 254, 253, 252, 252, 251, 250, 250, 249, 248, 248, 247, 246, 246, 245, 244, 244, 243, 242, 242, 241, 241, 240, 239, 239, 238, 238, 237, 237, 236, 235, 235, 234, 234, 233, 233, 232, 232, 231, 231, 230, 230, 229, 229, 228, 227, 227, 227, 226, 226, 225, 225, 224, 224, 223, 223, 222, 222, 221, 221, 220, 220, 219, 219, 219, 218, 218, 217, 217, 216, 216, 216, 215, 215, 214, 214, 214, 213, 213, 212, 212, 212, 211, 211, 210, 210, 210, 209, 209, 208, 208, 208, 207, 207, 207, 206, 206, 206, 205, 205, 204, 204, 204, 203, 203, 203, 202, 202, 202, 201, 201, 201, 200, 200, 200, 199, 199, 199, 198, 198, 198, 197, 197, 197, 197, 196, 196, 196, 195, 195, 195, 194, 194, 194, 194, 193, 193, 193, 192, 192, 192, 192, 191, 191, 191, 190, 190, 190, 190, 189, 189, 189, 188, 188, 188, 188, 187, 187, 187, 187, 186, 186, 186, 186, 185, 185, 185, 185, 184, 184, 184, 184, 183, 183, 183, 183, 182, 182, 182, 182, 181, 181, 181, 181, 181, 180, 180, 180, 180, 179, 179, 179, 179, 178, 178, 178, 178, 178, 177, 177, 177, 177, 177, 176, 176, 176, 176, 175, 175, 175, 175, 175, 174, 174, 174, 174, 174, 173, 173, 173, 173, 173, 172, 172, 172, 172, 172, 171, 171, 171, 0, 3901141cc406Sopenharmony_ci ACC_CURVE,CRV_PARKHOME , 4705, 2888, 2234, 1878, 1648, 1485, 1362, 1265, 1186, 1120, 1064, 1016, 973, 936, 903, 873, 845, 821, 798, 777, 758, 740, 723, 708, 693, 679, 666, 654, 643, 632, 621, 612, 602, 593, 585, 576, 569, 561, 554, 547, 540, 534, 528, 522, 516, 510, 505, 499, 494, 490, 485, 480, 476, 471, 467, 463, 459, 455, 451, 448, 444, 440, 437, 434, 430, 427, 424, 421, 418, 415, 412, 409, 407, 404, 401, 399, 396, 394, 391, 389, 387, 384, 382, 380, 378, 376, 374, 371, 369, 367, 366, 364, 362, 360, 358, 356, 354, 353, 351, 349, 348, 346, 344, 343, 341, 340, 338, 337, 335, 334, 332, 331, 329, 328, 327, 325, 324, 323, 321, 320, 319, 318, 316, 315, 314, 313, 312, 311, 309, 308, 307, 306, 305, 304, 303, 302, 301, 300, 299, 298, 297, 296, 295, 294, 293, 292, 291, 290, 289, 288, 287, 286, 285, 285, 284, 283, 282, 281, 280, 279, 279, 278, 277, 276, 275, 275, 274, 273, 272, 272, 271, 270, 269, 269, 268, 267, 267, 266, 265, 264, 264, 263, 262, 262, 261, 260, 260, 259, 259, 258, 257, 257, 256, 255, 255, 254, 254, 253, 252, 252, 251, 251, 250, 249, 249, 248, 248, 247, 247, 246, 246, 245, 245, 244, 243, 243, 242, 242, 241, 241, 240, 240, 239, 239, 238, 238, 237, 237, 237, 236, 236, 235, 235, 234, 234, 233, 233, 232, 232, 231, 231, 231, 230, 230, 229, 229, 228, 228, 228, 227, 227, 226, 226, 225, 225, 225, 224, 224, 223, 223, 223, 222, 222, 222, 221, 221, 220, 220, 220, 219, 219, 219, 218, 218, 217, 217, 217, 216, 216, 216, 215, 215, 215, 214, 214, 214, 213, 213, 213, 212, 212, 212, 211, 211, 211, 210, 210, 210, 209, 209, 209, 208, 208, 208, 207, 207, 207, 207, 206, 206, 206, 205, 205, 205, 204, 204, 204, 204, 203, 203, 203, 202, 202, 202, 202, 201, 201, 201, 200, 200, 200, 200, 199, 199, 199, 199, 198, 198, 198, 198, 197, 197, 197, 196, 196, 196, 196, 195, 195, 195, 195, 194, 194, 194, 194, 193, 193, 193, 193, 192, 192, 192, 192, 192, 191, 191, 191, 191, 190, 190, 190, 190, 189, 189, 189, 189, 189, 188, 188, 188, 188, 187, 187, 187, 187, 187, 186, 186, 186, 186, 186, 185, 185, 185, 185, 184, 184, 184, 184, 184, 183, 183, 183, 183, 183, 182, 182, 182, 182, 182, 181, 181, 181, 181, 181, 180, 180, 180, 180, 180, 180, 179, 179, 179, 179, 179, 178, 178, 178, 178, 178, 177, 177, 177, 177, 177, 177, 176, 176, 176, 176, 176, 176, 175, 175, 175, 175, 175, 174, 174, 174, 174, 174, 174, 173, 173, 173, 173, 173, 173, 172, 172, 172, 172, 172, 172, 171, 171, 171, 171, 0, 3902141cc406Sopenharmony_ci ACC_CURVE,CRV_SMEARING , 4705, 3056, 2724, 2497, 1498, 1498, 1374, 1276, 1196, 1130, 1073, 1025, 982, 944, 911, 880, 853, 828, 805, 784, 764, 746, 730, 714, 699, 685, 675, 0, 3903141cc406Sopenharmony_ci DEC_CURVE,CRV_NORMALSCAN, 523, 545, 571, 601, 636, 678, 730, 796, 883, 1005, 1195, 1544, 4705, 0, 3904141cc406Sopenharmony_ci DEC_CURVE,CRV_PARKHOME , 171, 172, 172, 173, 173, 174, 174, 175, 175, 176, 176, 177, 177, 178, 179, 179, 180, 180, 181, 182, 182, 183, 183, 184, 185, 185, 186, 187, 187, 188, 189, 189, 190, 191, 192, 192, 193, 194, 195, 195, 196, 197, 198, 199, 199, 200, 201, 202, 203, 204, 205, 206, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 217, 218, 219, 220, 221, 222, 223, 225, 226, 227, 228, 230, 231, 232, 234, 235, 237, 238, 240, 241, 243, 244, 246, 247, 249, 251, 253, 254, 256, 258, 260, 262, 264, 266, 268, 271, 273, 275, 278, 280, 282, 285, 288, 290, 293, 296, 299, 302, 305, 309, 312, 316, 319, 323, 327, 331, 336, 340, 345, 350, 355, 360, 365, 371, 377, 384, 391, 398, 406, 414, 422, 432, 441, 452, 463, 476, 489, 504, 520, 538, 558, 580, 605, 633, 667, 706, 752, 810, 883, 979, 1116, 1326, 1714, 4705, 0, 3905141cc406Sopenharmony_ci DEC_CURVE,CRV_SMEARING , 675, 685, 699, 714, 730, 746, 764, 784, 805, 828, 853, 880, 911, 944, 982, 1025, 1073, 1130, 1196, 1276, 1374, 1498, 1498, 2497, 2724, 3056, 4705, 0, 3906141cc406Sopenharmony_ci DEC_CURVE,CRV_BUFFERFULL, 171, 172, 172, 173, 174, 174, 175, 176, 176, 177, 178, 178, 179, 180, 181, 181, 182, 183, 184, 184, 185, 186, 187, 188, 189, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 207, 208, 209, 210, 211, 213, 214, 215, 217, 218, 219, 221, 222, 224, 225, 227, 228, 230, 232, 233, 235, 237, 239, 241, 243, 245, 247, 249, 251, 253, 255, 258, 260, 262, 265, 268, 270, 273, 276, 279, 282, 285, 289, 292, 296, 299, 303, 307, 311, 316, 320, 325, 330, 335, 341, 347, 353, 359, 366, 373, 381, 390, 398, 408, 418, 429, 441, 455, 469, 485, 503, 523, 545, 571, 601, 636, 678, 730, 796, 883, 1005, 1195, 1544, 4705, 0, 3907141cc406Sopenharmony_ci -2, 3908141cc406Sopenharmony_ci 3909141cc406Sopenharmony_ci /* motorcurve 7 */ 3910141cc406Sopenharmony_ci 1, 1, 1, 0, /* mri, msi, skiplinecount, motorbackstep */ 3911141cc406Sopenharmony_ci ACC_CURVE,CRV_NORMALSCAN, 3763, 3763, 3763, 3763, 3763, 3763, 2444, 2178, 1997, 1198, 1198, 1098, 1020, 956, 903, 858, 819, 785, 754, 727, 703, 681, 662, 644, 626, 610, 596, 582, 571, 558, 547, 537, 527, 518, 509, 500, 492, 485, 478, 471, 464, 458, 452, 446, 440, 435, 430, 425, 420, 415, 410, 407, 402, 398, 394, 391, 386, 383, 380, 376, 373, 369, 366, 364, 360, 357, 355, 352, 349, 347, 344, 341, 338, 337, 334, 332, 329, 328, 325, 323, 321, 319, 317, 315, 313, 311, 310, 308, 306, 304, 302, 301, 299, 297, 295, 294, 293, 291, 290, 288, 286, 285, 284, 283, 281, 280, 278, 277, 275, 275, 274, 272, 271, 270, 268, 267, 266, 265, 264, 263, 262, 261, 259, 258, 257, 257, 256, 255, 254, 253, 251, 250, 249, 248, 248, 247, 246, 245, 244, 243, 243, 242, 241, 240, 239, 239, 238, 237, 236, 235, 235, 234, 233, 232, 231, 230, 230, 230, 229, 228, 228, 227, 226, 225, 225,224, 223, 222, 222, 221, 221, 221, 220, 219, 219, 218, 217, 217, 216, 215, 215, 214, 213, 213, 212, 212, 212, 211, 211, 210, 209, 209, 208, 208, 207, 207, 206, 206, 205, 204, 204, 203, 203, 203, 203, 202, 202, 201, 201, 200, 200, 199, 199, 198, 198, 197, 197, 196, 196, 195, 195, 194, 194, 194, 194, 194, 193, 193, 192, 192, 191, 191, 190, 190, 190, 189, 189, 188, 188, 188, 187, 187, 186, 186, 185, 185, 185, 185, 185, 185, 184, 184, 183, 183, 183, 182, 182, 182, 181, 181, 180, 180, 180, 179, 179, 179, 178, 178, 178, 177, 177, 177, 176, 176, 176, 176, 176, 176, 175, 175, 175, 174, 174, 174, 173, 173, 173, 172, 172, 172, 171, 171, 171, 171, 170, 170, 170, 169, 169, 169, 169, 168, 168, 168, 167, 167, 167, 167, 167, 167, 167, 166, 166, 166, 166, 165, 165, 165, 165, 164, 164, 164, 163, 163, 163, 163, 162, 162, 162, 162, 161, 161, 161, 161, 160, 160, 160, 160, 159, 159, 159, 159, 159, 158, 158, 158, 158, 158, 158, 158, 158, 157, 157, 157, 157, 157, 156, 156, 156, 156, 155, 155, 155, 155, 155, 154, 154, 154, 154, 154, 153, 153, 153, 153, 152, 152, 152, 152, 152, 151, 151, 151, 151, 151, 150, 150, 150, 150, 150, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 148, 148, 148, 148, 148, 147, 147, 147, 147, 147, 147, 146, 146, 146, 146, 146, 145, 145, 145, 145, 145, 145, 144, 144, 144, 144, 144, 144, 143, 143, 143, 143, 143, 143, 142, 142, 142, 142, 142, 142, 141, 141, 141, 141, 141, 141, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 139, 139, 139, 139, 139, 139, 139, 138, 138, 138, 138, 138, 138, 138, 137, 137, 137, 137, 137, 137, 137, 136, 136, 136, 136, 136, 136, 136, 135, 135, 135, 135, 135, 135, 135, 134, 134, 134, 134, 134, 134, 134, 134, 133, 133, 133, 133, 133, 133, 133, 133, 132, 132, 132, 132, 132, 132, 132, 132, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 130, 130, 130, 130, 130, 130, 130, 130, 129, 129, 129, 129, 129, 129, 129, 129, 129, 128, 128, 128, 128, 128, 128, 128, 128, 128, 127, 127, 127, 127, 127, 127, 127, 127, 127, 126, 126, 126, 126, 126, 126, 126, 126, 126, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 101, 101, 101, 101, 101, 101, 101, 101, 101,101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 0, 3912141cc406Sopenharmony_ci ACC_CURVE,CRV_PARKHOME , 3763, 2330, 1803, 1515, 1330, 1198, 1099, 1021, 957, 904, 859, 819, 785, 755, 728, 704, 682, 662, 644, 626, 611, 597, 583, 571, 559, 548, 537, 527, 518, 509, 501, 493, 485, 478, 472, 464, 458, 453, 446, 441, 436, 430, 425, 420, 416, 411, 407, 402, 399, 394, 391, 387, 383, 380, 376, 374, 370, 366, 364, 361, 358, 355, 352, 349, 347, 344, 342, 339, 337, 335, 332, 330, 328, 326, 323, 321, 320, 318, 315, 313, 311, 310, 308, 306, 304, 302, 301, 300, 298, 296, 294, 293, 292, 290, 289, 287, 285, 284, 283, 282, 280, 279, 277, 276, 275, 274, 273, 271, 270, 269, 267, 266, 266, 265, 263, 262, 261, 260, 259, 258, 257, 256, 255, 254, 253, 252, 251, 250, 249, 248, 248, 247, 246, 245, 244, 243, 242, 241, 240, 239, 239, 239, 238, 237, 236, 235, 234, 233, 233, 232, 231, 230, 230, 230, 229, 228, 227, 227, 226, 225, 224, 224, 223, 222, 221, 221, 221, 220, 220, 219, 218, 218, 217, 216, 216, 215, 214, 214, 213, 213, 212, 212, 212, 211, 211, 210, 209, 209, 208, 208, 207, 207, 206, 205, 205, 204, 204, 203, 203, 203, 203, 202, 202, 201, 201, 200, 200, 199, 199, 198, 198, 197, 197, 196, 196, 195, 195, 194, 194, 194, 194, 194, 193, 193, 192, 192, 191, 191, 191, 190, 190, 189, 189, 188, 188, 188, 187, 187, 186, 186, 186, 185, 185, 185, 185, 185, 184, 184, 184, 183, 183, 182, 182, 182, 181, 181, 181, 180, 180, 180, 179, 179, 178, 178, 178, 177, 177, 177, 176, 176, 176, 176, 176, 176, 175, 175, 175, 174, 174, 174, 174, 173, 173, 173, 172, 172, 172, 171, 171, 171, 170, 170, 170, 170, 169, 169, 169, 168, 168, 168, 168, 167, 167, 167, 167, 167, 167, 167, 166, 166, 166, 166, 165, 165, 165, 165, 164, 164, 164, 163, 163, 163, 163, 162, 162, 162, 162, 161, 161, 161, 161, 160, 160, 160, 160, 160, 159, 159, 159, 159, 158, 158, 158, 158, 158, 158, 158, 158, 157, 157, 157, 157, 157, 156, 156, 156, 156, 155, 155, 155, 155, 155, 154, 154, 154, 154, 154, 153, 153, 153, 153, 153, 152, 152, 152, 152, 152, 151, 151, 151, 151, 151, 150, 150, 150, 150, 150, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 148, 148, 148, 148, 148, 148, 147, 147, 147, 147, 147, 147, 146, 146, 146, 146, 146, 145, 145, 145, 145, 145, 145, 144, 144, 144, 144, 144, 144, 143, 143, 143, 143, 143, 143, 142, 142, 142, 142, 142, 142, 141, 141, 141, 141, 141, 141, 141, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 139, 139, 139, 139, 139, 139, 139, 138, 0, 3913141cc406Sopenharmony_ci ACC_CURVE,CRV_SMEARING , 3763, 2330, 1803, 1515, 1330, 1198, 1099, 1021, 957, 904, 859, 819, 785, 755, 728, 704, 682, 662, 644, 626, 611, 597, 583, 571, 559, 548, 537, 527, 518, 509, 501, 493, 485, 478, 472, 464, 458, 453, 446, 441, 436, 430, 425, 420, 416, 411, 407, 402, 399, 394, 391, 387, 383, 380, 376, 374, 370, 366, 364, 361, 358, 355, 352, 349, 347, 344, 342, 339, 337, 335, 332, 330, 328, 326, 323, 321, 320, 318, 315, 313, 311, 310, 308, 306, 304, 302, 301, 300, 298, 296, 294, 293, 292, 290, 289, 287, 285, 284, 283, 282, 280, 279, 277, 276, 275, 274, 273, 271, 270, 269, 267, 266, 266, 265, 263, 262, 261, 260, 259, 258, 257, 256, 255, 254, 253, 252, 251, 250, 249, 248, 248, 247, 246, 245, 244, 243, 242, 241, 240, 239, 239, 239, 238, 237, 236, 235, 234, 233, 233, 232, 231, 230, 230, 230, 229, 228, 227, 227, 226, 225, 224, 224, 223, 222, 221, 221, 221, 220, 220, 219, 218, 218, 217, 216, 216, 215, 214, 214, 213, 213, 212, 212, 212, 211, 211, 210, 209, 209, 208, 208, 207, 207, 206, 205, 205, 204, 204, 203, 203, 203, 203, 202, 202, 201, 201, 200, 200, 199, 199, 198, 198, 197, 197, 196, 196, 195, 195, 194, 194, 194, 194, 194, 193, 193, 192, 192, 191, 191, 191, 190, 190, 189, 189, 188, 188, 188, 187, 187, 186, 186, 186, 185, 185, 185, 185, 185, 184, 184, 184, 183, 183, 182, 182, 182, 181, 181, 181, 180, 180, 180, 179, 179, 178, 178, 178, 177, 177, 177, 176, 176, 176, 176, 176, 176, 175, 175, 175, 174, 174, 174, 174, 173, 173, 173, 172, 172, 172, 171, 171, 171, 170, 170, 170, 170, 169, 169, 169, 168, 168, 168, 168, 167, 167, 167, 167, 167, 167, 167, 166, 166, 166, 166, 165, 165, 165, 165, 164, 164, 164, 163, 163, 163, 163, 162, 162, 162, 162, 161, 161, 161, 161, 160, 160, 160, 160, 160, 159, 159, 159, 159, 158, 158, 158, 158, 158, 158, 158, 158, 157, 157, 157, 157, 157, 156, 156, 156, 156, 155, 155, 155, 155, 155, 154, 154, 154, 154, 154, 153, 153, 153, 153, 153, 152, 152, 152, 152, 152, 151, 151, 151, 151, 151, 150, 150, 150, 150, 150, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 148, 148, 148, 148, 148, 148, 147, 147, 147, 147, 147, 147, 146, 146, 146, 146, 146, 145, 145, 145, 145, 145, 145, 144, 144, 144, 144, 144, 144, 143, 143, 143, 143, 143, 143, 142, 142, 142, 142, 142, 142, 141, 141, 141, 141, 141, 141, 141, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 139, 139, 139, 139, 139, 139, 139, 138, 0, 3914141cc406Sopenharmony_ci DEC_CURVE,CRV_NORMALSCAN, 522, 522, 528, 536, 544, 553, 562, 572, 582, 593, 604, 616, 629, 643, 658, 674, 692, 711, 732, 755, 781, 810, 843, 880, 923, 974, 1035, 1110, 1205, 1331, 1510, 1796, 2368, 3400, 4922, 0, 3915141cc406Sopenharmony_ci DEC_CURVE,CRV_PARKHOME , 138, 142, 146, 149, 153, 158, 162, 167, 171, 176, 180, 186, 193, 202, 209, 216, 223, 232, 243, 254, 266, 279, 292, 306, 320, 335, 337, 351, 367, 380, 396, 414, 437, 464, 493, 520, 549, 583, 611, 644, 675, 711, 755, 785, 819, 859, 904, 957, 1021, 1099, 1198, 1330, 1515, 1803, 2330, 3763, 0, 3916141cc406Sopenharmony_ci DEC_CURVE,CRV_SMEARING , 138, 139, 139, 139, 139, 139, 139, 139, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 141, 141, 141, 141, 141, 141, 141, 142, 142, 142, 142, 142, 142, 143, 143, 143, 143, 143, 143, 144, 144, 144, 144, 144, 144, 145, 145, 145, 145, 145, 145, 146, 146, 146, 146, 146, 147, 147, 147, 147, 147, 147, 148, 148, 148, 148, 148, 148, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 150, 150, 150, 150, 150, 151, 151, 151, 151, 151, 152, 152, 152, 152, 152, 153, 153, 153, 153, 153, 154, 154, 154, 154, 154, 155, 155, 155, 155, 155, 156, 156, 156, 156, 157, 157, 157, 157, 157, 158, 158, 158, 158, 158, 158, 158, 158, 159, 159, 159, 159, 160, 160, 160, 160, 160, 161, 161, 161, 161, 162, 162, 162, 162, 163, 163, 163, 163, 164, 164, 164, 165, 165, 165, 165, 166, 166, 166, 166, 167, 167, 167, 167, 167, 167, 167, 168, 168, 168, 168, 169, 169, 169, 170, 170, 170, 170, 171, 171, 171, 172, 172, 172, 173, 173, 173, 174, 174, 174, 174, 175, 175, 175, 176, 176, 176, 176, 176, 176, 177, 177, 177, 178, 178, 178, 179, 179, 180, 180, 180, 181, 181, 181, 182, 182, 182, 183, 183, 184, 184, 184, 185, 185, 185, 185, 185, 186, 186, 186, 187, 187, 188, 188, 188, 189, 189, 190, 190, 191, 191, 191, 192, 192, 193, 193, 194, 194, 194, 194, 194, 195, 195, 196, 196, 197, 197, 198, 198, 199, 199, 200, 200, 201, 201, 202, 202, 203, 203, 203, 203, 204, 204, 205, 205, 206, 207, 207, 208, 208, 209, 209, 210, 211, 211, 212, 212, 212, 213, 213, 214, 214, 215, 216, 216, 217, 218, 218, 219, 220, 220, 221, 221, 221, 222, 223, 224, 224, 225, 226, 227, 227, 228, 229, 230, 230, 230, 231, 232, 233, 233, 234, 235, 236, 237, 238, 239, 239, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 265, 266, 266, 267, 269, 270, 271, 273, 274, 275, 276, 277, 279, 280, 282, 283, 284, 285, 287, 289, 290, 292, 293, 294, 296, 298, 300, 301, 302, 304, 306, 308, 310, 311, 313, 315, 318, 320, 321, 323, 326, 328, 330, 332, 335, 337, 339, 342, 344, 347, 349, 352, 355, 358, 361, 364, 366, 370, 374, 376, 380, 383, 387, 391, 394, 399, 402, 407, 411, 416, 420, 425, 430, 436, 441, 446, 453, 458, 464, 472, 478, 485, 493, 501, 509, 518, 527, 537, 548, 559, 571, 583, 597, 611, 626, 644, 662, 682, 704, 728, 755, 785, 819, 859, 904, 957, 1021, 1099, 1198, 1330, 1515, 1803, 2330, 3763, 0, 3917141cc406Sopenharmony_ci DEC_CURVE,CRV_BUFFERFULL, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 94, 94, 94, 95, 95, 95, 95, 95, 96, 96, 97, 97, 98, 98, 99, 99, 100, 100, 101, 101, 102, 102, 103, 104, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 113, 115, 117, 119, 121, 122, 124, 127, 130, 132, 135, 139, 142, 146, 149, 153, 158, 162, 167, 171, 176, 180, 186, 193, 202, 209, 216, 223, 232, 243, 254, 266, 279, 292, 306, 320, 335, 337, 351, 367, 380, 396, 414, 437, 464, 493, 520, 549, 583, 611, 644, 675, 711, 755, 785, 819, 859, 904, 957, 1021, 1099, 1198, 1330, 1515, 1803, 2330, 3763, 0, 3918141cc406Sopenharmony_ci -2, 3919141cc406Sopenharmony_ci 3920141cc406Sopenharmony_ci /* motorcurve 8 */ 3921141cc406Sopenharmony_ci 1, 1, 1, 0, /* mri, msi, skiplinecount, motorbackstep */ 3922141cc406Sopenharmony_ci ACC_CURVE,CRV_NORMALSCAN, 1046, 1046, 1046, 1046, 1046, 1046, 647, 501, 421, 370, 333, 305, 284, 266, 251, 239, 228, 218, 210, 202, 196, 190, 184, 179, 174, 170, 166, 162, 159, 155, 152, 149, 147, 144, 142, 139, 137, 135, 133, 131, 129, 127, 126, 124, 123, 121, 120, 118, 117, 116, 114, 113, 112, 111, 110, 109, 108, 107, 106, 105, 104, 103, 102, 101, 100, 100, 99, 98, 97, 96, 96, 95, 94, 94, 93, 92, 92, 91, 91, 90, 89, 89, 88, 88, 87, 87, 86, 86, 85, 85, 84, 84, 83, 83, 82, 82, 82, 81, 81, 80, 80, 79, 79, 79, 78, 78, 78, 77, 77, 76, 76, 76, 75, 75, 75, 74, 74, 74, 74, 73, 73, 73, 72, 72, 72, 71, 71, 71, 71, 70, 70, 70, 70, 69, 69, 69, 69, 68, 68, 68, 68, 67, 67, 67, 67, 66, 66, 66, 66, 65, 65, 65, 65, 64, 64, 64, 64, 63, 63, 63, 63, 62, 62, 62, 62, 61, 61, 61, 61, 61, 60, 60, 60, 60, 60, 60, 59, 59, 59, 59, 59, 59, 59, 58, 58, 58, 58, 58, 58, 57, 57, 57, 57, 57, 57, 57, 56, 56, 56, 56, 56, 56, 56, 56, 55, 55, 55, 55, 55, 55, 55, 55, 54, 54, 54, 54, 54, 54, 54, 54, 53, 53, 53, 53, 53, 53, 53, 53, 52, 52, 52, 52, 52, 52, 52, 52, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 23, 23, 0, 3923141cc406Sopenharmony_ci ACC_CURVE,CRV_PARKHOME , 1045, 678, 604, 554, 332, 332, 304, 283, 265, 250, 238, 227, 217, 209, 201, 195, 189, 183, 178,173, 169, 165, 161, 158, 154, 151, 148, 146, 143, 141, 138, 136, 134, 132, 130, 128, 126, 125, 123, 122, 120, 119, 117, 116, 115, 113, 112, 111, 110, 109, 108, 107, 106, 105, 104, 103,102, 101, 100, 99, 99, 98, 97, 96, 95, 95, 94, 93, 93, 92, 91, 91, 90, 90, 89, 88, 88, 87, 87, 86, 86, 85, 85, 84, 84, 83, 83, 82, 82, 81, 81, 81, 80, 80, 79, 79, 78, 78, 78, 77, 77, 77, 76, 76, 75, 75, 75, 74, 74, 74, 73, 73, 73, 73, 72, 72, 72, 71, 71, 71, 70, 70, 70, 70, 69, 69, 69, 69, 68, 68, 68, 68, 67, 67, 67, 67, 66, 66, 66, 66, 65, 65, 65, 65, 65, 64, 64, 64, 64, 64, 63, 63, 63, 63, 63, 62, 62, 62, 62, 62, 61, 61, 61, 61, 61, 61, 60, 60, 60, 60, 60, 60, 59, 59, 59, 59, 59, 59, 58, 58, 58, 58, 58, 58, 58, 57, 57, 57, 57, 57, 57, 57, 56, 56, 56, 56, 56, 56, 56, 55, 55, 55, 55, 55, 55, 55, 55, 54, 54, 54, 54, 54, 54, 54, 54, 53, 53, 53, 53, 53, 53, 53, 53, 53, 52, 52, 52, 52, 52, 52, 52, 52, 52, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 39, 0, 3924141cc406Sopenharmony_ci ACC_CURVE,CRV_SMEARING , 1045, 678, 604, 554, 332, 332, 304, 283, 265, 250, 238, 227, 217, 209, 201, 195, 189, 183, 178,173, 169, 165, 161, 158, 154, 151, 148, 146, 143, 141, 138, 136, 134, 132, 130, 128, 126, 125, 123, 122, 120, 119, 117, 116, 115, 113, 112, 111, 110, 109, 108, 107, 106, 105, 104, 103,102, 101, 100, 99, 99, 98, 97, 96, 95, 95, 94, 93, 93, 92, 91, 91, 90, 90, 89, 88, 88, 87, 87, 86, 86, 85, 85, 84, 84, 83, 83, 82, 82, 81, 81, 81, 80, 80, 79, 79, 78, 78, 78, 77, 77, 77, 76, 76, 75, 75, 75, 74, 74, 74, 73, 73, 73, 73, 72, 72, 72, 71, 71, 71, 70, 70, 70, 70, 69, 69, 69, 69, 68, 68, 68, 68, 67, 67, 67, 67, 66, 66, 66, 66, 65, 65, 65, 65, 65, 64, 64, 64, 64, 64, 63, 63, 63, 63, 63, 62, 62, 62, 62, 62, 61, 61, 61, 61, 61, 61, 60, 60, 60, 60, 60, 60, 59, 59, 59, 59, 59, 59, 58, 58, 58, 58, 58, 58, 58, 57, 57, 57, 57, 57, 57, 57, 56, 56, 56, 56, 56, 56, 56, 55, 55, 55, 55, 55, 55, 55, 55, 54, 54, 54, 54, 54, 54, 54, 54, 53, 53, 53, 53, 53, 53, 53, 53, 53, 52, 52, 52, 52, 52, 52, 52, 52, 52, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 39, 0, 3925141cc406Sopenharmony_ci DEC_CURVE,CRV_NORMALSCAN, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 28, 28, 28, 28, 28, 28, 28, 28, 29, 29, 29, 29, 29, 29, 29, 30, 30, 30, 30, 31, 31, 31, 31, 32, 32, 32, 32, 33, 33, 34, 34, 35, 35, 36, 37, 38, 38, 39, 40, 41, 42, 43, 45, 46, 47, 48, 50, 51, 53, 54, 57, 59, 61, 63, 65, 68, 71, 75, 78, 82, 86, 90, 94, 94, 98, 103, 106, 111, 116, 122, 130, 138, 145, 153, 163, 171, 180, 188, 198, 211, 219, 228, 239, 252, 267, 284, 306, 334, 370, 422, 502, 648, 1045, 0, 3926141cc406Sopenharmony_ci DEC_CURVE,CRV_PARKHOME , 39, 40, 41, 42, 43, 45, 46, 47, 48, 50, 51, 53, 54, 57, 59, 61, 63, 65, 68, 71, 75, 78, 82, 86, 90, 94, 94, 98, 103, 106, 111, 116, 122, 130, 138, 145, 153, 163, 171, 180, 188, 198, 211, 219, 228, 239, 252, 267, 284, 306, 334, 370, 422, 502, 648, 1045, 0, 3927141cc406Sopenharmony_ci DEC_CURVE,CRV_SMEARING , 39, 39, 39, 39, 39, 39, 39, 39, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 54, 54, 54, 54, 54, 54, 54, 54, 54, 55, 55, 55, 55, 55, 55, 55, 55, 55, 56, 56, 56, 56, 56, 56, 56, 56, 57, 57, 57, 57, 57, 57, 57, 57, 58, 58, 58, 58, 58, 58, 58, 59, 59, 59, 59, 59, 59, 59, 60, 60, 60, 60, 60, 60, 60, 61, 61, 61, 61, 61, 61, 62, 62, 62, 62, 62, 62, 63, 63, 63, 63, 63, 64, 64, 64, 64, 64, 65, 65, 65, 65, 65, 66, 66, 66, 66, 66, 67, 67, 67, 67, 67, 68, 68, 68, 68, 69, 69, 69, 69, 70, 70, 70, 70, 71, 71, 71, 71, 72, 72, 72, 73, 73, 73, 73, 74, 74, 74, 75, 75, 75, 76, 76, 76, 77, 77, 77, 78, 78, 78, 79, 79, 79, 80, 80, 81, 81, 81, 82, 82, 83, 83, 84, 84, 84, 85, 85, 86, 86, 87, 87, 88, 88, 89, 90, 90, 91, 91, 92, 93, 93, 94, 94, 95, 96, 96, 97, 98, 99, 99, 100, 101, 102, 103, 104, 105, 105, 106, 107, 108, 109, 110, 112, 113, 114, 115, 116, 118, 119, 120, 122, 123, 125, 127, 128, 130, 132, 134, 136, 138, 140, 142, 145, 147, 150, 153, 156, 159, 163, 167, 171, 175, 180, 185, 190, 196, 203, 211, 219, 228, 239, 252, 267, 284, 306, 334, 370, 422, 502, 648, 1045, 0, 3928141cc406Sopenharmony_ci DEC_CURVE,CRV_BUFFERFULL, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 28, 28, 28, 28, 28, 28, 28, 28, 29, 29, 29, 29, 29, 29, 29, 30, 30, 30, 30, 31, 31, 31, 31, 32, 32, 32, 32, 33, 33, 34, 34, 35, 35, 36, 37, 38, 38, 39, 40, 41, 42, 43, 45, 46, 47, 48, 50, 51, 53, 54, 57, 59, 61, 63, 65, 68, 71, 75, 78, 82, 86, 90, 94, 94, 98, 103, 106, 111, 116, 122, 130, 138, 145, 153, 163, 171, 180, 188, 198, 211, 219, 228, 239, 252, 267, 284, 306, 334, 370, 422, 502, 648, 1045, 0, 3929141cc406Sopenharmony_ci -1 3930141cc406Sopenharmony_ci }; 3931141cc406Sopenharmony_ci 3932141cc406Sopenharmony_ci rst = (SANE_Int *)malloc(sizeof(steps)); 3933141cc406Sopenharmony_ci if (rst != NULL) 3934141cc406Sopenharmony_ci memcpy(rst, &steps, sizeof(steps)); 3935141cc406Sopenharmony_ci 3936141cc406Sopenharmony_ci return rst; 3937141cc406Sopenharmony_ci} 3938141cc406Sopenharmony_ci 3939141cc406Sopenharmony_cistatic SANE_Int *hp3970_motor() 3940141cc406Sopenharmony_ci{ 3941141cc406Sopenharmony_ci SANE_Int *rst = NULL; 3942141cc406Sopenharmony_ci SANE_Int steps[] = 3943141cc406Sopenharmony_ci { 3944141cc406Sopenharmony_ci /* motorcurve 1 */ 3945141cc406Sopenharmony_ci 1, 1, 1, 0, /* mri, msi, skiplinecount, motorbackstep */ 3946141cc406Sopenharmony_ci ACC_CURVE,CRV_NORMALSCAN, 2000, 1984, 1968, 1953, 1937, 1921, 1906, 1890, 1874, 1859, 1843, 1827, 1812, 1796, 1781, 1765, 1749, 1734, 1715, 1700, 1684, 1669, 1653, 1637, 1622, 1606, 1590, 1572, 1556, 1541, 1525, 1510, 1494, 1478, 1463, 1447, 1431, 1416, 1400, 1384, 1366, 1351, 1335, 1319, 1304, 1288, 1272, 1257, 1241, 1225, 1210, 1194, 1179, 1160, 1145, 1129, 1113, 1098, 1082, 1066, 1051, 1035, 1017, 1001, 986, 970, 954, 939, 923, 907, 892, 876, 861, 845, 829, 814, 798, 782, 767, 749, 0, 3947141cc406Sopenharmony_ci ACC_CURVE,CRV_PARKHOME , 4705, 2913, 2253, 1894, 1662, 1498, 1374, 1276, 1196, 1129, 1073, 1024, 981, 944, 910, 880, 852, 827, 804, 783, 764, 746, 729, 713, 699, 685, 672, 659, 648, 637, 626, 616, 607, 598, 589, 581, 573, 565, 558, 551, 544, 538, 532, 526, 520, 514, 509, 503, 500, 0, 3948141cc406Sopenharmony_ci ACC_CURVE,CRV_SMEARING , 200, 12, 14, 16, 0, 3949141cc406Sopenharmony_ci DEC_CURVE,CRV_NORMALSCAN, 749, 1166, 1583, 2000, 0, 3950141cc406Sopenharmony_ci DEC_CURVE,CRV_PARKHOME , 500, 503, 509, 514, 520, 526, 532, 538, 544, 551, 558, 565, 573, 581, 589, 598, 607, 616, 626, 637, 648, 659, 672, 685, 699, 713, 729, 746, 764, 783, 804, 827, 852, 880, 910, 944, 981, 1024, 1073, 1129, 1196, 1276, 1374, 1498, 1662, 1894, 2253, 2913, 4705, 0, 3951141cc406Sopenharmony_ci DEC_CURVE,CRV_SMEARING , 300, 234, 167, 100, 0, 3952141cc406Sopenharmony_ci DEC_CURVE,CRV_BUFFERFULL, 1100, 867, 633, 400, 0, 3953141cc406Sopenharmony_ci -2, 3954141cc406Sopenharmony_ci 3955141cc406Sopenharmony_ci /* motorcurve 2 */ 3956141cc406Sopenharmony_ci 1, 1, 1, 0, /* mri, msi, skiplinecount, motorbackstep */ 3957141cc406Sopenharmony_ci ACC_CURVE,CRV_NORMALSCAN, 4705, 2664, 2061, 1732, 1521, 1370, 1257, 1167, 1094, 1033, 982, 937, 898, 864, 833, 805, 780, 757, 736, 717, 699, 683, 667, 653, 640, 627, 615, 604, 593, 583, 574, 564, 556, 547, 540, 532, 525, 518, 511, 505, 499, 493, 487, 481, 476, 471, 466, 461, 456, 452, 447, 443, 439, 435, 431, 427, 424, 420, 417, 413, 410, 407, 403, 400, 397, 394, 391, 389, 386, 383, 381, 378, 375, 373, 371, 368, 366, 364, 361, 359, 357, 355, 353, 351, 349, 347, 345, 343, 341, 339, 338, 336, 334, 332, 331, 329, 327, 326, 324, 323, 321, 320, 318, 317, 315, 314, 312, 311, 310, 308, 307, 306, 304, 303, 302, 301, 299, 298, 297, 296, 295, 293, 292, 291, 290, 289, 288, 287, 286, 285, 284, 283, 282, 281, 280, 279, 278, 277, 276, 275, 274, 273, 272, 271, 270, 270, 269, 268, 267, 266, 265, 264, 264, 263, 262, 261, 260, 260, 259, 258, 257, 257, 256, 255, 255, 254, 253, 252, 252, 251, 250, 250, 249, 248, 248, 247, 246, 246, 245, 244, 244, 243, 242, 242, 241, 241, 240, 239, 239, 238, 238, 237, 237, 236, 235, 235, 234, 234, 233, 233, 232, 232, 231, 231, 230, 230, 229, 229, 228, 227, 227, 227, 226, 226, 225, 225, 224, 224, 223, 223, 222, 222, 221, 221, 220, 220, 219, 219, 219, 218, 218, 217, 217, 216, 216, 216, 215, 215, 214, 214, 214, 213, 213, 212, 212, 212, 211, 211, 210, 210, 210, 209, 209, 208, 208, 208, 207, 207, 207, 206, 206, 206, 205, 205, 204, 204, 204, 203, 203, 203, 202, 202, 202, 201, 201, 201, 200, 200, 200, 199, 199, 199, 198, 198, 198, 197, 197, 197, 197, 196, 196, 196, 195, 195, 195, 194, 194, 194, 194, 193, 193, 193, 192, 192, 192, 192, 191, 191, 191, 190, 190, 190, 190, 189, 189, 189, 188, 188, 188, 188, 187, 187, 187, 187, 186, 186, 186, 186, 185, 185, 185, 185, 184, 184, 184, 184, 183, 183, 183, 183, 182, 182, 182, 182, 181, 181, 181, 181, 181, 180, 180, 180, 180, 179, 179, 179, 179, 178, 178, 178, 178, 178, 177, 177, 177, 177, 177, 176, 176, 176, 176, 175, 175, 175, 175, 175, 174, 174, 174, 174, 174, 173, 173, 173, 173, 173, 172, 172, 172, 172, 172, 171, 171, 171, 0, 3958141cc406Sopenharmony_ci ACC_CURVE,CRV_PARKHOME , 4705, 2913, 2253, 1894, 1662, 1498, 1374, 1276, 1196, 1129, 1073, 1024, 981, 944, 910, 880, 852, 827, 804, 783, 764, 746, 729, 713, 699, 685, 672, 659, 648, 637, 626, 616, 607, 598, 589, 581, 573, 565, 558, 551, 544, 538, 532, 526, 520, 514, 509, 503, 500, 0, 3959141cc406Sopenharmony_ci ACC_CURVE,CRV_SMEARING , 200, 12, 14, 16, 0, 3960141cc406Sopenharmony_ci DEC_CURVE,CRV_NORMALSCAN, 171, 172, 172, 173, 174, 174, 175, 176, 176, 177, 178, 178, 179, 180, 181, 181, 182, 183, 184, 184, 185, 186, 187, 188, 189, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 207, 208, 209, 210, 211, 213, 214, 215, 217, 218, 219, 221, 222, 224, 225, 227, 228, 230, 232, 233, 235, 237, 239, 241, 243, 245, 247, 249, 251, 253, 255, 258, 260, 262, 265, 268, 270, 273, 276, 279, 282, 285, 289, 292, 296, 299, 303, 307, 311, 316, 320, 325, 330, 335, 341, 347, 353, 359, 366, 373, 381, 390, 398, 408, 418, 429, 441, 455, 469, 485, 503, 523, 545, 571, 601, 636, 678, 730, 796, 883, 1005, 1195, 1544, 4705, 0, 3961141cc406Sopenharmony_ci DEC_CURVE,CRV_PARKHOME , 500, 503, 509, 514, 520, 526, 532, 538, 544, 551, 558, 565, 573, 581, 589, 598, 607, 616, 626, 637, 648, 659, 672, 685, 699, 713, 729, 746, 764, 783, 804, 827, 852, 880, 910, 944, 981, 1024, 1073, 1129, 1196, 1276, 1374, 1498, 1662, 1894, 2253, 2913, 4705, 0, 3962141cc406Sopenharmony_ci DEC_CURVE,CRV_SMEARING , 300, 234, 167, 100, 0, 3963141cc406Sopenharmony_ci DEC_CURVE,CRV_BUFFERFULL, 1100, 867, 633, 400, 0, 3964141cc406Sopenharmony_ci -2, 3965141cc406Sopenharmony_ci 3966141cc406Sopenharmony_ci /* motorcurve 3 */ 3967141cc406Sopenharmony_ci 1, 1, 1, 0, /* mri, msi, skiplinecount, motorbackstep */ 3968141cc406Sopenharmony_ci ACC_CURVE,CRV_NORMALSCAN, 5360, 3655, 2855, 2422, 2142, 1944, 1795, 1678, 1582, 1503, 1434, 1374, 0, 3969141cc406Sopenharmony_ci ACC_CURVE,CRV_PARKHOME , 5360, 3362, 2628, 2229, 1973, 1791, 1654, 1547, 1458, 1384, 1319, 1264, 1214, 1170, 1131, 1096, 1063, 1034, 1006, 981, 958, 937, 916, 897, 880, 863, 847, 832, 818, 805, 792, 780, 769, 758, 747, 737, 727, 718, 709, 700, 692, 684, 677, 669, 662, 655, 648, 642, 636, 629, 624, 618, 612, 607, 602, 596, 591, 587, 582, 577, 573, 568, 564, 560, 556, 552, 548, 544, 540, 537, 533, 530, 526, 523, 520, 516, 513, 510, 507, 504, 501, 498, 496, 493, 490, 488, 485, 482, 480, 477, 475, 472, 470, 468, 466, 463, 461, 459, 457, 455, 453, 450, 448, 446, 444, 443, 441, 439, 437, 435, 433, 431, 430, 428, 426, 425, 423, 421, 420, 418, 416, 415, 413, 412, 410, 409, 407, 406, 405, 403, 402, 400, 399, 398, 396, 395, 394, 392, 391, 390, 389, 387, 386, 385, 384, 382, 381, 380, 379, 378, 377, 376, 374, 373, 372, 371, 370, 369, 368, 367, 366, 365, 364, 363, 362, 361, 360, 359, 358, 357, 356, 355, 354, 353, 353, 352, 351, 350, 349, 348, 0, 3970141cc406Sopenharmony_ci ACC_CURVE,CRV_SMEARING , 5360, 3362, 2628, 2229, 1973, 1791, 1654, 1547, 0, 3971141cc406Sopenharmony_ci DEC_CURVE,CRV_NORMALSCAN, 1374, 1434, 1503, 1582, 1678, 1795, 1944, 2142, 2422, 2855, 3655, 5360, 0, 3972141cc406Sopenharmony_ci DEC_CURVE,CRV_PARKHOME , 348, 351, 353, 356, 359, 362, 365, 368, 371, 374, 378, 381, 385, 389, 392, 396, 400, 405, 409, 413, 418, 423, 428, 433, 439, 444, 450, 457, 463, 470, 477, 485, 493, 501, 510, 520, 530, 540, 552, 564, 577, 591, 607, 624, 642, 662, 684, 709, 737, 769, 805, 847, 897, 958, 1034, 1131, 1264, 1458, 1791, 2628, 5360, 0, 3973141cc406Sopenharmony_ci DEC_CURVE,CRV_SMEARING , 1547, 1654, 1791, 1973, 2229, 2628, 3362, 5360, 0, 3974141cc406Sopenharmony_ci DEC_CURVE,CRV_BUFFERFULL, 1374, 1434, 1503, 1582, 1678, 1795, 1944, 2142, 2422, 2855, 3655, 5360, 0, 3975141cc406Sopenharmony_ci -2, 3976141cc406Sopenharmony_ci 3977141cc406Sopenharmony_ci /* motorcurve 4 */ 3978141cc406Sopenharmony_ci 1, 1, 1, 0, /* mri, msi, skiplinecount, motorbackstep */ 3979141cc406Sopenharmony_ci ACC_CURVE,CRV_NORMALSCAN, 4705, 2664, 2061, 1732, 1521, 1370, 1257, 1167, 1094, 1033, 982, 937, 898, 864, 833, 805, 780, 757, 736, 717, 699, 683, 667, 653, 640, 627, 615, 604, 593, 583, 574, 564, 556, 547, 540, 532, 525, 518, 511, 505, 499, 493, 487, 481, 476, 471, 466, 461, 456, 452, 447, 443, 439, 435, 431, 427, 424, 420, 417, 413, 410, 407, 403, 400, 397, 394, 391, 389, 386, 383, 381, 378, 375, 373, 371, 368, 366, 364, 361, 359, 357, 355, 353, 351, 349, 347, 345, 343, 341, 339, 338, 336, 334, 332, 331, 329, 327, 326, 324, 323, 321, 320, 318, 317, 315, 314, 312, 311, 310, 308, 307, 306, 304, 303, 302, 301, 299, 298, 297, 296, 295, 293, 292, 291, 290, 289, 288, 287, 286, 285, 284, 283, 282, 281, 280, 279, 278, 277, 276, 275, 274, 273, 272, 271, 270, 270, 269, 268, 267, 266, 265, 264, 264, 263, 262, 261, 260, 260, 259, 258, 257, 257, 256, 255, 255, 254, 253, 252, 252, 251, 250, 250, 249, 248, 248, 247, 246, 246, 245, 244, 244, 243, 242, 242, 241, 241, 240, 239, 239, 238, 238, 237, 237, 236, 235, 235, 234, 234, 233, 233, 232, 232, 231, 231, 230, 230, 229, 229, 228, 227, 227, 227, 226, 226, 225, 225, 224, 224, 223, 223, 222, 222, 221, 221, 220, 220, 219, 219, 219, 218, 218, 217, 217, 216, 216, 216, 215, 215, 214, 214, 214, 213, 213, 212, 212, 212, 211, 211, 210, 210, 210, 209, 209, 208, 208, 208, 207, 207, 207, 206, 206, 206, 205, 205, 204, 204, 204, 203, 203, 203, 202, 202, 202, 201, 201, 201, 200, 200, 200, 199, 199, 199, 198, 198, 198, 197, 197, 197, 197, 196, 196, 196, 195, 195, 195, 194, 194, 194, 194, 193, 193, 193, 192, 192, 192, 192, 191, 191, 191, 190, 190, 190, 190, 189, 189, 189, 188, 188, 188, 188, 187, 187, 187, 187, 186, 186, 186, 186, 185, 185, 185, 185, 184, 184, 184, 184, 183, 183, 183, 183, 182, 182, 182, 182, 181, 181, 181, 181, 181, 180, 180, 180, 180, 179, 179, 179, 179, 178, 178, 178, 178, 178, 177, 177, 177, 177, 177, 176, 176, 176, 176, 175, 175, 175, 175, 175, 174, 174, 174, 174, 174, 173, 173, 173, 173, 173, 172, 172, 172, 172, 172, 171, 171, 171, 0, 3980141cc406Sopenharmony_ci ACC_CURVE,CRV_PARKHOME , 4705, 2888, 2234, 1878, 1648, 1485, 1362, 1265, 1186, 1120, 1064, 1016, 973, 936, 903, 873, 845, 821, 798, 777, 758, 740, 723, 708, 693, 679, 666, 654, 643, 632, 621, 612, 602, 593, 585, 576, 569, 561, 554, 547, 540, 534, 528, 522, 516, 510, 505, 499, 494, 490, 485, 480, 476, 471, 467, 463, 459, 455, 451, 448, 444, 440, 437, 434, 430, 427, 424, 421, 418, 415, 412, 409, 407, 404, 401, 399, 396, 394, 391, 389, 387, 384, 382, 380, 378, 376, 374, 371, 369, 367, 366, 364, 362, 360, 358, 356, 354, 353, 351, 349, 348, 346, 344, 343, 341, 340, 338, 337, 335, 334, 332, 331, 329, 328, 327, 325, 324, 323, 321, 320, 319, 318, 316, 315, 314, 313, 312, 311, 309, 308, 307, 306, 305, 304, 303, 302, 301, 300, 299, 298, 297, 296, 295, 294, 293, 292, 291, 290, 289, 288, 287, 286, 285, 285, 284, 283, 282, 281, 280, 279, 279, 278, 277, 276, 275, 275, 274, 273, 272, 272, 271, 270, 269, 269, 268, 267, 267, 266, 265, 264, 264, 263, 262, 262, 261, 260, 260, 259, 259, 258, 257, 257, 256, 255, 255, 254, 254, 253, 252, 252, 251, 251, 250, 249, 249, 248, 248, 247, 247, 246, 246, 245, 245, 244, 243, 243, 242, 242, 241, 241, 240, 240, 239, 239, 238, 238, 237, 237, 237, 236, 236, 235, 235, 234, 234, 233, 233, 232, 232, 231, 231, 231, 230, 230, 229, 229, 228, 228, 228, 227, 227, 226, 226, 225, 225, 225, 224, 224, 223, 223, 223, 222, 222, 222, 221, 221, 220, 220, 220, 219, 219, 219, 218, 218, 217, 217, 217, 216, 216, 216, 215, 215, 215, 214, 214, 214, 213, 213, 213, 212, 212, 212, 211, 211, 211, 210, 210, 210, 209, 209, 209, 208, 208, 208, 207, 207, 207, 207, 206, 206, 206, 205, 205, 205, 204, 204, 204, 204, 203, 203, 203, 202, 202, 202, 202, 201, 201, 201, 200, 200, 200, 200, 199, 199, 199, 199, 198, 198, 198, 198, 197, 197, 197, 196, 196, 196, 196, 195, 195, 195, 195, 194, 194, 194, 194, 193, 193, 193, 193, 192, 192, 192, 192, 192, 191, 191, 191, 191, 190, 190, 190, 190, 189, 189, 189, 189, 189, 188, 188, 188, 188, 187, 187, 187, 187, 187, 186, 186, 186, 186, 186, 185, 185, 185, 185, 184, 184, 184, 184, 184, 183, 183, 183, 183, 183, 182, 182, 182, 182, 182, 181, 181, 181, 181, 181, 180, 180, 180, 180, 180, 180, 179, 179, 179, 179, 179, 178, 178, 178, 178, 178, 177, 177, 177, 177, 177, 177, 176, 176, 176, 176, 176, 176, 175, 175, 175, 175, 175, 174, 174, 174, 174, 174, 174, 173, 173, 173, 173, 173, 173, 172, 172, 172, 172, 172, 172, 171, 171, 171, 171, 0, 3981141cc406Sopenharmony_ci ACC_CURVE,CRV_SMEARING , 4705, 3056, 2724, 2497, 1498, 1498, 1374, 1276, 1196, 1130, 1073, 1025, 982, 944, 911, 880, 853, 828, 805, 784, 764, 746, 730, 714, 699, 685, 675, 0, 3982141cc406Sopenharmony_ci DEC_CURVE,CRV_NORMALSCAN, 171, 172, 172, 173, 174, 174, 175, 176, 176, 177, 178, 178, 179, 180, 181, 181, 182, 183, 184, 184, 185, 186, 187, 188, 189, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 207, 208, 209, 210, 211, 213, 214, 215, 217, 218, 219, 221, 222, 224, 225, 227, 228, 230, 232, 233, 235, 237, 239, 241, 243, 245, 247, 249, 251, 253, 255, 258, 260, 262, 265, 268, 270, 273, 276, 279, 282, 285, 289, 292, 296, 299, 303, 307, 311, 316, 320, 325, 330, 335, 341, 347, 353, 359, 366, 373, 381, 390, 398, 408, 418, 429, 441, 455, 469, 485, 503, 523, 545, 571, 601, 636, 678, 730, 796, 883, 1005, 1195, 1544, 4705, 0, 3983141cc406Sopenharmony_ci DEC_CURVE,CRV_PARKHOME , 171, 172, 172, 173, 173, 174, 174, 175, 175, 176, 176, 177, 177, 178, 179, 179, 180, 180, 181, 182, 182, 183, 183, 184, 185, 185, 186, 187, 187, 188, 189, 189, 190, 191, 192, 192, 193, 194, 195, 195, 196, 197, 198, 199, 199, 200, 201, 202, 203, 204, 205, 206, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 217, 218, 219, 220, 221, 222, 223, 225, 226, 227, 228, 230, 231, 232, 234, 235, 237, 238, 240, 241, 243, 244, 246, 247, 249, 251, 253, 254, 256, 258, 260, 262, 264, 266, 268, 271, 273, 275, 278, 280, 282, 285, 288, 290, 293, 296, 299, 302, 305, 309, 312, 316, 319, 323, 327, 331, 336, 340, 345, 350, 355, 360, 365, 371, 377, 384, 391, 398, 406, 414, 422, 432, 441, 452, 463, 476, 489, 504, 520, 538, 558, 580, 605, 633, 667, 706, 752, 810, 883, 979, 1116, 1326, 1714, 4705, 0, 3984141cc406Sopenharmony_ci DEC_CURVE,CRV_SMEARING , 675, 685, 699, 714, 730, 746, 764, 784, 805, 828, 853, 880, 911, 944, 982, 1025, 1073, 1130, 1196, 1276, 1374, 1498, 1498, 2497, 2724, 3056, 4705, 0, 3985141cc406Sopenharmony_ci DEC_CURVE,CRV_BUFFERFULL, 171, 172, 172, 173, 174, 174, 175, 176, 176, 177, 178, 178, 179, 180, 181, 181, 182, 183, 184, 184, 185, 186, 187, 188, 189, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 207, 208, 209, 210, 211, 213, 214, 215, 217, 218, 219, 221, 222, 224, 225, 227, 228, 230, 232, 233, 235, 237, 239, 241, 243, 245, 247, 249, 251, 253, 255, 258, 260, 262, 265, 268, 270, 273, 276, 279, 282, 285, 289, 292, 296, 299, 303, 307, 311, 316, 320, 325, 330, 335, 341, 347, 353, 359, 366, 373, 381, 390, 398, 408, 418, 429, 441, 455, 469, 485, 503, 523, 545, 571, 601, 636, 678, 730, 796, 883, 1005, 1195, 1544, 4705, 0, 3986141cc406Sopenharmony_ci -2, 3987141cc406Sopenharmony_ci 3988141cc406Sopenharmony_ci /* motorcurve 5 */ 3989141cc406Sopenharmony_ci 1, 1, 1, 0, /* mri, msi, skiplinecount, motorbackstep */ 3990141cc406Sopenharmony_ci ACC_CURVE,CRV_NORMALSCAN, 3763, 3763, 3763, 3763, 3763, 3763, 2444, 2178, 1997, 1198, 1198, 1098, 1020, 956, 903, 858, 819, 785, 754, 727, 703, 681, 662, 644, 626, 610, 596, 582, 571, 558, 547, 537, 527, 518, 509, 500, 492, 485, 478, 471, 464, 458, 452, 446, 440, 435, 430, 425, 420, 415, 410, 407, 402, 398, 394, 391, 386, 383, 380, 376, 373, 369, 366, 364, 360, 357, 355, 352, 349, 347, 344, 341, 338, 337, 334, 332, 329, 328, 325, 323, 321, 319, 317, 315, 313, 311, 310, 308, 306, 304, 302, 301, 299, 297, 295, 294, 293, 291, 290, 288, 286, 285, 284, 283, 281, 280, 278, 277, 275, 275, 274, 272, 271, 270, 268, 267, 266, 265, 264, 263, 262, 261, 259, 258, 257, 257, 256, 255, 254, 253, 251, 250, 249, 248, 248, 247, 246, 245, 244, 243, 243, 242, 241, 240, 239, 239, 238, 237, 236, 235, 235, 234, 233, 232, 231, 230, 230, 230, 229, 228, 228, 227, 226, 225, 225,224, 223, 222, 222, 221, 221, 221, 220, 219, 219, 218, 217, 217, 216, 215, 215, 214, 213, 213, 212, 212, 212, 211, 211, 210, 209, 209, 208, 208, 207, 207, 206, 206, 205, 204, 204, 203, 203, 203, 203, 202, 202, 201, 201, 200, 200, 199, 199, 198, 198, 197, 197, 196, 196, 195, 195, 194, 194, 194, 194, 194, 193, 193, 192, 192, 191, 191, 190, 190, 190, 189, 189, 188, 188, 188, 187, 187, 186, 186, 185, 185, 185, 185, 185, 185, 184, 184, 183, 183, 183, 182, 182, 182, 181, 181, 180, 180, 180, 179, 179, 179, 178, 178, 178, 177, 177, 177, 176, 176, 176, 176, 176, 176, 175, 175, 175, 174, 174, 174, 173, 173, 173, 172, 172, 172, 171, 171, 171, 171, 170, 170, 170, 169, 169, 169, 169, 168, 168, 168, 167, 167, 167, 167, 167, 167, 167, 166, 166, 166, 166, 165, 165, 165, 165, 164, 164, 164, 163, 163, 163, 163, 162, 162, 162, 162, 161, 161, 161, 161, 160, 160, 160, 160, 159, 159, 159, 159, 159, 158, 158, 158, 158, 158, 158, 158, 158, 157, 157, 157, 157, 157, 156, 156, 156, 156, 155, 155, 155, 155, 155, 154, 154, 154, 154, 154, 153, 153, 153, 153, 152, 152, 152, 152, 152, 151, 151, 151, 151, 151, 150, 150, 150, 150, 150, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 148, 148, 148, 148, 148, 147, 147, 147, 147, 147, 147, 146, 146, 146, 146, 146, 145, 145, 145, 145, 145, 145, 144, 144, 144, 144, 144, 144, 143, 143, 143, 143, 143, 143, 142, 142, 142, 142, 142, 142, 141, 141, 141, 141, 141, 141, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 139, 139, 139, 139, 139, 139, 139, 138, 138, 138, 138, 138, 138, 138, 137, 137, 137, 137, 137, 137, 137, 136, 136, 136, 136, 136, 136, 136, 135, 135, 135, 135, 135, 135, 135, 134, 134, 134, 134, 134, 134, 134, 134, 133, 133, 133, 133, 133, 133, 133, 133, 132, 132, 132, 132, 132, 132, 132, 132, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 130, 130, 130, 130, 130, 130, 130, 130, 129, 129, 129, 129, 129, 129, 129, 129, 129, 128, 128, 128, 128, 128, 128, 128, 128, 128, 127, 127, 127, 127, 127, 127, 127, 127, 127, 126, 126, 126, 126, 126, 126, 126, 126, 126, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 122, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 119, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 118, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 117, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 116, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 114, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 113, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 111, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 106, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 104, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 103, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, 101, 101, 101, 101, 101, 101, 101, 101, 101,101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 99, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 0, 3991141cc406Sopenharmony_ci ACC_CURVE,CRV_PARKHOME , 3763, 2330, 1803, 1515, 1330, 1198, 1099, 1021, 957, 904, 859, 819, 785, 755, 728, 704, 682, 662, 644, 626, 611, 597, 583, 571, 559, 548, 537, 527, 518, 509, 501, 493, 485, 478, 472, 464, 458, 453, 446, 441, 436, 430, 425, 420, 416, 411, 407, 402, 399, 394, 391, 387, 383, 380, 376, 374, 370, 366, 364, 361, 358, 355, 352, 349, 347, 344, 342, 339, 337, 335, 332, 330, 328, 326, 323, 321, 320, 318, 315, 313, 311, 310, 308, 306, 304, 302, 301, 300, 298, 296, 294, 293, 292, 290, 289, 287, 285, 284, 283, 282, 280, 279, 277, 276, 275, 274, 273, 271, 270, 269, 267, 266, 266, 265, 263, 262, 261, 260, 259, 258, 257, 256, 255, 254, 253, 252, 251, 250, 249, 248, 248, 247, 246, 245, 244, 243, 242, 241, 240, 239, 239, 239, 238, 237, 236, 235, 234, 233, 233, 232, 231, 230, 230, 230, 229, 228, 227, 227, 226, 225, 224, 224, 223, 222, 221, 221, 221, 220, 220, 219, 218, 218, 217, 216, 216, 215, 214, 214, 213, 213, 212, 212, 212, 211, 211, 210, 209, 209, 208, 208, 207, 207, 206, 205, 205, 204, 204, 203, 203, 203, 203, 202, 202, 201, 201, 200, 200, 199, 199, 198, 198, 197, 197, 196, 196, 195, 195, 194, 194, 194, 194, 194, 193, 193, 192, 192, 191, 191, 191, 190, 190, 189, 189, 188, 188, 188, 187, 187, 186, 186, 186, 185, 185, 185, 185, 185, 184, 184, 184, 183, 183, 182, 182, 182, 181, 181, 181, 180, 180, 180, 179, 179, 178, 178, 178, 177, 177, 177, 176, 176, 176, 176, 176, 176, 175, 175, 175, 174, 174, 174, 174, 173, 173, 173, 172, 172, 172, 171, 171, 171, 170, 170, 170, 170, 169, 169, 169, 168, 168, 168, 168, 167, 167, 167, 167, 167, 167, 167, 166, 166, 166, 166, 165, 165, 165, 165, 164, 164, 164, 163, 163, 163, 163, 162, 162, 162, 162, 161, 161, 161, 161, 160, 160, 160, 160, 160, 159, 159, 159, 159, 158, 158, 158, 158, 158, 158, 158, 158, 157, 157, 157, 157, 157, 156, 156, 156, 156, 155, 155, 155, 155, 155, 154, 154, 154, 154, 154, 153, 153, 153, 153, 153, 152, 152, 152, 152, 152, 151, 151, 151, 151, 151, 150, 150, 150, 150, 150, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 148, 148, 148, 148, 148, 148, 147, 147, 147, 147, 147, 147, 146, 146, 146, 146, 146, 145, 145, 145, 145, 145, 145, 144, 144, 144, 144, 144, 144, 143, 143, 143, 143, 143, 143, 142, 142, 142, 142, 142, 142, 141, 141, 141, 141, 141, 141, 141, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 139, 139, 139, 139, 139, 139, 139, 138, 0, 3992141cc406Sopenharmony_ci ACC_CURVE,CRV_SMEARING , 3763, 2330, 1803, 1515, 1330, 1198, 1099, 1021, 957, 904, 859, 819, 785, 755, 728, 704, 682, 662, 644, 626, 611, 597, 583, 571, 559, 548, 537, 527, 518, 509, 501, 493, 485, 478, 472, 464, 458, 453, 446, 441, 436, 430, 425, 420, 416, 411, 407, 402, 399, 394, 391, 387, 383, 380, 376, 374, 370, 366, 364, 361, 358, 355, 352, 349, 347, 344, 342, 339, 337, 335, 332, 330, 328, 326, 323, 321, 320, 318, 315, 313, 311, 310, 308, 306, 304, 302, 301, 300, 298, 296, 294, 293, 292, 290, 289, 287, 285, 284, 283, 282, 280, 279, 277, 276, 275, 274, 273, 271, 270, 269, 267, 266, 266, 265, 263, 262, 261, 260, 259, 258, 257, 256, 255, 254, 253, 252, 251, 250, 249, 248, 248, 247, 246, 245, 244, 243, 242, 241, 240, 239, 239, 239, 238, 237, 236, 235, 234, 233, 233, 232, 231, 230, 230, 230, 229, 228, 227, 227, 226, 225, 224, 224, 223, 222, 221, 221, 221, 220, 220, 219, 218, 218, 217, 216, 216, 215, 214, 214, 213, 213, 212, 212, 212, 211, 211, 210, 209, 209, 208, 208, 207, 207, 206, 205, 205, 204, 204, 203, 203, 203, 203, 202, 202, 201, 201, 200, 200, 199, 199, 198, 198, 197, 197, 196, 196, 195, 195, 194, 194, 194, 194, 194, 193, 193, 192, 192, 191, 191, 191, 190, 190, 189, 189, 188, 188, 188, 187, 187, 186, 186, 186, 185, 185, 185, 185, 185, 184, 184, 184, 183, 183, 182, 182, 182, 181, 181, 181, 180, 180, 180, 179, 179, 178, 178, 178, 177, 177, 177, 176, 176, 176, 176, 176, 176, 175, 175, 175, 174, 174, 174, 174, 173, 173, 173, 172, 172, 172, 171, 171, 171, 170, 170, 170, 170, 169, 169, 169, 168, 168, 168, 168, 167, 167, 167, 167, 167, 167, 167, 166, 166, 166, 166, 165, 165, 165, 165, 164, 164, 164, 163, 163, 163, 163, 162, 162, 162, 162, 161, 161, 161, 161, 160, 160, 160, 160, 160, 159, 159, 159, 159, 158, 158, 158, 158, 158, 158, 158, 158, 157, 157, 157, 157, 157, 156, 156, 156, 156, 155, 155, 155, 155, 155, 154, 154, 154, 154, 154, 153, 153, 153, 153, 153, 152, 152, 152, 152, 152, 151, 151, 151, 151, 151, 150, 150, 150, 150, 150, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 148, 148, 148, 148, 148, 148, 147, 147, 147, 147, 147, 147, 146, 146, 146, 146, 146, 145, 145, 145, 145, 145, 145, 144, 144, 144, 144, 144, 144, 143, 143, 143, 143, 143, 143, 142, 142, 142, 142, 142, 142, 141, 141, 141, 141, 141, 141, 141, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 139, 139, 139, 139, 139, 139, 139, 138, 0, 3993141cc406Sopenharmony_ci DEC_CURVE,CRV_NORMALSCAN, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, 87, 87, 87, 87, 87, 87, 87, 87, 88, 88, 88, 88, 88, 88, 88, 88, 89, 89, 89, 89, 89, 89, 89, 90, 90, 90, 90, 90, 90, 91, 91, 91, 91, 91, 92, 92, 92, 92, 93, 93, 93, 93, 94, 94, 94, 95, 95, 95, 95, 95, 96, 96, 97, 97, 98, 98, 99, 99, 100, 100, 101, 101, 102, 102, 103, 104, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 113, 115, 117, 119, 121, 122, 124, 127, 130, 132, 135, 139, 142, 146, 149, 153, 158, 162, 167, 171, 176, 180, 186, 193, 202, 209, 216, 223, 232, 243, 254, 266, 279, 292, 306, 320, 335, 337, 351, 367, 380, 396, 414, 437, 464, 493, 520, 549, 583, 611, 644, 675, 711, 755, 785, 819, 859, 904, 957, 1021, 1099, 1198, 1330, 1515, 1803, 2330, 3763, 0, 3994141cc406Sopenharmony_ci DEC_CURVE,CRV_PARKHOME , 138, 142, 146, 149, 153, 158, 162, 167, 171, 176, 180, 186, 193, 202, 209, 216, 223, 232, 243, 254, 266, 279, 292, 306, 320, 335, 337, 351, 367, 380, 396, 414, 437, 464, 493, 520, 549, 583, 611, 644, 675, 711, 755, 785, 819, 859, 904, 957, 1021, 1099, 1198, 1330, 1515, 1803, 2330, 3763, 0, 3995141cc406Sopenharmony_ci DEC_CURVE,CRV_SMEARING , 138, 139, 139, 139, 139, 139, 139, 139, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 141, 141, 141, 141, 141, 141, 141, 142, 142, 142, 142, 142, 142, 143, 143, 143, 143, 143, 143, 144, 144, 144, 144, 144, 144, 145, 145, 145, 145, 145, 145, 146, 146, 146, 146, 146, 147, 147, 147, 147, 147, 147, 148, 148, 148, 148, 148, 148, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 150, 150, 150, 150, 150, 151, 151, 151, 151, 151, 152, 152, 152, 152, 152, 153, 153, 153, 153, 153, 154, 154, 154, 154, 154, 155, 155, 155, 155, 155, 156, 156, 156, 156, 157, 157, 157, 157, 157, 158, 158, 158, 158, 158, 158, 158, 158, 159, 159, 159, 159, 160, 160, 160, 160, 160, 161, 161, 161, 161, 162, 162, 162, 162, 163, 163, 163, 163, 164, 164, 164, 165, 165, 165, 165, 166, 166, 166, 166, 167, 167, 167, 167, 167, 167, 167, 168, 168, 168, 168, 169, 169, 169, 170, 170, 170, 170, 171, 171, 171, 172, 172, 172, 173, 173, 173, 174, 174, 174, 174, 175, 175, 175, 176, 176, 176, 176, 176, 176, 177, 177, 177, 178, 178, 178, 179, 179, 180, 180, 180, 181, 181, 181, 182, 182, 182, 183, 183, 184, 184, 184, 185, 185, 185, 185, 185, 186, 186, 186, 187, 187, 188, 188, 188, 189, 189, 190, 190, 191, 191, 191, 192, 192, 193, 193, 194, 194, 194, 194, 194, 195, 195, 196, 196, 197, 197, 198, 198, 199, 199, 200, 200, 201, 201, 202, 202, 203, 203, 203, 203, 204, 204, 205, 205, 206, 207, 207, 208, 208, 209, 209, 210, 211, 211, 212, 212, 212, 213, 213, 214, 214, 215, 216, 216, 217, 218, 218, 219, 220, 220, 221, 221, 221, 222, 223, 224, 224, 225, 226, 227, 227, 228, 229, 230, 230, 230, 231, 232, 233, 233, 234, 235, 236, 237, 238, 239, 239, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 265, 266, 266, 267, 269, 270, 271, 273, 274, 275, 276, 277, 279, 280, 282, 283, 284, 285, 287, 289, 290, 292, 293, 294, 296, 298, 300, 301, 302, 304, 306, 308, 310, 311, 313, 315, 318, 320, 321, 323, 326, 328, 330, 332, 335, 337, 339, 342, 344, 347, 349, 352, 355, 358, 361, 364, 366, 370, 374, 376, 380, 383, 387, 391, 394, 399, 402, 407, 411, 416, 420, 425, 430, 436, 441, 446, 453, 458, 464, 472, 478, 485, 493, 501, 509, 518, 527, 537, 548, 559, 571, 583, 597, 611, 626, 644, 662, 682, 704, 728, 755, 785, 819, 859, 904, 957, 1021, 1099, 1198, 1330, 1515, 1803, 2330, 3763, 0, 3996141cc406Sopenharmony_ci DEC_CURVE,CRV_BUFFERFULL, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 93, 94, 94, 94, 95, 95, 95, 95, 95, 96, 96, 97, 97, 98, 98, 99, 99, 100, 100, 101, 101, 102, 102, 103, 104, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 113, 115, 117, 119, 121, 122, 124, 127, 130, 132, 135, 139, 142, 146, 149, 153, 158, 162, 167, 171, 176, 180, 186, 193, 202, 209, 216, 223, 232, 243, 254, 266, 279, 292, 306, 320, 335, 337, 351, 367, 380, 396, 414, 437, 464, 493, 520, 549, 583, 611, 644, 675, 711, 755, 785, 819, 859, 904, 957, 1021, 1099, 1198, 1330, 1515, 1803, 2330, 3763, 0, 3997141cc406Sopenharmony_ci -2, 3998141cc406Sopenharmony_ci 3999141cc406Sopenharmony_ci /* motorcurve 6 */ 4000141cc406Sopenharmony_ci 1, 1, 1, 0, /* mri, msi, skiplinecount, motorbackstep */ 4001141cc406Sopenharmony_ci ACC_CURVE,CRV_NORMALSCAN, 23999, 0, 4002141cc406Sopenharmony_ci ACC_CURVE,CRV_PARKHOME , 5360, 3362, 2628, 2229, 1973, 1791, 1654, 1547, 1458, 1384, 1319, 1264, 1214, 1170, 1131, 1096, 1063, 1034, 1006, 981, 958, 937, 916, 897, 880, 863, 847, 832, 818, 805, 792, 780, 769, 758, 747, 737, 727, 718, 709, 700, 692, 0, 4003141cc406Sopenharmony_ci ACC_CURVE,CRV_SMEARING , 23999, 0, 4004141cc406Sopenharmony_ci DEC_CURVE,CRV_NORMALSCAN, 23999, 0, 4005141cc406Sopenharmony_ci DEC_CURVE,CRV_PARKHOME , 692, 700, 709, 718, 727, 737, 747, 758, 769, 780, 792, 805, 818, 832, 847, 863, 880, 897, 916, 937, 958, 981, 1006, 1034, 1063, 1096, 1131, 1170, 1214, 1264, 1319, 1384, 1458, 1547, 1654, 1791, 1973, 2229, 2628, 3362, 5360, 0, 4006141cc406Sopenharmony_ci DEC_CURVE,CRV_SMEARING , 23999, 0, 4007141cc406Sopenharmony_ci DEC_CURVE,CRV_BUFFERFULL, 23999, 0, 4008141cc406Sopenharmony_ci -2, 4009141cc406Sopenharmony_ci 4010141cc406Sopenharmony_ci /* motorcurve 7 */ 4011141cc406Sopenharmony_ci 1, 1, 1, 0, /* mri, msi, skiplinecount, motorbackstep */ 4012141cc406Sopenharmony_ci ACC_CURVE,CRV_NORMALSCAN, 6667, 0, 4013141cc406Sopenharmony_ci ACC_CURVE,CRV_PARKHOME , 5360, 3362, 2628, 2229, 1973, 1791, 1654, 1547, 1458, 1384, 1319, 1264, 1214, 1170, 1131, 1096, 1063, 1034, 1006, 981, 958, 937, 916, 897, 880, 863, 847, 832, 818, 805, 792, 780, 769, 758, 747, 737, 727, 718, 709, 700, 692, 0, 4014141cc406Sopenharmony_ci ACC_CURVE,CRV_SMEARING , 6667, 0, 4015141cc406Sopenharmony_ci DEC_CURVE,CRV_NORMALSCAN, 6667, 0, 4016141cc406Sopenharmony_ci DEC_CURVE,CRV_PARKHOME , 692, 700, 709, 718, 727, 737, 747, 758, 769, 780, 792, 805, 818, 832, 847, 863, 880, 897, 916, 937, 958, 981, 1006, 1034, 1063, 1096, 1131, 1170, 1214, 1264, 1319, 1384, 1458, 1547, 1654, 1791, 1973, 2229, 2628, 3362, 5360, 0, 4017141cc406Sopenharmony_ci DEC_CURVE,CRV_SMEARING , 6667, 0, 4018141cc406Sopenharmony_ci DEC_CURVE,CRV_BUFFERFULL, 6667, 0, 4019141cc406Sopenharmony_ci -2, 4020141cc406Sopenharmony_ci 4021141cc406Sopenharmony_ci /* motorcurve 8 */ 4022141cc406Sopenharmony_ci 1, 1, 1, 0, /* mri, msi, skiplinecount, motorbackstep */ 4023141cc406Sopenharmony_ci ACC_CURVE,CRV_NORMALSCAN, 1046, 1046, 1046, 1046, 1046, 1046, 647, 501, 421, 370, 333, 305, 284, 266, 251, 239, 228, 218, 210, 202, 196, 190, 184, 179, 174, 170, 166, 162, 159, 155, 152, 149, 147, 144, 142, 139, 137, 135, 133, 131, 129, 127, 126, 124, 123, 121, 120, 118, 117, 116, 114, 113, 112, 111, 110, 109, 108, 107, 106, 105, 104, 103, 102, 101, 100, 100, 99, 98, 97, 96, 96, 95, 94, 94, 93, 92, 92, 91, 91, 90, 89, 89, 88, 88, 87, 87, 86, 86, 85, 85, 84, 84, 83, 83, 82, 82, 82, 81, 81, 80, 80, 79, 79, 79, 78, 78, 78, 77, 77, 76, 76, 76, 75, 75, 75, 74, 74, 74, 74, 73, 73, 73, 72, 72, 72, 71, 71, 71, 71, 70, 70, 70, 70, 69, 69, 69, 69, 68, 68, 68, 68, 67, 67, 67, 67, 66, 66, 66, 66, 65, 65, 65, 65, 64, 64, 64, 64, 63, 63, 63, 63, 62, 62, 62, 62, 61, 61, 61, 61, 61, 60, 60, 60, 60, 60, 60, 59, 59, 59, 59, 59, 59, 59, 58, 58, 58, 58, 58, 58, 57, 57, 57, 57, 57, 57, 57, 56, 56, 56, 56, 56, 56, 56, 56, 55, 55, 55, 55, 55, 55, 55, 55, 54, 54, 54, 54, 54, 54, 54, 54, 53, 53, 53, 53, 53, 53, 53, 53, 52, 52, 52, 52, 52, 52, 52, 52, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 39, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 23, 23, 0, 4024141cc406Sopenharmony_ci ACC_CURVE,CRV_PARKHOME , 1045, 678, 604, 554, 332, 332, 304, 283, 265, 250, 238, 227, 217, 209, 201, 195, 189, 183, 178,173, 169, 165, 161, 158, 154, 151, 148, 146, 143, 141, 138, 136, 134, 132, 130, 128, 126, 125, 123, 122, 120, 119, 117, 116, 115, 113, 112, 111, 110, 109, 108, 107, 106, 105, 104, 103,102, 101, 100, 99, 99, 98, 97, 96, 95, 95, 94, 93, 93, 92, 91, 91, 90, 90, 89, 88, 88, 87, 87, 86, 86, 85, 85, 84, 84, 83, 83, 82, 82, 81, 81, 81, 80, 80, 79, 79, 78, 78, 78, 77, 77, 77, 76, 76, 75, 75, 75, 74, 74, 74, 73, 73, 73, 73, 72, 72, 72, 71, 71, 71, 70, 70, 70, 70, 69, 69, 69, 69, 68, 68, 68, 68, 67, 67, 67, 67, 66, 66, 66, 66, 65, 65, 65, 65, 65, 64, 64, 64, 64, 64, 63, 63, 63, 63, 63, 62, 62, 62, 62, 62, 61, 61, 61, 61, 61, 61, 60, 60, 60, 60, 60, 60, 59, 59, 59, 59, 59, 59, 58, 58, 58, 58, 58, 58, 58, 57, 57, 57, 57, 57, 57, 57, 56, 56, 56, 56, 56, 56, 56, 55, 55, 55, 55, 55, 55, 55, 55, 54, 54, 54, 54, 54, 54, 54, 54, 53, 53, 53, 53, 53, 53, 53, 53, 53, 52, 52, 52, 52, 52, 52, 52, 52, 52, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 39, 0, 4025141cc406Sopenharmony_ci ACC_CURVE,CRV_SMEARING , 1045, 678, 604, 554, 332, 332, 304, 283, 265, 250, 238, 227, 217, 209, 201, 195, 189, 183, 178,173, 169, 165, 161, 158, 154, 151, 148, 146, 143, 141, 138, 136, 134, 132, 130, 128, 126, 125, 123, 122, 120, 119, 117, 116, 115, 113, 112, 111, 110, 109, 108, 107, 106, 105, 104, 103,102, 101, 100, 99, 99, 98, 97, 96, 95, 95, 94, 93, 93, 92, 91, 91, 90, 90, 89, 88, 88, 87, 87, 86, 86, 85, 85, 84, 84, 83, 83, 82, 82, 81, 81, 81, 80, 80, 79, 79, 78, 78, 78, 77, 77, 77, 76, 76, 75, 75, 75, 74, 74, 74, 73, 73, 73, 73, 72, 72, 72, 71, 71, 71, 70, 70, 70, 70, 69, 69, 69, 69, 68, 68, 68, 68, 67, 67, 67, 67, 66, 66, 66, 66, 65, 65, 65, 65, 65, 64, 64, 64, 64, 64, 63, 63, 63, 63, 63, 62, 62, 62, 62, 62, 61, 61, 61, 61, 61, 61, 60, 60, 60, 60, 60, 60, 59, 59, 59, 59, 59, 59, 58, 58, 58, 58, 58, 58, 58, 57, 57, 57, 57, 57, 57, 57, 56, 56, 56, 56, 56, 56, 56, 55, 55, 55, 55, 55, 55, 55, 55, 54, 54, 54, 54, 54, 54, 54, 54, 53, 53, 53, 53, 53, 53, 53, 53, 53, 52, 52, 52, 52, 52, 52, 52, 52, 52, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 39, 0, 4026141cc406Sopenharmony_ci DEC_CURVE,CRV_NORMALSCAN, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 28, 28, 28, 28, 28, 28, 28, 28, 29, 29, 29, 29, 29, 29, 29, 30, 30, 30, 30, 31, 31, 31, 31, 32, 32, 32, 32, 33, 33, 34, 34, 35, 35, 36, 37, 38, 38, 39, 40, 41, 42, 43, 45, 46, 47, 48, 50, 51, 53, 54, 57, 59, 61, 63, 65, 68, 71, 75, 78, 82, 86, 90, 94, 94, 98, 103, 106, 111, 116, 122, 130, 138, 145, 153, 163, 171, 180, 188, 198, 211, 219, 228, 239, 252, 267, 284, 306, 334, 370, 422, 502, 648, 1045, 0, 4027141cc406Sopenharmony_ci DEC_CURVE,CRV_PARKHOME , 39, 40, 41, 42, 43, 45, 46, 47, 48, 50, 51, 53, 54, 57, 59, 61, 63, 65, 68, 71, 75, 78, 82, 86, 90, 94, 94, 98, 103, 106, 111, 116, 122, 130, 138, 145, 153, 163, 171, 180, 188, 198, 211, 219, 228, 239, 252, 267, 284, 306, 334, 370, 422, 502, 648, 1045, 0, 4028141cc406Sopenharmony_ci DEC_CURVE,CRV_SMEARING , 39, 39, 39, 39, 39, 39, 39, 39, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 43, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 46, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 54, 54, 54, 54, 54, 54, 54, 54, 54, 55, 55, 55, 55, 55, 55, 55, 55, 55, 56, 56, 56, 56, 56, 56, 56, 56, 57, 57, 57, 57, 57, 57, 57, 57, 58, 58, 58, 58, 58, 58, 58, 59, 59, 59, 59, 59, 59, 59, 60, 60, 60, 60, 60, 60, 60, 61, 61, 61, 61, 61, 61, 62, 62, 62, 62, 62, 62, 63, 63, 63, 63, 63, 64, 64, 64, 64, 64, 65, 65, 65, 65, 65, 66, 66, 66, 66, 66, 67, 67, 67, 67, 67, 68, 68, 68, 68, 69, 69, 69, 69, 70, 70, 70, 70, 71, 71, 71, 71, 72, 72, 72, 73, 73, 73, 73, 74, 74, 74, 75, 75, 75, 76, 76, 76, 77, 77, 77, 78, 78, 78, 79, 79, 79, 80, 80, 81, 81, 81, 82, 82, 83, 83, 84, 84, 84, 85, 85, 86, 86, 87, 87, 88, 88, 89, 90, 90, 91, 91, 92, 93, 93, 94, 94, 95, 96, 96, 97, 98, 99, 99, 100, 101, 102, 103, 104, 105, 105, 106, 107, 108, 109, 110, 112, 113, 114, 115, 116, 118, 119, 120, 122, 123, 125, 127, 128, 130, 132, 134, 136, 138, 140, 142, 145, 147, 150, 153, 156, 159, 163, 167, 171, 175, 180, 185, 190, 196, 203, 211, 219, 228, 239, 252, 267, 284, 306, 334, 370, 422, 502, 648, 1045, 0, 4029141cc406Sopenharmony_ci DEC_CURVE,CRV_BUFFERFULL, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 28, 28, 28, 28, 28, 28, 28, 28, 29, 29, 29, 29, 29, 29, 29, 30, 30, 30, 30, 31, 31, 31, 31, 32, 32, 32, 32, 33, 33, 34, 34, 35, 35, 36, 37, 38, 38, 39, 40, 41, 42, 43, 45, 46, 47, 48, 50, 51, 53, 54, 57, 59, 61, 63, 65, 68, 71, 75, 78, 82, 86, 90, 94, 94, 98, 103, 106, 111, 116, 122, 130, 138, 145, 153, 163, 171, 180, 188, 198, 211, 219, 228, 239, 252, 267, 284, 306, 334, 370, 422, 502, 648, 1045, 0, 4030141cc406Sopenharmony_ci -1 4031141cc406Sopenharmony_ci }; 4032141cc406Sopenharmony_ci 4033141cc406Sopenharmony_ci rst = (SANE_Int *)malloc(sizeof(steps)); 4034141cc406Sopenharmony_ci if (rst != NULL) 4035141cc406Sopenharmony_ci memcpy(rst, &steps, sizeof(steps)); 4036141cc406Sopenharmony_ci 4037141cc406Sopenharmony_ci return rst; 4038141cc406Sopenharmony_ci} 4039141cc406Sopenharmony_ci 4040141cc406Sopenharmony_cistatic SANE_Int *hp3800_motor() 4041141cc406Sopenharmony_ci{ 4042141cc406Sopenharmony_ci SANE_Int *rst = NULL; 4043141cc406Sopenharmony_ci SANE_Int steps[] = 4044141cc406Sopenharmony_ci { 4045141cc406Sopenharmony_ci /* motorcurve 1 */ 4046141cc406Sopenharmony_ci 1, 1, 1, 0, /* mri, msi, skiplinecount, motorbackstep */ 4047141cc406Sopenharmony_ci ACC_CURVE,CRV_NORMALSCAN,2000,1984,1968,1953,1937,1921,1906,1890,1874,1859,1843,1827,1812,1796,1781,1765,1749,1734,1715,1700,1684,1669,1653,1637,1622,1606,1590,1572,1556,1541,1525,1510,1494,1478,1463,1447,1431,1416,1400,1384,1366,1351,1335,1319,1304,1288,1272,1257,1241,1225,1210,1194,1179,1160,1145,1129,1113,1098,1082,1066,1051,1035,1017,1001,986,970,954,939,923,907,892,876,861,845,829,814,798,782,767,749, 0, 4048141cc406Sopenharmony_ci ACC_CURVE,CRV_PARKHOME ,4705,2913,2253,1894,1662,1498,1374,1276,1196,1129,1073,1024,981,944,910,880,852,827,804,783,764,746,729,713,699,685,672,659,648,637,626,616,607,598,589,581,573,565,558,551,544,538,532,526,520,514,509,503,500, 0, 4049141cc406Sopenharmony_ci ACC_CURVE,CRV_SMEARING ,200,12,14,16, 0, 4050141cc406Sopenharmony_ci DEC_CURVE,CRV_NORMALSCAN,749,1166,1583,2000, 0, 4051141cc406Sopenharmony_ci DEC_CURVE,CRV_PARKHOME ,500,503,509,514,520,526,532,538,544,551,558,565,573,581,589,598,607,616,626,637,648,659,672,685,699,713,729,746,764,783,804,827,852,880,910,944,981,1024,1073,1129,1196,1276,1374,1498,1662,1894,2253,2913,4705, 0, 4052141cc406Sopenharmony_ci DEC_CURVE,CRV_SMEARING ,300,234,167,100, 0, 4053141cc406Sopenharmony_ci DEC_CURVE,CRV_BUFFERFULL,1100,867,633,400, 0, 4054141cc406Sopenharmony_ci -2, 4055141cc406Sopenharmony_ci 4056141cc406Sopenharmony_ci /* motorcurve 2 */ 4057141cc406Sopenharmony_ci 1, 1, 1, 0, /* mri, msi, skiplinecount, motorbackstep */ 4058141cc406Sopenharmony_ci ACC_CURVE,CRV_NORMALSCAN,4705,2664,2061,1732,1521,1370,1257,1167,1094,1033,982,937,898,864,833,805,780,757,736,717,699,683,667,653,640,627,615,604,593,583,574,564,556,547,540,532,525,518,511,505,499,493,487,481,476,471,466,461,456,452,447,443,439,435,431,427,424,420,417,413,410,407,403,400,397,394,391,389,386,383,381,378,375,373,371,368,366,364,361,359,357,355,353,351,349,347,345,343,341,339,338,336,334,332,331,329,327,326,324,323,321,320,318,317,315,314,312,311,310,308,307,306,304,303,302,301,299,298,297,296,295,293,292,291,290,289,288,287,286,285,284,283,282,281,280,279,278,277,276,275,274,273,272,271,270,270,269,268,267,266,265,264,264,263,262,261,260,260,259,258,257,257,256,255,255,254,253,252,252,251,250,250,249,248,248,247,246,246,245,244,244,243,242,242,241,241,240,239,239,238,238,237,237,236,235,235,234,234,233,233,232,232,231,231,230,230,229,229,228,227,227,227,226,226,225,225,224,224,223,223,222,222,221,221,220,220,219,219,219,218,218,217,217,216,216,216,215,215,214,214,214,213,213,212,212,212,211,211,210,210,210,209,209,208,208,208,207,207,207,206,206,206,205,205,204,204,204,203,203,203,202,202,202,201,201,201,200,200,200,199,199,199,198,198,198,197,197,197,197,196,196,196,195,195,195,194,194,194,194,193,193,193,192,192,192,192,191,191,191,190,190,190,190,189,189,189,188,188,188,188,187,187,187,187,186,186,186,186,185,185,185,185,184,184,184,184,183,183,183,183,182,182,182,182,181,181,181,181,181,180,180,180,180,179,179,179,179,178,178,178,178,178,177,177,177,177,177,176,176,176,176,175,175,175,175,175,174,174,174,174,174,173,173,173,173,173,172,172,172,172,172,171,171,171, 0, 4059141cc406Sopenharmony_ci ACC_CURVE,CRV_PARKHOME ,4705,2913,2253,1894,1662,1498,1374,1276,1196,1129,1073,1024,981,944,910,880,852,827,804,783,764,746,729,713,699,685,672,659,648,637,626,616,607,598,589,581,573,565,558,551,544,538,532,526,520,514,509,503,500, 0, 4060141cc406Sopenharmony_ci ACC_CURVE,CRV_SMEARING ,200,12,14,16, 0, 4061141cc406Sopenharmony_ci DEC_CURVE,CRV_NORMALSCAN,171,172,172,173,174,174,175,176,176,177,178,178,179,180,181,181,182,183,184,184,185,186,187,188,189,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,207,208,209,210,211,213,214,215,217,218,219,221,222,224,225,227,228,230,232,233,235,237,239,241,243,245,247,249,251,253,255,258,260,262,265,268,270,273,276,279,282,285,289,292,296,299,303,307,311,316,320,325,330,335,341,347,353,359,366,373,381,390,398,408,418,429,441,455,469,485,503,523,545,571,601,636,678,730,796,883,1005,1195,1544,4705, 0, 4062141cc406Sopenharmony_ci DEC_CURVE,CRV_PARKHOME ,500,503,509,514,520,526,532,538,544,551,558,565,573,581,589,598,607,616,626,637,648,659,672,685,699,713,729,746,764,783,804,827,852,880,910,944,981,1024,1073,1129,1196,1276,1374,1498,1662,1894,2253,2913,4705, 0, 4063141cc406Sopenharmony_ci DEC_CURVE,CRV_SMEARING ,300,234,167,100, 0, 4064141cc406Sopenharmony_ci DEC_CURVE,CRV_BUFFERFULL,1100,867,633,400, 0, 4065141cc406Sopenharmony_ci -2, 4066141cc406Sopenharmony_ci 4067141cc406Sopenharmony_ci /* motorcurve 3 */ 4068141cc406Sopenharmony_ci 1, 1, 1, 0, /* mri, msi, skiplinecount, motorbackstep */ 4069141cc406Sopenharmony_ci ACC_CURVE,CRV_NORMALSCAN,5360,3655,2855,2422,2142,1944,1795,1678,1582,1503,1434,1374, 0, 4070141cc406Sopenharmony_ci ACC_CURVE,CRV_PARKHOME ,5360,3362,2628,2229,1973,1791,1654,1547,1458,1384,1319,1264,1214,1170,1131,1096,1063,1034,1006,981,958,937,916,897,880,863,847,832,818,805,792,780,769,758,747,737,727,718,709,700,692,684,677,669,662,655,648,642,636,629,624,618,612,607,602,596,591,587,582,577,573,568,564,560,556,552,548,544,540,537,533,530,526,523,520,516,513,510,507,504,501,498,496,493,490,488,485,482,480,477,475,472,470,468,466,463,461,459,457,455,453,450,448,446,444,443,441,439,437,435,433,431,430,428,426,425,423,421,420,418,416,415,413,412,410,409,407,406,405,403,402,400,399,398,396,395,394,392,391,390,389,387,386,385,384,382,381,380,379,378,377,376,374,373,372,371,370,369,368,367,366,365,364,363,362,361,360,359,358,357,356,355,354,353,353,352,351,350,349,348, 0, 4071141cc406Sopenharmony_ci ACC_CURVE,CRV_SMEARING ,5360,3362,2628,2229,1973,1791,1654,1547, 0, 4072141cc406Sopenharmony_ci DEC_CURVE,CRV_NORMALSCAN,1374,1434,1503,1582,1678,1795,1944,2142,2422,2855,3655,5360, 0, 4073141cc406Sopenharmony_ci DEC_CURVE,CRV_PARKHOME ,348,351,353,356,359,362,365,368,371,374,378,381,385,389,392,396,400,405,409,413,418,423,428,433,439,444,450,457,463,470,477,485,493,501,510,520,530,540,552,564,577,591,607,624,642,662,684,709,737,769,805,847,897,958,1034,1131,1264,1458,1791,2628,5360, 0, 4074141cc406Sopenharmony_ci DEC_CURVE,CRV_SMEARING ,1547,1654,1791,1973,2229,2628,3362,5360, 0, 4075141cc406Sopenharmony_ci DEC_CURVE,CRV_BUFFERFULL,1374,1434,1503,1582,1678,1795,1944,2142,2422,2855,3655,5360, 0, 4076141cc406Sopenharmony_ci -2, 4077141cc406Sopenharmony_ci 4078141cc406Sopenharmony_ci /* motorcurve 4 */ 4079141cc406Sopenharmony_ci 1, 1, 1, 0, /* mri, msi, skiplinecount, motorbackstep */ 4080141cc406Sopenharmony_ci ACC_CURVE,CRV_NORMALSCAN,4705,2664,2061,1732,1521,1370,1257,1167,1094,1033,982,937,898,864,833,805,780,757,736,717,699,683,667,653,640,627,615,604,593,583,574,564,556,547,540,532,525,518,511,505,499,493,487,481,476,471,466,461,456,452,447,443,439,435,431,427,424,420,417,413,410,407,403,400,397,394,391,389,386,383,381,378,375,373,371,368,366,364,361,359,357,355,353,351,349,347,345,343,341,339,338,336,334,332,331,329,327,326,324,323,321,320,318,317,315,314,312,311,310,308,307,306,304,303,302,301,299,298,297,296,295,293,292,291,290,289,288,287,286,285,284,283,282,281,280,279,278,277,276,275,274,273,272,271,270,270,269,268,267,266,265,264,264,263,262,261,260,260,259,258,257,257,256,255,255,254,253,252,252,251,250,250,249,248,248,247,246,246,245,244,244,243,242,242,241,241,240,239,239,238,238,237,237,236,235,235,234,234,233,233,232,232,231,231,230,230,229,229,228,227,227,227,226,226,225,225,224,224,223,223,222,222,221,221,220,220,219,219,219,218,218,217,217,216,216,216,215,215,214,214,214,213,213,212,212,212,211,211,210,210,210,209,209,208,208,208,207,207,207,206,206,206,205,205,204,204,204,203,203,203,202,202,202,201,201,201,200,200,200,199,199,199,198,198,198,197,197,197,197,196,196,196,195,195,195,194,194,194,194,193,193,193,192,192,192,192,191,191,191,190,190,190,190,189,189,189,188,188,188,188,187,187,187,187,186,186,186,186,185,185,185,185,184,184,184,184,183,183,183,183,182,182,182,182,181,181,181,181,181,180,180,180,180,179,179,179,179,178,178,178,178,178,177,177,177,177,177,176,176,176,176,175,175,175,175,175,174,174,174,174,174,173,173,173,173,173,172,172,172,172,172,171,171,171, 0, 4081141cc406Sopenharmony_ci ACC_CURVE,CRV_PARKHOME ,4705,2888,2234,1878,1648,1485,1362,1265,1186,1120,1064,1016,973,936,903,873,845,821,798,777,758,740,723,708,693,679,666,654,643,632,621,612,602,593,585,576,569,561,554,547,540,534,528,522,516,510,505,499,494,490,485,480,476,471,467,463,459,455,451,448,444,440,437,434,430,427,424,421,418,415,412,409,407,404,401,399,396,394,391,389,387,384,382,380,378,376,374,371,369,367,366,364,362,360,358,356,354,353,351,349,348,346,344,343,341,340,338,337,335,334,332,331,329,328,327,325,324,323,321,320,319,318,316,315,314,313,312,311,309,308,307,306,305,304,303,302,301,300,299,298,297,296,295,294,293,292,291,290,289,288,287,286,285,285,284,283,282,281,280,279,279,278,277,276,275,275,274,273,272,272,271,270,269,269,268,267,267,266,265,264,264,263,262,262,261,260,260,259,259,258,257,257,256,255,255,254,254,253,252,252,251,251,250,249,249,248,248,247,247,246,246,245,245,244,243,243,242,242,241,241,240,240,239,239,238,238,237,237,237,236,236,235,235,234,234,233,233,232,232,231,231,231,230,230,229,229,228,228,228,227,227,226,226,225,225,225,224,224,223,223,223,222,222,222,221,221,220,220,220,219,219,219,218,218,217,217,217,216,216,216,215,215,215,214,214,214,213,213,213,212,212,212,211,211,211,210,210,210,209,209,209,208,208,208,207,207,207,207,206,206,206,205,205,205,204,204,204,204,203,203,203,202,202,202,202,201,201,201,200,200,200,200,199,199,199,199,198,198,198,198,197,197,197,196,196,196,196,195,195,195,195,194,194,194,194,193,193,193,193,192,192,192,192,192,191,191,191,191,190,190,190,190,189,189,189,189,189,188,188,188,188,187,187,187,187,187,186,186,186,186,186,185,185,185,185,184,184,184,184,184,183,183,183,183,183,182,182,182,182,182,181,181,181,181,181,180,180,180,180,180,180,179,179,179,179,179,178,178,178,178,178,177,177,177,177,177,177,176,176,176,176,176,176,175,175,175,175,175,174,174,174,174,174,174,173,173,173,173,173,173,172,172,172,172,172,172,171,171,171,171, 0, 4082141cc406Sopenharmony_ci ACC_CURVE,CRV_SMEARING ,4705,3056,2724,2497,1498,1498,1374,1276,1196,1130,1073,1025,982,944,911,880,853,828,805,784,764,746,730,714,699,685,675, 0, 4083141cc406Sopenharmony_ci DEC_CURVE,CRV_NORMALSCAN,171,172,172,173,174,174,175,176,176,177,178,178,179,180,181,181,182,183,184,184,185,186,187,188,189,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,207,208,209,210,211,213,214,215,217,218,219,221,222,224,225,227,228,230,232,233,235,237,239,241,243,245,247,249,251,253,255,258,260,262,265,268,270,273,276,279,282,285,289,292,296,299,303,307,311,316,320,325,330,335,341,347,353,359,366,373,381,390,398,408,418,429,441,455,469,485,503,523,545,571,601,636,678,730,796,883,1005,1195,1544,4705, 0, 4084141cc406Sopenharmony_ci DEC_CURVE,CRV_PARKHOME ,171,172,172,173,173,174,174,175,175,176,176,177,177,178,179,179,180,180,181,182,182,183,183,184,185,185,186,187,187,188,189,189,190,191,192,192,193,194,195,195,196,197,198,199,199,200,201,202,203,204,205,206,206,207,208,209,210,211,212,213,214,215,217,218,219,220,221,222,223,225,226,227,228,230,231,232,234,235,237,238,240,241,243,244,246,247,249,251,253,254,256,258,260,262,264,266,268,271,273,275,278,280,282,285,288,290,293,296,299,302,305,309,312,316,319,323,327,331,336,340,345,350,355,360,365,371,377,384,391,398,406,414,422,432,441,452,463,476,489,504,520,538,558,580,605,633,667,706,752,810,883,979,1116,1326,1714,4705, 0, 4085141cc406Sopenharmony_ci DEC_CURVE,CRV_SMEARING ,675,685,699,714,730,746,764,784,805,828,853,880,911,944,982,1025,1073,1130,1196,1276,1374,1498,1498,2497,2724,3056,4705, 0, 4086141cc406Sopenharmony_ci DEC_CURVE,CRV_BUFFERFULL,171,172,172,173,174,174,175,176,176,177,178,178,179,180,181,181,182,183,184,184,185,186,187,188,189,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,207,208,209,210,211,213,214,215,217,218,219,221,222,224,225,227,228,230,232,233,235,237,239,241,243,245,247,249,251,253,255,258,260,262,265,268,270,273,276,279,282,285,289,292,296,299,303,307,311,316,320,325,330,335,341,347,353,359,366,373,381,390,398,408,418,429,441,455,469,485,503,523,545,571,601,636,678,730,796,883,1005,1195,1544,4705, 0, 4087141cc406Sopenharmony_ci -2, 4088141cc406Sopenharmony_ci 4089141cc406Sopenharmony_ci /* motorcurve 5 */ 4090141cc406Sopenharmony_ci 1, 1, 1, 0, /* mri, msi, skiplinecount, motorbackstep */ 4091141cc406Sopenharmony_ci ACC_CURVE,CRV_NORMALSCAN,3763,3763,3763,3763,3763,3763,2444,2178,1997,1198,1198,1098,1020,956,903,858,819,785,754,727,703,681,662,644,626,610,596,582,571,558,547,537,527,518,509,500,492,485,478,471,464,458,452,446,440,435,430,425,420,415,410,407,402,398,394,391,386,383,380,376,373,369,366,364,360,357,355,352,349,347,344,341,338,337,334,332,329,328,325,323,321,319,317,315,313,311,310,308,306,304,302,301,299,297,295,294,293,291,290,288,286,285,284,283,281,280,278,277,275,275,274,272,271,270,268,267,266,265,264,263,262,261,259,258,257,257,256,255,254,253,251,250,249,248,248,247,246,245,244,243,243,242,241,240,239,239,238,237,236,235,235,234,233,232,231,230,230,230,229,228,228,227,226,225,225,224,223,222,222,221,221,221,220,219,219,218,217,217,216,215,215,214,213,213,212,212,212,211,211,210,209,209,208,208,207,207,206,206,205,204,204,203,203,203,203,202,202,201,201,200,200,199,199,198,198,197,197,196,196,195,195,194,194,194,194,194,193,193,192,192,191,191,190,190,190,189,189,188,188,188,187,187,186,186,185,185,185,185,185,185,184,184,183,183,183,182,182,182,181,181,180,180,180,179,179,179,178,178,178,177,177,177,176,176,176,176,176,176,175,175,175,174,174,174,173,173,173,172,172,172,171,171,171,171,170,170,170,169,169,169,169,168,168,168,167,167,167,167,167,167,167,166,166,166,166,165,165,165,165,164,164,164,163,163,163,163,162,162,162,162,161,161,161,161,160,160,160,160,159,159,159,159,159,158,158,158,158,158,158,158,158,157,157,157,157,157,156,156,156,156,155,155,155,155,155,154,154,154,154,154,153,153,153,153,152,152,152,152,152,151,151,151,151,151,150,150,150,150,150,149,149,149,149,149,149,149,149,149,149,149,148,148,148,148,148,147,147,147,147,147,147,146,146,146,146,146,145,145,145,145,145,145,144,144,144,144,144,144,143,143,143,143,143,143,142,142,142,142,142,142,141,141,141,141,141,141,140,140,140,140,140,140,140,140,140,140,140,140,140,139,139,139,139,139,139,139,138,138,138,138,138,138,138,137,137,137,137,137,137,137,136,136,136,136,136,136,136,135,135,135,135,135,135,135,134,134,134,134,134,134,134,134,133,133,133,133,133,133,133,133,132,132,132,132,132,132,132,132,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,131,130,130,130,130,130,130,130,130,129,129,129,129,129,129,129,129,129,128,128,128,128,128,128,128,128,128,127,127,127,127,127,127,127,127,127,126,126,126,126,126,126,126,126,126,125,125,125,125,125,125,125,125,125,125,124,124,124,124,124,124,124,124,124,124,123,123,123,123,123,123,123,123,123,123,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,121,121,121,121,121,121,121,121,121,121,121,120,120,120,120,120,120,120,120,120,120,120,119,119,119,119,119,119,119,119,119,119,119,119,118,118,118,118,118,118,118,118,118,118,118,118,117,117,117,117,117,117,117,117,117,117,117,117,116,116,116,116,116,116,116,116,116,116,116,116,115,115,115,115,115,115,115,115,115,115,115,115,115,114,114,114,114,114,114,114,114,114,114,114,114,114,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,112,112,112,112,112,112,112,112,112,112,112,112,112,112,112,111,111,111,111,111,111,111,111,111,111,111,111,111,111,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,106,106,106,106,106,106,106,106,106,106,106,106,106,106,106,106,106,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,105,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,104,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,103,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,102,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,101,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,98,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,97,96,96,96,96,96,96,96,96,96,96,96,96,96,96,96,96,96,96,96,96,96,96,96,96,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,95,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,94,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93, 0, 4092141cc406Sopenharmony_ci ACC_CURVE,CRV_PARKHOME ,3763,2330,1803,1515,1330,1198,1099,1021,957,904,859,819,785,755,728,704,682,662,644,626,611,597,583,571,559,548,537,527,518,509,501,493,485,478,472,464,458,453,446,441,436,430,425,420,416,411,407,402,399,394,391,387,383,380,376,374,370,366,364,361,358,355,352,349,347,344,342,339,337,335,332,330,328,326,323,321,320,318,315,313,311,310,308,306,304,302,301,300,298,296,294,293,292,290,289,287,285,284,283,282,280,279,277,276,275,274,273,271,270,269,267,266,266,265,263,262,261,260,259,258,257,256,255,254,253,252,251,250,249,248,248,247,246,245,244,243,242,241,240,239,239,239,238,237,236,235,234,233,233,232,231,230,230,230,229,228,227,227,226,225,224,224,223,222,221,221,221,220,220,219,218,218,217,216,216,215,214,214,213,213,212,212,212,211,211,210,209,209,208,208,207,207,206,205,205,204,204,203,203,203,203,202,202,201,201,200,200,199,199,198,198,197,197,196,196,195,195,194,194,194,194,194,193,193,192,192,191,191,191,190,190,189,189,188,188,188,187,187,186,186,186,185,185,185,185,185,184,184,184,183,183,182,182,182,181,181,181,180,180,180,179,179,178,178,178,177,177,177,176,176,176,176,176,176,175,175,175,174,174,174,174,173,173,173,172,172,172,171,171,171,170,170,170,170,169,169,169,168,168,168,168,167,167,167,167,167,167,167,166,166,166,166,165,165,165,165,164,164,164,163,163,163,163,162,162,162,162,161,161,161,161,160,160,160,160,160,159,159,159,159,158,158,158,158,158,158,158,158,157,157,157,157,157,156,156,156,156,155,155,155,155,155,154,154,154,154,154,153,153,153,153,153,152,152,152,152,152,151,151,151,151,151,150,150,150,150,150,149,149,149,149,149,149,149,149,149,149,148,148,148,148,148,148,147,147,147,147,147,147,146,146,146,146,146,145,145,145,145,145,145,144,144,144,144,144,144,143,143,143,143,143,143,142,142,142,142,142,142,141,141,141,141,141,141,141,140,140,140,140,140,140,140,140,140,140,140,140,140,139,139,139,139,139,139,139,138, 0, 4093141cc406Sopenharmony_ci ACC_CURVE,CRV_SMEARING ,3763,2330,1803,1515,1330,1198,1099,1021,957,904,859,819,785,755,728,704,682,662,644,626,611,597,583,571,559,548,540, 0, 4094141cc406Sopenharmony_ci DEC_CURVE,CRV_NORMALSCAN,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,87,87,87,87,87,87,87,87,88,88,88,88,88,88,88,88,89,89,89,89,89,89,89,90,90,90,90,90,90,91,91,91,91,91,92,92,92,92,93,93,93,93,94,94,94,95,95,95,95,95,96,96,97,97,98,98,99,99,100,100,101,101,102,102,103,104,104,105,106,107,108,109,110,111,112,113,113,115,117,119,121,122,124,127,130,132,135,139,142,146,149,153,158,162,167,171,176,180,186,193,202,209,216,223,232,243,254,266,279,292,306,320,335,337,351,367,380,396,414,437,464,493,520,549,583,611,644,675,711,755,785,819,859,904,957,1021,1099,1198,1330,1515,1803,2330,3763, 0, 4095141cc406Sopenharmony_ci DEC_CURVE,CRV_PARKHOME ,138,142,146,149,153,158,162,167,171,176,180,186,193,202,209,216,223,232,243,254,266,279,292,306,320,335,337,351,367,380,396,414,437,464,493,520,549,583,611,644,675,711,755,785,819,859,904,957,1021,1099,1198,1330,1515,1803,2330,3763, 0, 4096141cc406Sopenharmony_ci DEC_CURVE,CRV_SMEARING ,138,139,139,139,139,139,139,139,140,140,140,140,140,140,140,140,140,140,140,140,140,141,141,141,141,141,141,141,142,142,142,142,142,142,143,143,143,143,143,143,144,144,144,144,144,144,145,145,145,145,145,145,146,146,146,146,146,147,147,147,147,147,147,148,148,148,148,148,148,149,149,149,149,149,149,149,149,149,149,150,150,150,150,150,151,151,151,151,151,152,152,152,152,152,153,153,153,153,153,154,154,154,154,154,155,155,155,155,155,156,156,156,156,157,157,157,157,157,158,158,158,158,158,158,158,158,159,159,159,159,160,160,160,160,160,161,161,161,161,162,162,162,162,163,163,163,163,164,164,164,165,165,165,165,166,166,166,166,167,167,167,167,167,167,167,168,168,168,168,169,169,169,170,170,170,170,171,171,171,172,172,172,173,173,173,174,174,174,174,175,175,175,176,176,176,176,176,176,177,177,177,178,178,178,179,179,180,180,180,181,181,181,182,182,182,183,183,184,184,184,185,185,185,185,185,186,186,186,187,187,188,188,188,189,189,190,190,191,191,191,192,192,193,193,194,194,194,194,194,195,195,196,196,197,197,198,198,199,199,200,200,201,201,202,202,203,203,203,203,204,204,205,205,206,207,207,208,208,209,209,210,211,211,212,212,212,213,213,214,214,215,216,216,217,218,218,219,220,220,221,221,221,222,223,224,224,225,226,227,227,228,229,230,230,230,231,232,233,233,234,235,236,237,238,239,239,239,240,241,242,243,244,245,246,247,248,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,265,266,266,267,269,270,271,273,274,275,276,277,279,280,282,283,284,285,287,289,290,292,293,294,296,298,300,301,302,304,306,308,310,311,313,315,318,320,321,323,326,328,330,332,335,337,339,342,344,347,349,352,355,358,361,364,366,370,374,376,380,383,387,391,394,399,402,407,411,416,420,425,430,436,441,446,453,458,464,472,478,485,493,501,509,518,527,537,548,559,571,583,597,611,626,644,662,682,704,728,755,785,819,859,904,957,1021,1099,1198,1330,1515,1803,2330,3763, 0, 4097141cc406Sopenharmony_ci DEC_CURVE,CRV_BUFFERFULL,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,93,94,94,94,95,95,95,95,95,96,96,97,97,98,98,99,99,100,100,101,101,102,102,103,104,104,105,106,107,108,109,110,111,112,113,113,115,117,119,121,122,124,127,130,132,135,139,142,146,149,153,158,162,167,171,176,180,186,193,202,209,216,223,232,243,254,266,279,292,306,320,335,337,351,367,380,396,414,437,464,493,520,549,583,611,644,675,711,755,785,819,859,904,957,1021,1099,1198,1330,1515,1803,2330,3763, 0, 4098141cc406Sopenharmony_ci -2, 4099141cc406Sopenharmony_ci 4100141cc406Sopenharmony_ci /* motorcurve 6 */ 4101141cc406Sopenharmony_ci 1, 1, 1, 0, /* mri, msi, skiplinecount, motorbackstep */ 4102141cc406Sopenharmony_ci ACC_CURVE,CRV_NORMALSCAN,23999, 0, 4103141cc406Sopenharmony_ci ACC_CURVE,CRV_PARKHOME ,5360,3362,2628,2229,1973,1791,1654,1547,1458,1384,1319,1264,1214,1170,1131,1096,1063,1034,1006,981,958,937,916,897,880,863,847,832,818,805,792,780,769,758,747,737,727,718,709,700,692, 0, 4104141cc406Sopenharmony_ci ACC_CURVE,CRV_SMEARING ,23999, 0, 4105141cc406Sopenharmony_ci DEC_CURVE,CRV_NORMALSCAN,23999, 0, 4106141cc406Sopenharmony_ci DEC_CURVE,CRV_PARKHOME ,692,700,709,718,727,737,747,758,769,780,792,805,818,832,847,863,880,897,916,937,958,981,1006,1034,1063,1096,1131,1170,1214,1264,1319,1384,1458,1547,1654,1791,1973,2229,2628,3362,5360, 0, 4107141cc406Sopenharmony_ci DEC_CURVE,CRV_SMEARING ,23999, 0, 4108141cc406Sopenharmony_ci DEC_CURVE,CRV_BUFFERFULL,23999, 0, 4109141cc406Sopenharmony_ci -2, 4110141cc406Sopenharmony_ci 4111141cc406Sopenharmony_ci /* motorcurve 7 */ 4112141cc406Sopenharmony_ci 1, 1, 1, 0, /* mri, msi, skiplinecount, motorbackstep */ 4113141cc406Sopenharmony_ci ACC_CURVE,CRV_NORMALSCAN,6667, 0, 4114141cc406Sopenharmony_ci ACC_CURVE,CRV_PARKHOME ,5360,3362,2628,2229,1973,1791,1654,1547,1458,1384,1319,1264,1214,1170,1131,1096,1063,1034,1006,981,958,937,916,897,880,863,847,832,818,805,792,780,769,758,747,737,727,718,709,700,692, 0, 4115141cc406Sopenharmony_ci ACC_CURVE,CRV_SMEARING ,6667, 0, 4116141cc406Sopenharmony_ci DEC_CURVE,CRV_NORMALSCAN,6667, 0, 4117141cc406Sopenharmony_ci DEC_CURVE,CRV_PARKHOME ,692,700,709,718,727,737,747,758,769,780,792,805,818,832,847,863,880,897,916,937,958,981,1006,1034,1063,1096,1131,1170,1214,1264,1319,1384,1458,1547,1654,1791,1973,2229,2628,3362,5360, 0, 4118141cc406Sopenharmony_ci DEC_CURVE,CRV_SMEARING ,6667, 0, 4119141cc406Sopenharmony_ci DEC_CURVE,CRV_BUFFERFULL,6667, 0, 4120141cc406Sopenharmony_ci -2, 4121141cc406Sopenharmony_ci 4122141cc406Sopenharmony_ci /* motorcurve 8 */ 4123141cc406Sopenharmony_ci 1, 1, 1, 0, /* mri, msi, skiplinecount, motorbackstep */ 4124141cc406Sopenharmony_ci ACC_CURVE,CRV_NORMALSCAN,1046,1046,1046,1046,1046,1046,647,501,421,370,333,305,284,266,251,239,228,218,210,202,196,190,184,179,174,170,166,162,159,155,152,149,147,144,142,139,137,135,133,131,129,127,126,124,123,121,120,118,117,116,114,113,112,111,110,109,108,107,106,105,104,103,102,101,100,100,99,98,97,96,96,95,94,94,93,92,92,91,91,90,89,89,88,88,87,87,86,86,85,85,84,84,83,83,82,82,82,81,81,80,80,79,79,79,78,78,78,77,77,76,76,76,75,75,75,74,74,74,74,73,73,73,72,72,72,71,71,71,71,70,70,70,70,69,69,69,69,68,68,68,68,67,67,67,67,66,66,66,66,65,65,65,65,64,64,64,64,63,63,63,63,62,62,62,62,61,61,61,61,61,60,60,60,60,60,60,59,59,59,59,59,59,59,58,58,58,58,58,58,57,57,57,57,57,57,57,56,56,56,56,56,56,56,56,55,55,55,55,55,55,55,55,54,54,54,54,54,54,54,54,53,53,53,53,53,53,53,53,52,52,52,52,52,52,52,52,51,51,51,51,51,51,51,51,51,51,51,51,50,50,50,50,50,50,50,50,50,50,50,49,49,49,49,49,49,49,49,49,49,49,49,48,48,48,48,48,48,48,48,48,48,48,48,47,47,47,47,47,47,47,47,47,47,47,47,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,39,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,38,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,35,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,34,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,23,23, 0, 4125141cc406Sopenharmony_ci ACC_CURVE,CRV_PARKHOME ,1045,678,604,554,332,332,304,283,265,250,238,227,217,209,201,195,189,183,178,173,169,165,161,158,154,151,148,146,143,141,138,136,134,132,130,128,126,125,123,122,120,119,117,116,115,113,112,111,110,109,108,107,106,105,104,103,102,101,100,99,99,98,97,96,95,95,94,93,93,92,91,91,90,90,89,88,88,87,87,86,86,85,85,84,84,83,83,82,82,81,81,81,80,80,79,79,78,78,78,77,77,77,76,76,75,75,75,74,74,74,73,73,73,73,72,72,72,71,71,71,70,70,70,70,69,69,69,69,68,68,68,68,67,67,67,67,66,66,66,66,65,65,65,65,65,64,64,64,64,64,63,63,63,63,63,62,62,62,62,62,61,61,61,61,61,61,60,60,60,60,60,60,59,59,59,59,59,59,58,58,58,58,58,58,58,57,57,57,57,57,57,57,56,56,56,56,56,56,56,55,55,55,55,55,55,55,55,54,54,54,54,54,54,54,54,53,53,53,53,53,53,53,53,53,52,52,52,52,52,52,52,52,52,51,51,51,51,51,51,51,51,51,51,50,50,50,50,50,50,50,50,50,50,50,49,49,49,49,49,49,49,49,49,49,49,48,48,48,48,48,48,48,48,48,48,48,48,47,47,47,47,47,47,47,47,47,47,47,47,47,46,46,46,46,46,46,46,46,46,46,46,46,46,46,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,39, 0, 4126141cc406Sopenharmony_ci ACC_CURVE,CRV_SMEARING ,1045,678,604,554,332,332,304,283,265,250,238,227,217,209,201,195,189,183,178,173,169,165,161,158,154,151,148,146,143,141,138,136,134,132,130,128,126,125,123,122,120,119,117,116,115,113,112,111,110,109,108,107,106,105,104,103,102,101,100,99,99,98,97,96,95,95,94,93,93,92,91,91,90,90,89,88,88,87,87,86,86,85,85,84,84,83,83,82,82,81,81,81,80,80,79,79,78,78,78,77,77,77,76,76,75,75,75,74,74,74,73,73,73,73,72,72,72,71,71,71,70,70,70,70,69,69,69,69,68,68,68,68,67,67,67,67,66,66,66,66,65,65,65,65,65,64,64,64,64,64,63,63,63,63,63,62,62,62,62,62,61,61,61,61,61,61,60,60,60,60,60,60,59,59,59,59,59,59,58,58,58,58,58,58,58,57,57,57,57,57,57,57,56,56,56,56,56,56,56,55,55,55,55,55,55,55,55,54,54,54,54,54,54,54,54,53,53,53,53,53,53,53,53,53,52,52,52,52,52,52,52,52,52,51,51,51,51,51,51,51,51,51,51,50,50,50,50,50,50,50,50,50,50,50,49,49,49,49,49,49,49,49,49,49,49,48,48,48,48,48,48,48,48,48,48,48,48,47,47,47,47,47,47,47,47,47,47,47,47,47,46,46,46,46,46,46,46,46,46,46,46,46,46,46,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,39, 0, 4127141cc406Sopenharmony_ci DEC_CURVE,CRV_NORMALSCAN,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,27,27,27,27,27,27,27,27,27,27,27,27,28,28,28,28,28,28,28,28,29,29,29,29,29,29,29,30,30,30,30,31,31,31,31,32,32,32,32,33,33,34,34,35,35,36,37,38,38,39,40,41,42,43,45,46,47,48,50,51,53,54,57,59,61,63,65,68,71,75,78,82,86,90,94,94,98,103,106,111,116,122,130,138,145,153,163,171,180,188,198,211,219,228,239,252,267,284,306,334,370,422,502,648,1045, 0, 4128141cc406Sopenharmony_ci DEC_CURVE,CRV_PARKHOME ,39,40,41,42,43,45,46,47,48,50,51,53,54,57,59,61,63,65,68,71,75,78,82,86,90,94,94,98,103,106,111,116,122,130,138,145,153,163,171,180,188,198,211,219,228,239,252,267,284,306,334,370,422,502,648,1045, 0, 4129141cc406Sopenharmony_ci DEC_CURVE,CRV_SMEARING ,39,39,39,39,39,39,39,39,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,48,48,48,48,48,48,48,48,48,48,48,48,48,48,49,49,49,49,49,49,49,49,49,49,49,49,49,50,50,50,50,50,50,50,50,50,50,50,50,51,51,51,51,51,51,51,51,51,51,51,52,52,52,52,52,52,52,52,52,52,53,53,53,53,53,53,53,53,53,53,54,54,54,54,54,54,54,54,54,55,55,55,55,55,55,55,55,55,56,56,56,56,56,56,56,56,57,57,57,57,57,57,57,57,58,58,58,58,58,58,58,59,59,59,59,59,59,59,60,60,60,60,60,60,60,61,61,61,61,61,61,62,62,62,62,62,62,63,63,63,63,63,64,64,64,64,64,65,65,65,65,65,66,66,66,66,66,67,67,67,67,67,68,68,68,68,69,69,69,69,70,70,70,70,71,71,71,71,72,72,72,73,73,73,73,74,74,74,75,75,75,76,76,76,77,77,77,78,78,78,79,79,79,80,80,81,81,81,82,82,83,83,84,84,84,85,85,86,86,87,87,88,88,89,90,90,91,91,92,93,93,94,94,95,96,96,97,98,99,99,100,101,102,103,104,105,105,106,107,108,109,110,112,113,114,115,116,118,119,120,122,123,125,127,128,130,132,134,136,138,140,142,145,147,150,153,156,159,163,167,171,175,180,185,190,196,203,211,219,228,239,252,267,284,306,334,370,422,502,648,1045, 0, 4130141cc406Sopenharmony_ci DEC_CURVE,CRV_BUFFERFULL,1045,648,502,422,370,334,306,284,267,252,239,228,219,211,198,188,180,171,163,153,145,138,130,122,116,111,106,103,98,94,94,90,86,82,78,75,71,68,65,63,61,59,57,54,53,51,50,48,47,46,45,43,42,41,40,39,38,38,37,36,35,35,34,34,33,33,32,32,32,32,31,31,31,31,30,30,30,30,29,29,29,29,29,29,29,28,28,28,28,28,28,28,28,27,27,27,27,27,27,27,27,27,27,27,27,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25, 0, 4131141cc406Sopenharmony_ci -2, 4132141cc406Sopenharmony_ci 4133141cc406Sopenharmony_ci /* motorcurve 9 */ 4134141cc406Sopenharmony_ci 1, 1, 1, 0, /* mri, msi, skiplinecount, motorbackstep */ 4135141cc406Sopenharmony_ci ACC_CURVE,CRV_NORMALSCAN,3136,3136,3136,3136,3136,3136,2036,1815,1664,998,998,915,850,797,752,715,682,654,628,606,586,568,551,536,522,509,497,485,475,465,456,447,439,431,424,417,410,404,398,392,387,381,376,371,367,362,358,354,350,346,342,338,335,331,328,325,322,319,316,313,310,308,305,302,300,298,295,293,291,288,286,284,282,280,278,276,274,272,271,269,267,265,264,262,261,259,257,256,254,253,252,250,249,247,246,245,244,242,241,240,239,237,236,235,234,233,232,231,230,228,227,226,225,224,223,222,221,221,220,219,218,217,216,215,214,213,213,212,211,210,209,209,208,207,206,206,205,204,203,203,202,201,200,200,199,198,198,197,196,196,195,195,194,193,193,192,192,191,190,190,189,189,188,187,187,186,186,185,185,184,184,183,183,182,182,181,181,180,180,179,179,178,178,177,177,176,176,175,175,175,174,174,173,173,172,172,172,171,171,170,170,170,169,169,168,168,168,167,167,166, 0, 4136141cc406Sopenharmony_ci ACC_CURVE,CRV_PARKHOME ,3136,3136,3136,3136,3136,3136,2036,1815,1664,998,998,915,850,797,752,715,682,654,628,606,586,568,551,536,522,509,497,485,475,465,456,447,439,431,424,417,410,404,398,392,387,381,376,371,367,362,358,354,350,346,342,338,335,331,328,325,322,319,316,313,310,308,305,302,300,298,295,293,291,288,286,284,282,280,278,276,274,272,271,269,267,265,264,262,261,259,257,256,254,253,252,250,249,247,246,245,244,242,241,240,239,237,236,235,234,233,232,231,230,228,227,226,225,224,223,222,221,221,220,219,218,217,216,215,214,213,213,212,211,210,209,209,208,207,206,206,205,204,203,203,202,201,200,200,199,198,198,197,196,196,195,195,194,193,193,192,192,191,190,190,189,189,188,187,187,186,186,185,185,184,184,183,183,182,182,181,181,180,180,179,179,178,178,177,177,176,176,175,175,175,174,174,173,173,172,172,172,171,171,170,170,170,169,169,168,168,168,167,167,166,166,166, 0, 4137141cc406Sopenharmony_ci ACC_CURVE,CRV_SMEARING ,3136,3136,3136,3136,3136,3136,2036,1815,1664,998,998,915,850,797,752,715,682,654,628,606,586,568,551,536,522,509,497,485,475,465,456,455, 0, 4138141cc406Sopenharmony_ci DEC_CURVE,CRV_NORMALSCAN,455,456,465,475,485,497,509,522,536,551,568,586,606,628,654,682,715,752,797,850,915,998,998,1664,1815,2036,3136,3136,3136,3136,3136,3136, 0, 4139141cc406Sopenharmony_ci DEC_CURVE,CRV_PARKHOME ,455,456,465,475,485,497,509,522,536,551,568,586,606,628,654,682,715,752,797,850,915,998,998,1664,1815,2036,3136,3136,3136,3136,3136,3136, 0, 4140141cc406Sopenharmony_ci DEC_CURVE,CRV_SMEARING ,455,456,465,475,485,497,509,522,536,551,568,586,606,628,654,682,715,752,797,850,915,998,998,1664,1815,2036,3136,3136,3136,3136,3136,3136, 0, 4141141cc406Sopenharmony_ci DEC_CURVE,CRV_BUFFERFULL,110,110,111,111,112,112,113,113,114,114,115,115,116,116,117,117,118,118,119,119,120,120,121,121,122,122,123,123,124,124,125,125,126,126,127,127,128,128,129,129,130,131,132,133,133,134,135,136,137,138,139,140,141,143,144,145,146,147,149,150,151,153,154,156,157,159,161,162,164,166,168,170,172,174,176,179,181,184,186,189,192,195,198,202,206,209,213,218,222,227,233,239,245,252,259,267,276,282,286,291,298,305,310,319,325,331,342,354,362,376,387,404,417,431,456,475,509,551,586,654,715,850,998,1664,3136,3136, 0, 4142141cc406Sopenharmony_ci -2, 4143141cc406Sopenharmony_ci 4144141cc406Sopenharmony_ci /* motorcurve 10 */ 4145141cc406Sopenharmony_ci 1, 1, 1, 0, /* mri, msi, skiplinecount, motorbackstep */ 4146141cc406Sopenharmony_ci ACC_CURVE,CRV_NORMALSCAN,3136,3136,3136,3136,3136,3136,2036,1815,1664,998,998,915,850,797,752,715,682,654,628,606,586,568,551,536,522,509,497,485,475,465,456,447,439,431,424,417,410,404,398,392,387,381,376, 0, 4147141cc406Sopenharmony_ci ACC_CURVE,CRV_PARKHOME ,3136,3136,3136,3136,3136,3136,2036,1815,1664,998,998,915,850,797,752,715,682,654,628,606,586,568,551,536,522,509,497,485,475,465,456,447,439,431,424,417,410,404,398,392,387,381,376,371,367,362,358,354,350,346,342,338,335,331,328,325,322,319,316,313,310,308,305,302,300,298,295,293,291,288,286,284,282,280,278,276,274,272,271,269,267,265,264,262,261,259,257,256,254,253,252,250,249,247,246,245,244,242,241,240,239,237,236,235,234,233,232,231,230,228,227,226,225,224,223,222,221,221,220,219,218,217,216,215,214,213,213,212,211,210,209,209,208,207,206,206,205,204,203,203,202,201,200,200,199,198,198,197,196,196,195,195,194,193,193,192,192,191,190,190,189,189,188,187,187,186,186,185,185,184,184,183,183,182,182,181,181,180,180,179,179,178,178,177,177,176,176,175,175,175,174,174,173,173,172,172,172,171,171,170,170,170,169,169,168,168,168,167,167,166, 0, 4148141cc406Sopenharmony_ci ACC_CURVE,CRV_SMEARING ,3136,3136,3136,3136,3136,3136,2036,1815,1664,998,998,915,850,797,752,715,682,654,628,606,586,568,551,536,522,509,497,485,475,465,456,455, 0, 4149141cc406Sopenharmony_ci DEC_CURVE,CRV_NORMALSCAN,381,392,404,417,431,447,465,485,508,535,566,604,650,709,787,897,1067,2227,3136, 0, 4150141cc406Sopenharmony_ci DEC_CURVE,CRV_PARKHOME ,455,456,465,475,485,497,509,522,536,551,568,586,606,628,654,682,715,752,797,850,915,998,998,1664,1815,2036,3136, 0, 4151141cc406Sopenharmony_ci DEC_CURVE,CRV_SMEARING ,455,456,465,475,485,497,509,522,536,551,568,586,606,628,654,682,715,752,797,850,915,998,998,1664,1815,2036,3136, 0, 4152141cc406Sopenharmony_ci DEC_CURVE,CRV_BUFFERFULL,381,392,404,417,431,447,465,485,508,535,566,604,650,709,787,897,1067,2227,3136, 0, 4153141cc406Sopenharmony_ci -2, 4154141cc406Sopenharmony_ci 4155141cc406Sopenharmony_ci /* motorcurve 11 */ 4156141cc406Sopenharmony_ci 1, 1, 1, 0, /* mri, msi, skiplinecount, motorbackstep */ 4157141cc406Sopenharmony_ci ACC_CURVE,CRV_NORMALSCAN,3136,3136,3136,3136,3136,3136,2036,1815,1664,998,998,915,850,797,752,715,682,654,628,606,586,568,551,536,522,509,497,485,475,465,456,447,439,431,424,417,410,404,398,392,387,381,376,371,367,362,358,354,350,346,342,338,335,331,328,325,322,319,316,313,310,308,305,302,300,298,295,293,291,288,286,284,282,280,278,276,274,272,271,269,267,265,264,262,261,259,257,256,254,253,252,250,249,247,246,245,244,242,241,240,239,237,236,235,234,233,232,231,230,228,227,226,225,224,223,222,221,221,220,219,218,217,216,215,214,213,213,212,211,210,209,209,208,207,206,206,205,204,203,203,202,201,200,200,199,198,198,197,196,196,195,195,194,193,193,192,192,191,190,190,189,189,188,187,187,186,186,185,185,184,184,183,183,182,182,181,181,180,180,179,179,178,178,177,177,176,176,175,175,175,174,174,173,173,172,172,172,171,171,170,170,170,169,169,168,168,168,167,167,166, 0, 4158141cc406Sopenharmony_ci ACC_CURVE,CRV_PARKHOME ,3136,3136,3136,3136,3136,3136,2036,1815,1664,998,998,915,850,797,752,715,682,654,628,606,586,568,551,536,522,509,497,485,475,465,456,447,439,431,424,417,410,404,398,392,387,381,376,371,367,362,358,354,350,346,342,338,335,331,328,325,322,319,316,313,310,308,305,302,300,298,295,293,291,288,286,284,282,280,278,276,274,272,271,269,267,265,264,262,261,259,257,256,254,253,252,250,249,247,246,245,244,242,241,240,239,237,236,235,234,233,232,231,230,228,227,226,225,224,223,222,221,221,220,219,218,217,216,215,214,213,213,212,211,210,209,209,208,207,206,206,205,204,203,203,202,201,200,200,199,198,198,197,196,196,195,195,194,193,193,192,192,191,190,190,189,189,188,187,187,186,186,185,185,184,184,183,183,182,182,181,181,180,180,179,179,178,178,177,177,176,176,175,175,175,174,174,173,173,172,172,172,171,171,170,170,170,169,169,168,168,168,167,167,166, 0, 4159141cc406Sopenharmony_ci ACC_CURVE,CRV_SMEARING ,3136,3136,3136,3136,3136,3136,2036,1815,1664,998,998,915,850,797,752,715,682,654,628,606,586,568,551,536,522,509,497,485,475,465,456,447,439,431,424,417,410,404,398,392,387,381,376,371,367,362,358,354,350,346,342,338,335,331,328,325,322,319,316,313,310,308,305,302,300,298,295,293,291,288,286,284,282,280,278,276,274,272,271,269,267,265,264,262,261,259,257,256,254,253,252,250,249,247,246,245,244,242,241,240,239,237,236,235,234,233,232,231,230,228,227,226,225,224,223,222,221,221,220,219,218,217,216,215,214,213,213,212,211,210,209,209,208,207,206,206,205,204,203,203,202,201,200,200,199,198,198,197,196,196,195,195,194,193,193,192,192,191,190,190,189,189,188,187,187,186,186,185,185,184,184,183,183,182,182,181,181,180,180,179,179,178,178,177,177,176,176,175,175,175,174,174,173,173,172,172,172,171,171,170,170,170,169,169,168,168,168,167,167,166, 0, 4160141cc406Sopenharmony_ci DEC_CURVE,CRV_NORMALSCAN,167,168,169,170,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,190,191,192,193,194,196,197,198,200,201,203,204,206,207,209,211,212,214,216,218,219,221,223,225,227,230,232,234,236,239,241,244,247,249,252,255,258,261,265,268,272,275,279,283,288,292,297,302,307,313,318,325,331,338,346,353,362,371,381,392,404,417,431,447,465,485,508,535,566,604,650,709,787,897,1067,2227,3136, 0, 4161141cc406Sopenharmony_ci DEC_CURVE,CRV_PARKHOME ,455,456,465,475,485,497,509,522,536,551,568,586,606,628,654,682,715,752,797,850,915,998,998,1664,1815,2036,3136, 0, 4162141cc406Sopenharmony_ci DEC_CURVE,CRV_SMEARING ,455,456,465,475,485,497,509,522,536,551,568,586,606,628,654,682,715,752,797,850,915,998,998,1664,1815,2036,3136, 0, 4163141cc406Sopenharmony_ci DEC_CURVE,CRV_BUFFERFULL,167,168,169,170,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,190,191,192,193,194,196,197,198,200,201,203,204,206,207,209,211,212,214,216,218,219,221,223,225,227,230,232,234,236,239,241,244,247,249,252,255,258,261,265,268,272,275,279,283,288,292,297,302,307,313,318,325,331,338,346,353,362,371,381,392,404,417,431,447,465,485,508,535,566,604,650,709,787,897,1067,2227,3136, 0, 4164141cc406Sopenharmony_ci -2, 4165141cc406Sopenharmony_ci 4166141cc406Sopenharmony_ci /* motorcurve 12 */ 4167141cc406Sopenharmony_ci 1, 1, 1, 0, /* mri, msi, skiplinecount, motorbackstep */ 4168141cc406Sopenharmony_ci ACC_CURVE,CRV_NORMALSCAN,3136,3136,3136,3136,3136,3136,2036,1815,1664,998,998,915,850,797,752,715,682,654,628,606,586,568,551,536,522,509,497,485,475,465,456,447,439,431,424,417,410,404,398,392,387,381,376,371,367,362,358,354,350,346,342,338,335,331,328,325,322,319,316,313,310,308,305,302,300,298,295,293,291,288,286,284,282,280,278,276,274,272,271,269,267,265,264,262,261,259,257,256,254,253,252,250,249,247,246,245,244,242,241,240,239,237,236,235,234,233,232,231,230,228,227,226,225,224,223,222,221,221,220,219,218,217,216,215,214,213,213,212,211,210,209,209,208,207,206,206,205,204,203,203,202,201,200,200,199,198,198,197,196,196,195,195,194,193,193,192,192,191,190,190,189,189,188,187,187,186,186,185,185,184,184,183,183,182,182,181,181,180,180,179,179,178,178,177,177,176,176,175,175,175,174,174,173,173,172,172,172,171,171,170,170,170,169,169,168,168,168,167,167,166,166,166,165,165,165,164,164,163,163,163,162,162,162,161,161,161,160,160,160,159,159,159,158,158,158,157,157,157,156,156,156,156,155,155,155,154,154,154,153,153,153,153,152,152,152,151,151,151,151,150,150,150,150,149,149,149,148,148,148,148,147,147,147,147,146,146,146,146,145,145,145,145,144,144,144,144,144,143,143,143,143,142,142,142,142,141,141,141,141,141,140,140,140,140,140,139,139,139,139,138,138,138,138,138,137,137,137,137,137,136,136,136,136,136,135,135,135,135,135,135,134,134,134,134,134,133,133,133,133,133,133,132,132,132,132,132,131,131,131,131,131,131,130,130,130,130,130,130,129,129,129,129,129,129,128,128,128,128,128,128,127,127,127,127,127,127,127,126,126,126,126,126,126,125, 0, 4169141cc406Sopenharmony_ci ACC_CURVE,CRV_PARKHOME ,3136,3136,3136,3136,3136,3136,2036,1815,1664,998,998,915,850,797,752,715,682,654,628,606,586,568,551,536,522,509,497,485,475,465,456,447,439,431,424,417,410,404,398,392,387,381,376,371,367,362,358,354,350,346,342,338,335,331,328,325,322,319,316,313,310,308,305,302,300,298,295,293,291,288,286,284,282,280,278,276,274,272,271,269,267,265,264,262,261,259,257,256,254,253,252,250,249,247,246,245,244,242,241,240,239,237,236,235,234,233,232,231,230,228,227,226,225,224,223,222,221,221,220,219,218,217,216,215,214,213,213,212,211,210,209,209,208,207,206,206,205,204,203,203,202,201,200,200,199,198,198,197,196,196,195,195,194,193,193,192,192,191,190,190,189,189,188,187,187,186,186,185,185,184,184,183,183,182,182,181,181,180,180,179,179,178,178,177,177,176,176,175,175,175,174,174,173,173,172,172,172,171,171,170,170,170,169,169,168,168,168,167,167,166, 0, 4170141cc406Sopenharmony_ci ACC_CURVE,CRV_SMEARING ,3136,3136,3136,3136,3136,3136,2036,1815,1664,998,998,915,850,797,752,715,682,654,628,606,586,568,551,536,522,509,497,485,475,465,456,455, 0, 4171141cc406Sopenharmony_ci DEC_CURVE,CRV_NORMALSCAN,110,110,110,110,110,110,110,110,111,111,111,111,111,112,112,112,112,112,113,113,113,113,114,114,114,114,115,115,115,115,115,116,116,116,116,117,117,117,117,118,118,118,118,119,119,119,120,120,120,120,121,121,121,121,122,122,122,123,123,123,124,124,124,124,125,125,125,126,126,126,127,127,127,128,128,128,129,129,129,130,130,130,131,131,132,132,132,133,133,133,134,134,135,135,135,136,136,137,137,138,138,138,139,139,140,140,141,141,142,142,142,143,143,144,144,145,145,146,146,147,148,148,149,149,150,150,151,151,152,153,153,154,154,155,156,156,157,158,158,159,160,160,161,162,163,163,164,165,166,166,167,168,169,170,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,190,191,192,193,194,196,197,198,200,201,203,204,206,207,209,211,212,214,216,218,219,221,223,225,227,230,232,234,236,239,241,244,247,249,252,255,258,261,265,268,272,275,279,283,288,292,297,302,307,313,318,325,331,338,346,353,362,371,381,392,404,417,431,447,465,485,508,535,566,604,650,709,787,897,1067,2227,3136, 0, 4172141cc406Sopenharmony_ci DEC_CURVE,CRV_PARKHOME ,455,456,465,475,485,497,509,522,536,551,568,586,606,628,654,682,715,752,797,850,915,998,998,1664,1815,2036,3136, 0, 4173141cc406Sopenharmony_ci DEC_CURVE,CRV_SMEARING ,455,456,465,475,485,497,509,522,536,551,568,586,606,628,654,682,715,752,797,850,915,998,998,1664,1815,2036,3136, 0, 4174141cc406Sopenharmony_ci DEC_CURVE,CRV_BUFFERFULL,110,110,111,111,112,112,113,113,114,114,115,115,116,116,117,117,118,118,119,119,120,120,121,121,122,122,123,123,124,124,125,125,126,126,127,127,128,128,129,129,130,131,132,133,133,134,135,136,137,138,139,140,141,143,144,145,146,147,149,150,151,153,154,156,157,159,161,162,164,166,168,170,172,174,176,179,181,184,186,189,192,195,198,202,206,209,213,218,222,227,233,239,245,252,259,267,276,282,286,291,298,305,310,319,325,331,342,354,362,376,387,404,417,431,456,475,509,551,586,654,715,850,998,1664,3136, 0, 4175141cc406Sopenharmony_ci -1 4176141cc406Sopenharmony_ci }; 4177141cc406Sopenharmony_ci 4178141cc406Sopenharmony_ci rst = (SANE_Int *)malloc(sizeof(steps)); 4179141cc406Sopenharmony_ci if (rst != NULL) 4180141cc406Sopenharmony_ci memcpy(rst, &steps, sizeof(steps)); 4181141cc406Sopenharmony_ci 4182141cc406Sopenharmony_ci return rst; 4183141cc406Sopenharmony_ci} 4184141cc406Sopenharmony_ci 4185141cc406Sopenharmony_cistatic SANE_Int *cfg_motorcurve_get() 4186141cc406Sopenharmony_ci{ 4187141cc406Sopenharmony_ci /* returns motor setting buffer for a device */ 4188141cc406Sopenharmony_ci 4189141cc406Sopenharmony_ci SANE_Int *rst = NULL; 4190141cc406Sopenharmony_ci 4191141cc406Sopenharmony_ci switch(RTS_Debug->dev_model) 4192141cc406Sopenharmony_ci { 4193141cc406Sopenharmony_ci case BQ5550: 4194141cc406Sopenharmony_ci rst = bq5550_motor(); 4195141cc406Sopenharmony_ci break; 4196141cc406Sopenharmony_ci 4197141cc406Sopenharmony_ci case HP3800: 4198141cc406Sopenharmony_ci case HPG2710: 4199141cc406Sopenharmony_ci rst = hp3800_motor(); 4200141cc406Sopenharmony_ci break; 4201141cc406Sopenharmony_ci 4202141cc406Sopenharmony_ci case HP4370: 4203141cc406Sopenharmony_ci case HPG3010: 4204141cc406Sopenharmony_ci case HPG3110: 4205141cc406Sopenharmony_ci rst = hp4370_motor(); 4206141cc406Sopenharmony_ci break; 4207141cc406Sopenharmony_ci 4208141cc406Sopenharmony_ci default: 4209141cc406Sopenharmony_ci rst = hp3970_motor(); 4210141cc406Sopenharmony_ci break; 4211141cc406Sopenharmony_ci } 4212141cc406Sopenharmony_ci 4213141cc406Sopenharmony_ci return rst; 4214141cc406Sopenharmony_ci} 4215141cc406Sopenharmony_ci 4216141cc406Sopenharmony_ci/* DEPRECATED functions */ 4217141cc406Sopenharmony_ci 4218141cc406Sopenharmony_cistatic int ua4900_calibreflective(int option, int defvalue) 4219141cc406Sopenharmony_ci{ 4220141cc406Sopenharmony_ci int rst = defvalue; 4221141cc406Sopenharmony_ci 4222141cc406Sopenharmony_ci switch(option) 4223141cc406Sopenharmony_ci { 4224141cc406Sopenharmony_ci case WSTRIPXPOS: rst = 0; break; 4225141cc406Sopenharmony_ci case WSTRIPYPOS: rst = 0; break; 4226141cc406Sopenharmony_ci case BSTRIPXPOS: rst = 0; break; 4227141cc406Sopenharmony_ci case BSTRIPYPOS: rst = 0; break; 4228141cc406Sopenharmony_ci case BREFR: rst = 10; break; 4229141cc406Sopenharmony_ci case BREFG: rst = 10; break; 4230141cc406Sopenharmony_ci case BREFB: rst = 10; break; 4231141cc406Sopenharmony_ci case REFBITDEPTH: rst = 8; break; 4232141cc406Sopenharmony_ci case OFFSETHEIGHT: rst = 10; break; 4233141cc406Sopenharmony_ci case OFFSETNSIGMA: rst = 2; break; 4234141cc406Sopenharmony_ci case OFFSETTARGETMAX: rst = 50; break; 4235141cc406Sopenharmony_ci case OFFSETTARGETMIN: rst = 2; break; 4236141cc406Sopenharmony_ci case OFFSETAVGTARGETR: rst = 10; break; 4237141cc406Sopenharmony_ci case OFFSETAVGTARGETG: rst = 10; break; 4238141cc406Sopenharmony_ci case OFFSETAVGTARGETB: rst = 10; break; 4239141cc406Sopenharmony_ci case ADCOFFEVENODD: rst = 1; break; 4240141cc406Sopenharmony_ci case CALIBOFFSET1ON: rst = 2; break; 4241141cc406Sopenharmony_ci case ADCOFFQUICKWAY: rst = 1; break; 4242141cc406Sopenharmony_ci case ADCOFFPREDICTSTART: rst = 300; break; 4243141cc406Sopenharmony_ci case ADCOFFPREDICTEND: rst = 500; break; 4244141cc406Sopenharmony_ci case OFFSETTUNESTEP1: rst = 5; break; 4245141cc406Sopenharmony_ci case OFFSETBOUNDARYRATIO1: rst = 100; break; 4246141cc406Sopenharmony_ci case OFFSETAVGRATIO1: rst = 100; break; 4247141cc406Sopenharmony_ci case OFFSETEVEN1R: rst = 310; break; 4248141cc406Sopenharmony_ci case OFFSETODD1R: rst = 310; break; 4249141cc406Sopenharmony_ci case OFFSETEVEN1G: rst = 313; break; 4250141cc406Sopenharmony_ci case OFFSETODD1G: rst = 313; break; 4251141cc406Sopenharmony_ci case OFFSETEVEN1B: rst = 319; break; 4252141cc406Sopenharmony_ci case OFFSETODD1B: rst = 319; break; 4253141cc406Sopenharmony_ci case ADCOFFPREDICTR: rst = 321; break; 4254141cc406Sopenharmony_ci case ADCOFFPREDICTG: rst = 321; break; 4255141cc406Sopenharmony_ci case ADCOFFPREDICTB: rst = 321; break; 4256141cc406Sopenharmony_ci case ADCOFFEVEN1R_1ST: rst = 344; break; 4257141cc406Sopenharmony_ci case ADCOFFODD1R_1ST: rst = 344; break; 4258141cc406Sopenharmony_ci case ADCOFFEVEN1G_1ST: rst = 328; break; 4259141cc406Sopenharmony_ci case ADCOFFODD1G_1ST: rst = 328; break; 4260141cc406Sopenharmony_ci case ADCOFFEVEN1B_1ST: rst = 341; break; 4261141cc406Sopenharmony_ci case ADCOFFODD1B_1ST: rst = 341; break; 4262141cc406Sopenharmony_ci case PEAKR: rst = 122; break; 4263141cc406Sopenharmony_ci case PEAKG: rst = 122; break; 4264141cc406Sopenharmony_ci case PEAKB: rst = 122; break; 4265141cc406Sopenharmony_ci case MINR: rst = 50; break; 4266141cc406Sopenharmony_ci case MING: rst = 50; break; 4267141cc406Sopenharmony_ci case MINB: rst = 50; break; 4268141cc406Sopenharmony_ci case CALIBOFFSET2ON: rst = 0; break; 4269141cc406Sopenharmony_ci case OFFSETTUNESTEP2: rst = 1; break; 4270141cc406Sopenharmony_ci case OFFSETBOUNDARYRATIO2: rst = 100; break; 4271141cc406Sopenharmony_ci case OFFSETAVGRATIO2: rst = 100; break; 4272141cc406Sopenharmony_ci case OFFSETEVEN2R: rst = 0; break; 4273141cc406Sopenharmony_ci case OFFSETODD2R: rst = 0; break; 4274141cc406Sopenharmony_ci case OFFSETEVEN2G: rst = 0; break; 4275141cc406Sopenharmony_ci case OFFSETODD2G: rst = 0; break; 4276141cc406Sopenharmony_ci case OFFSETEVEN2B: rst = 0; break; 4277141cc406Sopenharmony_ci case OFFSETODD2B: rst = 0; break; 4278141cc406Sopenharmony_ci case GAINHEIGHT: rst = 10; break; 4279141cc406Sopenharmony_ci case GAINTARGETFACTOR: rst = 90; break; 4280141cc406Sopenharmony_ci case CALIBPAGON: rst = 0; break; 4281141cc406Sopenharmony_ci case PAGR: rst = 3; break; 4282141cc406Sopenharmony_ci case PAGG: rst = 3; break; 4283141cc406Sopenharmony_ci case PAGB: rst = 3; break; 4284141cc406Sopenharmony_ci case CALIBGAIN1ON: rst = 1; break; 4285141cc406Sopenharmony_ci case GAIN1R: rst = 8; break; 4286141cc406Sopenharmony_ci case GAIN1G: rst = 8; break; 4287141cc406Sopenharmony_ci case GAIN1B: rst = 8; break; 4288141cc406Sopenharmony_ci case CALIBGAIN2ON: rst = 0; break; 4289141cc406Sopenharmony_ci case GAIN2R: rst = 8; break; 4290141cc406Sopenharmony_ci case GAIN2G: rst = 8; break; 4291141cc406Sopenharmony_ci case GAIN2B: rst = 8; break; 4292141cc406Sopenharmony_ci case TOTSHADING: rst = 0; break; 4293141cc406Sopenharmony_ci case BSHADINGON: rst = -2; break; 4294141cc406Sopenharmony_ci case BSHADINGHEIGHT: rst = 10; break; 4295141cc406Sopenharmony_ci case BSHADINGPREDIFFR: rst = 2; break; 4296141cc406Sopenharmony_ci case BSHADINGPREDIFFG: rst = 1; break; 4297141cc406Sopenharmony_ci case BSHADINGPREDIFFB: rst = 2; break; 4298141cc406Sopenharmony_ci case BSHADINGDEFCUTOFF: rst = 0; break; 4299141cc406Sopenharmony_ci case WSHADINGON: rst = 3; break; 4300141cc406Sopenharmony_ci case WSHADINGHEIGHT: rst = 15; break; 4301141cc406Sopenharmony_ci case WSHADINGPREDIFFR: rst = -1; break; 4302141cc406Sopenharmony_ci case WSHADINGPREDIFFG: rst = -1; break; 4303141cc406Sopenharmony_ci case WSHADINGPREDIFFB: rst = -1; break; 4304141cc406Sopenharmony_ci } 4305141cc406Sopenharmony_ci 4306141cc406Sopenharmony_ci return rst; 4307141cc406Sopenharmony_ci} 4308141cc406Sopenharmony_ci 4309141cc406Sopenharmony_cistatic int hp3800_calibreflective(int option, int defvalue) 4310141cc406Sopenharmony_ci{ 4311141cc406Sopenharmony_ci int rst = defvalue; 4312141cc406Sopenharmony_ci switch(option) 4313141cc406Sopenharmony_ci { 4314141cc406Sopenharmony_ci case WSTRIPXPOS: rst = 0; break; 4315141cc406Sopenharmony_ci case WSTRIPYPOS: rst = 0; break; 4316141cc406Sopenharmony_ci case BSTRIPXPOS: rst = 0; break; 4317141cc406Sopenharmony_ci case BSTRIPYPOS: rst = 0; break; 4318141cc406Sopenharmony_ci case BREFR: rst = 10; break; 4319141cc406Sopenharmony_ci case BREFG: rst = 10; break; 4320141cc406Sopenharmony_ci case BREFB: rst = 10; break; 4321141cc406Sopenharmony_ci case REFBITDEPTH: rst = 8; break; 4322141cc406Sopenharmony_ci case OFFSETHEIGHT: rst = 10; break; 4323141cc406Sopenharmony_ci case OFFSETNSIGMA: rst = 2; break; 4324141cc406Sopenharmony_ci case OFFSETTARGETMAX: rst = 50; break; 4325141cc406Sopenharmony_ci case OFFSETTARGETMIN: rst = 2; break; 4326141cc406Sopenharmony_ci case OFFSETAVGTARGETR: rst = 10; break; 4327141cc406Sopenharmony_ci case OFFSETAVGTARGETG: rst = 10; break; 4328141cc406Sopenharmony_ci case OFFSETAVGTARGETB: rst = 10; break; 4329141cc406Sopenharmony_ci case ADCOFFEVENODD: rst = 1; break; 4330141cc406Sopenharmony_ci case CALIBOFFSET1ON: rst = 2; break; 4331141cc406Sopenharmony_ci case ADCOFFQUICKWAY: rst = 1; break; 4332141cc406Sopenharmony_ci case ADCOFFPREDICTSTART: rst = 300; break; 4333141cc406Sopenharmony_ci case ADCOFFPREDICTEND: rst = 500; break; 4334141cc406Sopenharmony_ci case OFFSETTUNESTEP1: rst = 5; break; 4335141cc406Sopenharmony_ci case OFFSETBOUNDARYRATIO1: rst = 100; break; 4336141cc406Sopenharmony_ci case OFFSETAVGRATIO1: rst = 100; break; 4337141cc406Sopenharmony_ci case OFFSETEVEN1R: rst = 310; break; 4338141cc406Sopenharmony_ci case OFFSETODD1R: rst = 310; break; 4339141cc406Sopenharmony_ci case OFFSETEVEN1G: rst = 317; break; 4340141cc406Sopenharmony_ci case OFFSETODD1G: rst = 317; break; 4341141cc406Sopenharmony_ci case OFFSETEVEN1B: rst = 293; break; 4342141cc406Sopenharmony_ci case OFFSETODD1B: rst = 293; break; 4343141cc406Sopenharmony_ci case ADCOFFPREDICTR: rst = 500; break; 4344141cc406Sopenharmony_ci case ADCOFFPREDICTG: rst = 500; break; 4345141cc406Sopenharmony_ci case ADCOFFPREDICTB: rst = 500; break; 4346141cc406Sopenharmony_ci case ADCOFFEVEN1R_1ST: rst = 128; break; 4347141cc406Sopenharmony_ci case ADCOFFODD1R_1ST: rst = 128; break; 4348141cc406Sopenharmony_ci case ADCOFFEVEN1G_1ST: rst = 128; break; 4349141cc406Sopenharmony_ci case ADCOFFODD1G_1ST: rst = 128; break; 4350141cc406Sopenharmony_ci case ADCOFFEVEN1B_1ST: rst = 128; break; 4351141cc406Sopenharmony_ci case ADCOFFODD1B_1ST: rst = 128; break; 4352141cc406Sopenharmony_ci case PEAKR: rst = 104; break; 4353141cc406Sopenharmony_ci case PEAKG: rst = 111; break; 4354141cc406Sopenharmony_ci case PEAKB: rst = 105; break; 4355141cc406Sopenharmony_ci case MINR: rst = 50; break; 4356141cc406Sopenharmony_ci case MING: rst = 56; break; 4357141cc406Sopenharmony_ci case MINB: rst = 57; break; 4358141cc406Sopenharmony_ci case CALIBOFFSET2ON: rst = 0; break; 4359141cc406Sopenharmony_ci case OFFSETTUNESTEP2: rst = 1; break; 4360141cc406Sopenharmony_ci case OFFSETBOUNDARYRATIO2: rst = 100; break; 4361141cc406Sopenharmony_ci case OFFSETAVGRATIO2: rst = 100; break; 4362141cc406Sopenharmony_ci case OFFSETEVEN2R: rst = 0; break; 4363141cc406Sopenharmony_ci case OFFSETODD2R: rst = 0; break; 4364141cc406Sopenharmony_ci case OFFSETEVEN2G: rst = 0; break; 4365141cc406Sopenharmony_ci case OFFSETODD2G: rst = 0; break; 4366141cc406Sopenharmony_ci case OFFSETEVEN2B: rst = 0; break; 4367141cc406Sopenharmony_ci case OFFSETODD2B: rst = 0; break; 4368141cc406Sopenharmony_ci case GAINHEIGHT: rst = 10; break; 4369141cc406Sopenharmony_ci case GAINTARGETFACTOR: rst = 80; break; 4370141cc406Sopenharmony_ci case CALIBPAGON: rst = 0; break; 4371141cc406Sopenharmony_ci case PAGR: rst = 3; break; 4372141cc406Sopenharmony_ci case PAGG: rst = 3; break; 4373141cc406Sopenharmony_ci case PAGB: rst = 3; break; 4374141cc406Sopenharmony_ci case CALIBGAIN1ON: rst = 1; break; 4375141cc406Sopenharmony_ci case GAIN1R: rst = 23; break; 4376141cc406Sopenharmony_ci case GAIN1G: rst = 19; break; 4377141cc406Sopenharmony_ci case GAIN1B: rst = 0; break; 4378141cc406Sopenharmony_ci case CALIBGAIN2ON: rst = 0; break; 4379141cc406Sopenharmony_ci case GAIN2R: rst = 4; break; 4380141cc406Sopenharmony_ci case GAIN2G: rst = 4; break; 4381141cc406Sopenharmony_ci case GAIN2B: rst = 4; break; 4382141cc406Sopenharmony_ci case TOTSHADING: rst = 0; break; 4383141cc406Sopenharmony_ci case BSHADINGON: rst = -3; break; 4384141cc406Sopenharmony_ci case BSHADINGHEIGHT: rst = 20; break; 4385141cc406Sopenharmony_ci case BSHADINGPREDIFFR: rst = 2; break; 4386141cc406Sopenharmony_ci case BSHADINGPREDIFFG: rst = 2; break; 4387141cc406Sopenharmony_ci case BSHADINGPREDIFFB: rst = 2; break; 4388141cc406Sopenharmony_ci case BSHADINGDEFCUTOFF: rst = 0; break; 4389141cc406Sopenharmony_ci case WSHADINGON: rst = 3; break; 4390141cc406Sopenharmony_ci case WSHADINGHEIGHT: rst = 24; break; 4391141cc406Sopenharmony_ci case WSHADINGPREDIFFR: rst = -1; break; 4392141cc406Sopenharmony_ci case WSHADINGPREDIFFG: rst = -1; break; 4393141cc406Sopenharmony_ci case WSHADINGPREDIFFB: rst = -1; break; 4394141cc406Sopenharmony_ci } 4395141cc406Sopenharmony_ci 4396141cc406Sopenharmony_ci return rst; 4397141cc406Sopenharmony_ci} 4398141cc406Sopenharmony_ci 4399141cc406Sopenharmony_cistatic int hp3970_calibreflective(int option, int defvalue) 4400141cc406Sopenharmony_ci{ 4401141cc406Sopenharmony_ci int rst = defvalue; 4402141cc406Sopenharmony_ci switch(option) 4403141cc406Sopenharmony_ci { 4404141cc406Sopenharmony_ci case WSTRIPXPOS: rst = 0; break; 4405141cc406Sopenharmony_ci case WSTRIPYPOS: rst = 0; break; 4406141cc406Sopenharmony_ci case BSTRIPXPOS: rst = 0; break; 4407141cc406Sopenharmony_ci case BSTRIPYPOS: rst = 0; break; 4408141cc406Sopenharmony_ci case BREFR: rst = 10; break; 4409141cc406Sopenharmony_ci case BREFG: rst = 10; break; 4410141cc406Sopenharmony_ci case BREFB: rst = 10; break; 4411141cc406Sopenharmony_ci case REFBITDEPTH: rst = 8; break; 4412141cc406Sopenharmony_ci case OFFSETHEIGHT: rst = 10; break; 4413141cc406Sopenharmony_ci case OFFSETNSIGMA: rst = 2; break; 4414141cc406Sopenharmony_ci case OFFSETTARGETMAX: rst = 50; break; 4415141cc406Sopenharmony_ci case OFFSETTARGETMIN: rst = 2; break; 4416141cc406Sopenharmony_ci case OFFSETAVGTARGETR: rst = 10; break; 4417141cc406Sopenharmony_ci case OFFSETAVGTARGETG: rst = 10; break; 4418141cc406Sopenharmony_ci case OFFSETAVGTARGETB: rst = 10; break; 4419141cc406Sopenharmony_ci case ADCOFFEVENODD: rst = 1; break; 4420141cc406Sopenharmony_ci case CALIBOFFSET1ON: rst = 2; break; 4421141cc406Sopenharmony_ci case ADCOFFQUICKWAY: rst = 1; break; 4422141cc406Sopenharmony_ci case ADCOFFPREDICTSTART: rst = 300; break; 4423141cc406Sopenharmony_ci case ADCOFFPREDICTEND: rst = 500; break; 4424141cc406Sopenharmony_ci case OFFSETTUNESTEP1: rst = 5; break; 4425141cc406Sopenharmony_ci case OFFSETBOUNDARYRATIO1: rst = 100; break; 4426141cc406Sopenharmony_ci case OFFSETAVGRATIO1: rst = 100; break; 4427141cc406Sopenharmony_ci case OFFSETEVEN1R: rst = 327; break; 4428141cc406Sopenharmony_ci case OFFSETODD1R: rst = 327; break; 4429141cc406Sopenharmony_ci case OFFSETEVEN1G: rst = 315; break; 4430141cc406Sopenharmony_ci case OFFSETODD1G: rst = 315; break; 4431141cc406Sopenharmony_ci case OFFSETEVEN1B: rst = 322; break; 4432141cc406Sopenharmony_ci case OFFSETODD1B: rst = 322; break; 4433141cc406Sopenharmony_ci case ADCOFFPREDICTR: rst = 322; break; 4434141cc406Sopenharmony_ci case ADCOFFPREDICTG: rst = 310; break; 4435141cc406Sopenharmony_ci case ADCOFFPREDICTB: rst = 322; break; 4436141cc406Sopenharmony_ci case ADCOFFEVEN1R_1ST: rst = 344; break; 4437141cc406Sopenharmony_ci case ADCOFFODD1R_1ST: rst = 344; break; 4438141cc406Sopenharmony_ci case ADCOFFEVEN1G_1ST: rst = 328; break; 4439141cc406Sopenharmony_ci case ADCOFFODD1G_1ST: rst = 328; break; 4440141cc406Sopenharmony_ci case ADCOFFEVEN1B_1ST: rst = 341; break; 4441141cc406Sopenharmony_ci case ADCOFFODD1B_1ST: rst = 341; break; 4442141cc406Sopenharmony_ci case PEAKR: rst = 82; break; 4443141cc406Sopenharmony_ci case PEAKG: rst = 117; break; 4444141cc406Sopenharmony_ci case PEAKB: rst = 116; break; 4445141cc406Sopenharmony_ci case MINR: rst = 37; break; 4446141cc406Sopenharmony_ci case MING: rst = 51; break; 4447141cc406Sopenharmony_ci case MINB: rst = 53; break; 4448141cc406Sopenharmony_ci case CALIBOFFSET2ON: rst = 0; break; 4449141cc406Sopenharmony_ci case OFFSETTUNESTEP2: rst = 1; break; 4450141cc406Sopenharmony_ci case OFFSETBOUNDARYRATIO2: rst = 100; break; 4451141cc406Sopenharmony_ci case OFFSETAVGRATIO2: rst = 100; break; 4452141cc406Sopenharmony_ci case OFFSETEVEN2R: rst = 0; break; 4453141cc406Sopenharmony_ci case OFFSETODD2R: rst = 0; break; 4454141cc406Sopenharmony_ci case OFFSETEVEN2G: rst = 0; break; 4455141cc406Sopenharmony_ci case OFFSETODD2G: rst = 0; break; 4456141cc406Sopenharmony_ci case OFFSETEVEN2B: rst = 0; break; 4457141cc406Sopenharmony_ci case OFFSETODD2B: rst = 0; break; 4458141cc406Sopenharmony_ci case GAINHEIGHT: rst = 10; break; 4459141cc406Sopenharmony_ci case GAINTARGETFACTOR: rst = 90; break; 4460141cc406Sopenharmony_ci case CALIBPAGON: rst = 0; break; 4461141cc406Sopenharmony_ci case PAGR: rst = 3; break; 4462141cc406Sopenharmony_ci case PAGG: rst = 3; break; 4463141cc406Sopenharmony_ci case PAGB: rst = 3; break; 4464141cc406Sopenharmony_ci case CALIBGAIN1ON: rst = 1; break; 4465141cc406Sopenharmony_ci case GAIN1R: rst = 28; break; 4466141cc406Sopenharmony_ci case GAIN1G: rst = 22; break; 4467141cc406Sopenharmony_ci case GAIN1B: rst = 21; break; 4468141cc406Sopenharmony_ci case CALIBGAIN2ON: rst = 0; break; 4469141cc406Sopenharmony_ci case GAIN2R: rst = 4; break; 4470141cc406Sopenharmony_ci case GAIN2G: rst = 4; break; 4471141cc406Sopenharmony_ci case GAIN2B: rst = 4; break; 4472141cc406Sopenharmony_ci case TOTSHADING: rst = 0; break; 4473141cc406Sopenharmony_ci case BSHADINGON: rst = -2; break; 4474141cc406Sopenharmony_ci case BSHADINGHEIGHT: rst = 10; break; 4475141cc406Sopenharmony_ci case BSHADINGPREDIFFR: rst = 2; break; 4476141cc406Sopenharmony_ci case BSHADINGPREDIFFG: rst = 2; break; 4477141cc406Sopenharmony_ci case BSHADINGPREDIFFB: rst = 2; break; 4478141cc406Sopenharmony_ci case BSHADINGDEFCUTOFF: rst = 0; break; 4479141cc406Sopenharmony_ci case WSHADINGON: rst = 3; break; 4480141cc406Sopenharmony_ci case WSHADINGHEIGHT: rst = 24; break; 4481141cc406Sopenharmony_ci case WSHADINGPREDIFFR: rst = -1; break; 4482141cc406Sopenharmony_ci case WSHADINGPREDIFFG: rst = -1; break; 4483141cc406Sopenharmony_ci case WSHADINGPREDIFFB: rst = -1; break; 4484141cc406Sopenharmony_ci } 4485141cc406Sopenharmony_ci 4486141cc406Sopenharmony_ci return rst; 4487141cc406Sopenharmony_ci} 4488141cc406Sopenharmony_ci 4489141cc406Sopenharmony_cistatic int hp4370_calibreflective(int option, int defvalue) 4490141cc406Sopenharmony_ci{ 4491141cc406Sopenharmony_ci int rst = defvalue; 4492141cc406Sopenharmony_ci switch(option) 4493141cc406Sopenharmony_ci { 4494141cc406Sopenharmony_ci case WSTRIPXPOS: rst = 0; break; 4495141cc406Sopenharmony_ci case WSTRIPYPOS: rst = 0; break; 4496141cc406Sopenharmony_ci case BSTRIPXPOS: rst = 0; break; 4497141cc406Sopenharmony_ci case BSTRIPYPOS: rst = 0; break; 4498141cc406Sopenharmony_ci case BREFR: rst = 10; break; 4499141cc406Sopenharmony_ci case BREFG: rst = 10; break; 4500141cc406Sopenharmony_ci case BREFB: rst = 10; break; 4501141cc406Sopenharmony_ci case REFBITDEPTH: rst = 8; break; 4502141cc406Sopenharmony_ci case OFFSETHEIGHT: rst = 10; break; 4503141cc406Sopenharmony_ci case OFFSETNSIGMA: rst = 2; break; 4504141cc406Sopenharmony_ci case OFFSETTARGETMAX: rst = 50; break; 4505141cc406Sopenharmony_ci case OFFSETTARGETMIN: rst = 2; break; 4506141cc406Sopenharmony_ci case OFFSETAVGTARGETR: rst = 10; break; 4507141cc406Sopenharmony_ci case OFFSETAVGTARGETG: rst = 10; break; 4508141cc406Sopenharmony_ci case OFFSETAVGTARGETB: rst = 10; break; 4509141cc406Sopenharmony_ci case ADCOFFEVENODD: rst = 1; break; 4510141cc406Sopenharmony_ci case CALIBOFFSET1ON: rst = 2; break; 4511141cc406Sopenharmony_ci case ADCOFFQUICKWAY: rst = 1; break; 4512141cc406Sopenharmony_ci case ADCOFFPREDICTSTART: rst = 300; break; 4513141cc406Sopenharmony_ci case ADCOFFPREDICTEND: rst = 500; break; 4514141cc406Sopenharmony_ci case OFFSETTUNESTEP1: rst = 5; break; 4515141cc406Sopenharmony_ci case OFFSETBOUNDARYRATIO1: rst = 100; break; 4516141cc406Sopenharmony_ci case OFFSETAVGRATIO1: rst = 100; break; 4517141cc406Sopenharmony_ci case OFFSETEVEN1R: rst = 305; break; 4518141cc406Sopenharmony_ci case OFFSETODD1R: rst = 3305; break; 4519141cc406Sopenharmony_ci case OFFSETEVEN1G: rst = 313; break; 4520141cc406Sopenharmony_ci case OFFSETODD1G: rst = 313; break; 4521141cc406Sopenharmony_ci case OFFSETEVEN1B: rst = 317; break; 4522141cc406Sopenharmony_ci case OFFSETODD1B: rst = 317; break; 4523141cc406Sopenharmony_ci case ADCOFFPREDICTR: rst = 500; break; 4524141cc406Sopenharmony_ci case ADCOFFPREDICTG: rst = 500; break; 4525141cc406Sopenharmony_ci case ADCOFFPREDICTB: rst = 500; break; 4526141cc406Sopenharmony_ci case ADCOFFEVEN1R_1ST: rst = 344; break; 4527141cc406Sopenharmony_ci case ADCOFFODD1R_1ST: rst = 344; break; 4528141cc406Sopenharmony_ci case ADCOFFEVEN1G_1ST: rst = 328; break; 4529141cc406Sopenharmony_ci case ADCOFFODD1G_1ST: rst = 328; break; 4530141cc406Sopenharmony_ci case ADCOFFEVEN1B_1ST: rst = 341; break; 4531141cc406Sopenharmony_ci case ADCOFFODD1B_1ST: rst = 341; break; 4532141cc406Sopenharmony_ci case PEAKR: rst = 159; break; 4533141cc406Sopenharmony_ci case PEAKG: rst = 191; break; 4534141cc406Sopenharmony_ci case PEAKB: rst = 191; break; 4535141cc406Sopenharmony_ci case MINR: rst = 146; break; 4536141cc406Sopenharmony_ci case MING: rst = 180; break; 4537141cc406Sopenharmony_ci case MINB: rst = 179; break; 4538141cc406Sopenharmony_ci case CALIBOFFSET2ON: rst = 0; break; 4539141cc406Sopenharmony_ci case OFFSETTUNESTEP2: rst = 1; break; 4540141cc406Sopenharmony_ci case OFFSETBOUNDARYRATIO2: rst = 100; break; 4541141cc406Sopenharmony_ci case OFFSETAVGRATIO2: rst = 100; break; 4542141cc406Sopenharmony_ci case OFFSETEVEN2R: rst = 0; break; 4543141cc406Sopenharmony_ci case OFFSETODD2R: rst = 0; break; 4544141cc406Sopenharmony_ci case OFFSETEVEN2G: rst = 0; break; 4545141cc406Sopenharmony_ci case OFFSETODD2G: rst = 0; break; 4546141cc406Sopenharmony_ci case OFFSETEVEN2B: rst = 0; break; 4547141cc406Sopenharmony_ci case OFFSETODD2B: rst = 0; break; 4548141cc406Sopenharmony_ci case GAINHEIGHT: rst = 10; break; 4549141cc406Sopenharmony_ci case GAINTARGETFACTOR: rst = 80; break; 4550141cc406Sopenharmony_ci case CALIBPAGON: rst = 0; break; 4551141cc406Sopenharmony_ci case HIPAGR: rst = 3; break; 4552141cc406Sopenharmony_ci case HIPAGG: rst = 0; break; 4553141cc406Sopenharmony_ci case HIPAGB: rst = 0; break; 4554141cc406Sopenharmony_ci case PAGR: rst = 3; break; 4555141cc406Sopenharmony_ci case PAGG: rst = 3; break; 4556141cc406Sopenharmony_ci case PAGB: rst = 3; break; 4557141cc406Sopenharmony_ci case LOPAGR: rst = 3; break; 4558141cc406Sopenharmony_ci case LOPAGG: rst = 3; break; 4559141cc406Sopenharmony_ci case LOPAGB: rst = 3; break; 4560141cc406Sopenharmony_ci case CALIBGAIN1ON: rst = 1; break; 4561141cc406Sopenharmony_ci case GAIN1R: rst = 10; break; 4562141cc406Sopenharmony_ci case GAIN1G: rst = 2; break; 4563141cc406Sopenharmony_ci case GAIN1B: rst = 1; break; 4564141cc406Sopenharmony_ci case CALIBGAIN2ON: rst = 0; break; 4565141cc406Sopenharmony_ci case GAIN2R: rst = 4; break; 4566141cc406Sopenharmony_ci case GAIN2G: rst = 4; break; 4567141cc406Sopenharmony_ci case GAIN2B: rst = 4; break; 4568141cc406Sopenharmony_ci case TOTSHADING: rst = 0; break; 4569141cc406Sopenharmony_ci case BSHADINGON: rst = -2; break; 4570141cc406Sopenharmony_ci case BSHADINGHEIGHT: rst = 10; break; 4571141cc406Sopenharmony_ci case BSHADINGPREDIFFR: rst = 2; break; 4572141cc406Sopenharmony_ci case BSHADINGPREDIFFG: rst = 2; break; 4573141cc406Sopenharmony_ci case BSHADINGPREDIFFB: rst = 2; break; 4574141cc406Sopenharmony_ci case BSHADINGDEFCUTOFF: rst = 0; break; 4575141cc406Sopenharmony_ci case WSHADINGON: rst = 3; break; 4576141cc406Sopenharmony_ci case WSHADINGHEIGHT: rst = 24; break; 4577141cc406Sopenharmony_ci case WSHADINGPREDIFFR: rst = -1; break; 4578141cc406Sopenharmony_ci case WSHADINGPREDIFFG: rst = -1; break; 4579141cc406Sopenharmony_ci case WSHADINGPREDIFFB: rst = -1; break; 4580141cc406Sopenharmony_ci } 4581141cc406Sopenharmony_ci 4582141cc406Sopenharmony_ci return rst; 4583141cc406Sopenharmony_ci} 4584141cc406Sopenharmony_ci 4585141cc406Sopenharmony_cistatic int fc_calibreflective(int option, int defvalue) 4586141cc406Sopenharmony_ci{ 4587141cc406Sopenharmony_ci int rst; 4588141cc406Sopenharmony_ci 4589141cc406Sopenharmony_ci switch(RTS_Debug->dev_model) 4590141cc406Sopenharmony_ci { 4591141cc406Sopenharmony_ci case UA4900: rst = ua4900_calibreflective(option, defvalue); break; 4592141cc406Sopenharmony_ci case HPG2710: 4593141cc406Sopenharmony_ci case HP3800: rst = hp3800_calibreflective(option, defvalue); break; 4594141cc406Sopenharmony_ci case HPG3010: 4595141cc406Sopenharmony_ci case HPG3110: 4596141cc406Sopenharmony_ci case HP4370: rst = hp4370_calibreflective(option, defvalue); break; 4597141cc406Sopenharmony_ci default : rst = hp3970_calibreflective(option, defvalue); break; 4598141cc406Sopenharmony_ci } 4599141cc406Sopenharmony_ci 4600141cc406Sopenharmony_ci return rst; 4601141cc406Sopenharmony_ci} 4602141cc406Sopenharmony_ci 4603141cc406Sopenharmony_cistatic int ua4900_calibtransparent(int option, int defvalue) 4604141cc406Sopenharmony_ci{ 4605141cc406Sopenharmony_ci int rst = defvalue; 4606141cc406Sopenharmony_ci 4607141cc406Sopenharmony_ci switch(option) 4608141cc406Sopenharmony_ci { 4609141cc406Sopenharmony_ci case WSTRIPXPOS: rst = 0; break; 4610141cc406Sopenharmony_ci case WSTRIPYPOS: rst = 12100; break; 4611141cc406Sopenharmony_ci case BSTRIPXPOS: rst = 0; break; 4612141cc406Sopenharmony_ci case BSTRIPYPOS: rst = 0; break; 4613141cc406Sopenharmony_ci case BREFR: rst = 2; break; 4614141cc406Sopenharmony_ci case BREFG: rst = 2; break; 4615141cc406Sopenharmony_ci case BREFB: rst = 2; break; 4616141cc406Sopenharmony_ci case REFBITDEPTH: rst = 8; break; 4617141cc406Sopenharmony_ci case OFFSETHEIGHT: rst = 10; break; 4618141cc406Sopenharmony_ci case OFFSETNSIGMA: rst = 2; break; 4619141cc406Sopenharmony_ci case OFFSETTARGETMAX: rst = 50; break; 4620141cc406Sopenharmony_ci case OFFSETTARGETMIN: rst = 2; break; 4621141cc406Sopenharmony_ci case OFFSETAVGTARGETR: rst = 13; break; 4622141cc406Sopenharmony_ci case OFFSETAVGTARGETG: rst = 13; break; 4623141cc406Sopenharmony_ci case OFFSETAVGTARGETB: rst = 13; break; 4624141cc406Sopenharmony_ci case ADCOFFEVENODD: rst = 1; break; 4625141cc406Sopenharmony_ci case CALIBOFFSET1ON: rst = 2; break; 4626141cc406Sopenharmony_ci case ADCOFFQUICKWAY: rst = 1; break; 4627141cc406Sopenharmony_ci case ADCOFFPREDICTSTART: rst = 200; break; 4628141cc406Sopenharmony_ci case ADCOFFPREDICTEND: rst = 500; break; 4629141cc406Sopenharmony_ci case OFFSETTUNESTEP1: rst = 5; break; 4630141cc406Sopenharmony_ci case OFFSETBOUNDARYRATIO1: rst = 100; break; 4631141cc406Sopenharmony_ci case OFFSETAVGRATIO1: rst = 100; break; 4632141cc406Sopenharmony_ci case OFFSETEVEN1R: rst = 321; break; 4633141cc406Sopenharmony_ci case OFFSETODD1R: rst = 321; break; 4634141cc406Sopenharmony_ci case OFFSETEVEN1G: rst = 321; break; 4635141cc406Sopenharmony_ci case OFFSETODD1G: rst = 321; break; 4636141cc406Sopenharmony_ci case OFFSETEVEN1B: rst = 321; break; 4637141cc406Sopenharmony_ci case OFFSETODD1B: rst = 321; break; 4638141cc406Sopenharmony_ci case ADCOFFPREDICTR: rst = 333; break; 4639141cc406Sopenharmony_ci case ADCOFFPREDICTG: rst = 313; break; 4640141cc406Sopenharmony_ci case ADCOFFPREDICTB: rst = 317; break; 4641141cc406Sopenharmony_ci case ADCOFFEVEN1R_1ST: rst = 69; break; 4642141cc406Sopenharmony_ci case ADCOFFODD1R_1ST: rst = 69; break; 4643141cc406Sopenharmony_ci case ADCOFFEVEN1G_1ST: rst = 87; break; 4644141cc406Sopenharmony_ci case ADCOFFODD1G_1ST: rst = 87; break; 4645141cc406Sopenharmony_ci case ADCOFFEVEN1B_1ST: rst = 106; break; 4646141cc406Sopenharmony_ci case ADCOFFODD1B_1ST: rst = 106; break; 4647141cc406Sopenharmony_ci case PEAKR: rst = 177; break; 4648141cc406Sopenharmony_ci case PEAKG: rst = 177; break; 4649141cc406Sopenharmony_ci case PEAKB: rst = 177; break; 4650141cc406Sopenharmony_ci case MINR: rst = 136; break; 4651141cc406Sopenharmony_ci case MING: rst = 136; break; 4652141cc406Sopenharmony_ci case MINB: rst = 136; break; 4653141cc406Sopenharmony_ci case CALIBOFFSET2ON: rst = 0; break; 4654141cc406Sopenharmony_ci case OFFSETTUNESTEP2: rst = 1; break; 4655141cc406Sopenharmony_ci case OFFSETBOUNDARYRATIO2: rst = 100; break; 4656141cc406Sopenharmony_ci case OFFSETAVGRATIO2: rst = 100; break; 4657141cc406Sopenharmony_ci case OFFSETEVEN2R: rst = 0; break; 4658141cc406Sopenharmony_ci case OFFSETODD2R: rst = 0; break; 4659141cc406Sopenharmony_ci case OFFSETEVEN2G: rst = 0; break; 4660141cc406Sopenharmony_ci case OFFSETODD2G: rst = 0; break; 4661141cc406Sopenharmony_ci case OFFSETEVEN2B: rst = 0; break; 4662141cc406Sopenharmony_ci case OFFSETODD2B: rst = 0; break; 4663141cc406Sopenharmony_ci case GAINHEIGHT: rst = 30; break; 4664141cc406Sopenharmony_ci case GAINTARGETFACTOR: rst = 90; break; 4665141cc406Sopenharmony_ci case CALIBPAGON: rst = 0; break; 4666141cc406Sopenharmony_ci case PAGR: rst = 0; break; 4667141cc406Sopenharmony_ci case PAGG: rst = 0; break; 4668141cc406Sopenharmony_ci case PAGB: rst = 0; break; 4669141cc406Sopenharmony_ci case CALIBGAIN1ON: rst = 1; break; 4670141cc406Sopenharmony_ci case GAIN1R: rst = 24; break; 4671141cc406Sopenharmony_ci case GAIN1G: rst = 21; break; 4672141cc406Sopenharmony_ci case GAIN1B: rst = 19; break; 4673141cc406Sopenharmony_ci case CALIBGAIN2ON: rst = 0; break; 4674141cc406Sopenharmony_ci case GAIN2R: rst = 8; break; 4675141cc406Sopenharmony_ci case GAIN2G: rst = 8; break; 4676141cc406Sopenharmony_ci case GAIN2B: rst = 8; break; 4677141cc406Sopenharmony_ci case TOTSHADING: rst = 0; break; 4678141cc406Sopenharmony_ci case BSHADINGON: rst = 2; break; 4679141cc406Sopenharmony_ci case BSHADINGHEIGHT: rst = 10; break; 4680141cc406Sopenharmony_ci case BSHADINGPREDIFFR: rst = 2; break; 4681141cc406Sopenharmony_ci case BSHADINGPREDIFFG: rst = 2; break; 4682141cc406Sopenharmony_ci case BSHADINGPREDIFFB: rst = 2; break; 4683141cc406Sopenharmony_ci case BSHADINGDEFCUTOFF: rst = 0; break; 4684141cc406Sopenharmony_ci case WSHADINGON: rst = 3; break; 4685141cc406Sopenharmony_ci case WSHADINGHEIGHT: rst = 24; break; 4686141cc406Sopenharmony_ci case WSHADINGPREDIFFR: rst = -1; break; 4687141cc406Sopenharmony_ci case WSHADINGPREDIFFG: rst = -1; break; 4688141cc406Sopenharmony_ci case WSHADINGPREDIFFB: rst = -1; break; 4689141cc406Sopenharmony_ci } 4690141cc406Sopenharmony_ci 4691141cc406Sopenharmony_ci return rst; 4692141cc406Sopenharmony_ci} 4693141cc406Sopenharmony_ci 4694141cc406Sopenharmony_cistatic int hp3800_calibtransparent(int option, int defvalue) 4695141cc406Sopenharmony_ci{ 4696141cc406Sopenharmony_ci int rst = defvalue; 4697141cc406Sopenharmony_ci switch(option) 4698141cc406Sopenharmony_ci { 4699141cc406Sopenharmony_ci case WSTRIPXPOS: rst = 0; break; 4700141cc406Sopenharmony_ci case WSTRIPYPOS: rst = 4155; break; 4701141cc406Sopenharmony_ci case BSTRIPXPOS: rst = 0; break; 4702141cc406Sopenharmony_ci case BSTRIPYPOS: rst = 0; break; 4703141cc406Sopenharmony_ci case BREFR: rst = 2; break; 4704141cc406Sopenharmony_ci case BREFG: rst = 2; break; 4705141cc406Sopenharmony_ci case BREFB: rst = 2; break; 4706141cc406Sopenharmony_ci case REFBITDEPTH: rst = 8; break; 4707141cc406Sopenharmony_ci case OFFSETHEIGHT: rst = 10; break; 4708141cc406Sopenharmony_ci case OFFSETNSIGMA: rst = 2; break; 4709141cc406Sopenharmony_ci case OFFSETTARGETMAX: rst = 50; break; 4710141cc406Sopenharmony_ci case OFFSETTARGETMIN: rst = 2; break; 4711141cc406Sopenharmony_ci case OFFSETAVGTARGETR: rst = 10; break; 4712141cc406Sopenharmony_ci case OFFSETAVGTARGETG: rst = 10; break; 4713141cc406Sopenharmony_ci case OFFSETAVGTARGETB: rst = 10; break; 4714141cc406Sopenharmony_ci case ADCOFFEVENODD: rst = 1; break; 4715141cc406Sopenharmony_ci case CALIBOFFSET1ON: rst = 2; break; 4716141cc406Sopenharmony_ci case ADCOFFQUICKWAY: rst = 1; break; 4717141cc406Sopenharmony_ci case ADCOFFPREDICTSTART: rst = 200; break; 4718141cc406Sopenharmony_ci case ADCOFFPREDICTEND: rst = 500; break; 4719141cc406Sopenharmony_ci case OFFSETTUNESTEP1: rst = 5; break; 4720141cc406Sopenharmony_ci case OFFSETBOUNDARYRATIO1: rst = 100; break; 4721141cc406Sopenharmony_ci case OFFSETAVGRATIO1: rst = 100; break; 4722141cc406Sopenharmony_ci case OFFSETEVEN1R: rst = 310; break; 4723141cc406Sopenharmony_ci case OFFSETODD1R: rst = 310; break; 4724141cc406Sopenharmony_ci case OFFSETEVEN1G: rst = 299; break; 4725141cc406Sopenharmony_ci case OFFSETODD1G: rst = 299; break; 4726141cc406Sopenharmony_ci case OFFSETEVEN1B: rst = 309; break; 4727141cc406Sopenharmony_ci case OFFSETODD1B: rst = 309; break; 4728141cc406Sopenharmony_ci case ADCOFFPREDICTR: rst = 333; break; 4729141cc406Sopenharmony_ci case ADCOFFPREDICTG: rst = 313; break; 4730141cc406Sopenharmony_ci case ADCOFFPREDICTB: rst = 317; break; 4731141cc406Sopenharmony_ci case ADCOFFEVEN1R_1ST: rst = 69; break; 4732141cc406Sopenharmony_ci case ADCOFFODD1R_1ST: rst = 69; break; 4733141cc406Sopenharmony_ci case ADCOFFEVEN1G_1ST: rst = 87; break; 4734141cc406Sopenharmony_ci case ADCOFFODD1G_1ST: rst = 87; break; 4735141cc406Sopenharmony_ci case ADCOFFEVEN1B_1ST: rst = 106; break; 4736141cc406Sopenharmony_ci case ADCOFFODD1B_1ST: rst = 106; break; 4737141cc406Sopenharmony_ci case PEAKR: rst = 67; break; 4738141cc406Sopenharmony_ci case PEAKG: rst = 61; break; 4739141cc406Sopenharmony_ci case PEAKB: rst = 57; break; 4740141cc406Sopenharmony_ci case MINR: rst = 10; break; 4741141cc406Sopenharmony_ci case MING: rst = 10; break; 4742141cc406Sopenharmony_ci case MINB: rst = 10; break; 4743141cc406Sopenharmony_ci case CALIBOFFSET2ON: rst = 0; break; 4744141cc406Sopenharmony_ci case OFFSETTUNESTEP2: rst = 1; break; 4745141cc406Sopenharmony_ci case OFFSETBOUNDARYRATIO2: rst = 100; break; 4746141cc406Sopenharmony_ci case OFFSETAVGRATIO2: rst = 100; break; 4747141cc406Sopenharmony_ci case OFFSETEVEN2R: rst = 0; break; 4748141cc406Sopenharmony_ci case OFFSETODD2R: rst = 0; break; 4749141cc406Sopenharmony_ci case OFFSETEVEN2G: rst = 0; break; 4750141cc406Sopenharmony_ci case OFFSETODD2G: rst = 0; break; 4751141cc406Sopenharmony_ci case OFFSETEVEN2B: rst = 0; break; 4752141cc406Sopenharmony_ci case OFFSETODD2B: rst = 0; break; 4753141cc406Sopenharmony_ci case GAINHEIGHT: rst = 30; break; 4754141cc406Sopenharmony_ci case GAINTARGETFACTOR: rst = 90; break; 4755141cc406Sopenharmony_ci case CALIBPAGON: rst = 0; break; 4756141cc406Sopenharmony_ci case PAGR: rst = 3; break; 4757141cc406Sopenharmony_ci case PAGG: rst = 3; break; 4758141cc406Sopenharmony_ci case PAGB: rst = 2; break; 4759141cc406Sopenharmony_ci case CALIBGAIN1ON: rst = 1; break; 4760141cc406Sopenharmony_ci case GAIN1R: rst = 9; break; 4761141cc406Sopenharmony_ci case GAIN1G: rst = 12; break; 4762141cc406Sopenharmony_ci case GAIN1B: rst = 10; break; 4763141cc406Sopenharmony_ci case CALIBGAIN2ON: rst = 0; break; 4764141cc406Sopenharmony_ci case GAIN2R: rst = 4; break; 4765141cc406Sopenharmony_ci case GAIN2G: rst = 4; break; 4766141cc406Sopenharmony_ci case GAIN2B: rst = 4; break; 4767141cc406Sopenharmony_ci case TOTSHADING: rst = 0; break; 4768141cc406Sopenharmony_ci case BSHADINGON: rst = -3; break; 4769141cc406Sopenharmony_ci case BSHADINGHEIGHT: rst = 30; break; 4770141cc406Sopenharmony_ci case BSHADINGPREDIFFR: rst = 2; break; 4771141cc406Sopenharmony_ci case BSHADINGPREDIFFG: rst = 2; break; 4772141cc406Sopenharmony_ci case BSHADINGPREDIFFB: rst = 2; break; 4773141cc406Sopenharmony_ci case BSHADINGDEFCUTOFF: rst = 0; break; 4774141cc406Sopenharmony_ci case WSHADINGON: rst = 3; break; 4775141cc406Sopenharmony_ci case WSHADINGHEIGHT: rst = 24; break; 4776141cc406Sopenharmony_ci case WSHADINGPREDIFFR: rst = -1; break; 4777141cc406Sopenharmony_ci case WSHADINGPREDIFFG: rst = -1; break; 4778141cc406Sopenharmony_ci case WSHADINGPREDIFFB: rst = -1; break; 4779141cc406Sopenharmony_ci } 4780141cc406Sopenharmony_ci 4781141cc406Sopenharmony_ci return rst; 4782141cc406Sopenharmony_ci} 4783141cc406Sopenharmony_ci 4784141cc406Sopenharmony_cistatic int hp3970_calibtransparent(int option, int defvalue) 4785141cc406Sopenharmony_ci{ 4786141cc406Sopenharmony_ci int rst = defvalue; 4787141cc406Sopenharmony_ci switch(option) 4788141cc406Sopenharmony_ci { 4789141cc406Sopenharmony_ci case WSTRIPXPOS: rst = 0; break; 4790141cc406Sopenharmony_ci case WSTRIPYPOS: rst = 7500; break; 4791141cc406Sopenharmony_ci case BSTRIPXPOS: rst = 0; break; 4792141cc406Sopenharmony_ci case BSTRIPYPOS: rst = 0; break; 4793141cc406Sopenharmony_ci case BREFR: rst = 2; break; 4794141cc406Sopenharmony_ci case BREFG: rst = 2; break; 4795141cc406Sopenharmony_ci case BREFB: rst = 2; break; 4796141cc406Sopenharmony_ci case REFBITDEPTH: rst = 8; break; 4797141cc406Sopenharmony_ci case OFFSETHEIGHT: rst = 10; break; 4798141cc406Sopenharmony_ci case OFFSETNSIGMA: rst = 2; break; 4799141cc406Sopenharmony_ci case OFFSETTARGETMAX: rst = 50; break; 4800141cc406Sopenharmony_ci case OFFSETTARGETMIN: rst = 2; break; 4801141cc406Sopenharmony_ci case OFFSETAVGTARGETR: rst = 10; break; 4802141cc406Sopenharmony_ci case OFFSETAVGTARGETG: rst = 10; break; 4803141cc406Sopenharmony_ci case OFFSETAVGTARGETB: rst = 10; break; 4804141cc406Sopenharmony_ci case ADCOFFEVENODD: rst = 1; break; 4805141cc406Sopenharmony_ci case CALIBOFFSET1ON: rst = 2; break; 4806141cc406Sopenharmony_ci case ADCOFFQUICKWAY: rst = 1; break; 4807141cc406Sopenharmony_ci case ADCOFFPREDICTSTART: rst = 200; break; 4808141cc406Sopenharmony_ci case ADCOFFPREDICTEND: rst = 500; break; 4809141cc406Sopenharmony_ci case OFFSETTUNESTEP1: rst = 5; break; 4810141cc406Sopenharmony_ci case OFFSETBOUNDARYRATIO1: rst = 100; break; 4811141cc406Sopenharmony_ci case OFFSETAVGRATIO1: rst = 100; break; 4812141cc406Sopenharmony_ci case OFFSETEVEN1R: rst = 323; break; 4813141cc406Sopenharmony_ci case OFFSETODD1R: rst = 323; break; 4814141cc406Sopenharmony_ci case OFFSETEVEN1G: rst = 327; break; 4815141cc406Sopenharmony_ci case OFFSETODD1G: rst = 327; break; 4816141cc406Sopenharmony_ci case OFFSETEVEN1B: rst = 327; break; 4817141cc406Sopenharmony_ci case OFFSETODD1B: rst = 327; break; 4818141cc406Sopenharmony_ci case ADCOFFPREDICTR: rst = 333; break; 4819141cc406Sopenharmony_ci case ADCOFFPREDICTG: rst = 313; break; 4820141cc406Sopenharmony_ci case ADCOFFPREDICTB: rst = 317; break; 4821141cc406Sopenharmony_ci case ADCOFFEVEN1R_1ST: rst = 69; break; 4822141cc406Sopenharmony_ci case ADCOFFODD1R_1ST: rst = 69; break; 4823141cc406Sopenharmony_ci case ADCOFFEVEN1G_1ST: rst = 87; break; 4824141cc406Sopenharmony_ci case ADCOFFODD1G_1ST: rst = 87; break; 4825141cc406Sopenharmony_ci case ADCOFFEVEN1B_1ST: rst = 106; break; 4826141cc406Sopenharmony_ci case ADCOFFODD1B_1ST: rst = 106; break; 4827141cc406Sopenharmony_ci case PEAKR: rst = 42; break; 4828141cc406Sopenharmony_ci case PEAKG: rst = 55; break; 4829141cc406Sopenharmony_ci case PEAKB: rst = 53; break; 4830141cc406Sopenharmony_ci case MINR: rst = 31; break; 4831141cc406Sopenharmony_ci case MING: rst = 39; break; 4832141cc406Sopenharmony_ci case MINB: rst = 38; break; 4833141cc406Sopenharmony_ci case CALIBOFFSET2ON: rst = 0; break; 4834141cc406Sopenharmony_ci case OFFSETTUNESTEP2: rst = 1; break; 4835141cc406Sopenharmony_ci case OFFSETBOUNDARYRATIO2: rst = 100; break; 4836141cc406Sopenharmony_ci case OFFSETAVGRATIO2: rst = 100; break; 4837141cc406Sopenharmony_ci case OFFSETEVEN2R: rst = 0; break; 4838141cc406Sopenharmony_ci case OFFSETODD2R: rst = 0; break; 4839141cc406Sopenharmony_ci case OFFSETEVEN2G: rst = 0; break; 4840141cc406Sopenharmony_ci case OFFSETODD2G: rst = 0; break; 4841141cc406Sopenharmony_ci case OFFSETEVEN2B: rst = 0; break; 4842141cc406Sopenharmony_ci case OFFSETODD2B: rst = 0; break; 4843141cc406Sopenharmony_ci case GAINHEIGHT: rst = 30; break; 4844141cc406Sopenharmony_ci case GAINTARGETFACTOR: rst = 90; break; 4845141cc406Sopenharmony_ci case CALIBPAGON: rst = 0; break; 4846141cc406Sopenharmony_ci case PAGR: rst = 3; break; 4847141cc406Sopenharmony_ci case PAGG: rst = 3; break; 4848141cc406Sopenharmony_ci case PAGB: rst = 2; break; 4849141cc406Sopenharmony_ci case CALIBGAIN1ON: rst = 1; break; 4850141cc406Sopenharmony_ci case GAIN1R: rst = 21; break; 4851141cc406Sopenharmony_ci case GAIN1G: rst = 14; break; 4852141cc406Sopenharmony_ci case GAIN1B: rst = 12; break; 4853141cc406Sopenharmony_ci case CALIBGAIN2ON: rst = 0; break; 4854141cc406Sopenharmony_ci case GAIN2R: rst = 4; break; 4855141cc406Sopenharmony_ci case GAIN2G: rst = 4; break; 4856141cc406Sopenharmony_ci case GAIN2B: rst = 4; break; 4857141cc406Sopenharmony_ci case TOTSHADING: rst = 0; break; 4858141cc406Sopenharmony_ci case BSHADINGON: rst = 1; break; 4859141cc406Sopenharmony_ci case BSHADINGHEIGHT: rst = 30; break; 4860141cc406Sopenharmony_ci case BSHADINGPREDIFFR: rst = 2; break; 4861141cc406Sopenharmony_ci case BSHADINGPREDIFFG: rst = 2; break; 4862141cc406Sopenharmony_ci case BSHADINGPREDIFFB: rst = 2; break; 4863141cc406Sopenharmony_ci case BSHADINGDEFCUTOFF: rst = 0; break; 4864141cc406Sopenharmony_ci case WSHADINGON: rst = 3; break; 4865141cc406Sopenharmony_ci case WSHADINGHEIGHT: rst = 24; break; 4866141cc406Sopenharmony_ci case WSHADINGPREDIFFR: rst = -1; break; 4867141cc406Sopenharmony_ci case WSHADINGPREDIFFG: rst = -1; break; 4868141cc406Sopenharmony_ci case WSHADINGPREDIFFB: rst = -1; break; 4869141cc406Sopenharmony_ci } 4870141cc406Sopenharmony_ci 4871141cc406Sopenharmony_ci return rst; 4872141cc406Sopenharmony_ci} 4873141cc406Sopenharmony_ci 4874141cc406Sopenharmony_cistatic int hp4370_calibtransparent(int option, int defvalue) 4875141cc406Sopenharmony_ci{ 4876141cc406Sopenharmony_ci int rst = defvalue; 4877141cc406Sopenharmony_ci switch(option) 4878141cc406Sopenharmony_ci { 4879141cc406Sopenharmony_ci case WSTRIPXPOS: rst = 0; break; 4880141cc406Sopenharmony_ci case WSTRIPYPOS: rst = 6580; break; 4881141cc406Sopenharmony_ci case BSTRIPXPOS: rst = 0; break; 4882141cc406Sopenharmony_ci case BSTRIPYPOS: rst = 0; break; 4883141cc406Sopenharmony_ci case BREFR: rst = 2; break; 4884141cc406Sopenharmony_ci case BREFG: rst = 2; break; 4885141cc406Sopenharmony_ci case BREFB: rst = 2; break; 4886141cc406Sopenharmony_ci case REFBITDEPTH: rst = 8; break; 4887141cc406Sopenharmony_ci case OFFSETHEIGHT: rst = 10; break; 4888141cc406Sopenharmony_ci case OFFSETNSIGMA: rst = 2; break; 4889141cc406Sopenharmony_ci case OFFSETTARGETMAX: rst = 50; break; 4890141cc406Sopenharmony_ci case OFFSETTARGETMIN: rst = 2; break; 4891141cc406Sopenharmony_ci case OFFSETAVGTARGETR: rst = 10; break; 4892141cc406Sopenharmony_ci case OFFSETAVGTARGETG: rst = 10; break; 4893141cc406Sopenharmony_ci case OFFSETAVGTARGETB: rst = 10; break; 4894141cc406Sopenharmony_ci case ADCOFFEVENODD: rst = 1; break; 4895141cc406Sopenharmony_ci case CALIBOFFSET1ON: rst = 2; break; 4896141cc406Sopenharmony_ci case ADCOFFQUICKWAY: rst = 1; break; 4897141cc406Sopenharmony_ci case ADCOFFPREDICTSTART: rst = 200; break; 4898141cc406Sopenharmony_ci case ADCOFFPREDICTEND: rst = 500; break; 4899141cc406Sopenharmony_ci case OFFSETTUNESTEP1: rst = 5; break; 4900141cc406Sopenharmony_ci case OFFSETBOUNDARYRATIO1: rst = 100; break; 4901141cc406Sopenharmony_ci case OFFSETAVGRATIO1: rst = 100; break; 4902141cc406Sopenharmony_ci case OFFSETEVEN1R: rst = 315; break; 4903141cc406Sopenharmony_ci case OFFSETODD1R: rst = 321; break; 4904141cc406Sopenharmony_ci case OFFSETEVEN1G: rst = 321; break; 4905141cc406Sopenharmony_ci case OFFSETODD1G: rst = 324; break; 4906141cc406Sopenharmony_ci case OFFSETEVEN1B: rst = 324; break; 4907141cc406Sopenharmony_ci case OFFSETODD1B: rst = 327; break; 4908141cc406Sopenharmony_ci case ADCOFFPREDICTR: rst = 333; break; 4909141cc406Sopenharmony_ci case ADCOFFPREDICTG: rst = 313; break; 4910141cc406Sopenharmony_ci case ADCOFFPREDICTB: rst = 317; break; 4911141cc406Sopenharmony_ci case ADCOFFEVEN1R_1ST: rst = 69; break; 4912141cc406Sopenharmony_ci case ADCOFFODD1R_1ST: rst = 69; break; 4913141cc406Sopenharmony_ci case ADCOFFEVEN1G_1ST: rst = 87; break; 4914141cc406Sopenharmony_ci case ADCOFFODD1G_1ST: rst = 87; break; 4915141cc406Sopenharmony_ci case ADCOFFEVEN1B_1ST: rst = 106; break; 4916141cc406Sopenharmony_ci case ADCOFFODD1B_1ST: rst = 106; break; 4917141cc406Sopenharmony_ci case PEAKR: rst = 62; break; 4918141cc406Sopenharmony_ci case PEAKG: rst = 66; break; 4919141cc406Sopenharmony_ci case PEAKB: rst = 54; break; 4920141cc406Sopenharmony_ci case MINR: rst = 42; break; 4921141cc406Sopenharmony_ci case MING: rst = 45; break; 4922141cc406Sopenharmony_ci case MINB: rst = 45; break; 4923141cc406Sopenharmony_ci case CALIBOFFSET2ON: rst = 0; break; 4924141cc406Sopenharmony_ci case OFFSETTUNESTEP2: rst = 1; break; 4925141cc406Sopenharmony_ci case OFFSETBOUNDARYRATIO2: rst = 100; break; 4926141cc406Sopenharmony_ci case OFFSETAVGRATIO2: rst = 100; break; 4927141cc406Sopenharmony_ci case OFFSETEVEN2R: rst = 0; break; 4928141cc406Sopenharmony_ci case OFFSETODD2R: rst = 0; break; 4929141cc406Sopenharmony_ci case OFFSETEVEN2G: rst = 0; break; 4930141cc406Sopenharmony_ci case OFFSETODD2G: rst = 0; break; 4931141cc406Sopenharmony_ci case OFFSETEVEN2B: rst = 0; break; 4932141cc406Sopenharmony_ci case OFFSETODD2B: rst = 0; break; 4933141cc406Sopenharmony_ci case GAINHEIGHT: rst = 30; break; 4934141cc406Sopenharmony_ci case GAINTARGETFACTOR: rst = 80; break; 4935141cc406Sopenharmony_ci case CALIBPAGON: rst = 0; break; 4936141cc406Sopenharmony_ci case HIPAGR: rst = 3; break; 4937141cc406Sopenharmony_ci case HIPAGG: rst = 3; break; 4938141cc406Sopenharmony_ci case HIPAGB: rst = 2; break; 4939141cc406Sopenharmony_ci case LOPAGR: rst = 3; break; 4940141cc406Sopenharmony_ci case LOPAGG: rst = 3; break; 4941141cc406Sopenharmony_ci case LOPAGB: rst = 2; break; 4942141cc406Sopenharmony_ci case PAGR: rst = 3; break; 4943141cc406Sopenharmony_ci case PAGG: rst = 3; break; 4944141cc406Sopenharmony_ci case PAGB: rst = 2; break; 4945141cc406Sopenharmony_ci case CALIBGAIN1ON: rst = 1; break; 4946141cc406Sopenharmony_ci case GAIN1R: rst = 11; break; 4947141cc406Sopenharmony_ci case GAIN1G: rst = 9; break; 4948141cc406Sopenharmony_ci case GAIN1B: rst = 12; break; 4949141cc406Sopenharmony_ci case CALIBGAIN2ON: rst = 0; break; 4950141cc406Sopenharmony_ci case GAIN2R: rst = 4; break; 4951141cc406Sopenharmony_ci case GAIN2G: rst = 4; break; 4952141cc406Sopenharmony_ci case GAIN2B: rst = 4; break; 4953141cc406Sopenharmony_ci case TOTSHADING: rst = 0; break; 4954141cc406Sopenharmony_ci case BSHADINGON: rst = -2; break; 4955141cc406Sopenharmony_ci case BSHADINGHEIGHT: rst = 30; break; 4956141cc406Sopenharmony_ci case BSHADINGPREDIFFR: rst = 2; break; 4957141cc406Sopenharmony_ci case BSHADINGPREDIFFG: rst = 2; break; 4958141cc406Sopenharmony_ci case BSHADINGPREDIFFB: rst = 2; break; 4959141cc406Sopenharmony_ci case BSHADINGDEFCUTOFF: rst = 0; break; 4960141cc406Sopenharmony_ci case WSHADINGON: rst = 3; break; 4961141cc406Sopenharmony_ci case WSHADINGHEIGHT: rst = 24; break; 4962141cc406Sopenharmony_ci case WSHADINGPREDIFFR: rst = -1; break; 4963141cc406Sopenharmony_ci case WSHADINGPREDIFFG: rst = -1; break; 4964141cc406Sopenharmony_ci case WSHADINGPREDIFFB: rst = -1; break; 4965141cc406Sopenharmony_ci } 4966141cc406Sopenharmony_ci 4967141cc406Sopenharmony_ci return rst; 4968141cc406Sopenharmony_ci} 4969141cc406Sopenharmony_ci 4970141cc406Sopenharmony_cistatic int hpg3110_calibtransparent(int option, int defvalue) 4971141cc406Sopenharmony_ci{ 4972141cc406Sopenharmony_ci int rst = defvalue; 4973141cc406Sopenharmony_ci switch(option) 4974141cc406Sopenharmony_ci { 4975141cc406Sopenharmony_ci case WSTRIPXPOS: rst = 0; break; 4976141cc406Sopenharmony_ci case WSTRIPYPOS: rst = 5100; break; 4977141cc406Sopenharmony_ci case BSTRIPXPOS: rst = 0; break; 4978141cc406Sopenharmony_ci case BSTRIPYPOS: rst = 0; break; 4979141cc406Sopenharmony_ci case BREFR: rst = 2; break; 4980141cc406Sopenharmony_ci case BREFG: rst = 2; break; 4981141cc406Sopenharmony_ci case BREFB: rst = 2; break; 4982141cc406Sopenharmony_ci case REFBITDEPTH: rst = 8; break; 4983141cc406Sopenharmony_ci case OFFSETHEIGHT: rst = 10; break; 4984141cc406Sopenharmony_ci case OFFSETNSIGMA: rst = 2; break; 4985141cc406Sopenharmony_ci case OFFSETTARGETMAX: rst = 50; break; 4986141cc406Sopenharmony_ci case OFFSETTARGETMIN: rst = 2; break; 4987141cc406Sopenharmony_ci case OFFSETAVGTARGETR: rst = 10; break; 4988141cc406Sopenharmony_ci case OFFSETAVGTARGETG: rst = 10; break; 4989141cc406Sopenharmony_ci case OFFSETAVGTARGETB: rst = 10; break; 4990141cc406Sopenharmony_ci case ADCOFFEVENODD: rst = 1; break; 4991141cc406Sopenharmony_ci case CALIBOFFSET1ON: rst = 2; break; 4992141cc406Sopenharmony_ci case ADCOFFQUICKWAY: rst = 1; break; 4993141cc406Sopenharmony_ci case ADCOFFPREDICTSTART: rst = 200; break; 4994141cc406Sopenharmony_ci case ADCOFFPREDICTEND: rst = 500; break; 4995141cc406Sopenharmony_ci case OFFSETTUNESTEP1: rst = 5; break; 4996141cc406Sopenharmony_ci case OFFSETBOUNDARYRATIO1: rst = 100; break; 4997141cc406Sopenharmony_ci case OFFSETAVGRATIO1: rst = 100; break; 4998141cc406Sopenharmony_ci case OFFSETEVEN1R: rst = 315; break; 4999141cc406Sopenharmony_ci case OFFSETODD1R: rst = 321; break; 5000141cc406Sopenharmony_ci case OFFSETEVEN1G: rst = 321; break; 5001141cc406Sopenharmony_ci case OFFSETODD1G: rst = 324; break; 5002141cc406Sopenharmony_ci case OFFSETEVEN1B: rst = 324; break; 5003141cc406Sopenharmony_ci case OFFSETODD1B: rst = 327; break; 5004141cc406Sopenharmony_ci case ADCOFFPREDICTR: rst = 333; break; 5005141cc406Sopenharmony_ci case ADCOFFPREDICTG: rst = 313; break; 5006141cc406Sopenharmony_ci case ADCOFFPREDICTB: rst = 317; break; 5007141cc406Sopenharmony_ci case ADCOFFEVEN1R_1ST: rst = 69; break; 5008141cc406Sopenharmony_ci case ADCOFFODD1R_1ST: rst = 69; break; 5009141cc406Sopenharmony_ci case ADCOFFEVEN1G_1ST: rst = 87; break; 5010141cc406Sopenharmony_ci case ADCOFFODD1G_1ST: rst = 87; break; 5011141cc406Sopenharmony_ci case ADCOFFEVEN1B_1ST: rst = 106; break; 5012141cc406Sopenharmony_ci case ADCOFFODD1B_1ST: rst = 106; break; 5013141cc406Sopenharmony_ci case PEAKR: rst = 62; break; 5014141cc406Sopenharmony_ci case PEAKG: rst = 66; break; 5015141cc406Sopenharmony_ci case PEAKB: rst = 54; break; 5016141cc406Sopenharmony_ci case MINR: rst = 42; break; 5017141cc406Sopenharmony_ci case MING: rst = 45; break; 5018141cc406Sopenharmony_ci case MINB: rst = 45; break; 5019141cc406Sopenharmony_ci case CALIBOFFSET2ON: rst = 0; break; 5020141cc406Sopenharmony_ci case OFFSETTUNESTEP2: rst = 1; break; 5021141cc406Sopenharmony_ci case OFFSETBOUNDARYRATIO2: rst = 100; break; 5022141cc406Sopenharmony_ci case OFFSETAVGRATIO2: rst = 100; break; 5023141cc406Sopenharmony_ci case OFFSETEVEN2R: rst = 0; break; 5024141cc406Sopenharmony_ci case OFFSETODD2R: rst = 0; break; 5025141cc406Sopenharmony_ci case OFFSETEVEN2G: rst = 0; break; 5026141cc406Sopenharmony_ci case OFFSETODD2G: rst = 0; break; 5027141cc406Sopenharmony_ci case OFFSETEVEN2B: rst = 0; break; 5028141cc406Sopenharmony_ci case OFFSETODD2B: rst = 0; break; 5029141cc406Sopenharmony_ci case GAINHEIGHT: rst = 30; break; 5030141cc406Sopenharmony_ci case GAINTARGETFACTOR: rst = 80; break; 5031141cc406Sopenharmony_ci case CALIBPAGON: rst = 0; break; 5032141cc406Sopenharmony_ci case HIPAGR: rst = 3; break; 5033141cc406Sopenharmony_ci case HIPAGG: rst = 3; break; 5034141cc406Sopenharmony_ci case HIPAGB: rst = 2; break; 5035141cc406Sopenharmony_ci case LOPAGR: rst = 3; break; 5036141cc406Sopenharmony_ci case LOPAGG: rst = 3; break; 5037141cc406Sopenharmony_ci case LOPAGB: rst = 2; break; 5038141cc406Sopenharmony_ci case PAGR: rst = 3; break; 5039141cc406Sopenharmony_ci case PAGG: rst = 3; break; 5040141cc406Sopenharmony_ci case PAGB: rst = 2; break; 5041141cc406Sopenharmony_ci case CALIBGAIN1ON: rst = 1; break; 5042141cc406Sopenharmony_ci case GAIN1R: rst = 11; break; 5043141cc406Sopenharmony_ci case GAIN1G: rst = 9; break; 5044141cc406Sopenharmony_ci case GAIN1B: rst = 12; break; 5045141cc406Sopenharmony_ci case CALIBGAIN2ON: rst = 0; break; 5046141cc406Sopenharmony_ci case GAIN2R: rst = 4; break; 5047141cc406Sopenharmony_ci case GAIN2G: rst = 4; break; 5048141cc406Sopenharmony_ci case GAIN2B: rst = 4; break; 5049141cc406Sopenharmony_ci case TOTSHADING: rst = 0; break; 5050141cc406Sopenharmony_ci case BSHADINGON: rst = -2; break; 5051141cc406Sopenharmony_ci case BSHADINGHEIGHT: rst = 30; break; 5052141cc406Sopenharmony_ci case BSHADINGPREDIFFR: rst = 2; break; 5053141cc406Sopenharmony_ci case BSHADINGPREDIFFG: rst = 2; break; 5054141cc406Sopenharmony_ci case BSHADINGPREDIFFB: rst = 2; break; 5055141cc406Sopenharmony_ci case BSHADINGDEFCUTOFF: rst = 0; break; 5056141cc406Sopenharmony_ci case WSHADINGON: rst = 3; break; 5057141cc406Sopenharmony_ci case WSHADINGHEIGHT: rst = 24; break; 5058141cc406Sopenharmony_ci case WSHADINGPREDIFFR: rst = -1; break; 5059141cc406Sopenharmony_ci case WSHADINGPREDIFFG: rst = -1; break; 5060141cc406Sopenharmony_ci case WSHADINGPREDIFFB: rst = -1; break; 5061141cc406Sopenharmony_ci } 5062141cc406Sopenharmony_ci 5063141cc406Sopenharmony_ci return rst; 5064141cc406Sopenharmony_ci} 5065141cc406Sopenharmony_ci 5066141cc406Sopenharmony_cistatic int fc_calibtransparent(int option, int defvalue) 5067141cc406Sopenharmony_ci{ 5068141cc406Sopenharmony_ci int rst; 5069141cc406Sopenharmony_ci 5070141cc406Sopenharmony_ci switch(RTS_Debug->dev_model) 5071141cc406Sopenharmony_ci { 5072141cc406Sopenharmony_ci case UA4900: rst = ua4900_calibtransparent(option, defvalue); break; 5073141cc406Sopenharmony_ci case HPG2710: 5074141cc406Sopenharmony_ci case HP3800: rst = hp3800_calibtransparent(option, defvalue); break; 5075141cc406Sopenharmony_ci case HPG3010: 5076141cc406Sopenharmony_ci case HP4370: rst = hp4370_calibtransparent(option, defvalue); break; 5077141cc406Sopenharmony_ci case HPG3110: rst = hpg3110_calibtransparent(option, defvalue); break; 5078141cc406Sopenharmony_ci default : rst = hp3970_calibtransparent(option, defvalue); break; 5079141cc406Sopenharmony_ci } 5080141cc406Sopenharmony_ci 5081141cc406Sopenharmony_ci return rst; 5082141cc406Sopenharmony_ci} 5083141cc406Sopenharmony_ci 5084141cc406Sopenharmony_cistatic int ua4900_calibnegative(int option, int defvalue) 5085141cc406Sopenharmony_ci{ 5086141cc406Sopenharmony_ci int rst = defvalue; 5087141cc406Sopenharmony_ci 5088141cc406Sopenharmony_ci switch(option) 5089141cc406Sopenharmony_ci { 5090141cc406Sopenharmony_ci case WSTRIPXPOS: rst = 0; break; 5091141cc406Sopenharmony_ci case WSTRIPYPOS: rst = 12100; break; 5092141cc406Sopenharmony_ci case BSTRIPXPOS: rst = 0; break; 5093141cc406Sopenharmony_ci case BSTRIPYPOS: rst = 0; break; 5094141cc406Sopenharmony_ci case BREFR: rst = 2; break; 5095141cc406Sopenharmony_ci case BREFG: rst = 2; break; 5096141cc406Sopenharmony_ci case BREFB: rst = 2; break; 5097141cc406Sopenharmony_ci case REFBITDEPTH: rst = 8; break; 5098141cc406Sopenharmony_ci case OFFSETHEIGHT: rst = 10; break; 5099141cc406Sopenharmony_ci case OFFSETNSIGMA: rst = 2; break; 5100141cc406Sopenharmony_ci case OFFSETTARGETMAX: rst = 50; break; 5101141cc406Sopenharmony_ci case OFFSETTARGETMIN: rst = 2; break; 5102141cc406Sopenharmony_ci case OFFSETAVGTARGETR: rst = 5; break; 5103141cc406Sopenharmony_ci case OFFSETAVGTARGETG: rst = 5; break; 5104141cc406Sopenharmony_ci case OFFSETAVGTARGETB: rst = 5; break; 5105141cc406Sopenharmony_ci case ADCOFFEVENODD: rst = 1; break; 5106141cc406Sopenharmony_ci case CALIBOFFSET1ON: rst = 2; break; 5107141cc406Sopenharmony_ci case ADCOFFQUICKWAY: rst = 1; break; 5108141cc406Sopenharmony_ci case ADCOFFPREDICTSTART: rst = 200; break; 5109141cc406Sopenharmony_ci case ADCOFFPREDICTEND: rst = 500; break; 5110141cc406Sopenharmony_ci case OFFSETTUNESTEP1: rst = 5; break; 5111141cc406Sopenharmony_ci case OFFSETBOUNDARYRATIO1: rst = 100; break; 5112141cc406Sopenharmony_ci case OFFSETAVGRATIO1: rst = 100; break; 5113141cc406Sopenharmony_ci case OFFSETEVEN1R: rst = 283; break; 5114141cc406Sopenharmony_ci case OFFSETODD1R: rst = 283; break; 5115141cc406Sopenharmony_ci case OFFSETEVEN1G: rst = 279; break; 5116141cc406Sopenharmony_ci case OFFSETODD1G: rst = 279; break; 5117141cc406Sopenharmony_ci case OFFSETEVEN1B: rst = 295; break; 5118141cc406Sopenharmony_ci case OFFSETODD1B: rst = 295; break; 5119141cc406Sopenharmony_ci case ADCOFFPREDICTR: rst = 333; break; 5120141cc406Sopenharmony_ci case ADCOFFPREDICTG: rst = 313; break; 5121141cc406Sopenharmony_ci case ADCOFFPREDICTB: rst = 317; break; 5122141cc406Sopenharmony_ci case ADCOFFEVEN1R_1ST: rst = 69; break; 5123141cc406Sopenharmony_ci case ADCOFFODD1R_1ST: rst = 69; break; 5124141cc406Sopenharmony_ci case ADCOFFEVEN1G_1ST: rst = 87; break; 5125141cc406Sopenharmony_ci case ADCOFFODD1G_1ST: rst = 87; break; 5126141cc406Sopenharmony_ci case ADCOFFEVEN1B_1ST: rst = 106; break; 5127141cc406Sopenharmony_ci case ADCOFFODD1B_1ST: rst = 106; break; 5128141cc406Sopenharmony_ci case PEAKR: rst = 113; break; 5129141cc406Sopenharmony_ci case PEAKG: rst = 145; break; 5130141cc406Sopenharmony_ci case PEAKB: rst = 126; break; 5131141cc406Sopenharmony_ci case MINR: rst = 80; break; 5132141cc406Sopenharmony_ci case MING: rst = 105; break; 5133141cc406Sopenharmony_ci case MINB: rst = 96; break; 5134141cc406Sopenharmony_ci case CALIBOFFSET2ON: rst = 0; break; 5135141cc406Sopenharmony_ci case OFFSETTUNESTEP2: rst = 1; break; 5136141cc406Sopenharmony_ci case OFFSETBOUNDARYRATIO2: rst = 100; break; 5137141cc406Sopenharmony_ci case OFFSETAVGRATIO2: rst = 100; break; 5138141cc406Sopenharmony_ci case OFFSETEVEN2R: rst = 0; break; 5139141cc406Sopenharmony_ci case OFFSETODD2R: rst = 0; break; 5140141cc406Sopenharmony_ci case OFFSETEVEN2G: rst = 0; break; 5141141cc406Sopenharmony_ci case OFFSETODD2G: rst = 0; break; 5142141cc406Sopenharmony_ci case OFFSETEVEN2B: rst = 0; break; 5143141cc406Sopenharmony_ci case OFFSETODD2B: rst = 0; break; 5144141cc406Sopenharmony_ci case GAINHEIGHT: rst = 10; break; 5145141cc406Sopenharmony_ci case GAINTARGETFACTOR: rst = 90; break; 5146141cc406Sopenharmony_ci case CALIBPAGON: rst = 0; break; 5147141cc406Sopenharmony_ci case PAGR: rst = 0; break; 5148141cc406Sopenharmony_ci case PAGG: rst = 0; break; 5149141cc406Sopenharmony_ci case PAGB: rst = 0; break; 5150141cc406Sopenharmony_ci case CALIBGAIN1ON: rst = 1; break; 5151141cc406Sopenharmony_ci case GAIN1R: rst = 8; break; 5152141cc406Sopenharmony_ci case GAIN1G: rst = 8; break; 5153141cc406Sopenharmony_ci case GAIN1B: rst = 8; break; 5154141cc406Sopenharmony_ci case CALIBGAIN2ON: rst = 0; break; 5155141cc406Sopenharmony_ci case GAIN2R: rst = 8; break; 5156141cc406Sopenharmony_ci case GAIN2G: rst = 8; break; 5157141cc406Sopenharmony_ci case GAIN2B: rst = 8; break; 5158141cc406Sopenharmony_ci case TOTSHADING: rst = 0; break; 5159141cc406Sopenharmony_ci case BSHADINGON: rst = 2; break; 5160141cc406Sopenharmony_ci case BSHADINGHEIGHT: rst = 10; break; 5161141cc406Sopenharmony_ci case BSHADINGPREDIFFR: rst = 2; break; 5162141cc406Sopenharmony_ci case BSHADINGPREDIFFG: rst = 2; break; 5163141cc406Sopenharmony_ci case BSHADINGPREDIFFB: rst = 2; break; 5164141cc406Sopenharmony_ci case BSHADINGDEFCUTOFF: rst = 0; break; 5165141cc406Sopenharmony_ci case WSHADINGON: rst = 3; break; 5166141cc406Sopenharmony_ci case WSHADINGHEIGHT: rst = 24; break; 5167141cc406Sopenharmony_ci case WSHADINGPREDIFFR: rst = -1; break; 5168141cc406Sopenharmony_ci case WSHADINGPREDIFFG: rst = -1; break; 5169141cc406Sopenharmony_ci case WSHADINGPREDIFFB: rst = -1; break; 5170141cc406Sopenharmony_ci } 5171141cc406Sopenharmony_ci 5172141cc406Sopenharmony_ci return rst; 5173141cc406Sopenharmony_ci} 5174141cc406Sopenharmony_ci 5175141cc406Sopenharmony_cistatic int hp3800_calibnegative(int option, int defvalue) 5176141cc406Sopenharmony_ci{ 5177141cc406Sopenharmony_ci int rst = defvalue; 5178141cc406Sopenharmony_ci 5179141cc406Sopenharmony_ci switch(option) 5180141cc406Sopenharmony_ci { 5181141cc406Sopenharmony_ci case WSTRIPXPOS: rst = 0; break; 5182141cc406Sopenharmony_ci case WSTRIPYPOS: rst = 4155; break; 5183141cc406Sopenharmony_ci case BSTRIPXPOS: rst = 0; break; 5184141cc406Sopenharmony_ci case BSTRIPYPOS: rst = 0; break; 5185141cc406Sopenharmony_ci case BREFR: rst = 10; break; 5186141cc406Sopenharmony_ci case BREFG: rst = 10; break; 5187141cc406Sopenharmony_ci case BREFB: rst = 10; break; 5188141cc406Sopenharmony_ci case REFBITDEPTH: rst = 8; break; 5189141cc406Sopenharmony_ci case OFFSETHEIGHT: rst = 10; break; 5190141cc406Sopenharmony_ci case OFFSETNSIGMA: rst = 2; break; 5191141cc406Sopenharmony_ci case OFFSETTARGETMAX: rst = 50; break; 5192141cc406Sopenharmony_ci case OFFSETTARGETMIN: rst = 2; break; 5193141cc406Sopenharmony_ci case OFFSETAVGTARGETR: rst = 10; break; 5194141cc406Sopenharmony_ci case OFFSETAVGTARGETG: rst = 10; break; 5195141cc406Sopenharmony_ci case OFFSETAVGTARGETB: rst = 10; break; 5196141cc406Sopenharmony_ci case ADCOFFEVENODD: rst = 1; break; 5197141cc406Sopenharmony_ci case CALIBOFFSET1ON: rst = 2; break; 5198141cc406Sopenharmony_ci case ADCOFFQUICKWAY: rst = 1; break; 5199141cc406Sopenharmony_ci case ADCOFFPREDICTSTART: rst = 200; break; 5200141cc406Sopenharmony_ci case ADCOFFPREDICTEND: rst = 500; break; 5201141cc406Sopenharmony_ci case OFFSETTUNESTEP1: rst = 5; break; 5202141cc406Sopenharmony_ci case OFFSETBOUNDARYRATIO1: rst = 100; break; 5203141cc406Sopenharmony_ci case OFFSETAVGRATIO1: rst = 100; break; 5204141cc406Sopenharmony_ci case OFFSETEVEN1R: rst = 315; break; 5205141cc406Sopenharmony_ci case OFFSETODD1R: rst = 315; break; 5206141cc406Sopenharmony_ci case OFFSETEVEN1G: rst = 307; break; 5207141cc406Sopenharmony_ci case OFFSETODD1G: rst = 304; break; 5208141cc406Sopenharmony_ci case OFFSETEVEN1B: rst = 309; break; 5209141cc406Sopenharmony_ci case OFFSETODD1B: rst = 309; break; 5210141cc406Sopenharmony_ci case ADCOFFPREDICTR: rst = 333; break; 5211141cc406Sopenharmony_ci case ADCOFFPREDICTG: rst = 313; break; 5212141cc406Sopenharmony_ci case ADCOFFPREDICTB: rst = 317; break; 5213141cc406Sopenharmony_ci case ADCOFFEVEN1R_1ST: rst = 69; break; 5214141cc406Sopenharmony_ci case ADCOFFODD1R_1ST: rst = 69; break; 5215141cc406Sopenharmony_ci case ADCOFFEVEN1G_1ST: rst = 87; break; 5216141cc406Sopenharmony_ci case ADCOFFODD1G_1ST: rst = 87; break; 5217141cc406Sopenharmony_ci case ADCOFFEVEN1B_1ST: rst = 106; break; 5218141cc406Sopenharmony_ci case ADCOFFODD1B_1ST: rst = 106; break; 5219141cc406Sopenharmony_ci case PEAKR: rst = 37; break; 5220141cc406Sopenharmony_ci case PEAKG: rst = 234; break; 5221141cc406Sopenharmony_ci case PEAKB: rst = 202; break; 5222141cc406Sopenharmony_ci case MINR: rst = 32; break; 5223141cc406Sopenharmony_ci case MING: rst = 195; break; 5224141cc406Sopenharmony_ci case MINB: rst = 166; break; 5225141cc406Sopenharmony_ci case CALIBOFFSET2ON: rst = 0; break; 5226141cc406Sopenharmony_ci case OFFSETTUNESTEP2: rst = 1; break; 5227141cc406Sopenharmony_ci case OFFSETBOUNDARYRATIO2: rst = 100; break; 5228141cc406Sopenharmony_ci case OFFSETAVGRATIO2: rst = 100; break; 5229141cc406Sopenharmony_ci case OFFSETEVEN2R: rst = 0; break; 5230141cc406Sopenharmony_ci case OFFSETODD2R: rst = 0; break; 5231141cc406Sopenharmony_ci case OFFSETEVEN2G: rst = 0; break; 5232141cc406Sopenharmony_ci case OFFSETODD2G: rst = 0; break; 5233141cc406Sopenharmony_ci case OFFSETEVEN2B: rst = 0; break; 5234141cc406Sopenharmony_ci case OFFSETODD2B: rst = 0; break; 5235141cc406Sopenharmony_ci case GAINHEIGHT: rst = 30; break; 5236141cc406Sopenharmony_ci case GAINTARGETFACTOR: rst = 90; break; 5237141cc406Sopenharmony_ci case CALIBPAGON: rst = 0; break; 5238141cc406Sopenharmony_ci case PAGR: rst = 3; break; 5239141cc406Sopenharmony_ci case PAGG: rst = 3; break; 5240141cc406Sopenharmony_ci case PAGB: rst = 3; break; 5241141cc406Sopenharmony_ci case CALIBGAIN1ON: rst = 1; break; 5242141cc406Sopenharmony_ci case GAIN1R: rst = 30; break; 5243141cc406Sopenharmony_ci case GAIN1G: rst = 3; break; 5244141cc406Sopenharmony_ci case GAIN1B: rst = 0; break; 5245141cc406Sopenharmony_ci case CALIBGAIN2ON: rst = 0; break; 5246141cc406Sopenharmony_ci case GAIN2R: rst = 4; break; 5247141cc406Sopenharmony_ci case GAIN2G: rst = 4; break; 5248141cc406Sopenharmony_ci case GAIN2B: rst = 4; break; 5249141cc406Sopenharmony_ci case TOTSHADING: rst = 0; break; 5250141cc406Sopenharmony_ci case BSHADINGON: rst = -2; break; 5251141cc406Sopenharmony_ci case BSHADINGHEIGHT: rst = 30; break; 5252141cc406Sopenharmony_ci case BSHADINGPREDIFFR: rst = 2; break; 5253141cc406Sopenharmony_ci case BSHADINGPREDIFFG: rst = 2; break; 5254141cc406Sopenharmony_ci case BSHADINGPREDIFFB: rst = 2; break; 5255141cc406Sopenharmony_ci case BSHADINGDEFCUTOFF: rst = 0; break; 5256141cc406Sopenharmony_ci case WSHADINGON: rst = 3; break; 5257141cc406Sopenharmony_ci case WSHADINGHEIGHT: rst = 24; break; 5258141cc406Sopenharmony_ci case WSHADINGPREDIFFR: rst = -1; break; 5259141cc406Sopenharmony_ci case WSHADINGPREDIFFG: rst = -1; break; 5260141cc406Sopenharmony_ci case WSHADINGPREDIFFB: rst = -1; break; 5261141cc406Sopenharmony_ci } 5262141cc406Sopenharmony_ci 5263141cc406Sopenharmony_ci return rst; 5264141cc406Sopenharmony_ci} 5265141cc406Sopenharmony_ci 5266141cc406Sopenharmony_cistatic int hp3970_calibnegative(int option, int defvalue) 5267141cc406Sopenharmony_ci{ 5268141cc406Sopenharmony_ci int rst = defvalue; 5269141cc406Sopenharmony_ci 5270141cc406Sopenharmony_ci switch(option) 5271141cc406Sopenharmony_ci { 5272141cc406Sopenharmony_ci case WSTRIPXPOS: rst = 0; break; 5273141cc406Sopenharmony_ci case WSTRIPYPOS: rst = 7500; break; 5274141cc406Sopenharmony_ci case BSTRIPXPOS: rst = 0; break; 5275141cc406Sopenharmony_ci case BSTRIPYPOS: rst = 0; break; 5276141cc406Sopenharmony_ci case BREFR: rst = 10; break; 5277141cc406Sopenharmony_ci case BREFG: rst = 10; break; 5278141cc406Sopenharmony_ci case BREFB: rst = 10; break; 5279141cc406Sopenharmony_ci case REFBITDEPTH: rst = 8; break; 5280141cc406Sopenharmony_ci case OFFSETHEIGHT: rst = 10; break; 5281141cc406Sopenharmony_ci case OFFSETNSIGMA: rst = 2; break; 5282141cc406Sopenharmony_ci case OFFSETTARGETMAX: rst = 50; break; 5283141cc406Sopenharmony_ci case OFFSETTARGETMIN: rst = 2; break; 5284141cc406Sopenharmony_ci case OFFSETAVGTARGETR: rst = 10; break; 5285141cc406Sopenharmony_ci case OFFSETAVGTARGETG: rst = 10; break; 5286141cc406Sopenharmony_ci case OFFSETAVGTARGETB: rst = 10; break; 5287141cc406Sopenharmony_ci case ADCOFFEVENODD: rst = 1; break; 5288141cc406Sopenharmony_ci case CALIBOFFSET1ON: rst = 2; break; 5289141cc406Sopenharmony_ci case ADCOFFQUICKWAY: rst = 1; break; 5290141cc406Sopenharmony_ci case ADCOFFPREDICTSTART: rst = 200; break; 5291141cc406Sopenharmony_ci case ADCOFFPREDICTEND: rst = 500; break; 5292141cc406Sopenharmony_ci case OFFSETTUNESTEP1: rst = 5; break; 5293141cc406Sopenharmony_ci case OFFSETBOUNDARYRATIO1: rst = 100; break; 5294141cc406Sopenharmony_ci case OFFSETAVGRATIO1: rst = 100; break; 5295141cc406Sopenharmony_ci case OFFSETEVEN1R: rst = 294; break; 5296141cc406Sopenharmony_ci case OFFSETODD1R: rst = 294; break; 5297141cc406Sopenharmony_ci case OFFSETEVEN1G: rst = 276; break; 5298141cc406Sopenharmony_ci case OFFSETODD1G: rst = 276; break; 5299141cc406Sopenharmony_ci case OFFSETEVEN1B: rst = 266; break; 5300141cc406Sopenharmony_ci case OFFSETODD1B: rst = 266; break; 5301141cc406Sopenharmony_ci case ADCOFFPREDICTR: rst = 333; break; 5302141cc406Sopenharmony_ci case ADCOFFPREDICTG: rst = 313; break; 5303141cc406Sopenharmony_ci case ADCOFFPREDICTB: rst = 317; break; 5304141cc406Sopenharmony_ci case ADCOFFEVEN1R_1ST: rst = 69; break; 5305141cc406Sopenharmony_ci case ADCOFFODD1R_1ST: rst = 69; break; 5306141cc406Sopenharmony_ci case ADCOFFEVEN1G_1ST: rst = 87; break; 5307141cc406Sopenharmony_ci case ADCOFFODD1G_1ST: rst = 87; break; 5308141cc406Sopenharmony_ci case ADCOFFEVEN1B_1ST: rst = 106; break; 5309141cc406Sopenharmony_ci case ADCOFFODD1B_1ST: rst = 106; break; 5310141cc406Sopenharmony_ci case PEAKR: rst = 33; break; 5311141cc406Sopenharmony_ci case PEAKG: rst = 75; break; 5312141cc406Sopenharmony_ci case PEAKB: rst = 105; break; 5313141cc406Sopenharmony_ci case MINR: rst = 19; break; 5314141cc406Sopenharmony_ci case MING: rst = 34; break; 5315141cc406Sopenharmony_ci case MINB: rst = 42; break; 5316141cc406Sopenharmony_ci case CALIBOFFSET2ON: rst = 0; break; 5317141cc406Sopenharmony_ci case OFFSETTUNESTEP2: rst = 1; break; 5318141cc406Sopenharmony_ci case OFFSETBOUNDARYRATIO2: rst = 100; break; 5319141cc406Sopenharmony_ci case OFFSETAVGRATIO2: rst = 100; break; 5320141cc406Sopenharmony_ci case OFFSETEVEN2R: rst = 0; break; 5321141cc406Sopenharmony_ci case OFFSETODD2R: rst = 0; break; 5322141cc406Sopenharmony_ci case OFFSETEVEN2G: rst = 0; break; 5323141cc406Sopenharmony_ci case OFFSETODD2G: rst = 0; break; 5324141cc406Sopenharmony_ci case OFFSETEVEN2B: rst = 0; break; 5325141cc406Sopenharmony_ci case OFFSETODD2B: rst = 0; break; 5326141cc406Sopenharmony_ci case GAINHEIGHT: rst = 30; break; 5327141cc406Sopenharmony_ci case GAINTARGETFACTOR: rst = 90; break; 5328141cc406Sopenharmony_ci case CALIBPAGON: rst = 0; break; 5329141cc406Sopenharmony_ci case PAGR: rst = 3; break; 5330141cc406Sopenharmony_ci case PAGG: rst = 3; break; 5331141cc406Sopenharmony_ci case PAGB: rst = 3; break; 5332141cc406Sopenharmony_ci case CALIBGAIN1ON: rst = 1; break; 5333141cc406Sopenharmony_ci case GAIN1R: rst = 23; break; 5334141cc406Sopenharmony_ci case GAIN1G: rst = 18; break; 5335141cc406Sopenharmony_ci case GAIN1B: rst = 23; break; 5336141cc406Sopenharmony_ci case CALIBGAIN2ON: rst = 0; break; 5337141cc406Sopenharmony_ci case GAIN2R: rst = 4; break; 5338141cc406Sopenharmony_ci case GAIN2G: rst = 4; break; 5339141cc406Sopenharmony_ci case GAIN2B: rst = 4; break; 5340141cc406Sopenharmony_ci case TOTSHADING: rst = 0; break; 5341141cc406Sopenharmony_ci case BSHADINGON: rst = 1; break; 5342141cc406Sopenharmony_ci case BSHADINGHEIGHT: rst = 30; break; 5343141cc406Sopenharmony_ci case BSHADINGPREDIFFR: rst = 2; break; 5344141cc406Sopenharmony_ci case BSHADINGPREDIFFG: rst = 2; break; 5345141cc406Sopenharmony_ci case BSHADINGPREDIFFB: rst = 2; break; 5346141cc406Sopenharmony_ci case BSHADINGDEFCUTOFF: rst = 0; break; 5347141cc406Sopenharmony_ci case WSHADINGON: rst = 3; break; 5348141cc406Sopenharmony_ci case WSHADINGHEIGHT: rst = 24; break; 5349141cc406Sopenharmony_ci case WSHADINGPREDIFFR: rst = -1; break; 5350141cc406Sopenharmony_ci case WSHADINGPREDIFFG: rst = -1; break; 5351141cc406Sopenharmony_ci case WSHADINGPREDIFFB: rst = -1; break; 5352141cc406Sopenharmony_ci } 5353141cc406Sopenharmony_ci 5354141cc406Sopenharmony_ci return rst; 5355141cc406Sopenharmony_ci} 5356141cc406Sopenharmony_ci 5357141cc406Sopenharmony_cistatic int hpg3110_calibnegative(int option, int defvalue) 5358141cc406Sopenharmony_ci{ 5359141cc406Sopenharmony_ci int rst = defvalue; 5360141cc406Sopenharmony_ci 5361141cc406Sopenharmony_ci switch(option) 5362141cc406Sopenharmony_ci { 5363141cc406Sopenharmony_ci case WSTRIPXPOS: rst = 0; break; 5364141cc406Sopenharmony_ci case WSTRIPYPOS: rst = 5100; break; 5365141cc406Sopenharmony_ci case BSTRIPXPOS: rst = 0; break; 5366141cc406Sopenharmony_ci case BSTRIPYPOS: rst = 0; break; 5367141cc406Sopenharmony_ci case BREFR: rst = 10; break; 5368141cc406Sopenharmony_ci case BREFG: rst = 10; break; 5369141cc406Sopenharmony_ci case BREFB: rst = 10; break; 5370141cc406Sopenharmony_ci case REFBITDEPTH: rst = 8; break; 5371141cc406Sopenharmony_ci case OFFSETHEIGHT: rst = 10; break; 5372141cc406Sopenharmony_ci case OFFSETNSIGMA: rst = 2; break; 5373141cc406Sopenharmony_ci case OFFSETTARGETMAX: rst = 50; break; 5374141cc406Sopenharmony_ci case OFFSETTARGETMIN: rst = 2; break; 5375141cc406Sopenharmony_ci case OFFSETAVGTARGETR: rst = 10; break; 5376141cc406Sopenharmony_ci case OFFSETAVGTARGETG: rst = 10; break; 5377141cc406Sopenharmony_ci case OFFSETAVGTARGETB: rst = 10; break; 5378141cc406Sopenharmony_ci case ADCOFFEVENODD: rst = 1; break; 5379141cc406Sopenharmony_ci case CALIBOFFSET1ON: rst = 2; break; 5380141cc406Sopenharmony_ci case ADCOFFQUICKWAY: rst = 1; break; 5381141cc406Sopenharmony_ci case ADCOFFPREDICTSTART: rst = 200; break; 5382141cc406Sopenharmony_ci case ADCOFFPREDICTEND: rst = 500; break; 5383141cc406Sopenharmony_ci case OFFSETTUNESTEP1: rst = 5; break; 5384141cc406Sopenharmony_ci case OFFSETBOUNDARYRATIO1: rst = 100; break; 5385141cc406Sopenharmony_ci case OFFSETAVGRATIO1: rst = 100; break; 5386141cc406Sopenharmony_ci case OFFSETEVEN1R: rst = 308; break; 5387141cc406Sopenharmony_ci case OFFSETODD1R: rst = 308; break; 5388141cc406Sopenharmony_ci case OFFSETEVEN1G: rst = 317; break; 5389141cc406Sopenharmony_ci case OFFSETODD1G: rst = 317; break; 5390141cc406Sopenharmony_ci case OFFSETEVEN1B: rst = 319; break; 5391141cc406Sopenharmony_ci case OFFSETODD1B: rst = 319; break; 5392141cc406Sopenharmony_ci case ADCOFFPREDICTR: rst = 333; break; 5393141cc406Sopenharmony_ci case ADCOFFPREDICTG: rst = 313; break; 5394141cc406Sopenharmony_ci case ADCOFFPREDICTB: rst = 317; break; 5395141cc406Sopenharmony_ci case ADCOFFEVEN1R_1ST: rst = 69; break; 5396141cc406Sopenharmony_ci case ADCOFFODD1R_1ST: rst = 69; break; 5397141cc406Sopenharmony_ci case ADCOFFEVEN1G_1ST: rst = 87; break; 5398141cc406Sopenharmony_ci case ADCOFFODD1G_1ST: rst = 87; break; 5399141cc406Sopenharmony_ci case ADCOFFEVEN1B_1ST: rst = 106; break; 5400141cc406Sopenharmony_ci case ADCOFFODD1B_1ST: rst = 106; break; 5401141cc406Sopenharmony_ci case PEAKR: rst = 116; break; 5402141cc406Sopenharmony_ci case PEAKG: rst = 126; break; 5403141cc406Sopenharmony_ci case PEAKB: rst = 102; break; 5404141cc406Sopenharmony_ci case MINR: rst = 103; break; 5405141cc406Sopenharmony_ci case MING: rst = 112; break; 5406141cc406Sopenharmony_ci case MINB: rst = 80; break; 5407141cc406Sopenharmony_ci case CALIBOFFSET2ON: rst = 0; break; 5408141cc406Sopenharmony_ci case OFFSETTUNESTEP2: rst = 1; break; 5409141cc406Sopenharmony_ci case OFFSETBOUNDARYRATIO2: rst = 100; break; 5410141cc406Sopenharmony_ci case OFFSETAVGRATIO2: rst = 100; break; 5411141cc406Sopenharmony_ci case OFFSETEVEN2R: rst = 0; break; 5412141cc406Sopenharmony_ci case OFFSETODD2R: rst = 0; break; 5413141cc406Sopenharmony_ci case OFFSETEVEN2G: rst = 0; break; 5414141cc406Sopenharmony_ci case OFFSETODD2G: rst = 0; break; 5415141cc406Sopenharmony_ci case OFFSETEVEN2B: rst = 0; break; 5416141cc406Sopenharmony_ci case OFFSETODD2B: rst = 0; break; 5417141cc406Sopenharmony_ci case GAINHEIGHT: rst = 30; break; 5418141cc406Sopenharmony_ci case GAINTARGETFACTOR: rst = 80; break; 5419141cc406Sopenharmony_ci case CALIBPAGON: rst = 0; break; 5420141cc406Sopenharmony_ci case HIPAGR: rst = 3; break; 5421141cc406Sopenharmony_ci case HIPAGG: rst = 3; break; 5422141cc406Sopenharmony_ci case HIPAGB: rst = 3; break; 5423141cc406Sopenharmony_ci case LOPAGR: rst = 3; break; 5424141cc406Sopenharmony_ci case LOPAGG: rst = 3; break; 5425141cc406Sopenharmony_ci case LOPAGB: rst = 3; break; 5426141cc406Sopenharmony_ci case PAGR: rst = 3; break; 5427141cc406Sopenharmony_ci case PAGG: rst = 3; break; 5428141cc406Sopenharmony_ci case PAGB: rst = 3; break; 5429141cc406Sopenharmony_ci case CALIBGAIN1ON: rst = 1; break; 5430141cc406Sopenharmony_ci case GAIN1R: rst = 6; break; 5431141cc406Sopenharmony_ci case GAIN1G: rst = 1; break; 5432141cc406Sopenharmony_ci case GAIN1B: rst = 7; break; 5433141cc406Sopenharmony_ci case CALIBGAIN2ON: rst = 0; break; 5434141cc406Sopenharmony_ci case GAIN2R: rst = 4; break; 5435141cc406Sopenharmony_ci case GAIN2G: rst = 4; break; 5436141cc406Sopenharmony_ci case GAIN2B: rst = 4; break; 5437141cc406Sopenharmony_ci case TOTSHADING: rst = 0; break; 5438141cc406Sopenharmony_ci case BSHADINGON: rst = -2; break; 5439141cc406Sopenharmony_ci case BSHADINGHEIGHT: rst = 30; break; 5440141cc406Sopenharmony_ci case BSHADINGPREDIFFR: rst = 2; break; 5441141cc406Sopenharmony_ci case BSHADINGPREDIFFG: rst = 2; break; 5442141cc406Sopenharmony_ci case BSHADINGPREDIFFB: rst = 2; break; 5443141cc406Sopenharmony_ci case BSHADINGDEFCUTOFF: rst = 0; break; 5444141cc406Sopenharmony_ci case WSHADINGON: rst = 3; break; 5445141cc406Sopenharmony_ci case WSHADINGHEIGHT: rst = 24; break; 5446141cc406Sopenharmony_ci case WSHADINGPREDIFFR: rst = -1; break; 5447141cc406Sopenharmony_ci case WSHADINGPREDIFFG: rst = -1; break; 5448141cc406Sopenharmony_ci case WSHADINGPREDIFFB: rst = -1; break; 5449141cc406Sopenharmony_ci } 5450141cc406Sopenharmony_ci 5451141cc406Sopenharmony_ci return rst; 5452141cc406Sopenharmony_ci} 5453141cc406Sopenharmony_ci 5454141cc406Sopenharmony_cistatic int hp4370_calibnegative(int option, int defvalue) 5455141cc406Sopenharmony_ci{ 5456141cc406Sopenharmony_ci int rst = defvalue; 5457141cc406Sopenharmony_ci 5458141cc406Sopenharmony_ci switch(option) 5459141cc406Sopenharmony_ci { 5460141cc406Sopenharmony_ci case WSTRIPXPOS: rst = 0; break; 5461141cc406Sopenharmony_ci case WSTRIPYPOS: rst = 6580; break; 5462141cc406Sopenharmony_ci case BSTRIPXPOS: rst = 0; break; 5463141cc406Sopenharmony_ci case BSTRIPYPOS: rst = 0; break; 5464141cc406Sopenharmony_ci case BREFR: rst = 10; break; 5465141cc406Sopenharmony_ci case BREFG: rst = 10; break; 5466141cc406Sopenharmony_ci case BREFB: rst = 10; break; 5467141cc406Sopenharmony_ci case REFBITDEPTH: rst = 8; break; 5468141cc406Sopenharmony_ci case OFFSETHEIGHT: rst = 10; break; 5469141cc406Sopenharmony_ci case OFFSETNSIGMA: rst = 2; break; 5470141cc406Sopenharmony_ci case OFFSETTARGETMAX: rst = 50; break; 5471141cc406Sopenharmony_ci case OFFSETTARGETMIN: rst = 2; break; 5472141cc406Sopenharmony_ci case OFFSETAVGTARGETR: rst = 10; break; 5473141cc406Sopenharmony_ci case OFFSETAVGTARGETG: rst = 10; break; 5474141cc406Sopenharmony_ci case OFFSETAVGTARGETB: rst = 10; break; 5475141cc406Sopenharmony_ci case ADCOFFEVENODD: rst = 1; break; 5476141cc406Sopenharmony_ci case CALIBOFFSET1ON: rst = 2; break; 5477141cc406Sopenharmony_ci case ADCOFFQUICKWAY: rst = 1; break; 5478141cc406Sopenharmony_ci case ADCOFFPREDICTSTART: rst = 200; break; 5479141cc406Sopenharmony_ci case ADCOFFPREDICTEND: rst = 500; break; 5480141cc406Sopenharmony_ci case OFFSETTUNESTEP1: rst = 5; break; 5481141cc406Sopenharmony_ci case OFFSETBOUNDARYRATIO1: rst = 100; break; 5482141cc406Sopenharmony_ci case OFFSETAVGRATIO1: rst = 100; break; 5483141cc406Sopenharmony_ci case OFFSETEVEN1R: rst = 308; break; 5484141cc406Sopenharmony_ci case OFFSETODD1R: rst = 308; break; 5485141cc406Sopenharmony_ci case OFFSETEVEN1G: rst = 317; break; 5486141cc406Sopenharmony_ci case OFFSETODD1G: rst = 317; break; 5487141cc406Sopenharmony_ci case OFFSETEVEN1B: rst = 319; break; 5488141cc406Sopenharmony_ci case OFFSETODD1B: rst = 319; break; 5489141cc406Sopenharmony_ci case ADCOFFPREDICTR: rst = 333; break; 5490141cc406Sopenharmony_ci case ADCOFFPREDICTG: rst = 313; break; 5491141cc406Sopenharmony_ci case ADCOFFPREDICTB: rst = 317; break; 5492141cc406Sopenharmony_ci case ADCOFFEVEN1R_1ST: rst = 69; break; 5493141cc406Sopenharmony_ci case ADCOFFODD1R_1ST: rst = 69; break; 5494141cc406Sopenharmony_ci case ADCOFFEVEN1G_1ST: rst = 87; break; 5495141cc406Sopenharmony_ci case ADCOFFODD1G_1ST: rst = 87; break; 5496141cc406Sopenharmony_ci case ADCOFFEVEN1B_1ST: rst = 106; break; 5497141cc406Sopenharmony_ci case ADCOFFODD1B_1ST: rst = 106; break; 5498141cc406Sopenharmony_ci case PEAKR: rst = 116; break; 5499141cc406Sopenharmony_ci case PEAKG: rst = 126; break; 5500141cc406Sopenharmony_ci case PEAKB: rst = 102; break; 5501141cc406Sopenharmony_ci case MINR: rst = 103; break; 5502141cc406Sopenharmony_ci case MING: rst = 112; break; 5503141cc406Sopenharmony_ci case MINB: rst = 80; break; 5504141cc406Sopenharmony_ci case CALIBOFFSET2ON: rst = 0; break; 5505141cc406Sopenharmony_ci case OFFSETTUNESTEP2: rst = 1; break; 5506141cc406Sopenharmony_ci case OFFSETBOUNDARYRATIO2: rst = 100; break; 5507141cc406Sopenharmony_ci case OFFSETAVGRATIO2: rst = 100; break; 5508141cc406Sopenharmony_ci case OFFSETEVEN2R: rst = 0; break; 5509141cc406Sopenharmony_ci case OFFSETODD2R: rst = 0; break; 5510141cc406Sopenharmony_ci case OFFSETEVEN2G: rst = 0; break; 5511141cc406Sopenharmony_ci case OFFSETODD2G: rst = 0; break; 5512141cc406Sopenharmony_ci case OFFSETEVEN2B: rst = 0; break; 5513141cc406Sopenharmony_ci case OFFSETODD2B: rst = 0; break; 5514141cc406Sopenharmony_ci case GAINHEIGHT: rst = 30; break; 5515141cc406Sopenharmony_ci case GAINTARGETFACTOR: rst = 80; break; 5516141cc406Sopenharmony_ci case CALIBPAGON: rst = 0; break; 5517141cc406Sopenharmony_ci case HIPAGR: rst = 3; break; 5518141cc406Sopenharmony_ci case HIPAGG: rst = 3; break; 5519141cc406Sopenharmony_ci case HIPAGB: rst = 3; break; 5520141cc406Sopenharmony_ci case LOPAGR: rst = 3; break; 5521141cc406Sopenharmony_ci case LOPAGG: rst = 3; break; 5522141cc406Sopenharmony_ci case LOPAGB: rst = 3; break; 5523141cc406Sopenharmony_ci case PAGR: rst = 3; break; 5524141cc406Sopenharmony_ci case PAGG: rst = 3; break; 5525141cc406Sopenharmony_ci case PAGB: rst = 3; break; 5526141cc406Sopenharmony_ci case CALIBGAIN1ON: rst = 1; break; 5527141cc406Sopenharmony_ci case GAIN1R: rst = 6; break; 5528141cc406Sopenharmony_ci case GAIN1G: rst = 1; break; 5529141cc406Sopenharmony_ci case GAIN1B: rst = 7; break; 5530141cc406Sopenharmony_ci case CALIBGAIN2ON: rst = 0; break; 5531141cc406Sopenharmony_ci case GAIN2R: rst = 4; break; 5532141cc406Sopenharmony_ci case GAIN2G: rst = 4; break; 5533141cc406Sopenharmony_ci case GAIN2B: rst = 4; break; 5534141cc406Sopenharmony_ci case TOTSHADING: rst = 0; break; 5535141cc406Sopenharmony_ci case BSHADINGON: rst = -2; break; 5536141cc406Sopenharmony_ci case BSHADINGHEIGHT: rst = 30; break; 5537141cc406Sopenharmony_ci case BSHADINGPREDIFFR: rst = 2; break; 5538141cc406Sopenharmony_ci case BSHADINGPREDIFFG: rst = 2; break; 5539141cc406Sopenharmony_ci case BSHADINGPREDIFFB: rst = 2; break; 5540141cc406Sopenharmony_ci case BSHADINGDEFCUTOFF: rst = 0; break; 5541141cc406Sopenharmony_ci case WSHADINGON: rst = 3; break; 5542141cc406Sopenharmony_ci case WSHADINGHEIGHT: rst = 24; break; 5543141cc406Sopenharmony_ci case WSHADINGPREDIFFR: rst = -1; break; 5544141cc406Sopenharmony_ci case WSHADINGPREDIFFG: rst = -1; break; 5545141cc406Sopenharmony_ci case WSHADINGPREDIFFB: rst = -1; break; 5546141cc406Sopenharmony_ci } 5547141cc406Sopenharmony_ci 5548141cc406Sopenharmony_ci return rst; 5549141cc406Sopenharmony_ci} 5550141cc406Sopenharmony_ci 5551141cc406Sopenharmony_cistatic int fc_calibnegative(int option, int defvalue) 5552141cc406Sopenharmony_ci{ 5553141cc406Sopenharmony_ci int rst; 5554141cc406Sopenharmony_ci 5555141cc406Sopenharmony_ci switch(RTS_Debug->dev_model) 5556141cc406Sopenharmony_ci { 5557141cc406Sopenharmony_ci case UA4900: rst = ua4900_calibnegative(option, defvalue); break; 5558141cc406Sopenharmony_ci case HPG2710: 5559141cc406Sopenharmony_ci case HP3800: rst = hp3800_calibnegative(option, defvalue); break; 5560141cc406Sopenharmony_ci case HPG3010: 5561141cc406Sopenharmony_ci case HP4370: rst = hp4370_calibnegative(option, defvalue); break; 5562141cc406Sopenharmony_ci case HPG3110: rst = hpg3110_calibnegative(option, defvalue); break; 5563141cc406Sopenharmony_ci default : rst = hp3970_calibnegative(option, defvalue); break; 5564141cc406Sopenharmony_ci } 5565141cc406Sopenharmony_ci 5566141cc406Sopenharmony_ci return rst; 5567141cc406Sopenharmony_ci} 5568141cc406Sopenharmony_ci 5569141cc406Sopenharmony_cistatic int fc_scaninfo_get(int option, int defvalue) 5570141cc406Sopenharmony_ci{ 5571141cc406Sopenharmony_ci int value[] = {1, 0, 0, 0, 0, 100}; 5572141cc406Sopenharmony_ci int ua4900_value[] = {1, 0xcdcdcdcd, 0xcdcdcdcd, 0xcdcdcdcd, 0xcdcdcdcd, 100}; 5573141cc406Sopenharmony_ci 5574141cc406Sopenharmony_ci int rst = defvalue; 5575141cc406Sopenharmony_ci int *myvalue = NULL; 5576141cc406Sopenharmony_ci 5577141cc406Sopenharmony_ci switch(RTS_Debug->dev_model) 5578141cc406Sopenharmony_ci { 5579141cc406Sopenharmony_ci case UA4900: myvalue = ua4900_value; break; 5580141cc406Sopenharmony_ci default: myvalue = value; break; 5581141cc406Sopenharmony_ci } 5582141cc406Sopenharmony_ci 5583141cc406Sopenharmony_ci switch(option) 5584141cc406Sopenharmony_ci { 5585141cc406Sopenharmony_ci case PARKHOMEAFTERCALIB: rst = myvalue[0]; break; 5586141cc406Sopenharmony_ci case SHADINGTIME_16BIT: rst = myvalue[1]; break; 5587141cc406Sopenharmony_ci case SHADOWTIME_16BIT: rst = myvalue[2]; break; 5588141cc406Sopenharmony_ci case SHADINGTIME_8BIT: rst = myvalue[3]; break; 5589141cc406Sopenharmony_ci case SHADOWTIME_8BIT: rst = myvalue[4]; break; 5590141cc406Sopenharmony_ci case PREVIEWDPI: rst = myvalue[5]; break; 5591141cc406Sopenharmony_ci } 5592141cc406Sopenharmony_ci 5593141cc406Sopenharmony_ci return rst; 5594141cc406Sopenharmony_ci} 5595141cc406Sopenharmony_ci 5596141cc406Sopenharmony_ci/* fitcalibrate */ 5597141cc406Sopenharmony_cistatic int fitcalibrate_get(int section, int option, int defvalue) 5598141cc406Sopenharmony_ci{ 5599141cc406Sopenharmony_ci int rst = defvalue; 5600141cc406Sopenharmony_ci 5601141cc406Sopenharmony_ci switch(section) 5602141cc406Sopenharmony_ci { 5603141cc406Sopenharmony_ci case CALIBREFLECTIVE: 5604141cc406Sopenharmony_ci rst = fc_calibreflective(option, defvalue); break; 5605141cc406Sopenharmony_ci case CALIBTRANSPARENT: 5606141cc406Sopenharmony_ci rst = fc_calibtransparent(option, defvalue); break; 5607141cc406Sopenharmony_ci case CALIBNEGATIVEFILM: 5608141cc406Sopenharmony_ci rst = fc_calibnegative(option, defvalue); break; 5609141cc406Sopenharmony_ci case SCANINFO: 5610141cc406Sopenharmony_ci rst = fc_scaninfo_get(option, defvalue); break; 5611141cc406Sopenharmony_ci } 5612141cc406Sopenharmony_ci 5613141cc406Sopenharmony_ci return rst; 5614141cc406Sopenharmony_ci} 5615141cc406Sopenharmony_ci 5616141cc406Sopenharmony_cistatic int srt_hp3800_scanparam_get(int option, int defvalue) 5617141cc406Sopenharmony_ci{ 5618141cc406Sopenharmony_ci int rst = defvalue; 5619141cc406Sopenharmony_ci 5620141cc406Sopenharmony_ci /* t_rtinifile */ 5621141cc406Sopenharmony_ci int value3[] = {1, 0, 0, 0, 1, 12, 0, 1, 170, 140, 40, 30, 40, 30, 1500, 20, 0, 36, 0}; 5622141cc406Sopenharmony_ci 5623141cc406Sopenharmony_ci int *value = value3; 5624141cc406Sopenharmony_ci 5625141cc406Sopenharmony_ci if (value != NULL) 5626141cc406Sopenharmony_ci switch(option) 5627141cc406Sopenharmony_ci { 5628141cc406Sopenharmony_ci case ARRANGELINE: rst = value[0]; break; 5629141cc406Sopenharmony_ci case COMPRESSION: rst = value[1]; break; 5630141cc406Sopenharmony_ci case TA_X_START: rst = value[2]; break; 5631141cc406Sopenharmony_ci case TA_Y_START: rst = value[3]; break; 5632141cc406Sopenharmony_ci case DPIGAINCONTROL600: rst = value[4]; break; 5633141cc406Sopenharmony_ci case CRVS: rst = value[5]; break; 5634141cc406Sopenharmony_ci case MLOCK: rst = value[6]; break; 5635141cc406Sopenharmony_ci case ENABLEWARMUP: rst = value[7]; break; 5636141cc406Sopenharmony_ci case NMAXTARGET: rst = value[8]; break; 5637141cc406Sopenharmony_ci case NMINTARGET: rst = value[9]; break; 5638141cc406Sopenharmony_ci case NMAXTARGETTA: rst = value[10]; break; 5639141cc406Sopenharmony_ci case NMINTARGETTA: rst = value[11]; break; 5640141cc406Sopenharmony_ci case NMAXTARGETNEG: rst = value[12]; break; 5641141cc406Sopenharmony_ci case NMINTARGETNEG: rst = value[13]; break; 5642141cc406Sopenharmony_ci case STABLEDIFF: rst = value[14]; break; 5643141cc406Sopenharmony_ci case DELTAPWM: rst = value[15]; break; 5644141cc406Sopenharmony_ci case PWMLAMPLEVEL: rst = value[16]; break; 5645141cc406Sopenharmony_ci case TMAPWMDUTY: rst = value[17]; break; 5646141cc406Sopenharmony_ci case LEFTLEADING: rst = value[18]; break; 5647141cc406Sopenharmony_ci } 5648141cc406Sopenharmony_ci 5649141cc406Sopenharmony_ci return rst; 5650141cc406Sopenharmony_ci} 5651141cc406Sopenharmony_ci 5652141cc406Sopenharmony_cistatic int srt_hp3970_scanparam_get(int file, int option, int defvalue) 5653141cc406Sopenharmony_ci{ 5654141cc406Sopenharmony_ci int rst = defvalue; 5655141cc406Sopenharmony_ci /* s_rtinifile */ 5656141cc406Sopenharmony_ci int value1[] = {1, 0, 150, 0, 1, 6, 0, 0, 170, 140, 40, 30, 40, 30, 1500, 20, 0, 36, 360}; 5657141cc406Sopenharmony_ci /* s_usb1inifile */ 5658141cc406Sopenharmony_ci int value2[] = {1, 0, 150, 0, 1, 6, 0, 0, 170, 140, 40, 30, 40, 30, 1500, 20, 0, 36, 360}; 5659141cc406Sopenharmony_ci /* t_rtinifile */ 5660141cc406Sopenharmony_ci int value3[] = {1, 0, 150, 0, 1, 12, 0, 0, 170, 140, 40, 30, 40, 30, 1500, 20, 0, 36, 0}; 5661141cc406Sopenharmony_ci /* t_usb1inifile */ 5662141cc406Sopenharmony_ci int value4[] = {1, 0, 150, 0, 1, 12, 0, 0, 170, 140, 40, 30, 40, 30, 1500, 20, 0, 36, 0}; 5663141cc406Sopenharmony_ci 5664141cc406Sopenharmony_ci int *value = NULL; 5665141cc406Sopenharmony_ci 5666141cc406Sopenharmony_ci switch(file) 5667141cc406Sopenharmony_ci { 5668141cc406Sopenharmony_ci case S_RTINIFILE: value = value1; break; 5669141cc406Sopenharmony_ci case S_USB1INIFILE: value = value2; break; 5670141cc406Sopenharmony_ci case T_RTINIFILE: value = value3; break; 5671141cc406Sopenharmony_ci case T_USB1INIFILE: value = value4; break; 5672141cc406Sopenharmony_ci } 5673141cc406Sopenharmony_ci 5674141cc406Sopenharmony_ci if (value != NULL) 5675141cc406Sopenharmony_ci switch(option) 5676141cc406Sopenharmony_ci { 5677141cc406Sopenharmony_ci case ARRANGELINE: rst = value[0]; break; 5678141cc406Sopenharmony_ci case COMPRESSION: rst = value[1]; break; 5679141cc406Sopenharmony_ci case TA_X_START: rst = value[2]; break; 5680141cc406Sopenharmony_ci case TA_Y_START: rst = value[3]; break; 5681141cc406Sopenharmony_ci case DPIGAINCONTROL600: rst = value[4]; break; 5682141cc406Sopenharmony_ci case CRVS: rst = value[5]; break; 5683141cc406Sopenharmony_ci case MLOCK: rst = value[6]; break; 5684141cc406Sopenharmony_ci case ENABLEWARMUP: rst = value[7]; break; 5685141cc406Sopenharmony_ci case NMAXTARGET: rst = value[8]; break; 5686141cc406Sopenharmony_ci case NMINTARGET: rst = value[9]; break; 5687141cc406Sopenharmony_ci case NMAXTARGETTA: rst = value[10]; break; 5688141cc406Sopenharmony_ci case NMINTARGETTA: rst = value[11]; break; 5689141cc406Sopenharmony_ci case NMAXTARGETNEG: rst = value[12]; break; 5690141cc406Sopenharmony_ci case NMINTARGETNEG: rst = value[13]; break; 5691141cc406Sopenharmony_ci case STABLEDIFF: rst = value[14]; break; 5692141cc406Sopenharmony_ci case DELTAPWM: rst = value[15]; break; 5693141cc406Sopenharmony_ci case PWMLAMPLEVEL: rst = value[16]; break; 5694141cc406Sopenharmony_ci case TMAPWMDUTY: rst = value[17]; break; 5695141cc406Sopenharmony_ci case LEFTLEADING: rst = value[18]; break; 5696141cc406Sopenharmony_ci } 5697141cc406Sopenharmony_ci 5698141cc406Sopenharmony_ci return rst; 5699141cc406Sopenharmony_ci} 5700141cc406Sopenharmony_ci 5701141cc406Sopenharmony_cistatic int srt_hp4370_scanparam_get(int file, int option, int defvalue) 5702141cc406Sopenharmony_ci{ 5703141cc406Sopenharmony_ci /* s_rtinifile */ 5704141cc406Sopenharmony_ci int value1[] = {1, 0, 150, 0, 1, 6, 0, 0, 170, 140, 40, 30, 40, 30, 1500, 20, 0, 36, 360}; 5705141cc406Sopenharmony_ci /* s_usb1inifile */ 5706141cc406Sopenharmony_ci int value2[] = {1, 0, 150, 0, 1, 6, 0, 0, 170, 140, 40, 30, 40, 30, 1500, 20, 0, 36, 360}; 5707141cc406Sopenharmony_ci /* t_rtinifile */ 5708141cc406Sopenharmony_ci int value3[] = {1, 0, 150, 0, 1, 12, 0, 0, 170, 140, 40, 30, 40, 30, 1500, 20, 0, 36, 0}; 5709141cc406Sopenharmony_ci /* t_usb1inifile */ 5710141cc406Sopenharmony_ci int value4[] = {1, 0, 150, 0, 1, 12, 0, 0, 170, 140, 40, 30, 40, 30, 1500, 20, 0, 36, 0}; 5711141cc406Sopenharmony_ci int *value = NULL; 5712141cc406Sopenharmony_ci 5713141cc406Sopenharmony_ci int rst = defvalue; 5714141cc406Sopenharmony_ci 5715141cc406Sopenharmony_ci switch(file) 5716141cc406Sopenharmony_ci { 5717141cc406Sopenharmony_ci case S_RTINIFILE: value = value1; break; 5718141cc406Sopenharmony_ci case S_USB1INIFILE: value = value2; break; 5719141cc406Sopenharmony_ci case T_RTINIFILE: value = value3; break; 5720141cc406Sopenharmony_ci case T_USB1INIFILE: value = value4; break; 5721141cc406Sopenharmony_ci } 5722141cc406Sopenharmony_ci 5723141cc406Sopenharmony_ci if (value != NULL) 5724141cc406Sopenharmony_ci switch(option) 5725141cc406Sopenharmony_ci { 5726141cc406Sopenharmony_ci case ARRANGELINE: rst = value[0]; break; 5727141cc406Sopenharmony_ci case COMPRESSION: rst = value[1]; break; 5728141cc406Sopenharmony_ci case TA_X_START: rst = value[2]; break; 5729141cc406Sopenharmony_ci case TA_Y_START: rst = value[3]; break; 5730141cc406Sopenharmony_ci case DPIGAINCONTROL600: rst = value[4]; break; 5731141cc406Sopenharmony_ci case CRVS: rst = value[5]; break; 5732141cc406Sopenharmony_ci case MLOCK: rst = value[6]; break; 5733141cc406Sopenharmony_ci case ENABLEWARMUP: rst = value[7]; break; 5734141cc406Sopenharmony_ci case NMAXTARGET: rst = value[8]; break; 5735141cc406Sopenharmony_ci case NMINTARGET: rst = value[9]; break; 5736141cc406Sopenharmony_ci case NMAXTARGETTA: rst = value[10]; break; 5737141cc406Sopenharmony_ci case NMINTARGETTA: rst = value[11]; break; 5738141cc406Sopenharmony_ci case NMAXTARGETNEG: rst = value[12]; break; 5739141cc406Sopenharmony_ci case NMINTARGETNEG: rst = value[13]; break; 5740141cc406Sopenharmony_ci case STABLEDIFF: rst = value[14]; break; 5741141cc406Sopenharmony_ci case DELTAPWM: rst = value[15]; break; 5742141cc406Sopenharmony_ci case PWMLAMPLEVEL: rst = value[16]; break; 5743141cc406Sopenharmony_ci case TMAPWMDUTY: rst = value[17]; break; 5744141cc406Sopenharmony_ci case LEFTLEADING: rst = value[18]; break; 5745141cc406Sopenharmony_ci } 5746141cc406Sopenharmony_ci 5747141cc406Sopenharmony_ci return rst; 5748141cc406Sopenharmony_ci} 5749141cc406Sopenharmony_ci 5750141cc406Sopenharmony_cistatic int srt_scancali_get(int file, int option, int defvalue) 5751141cc406Sopenharmony_ci{ 5752141cc406Sopenharmony_ci int rst = defvalue; 5753141cc406Sopenharmony_ci /* s_rtinifile */ 5754141cc406Sopenharmony_ci int value1[] = {3, 3, 3, 14, 4, 4, 41, 41, 42, 41, 41, 42, 91, 91, 5755141cc406Sopenharmony_ci 53, 53, 48, 48, 104, 104, 59, 59, 64,64}; 5756141cc406Sopenharmony_ci /* s_usb1inifile */ 5757141cc406Sopenharmony_ci int value2[] = {3, 3, 3, 14, 4, 4, 41, 41, 42, 41, 41, 42, 91, 91, 5758141cc406Sopenharmony_ci 53, 53, 48, 48, 104, 104, 59, 59, 64, 64}; 5759141cc406Sopenharmony_ci /* t_rtinifile*/ 5760141cc406Sopenharmony_ci int value3[] = {3, 3, 3, 14, 4, 4, 41, 41, 42, 41, 41, 42, 270, 270, 5761141cc406Sopenharmony_ci 511, 511, 511, 511, 270, 270, 511, 511, 511, 511}; 5762141cc406Sopenharmony_ci /* t_usb1inifile*/ 5763141cc406Sopenharmony_ci int value4[] = {3, 3, 3, 14, 4, 4, 41, 41, 42, 41, 41, 42, 270, 270, 5764141cc406Sopenharmony_ci 511, 511, 511, 511, 270, 270, 511, 511, 511, 511}; 5765141cc406Sopenharmony_ci int *value = NULL; 5766141cc406Sopenharmony_ci 5767141cc406Sopenharmony_ci switch(file) 5768141cc406Sopenharmony_ci { 5769141cc406Sopenharmony_ci case S_RTINIFILE: value = value1; break; 5770141cc406Sopenharmony_ci case S_USB1INIFILE: value = value2; break; 5771141cc406Sopenharmony_ci case T_RTINIFILE: value = value3; break; 5772141cc406Sopenharmony_ci case T_USB1INIFILE: value = value4; break; 5773141cc406Sopenharmony_ci } 5774141cc406Sopenharmony_ci 5775141cc406Sopenharmony_ci if (value != NULL) 5776141cc406Sopenharmony_ci switch(option) 5777141cc406Sopenharmony_ci { 5778141cc406Sopenharmony_ci case PGA1: rst = value[0]; break; 5779141cc406Sopenharmony_ci case PGA2: rst = value[1]; break; 5780141cc406Sopenharmony_ci case PGA3: rst = value[2]; break; 5781141cc406Sopenharmony_ci case VGAGAIN11: rst = value[3]; break; 5782141cc406Sopenharmony_ci case VGAGAIN12: rst = value[4]; break; 5783141cc406Sopenharmony_ci case VGAGAIN13: rst = value[5]; break; 5784141cc406Sopenharmony_ci case DCSTEPEVEN1: rst = value[6]; break; 5785141cc406Sopenharmony_ci case DCSTEPODD1: rst = value[7]; break; 5786141cc406Sopenharmony_ci case DCSTEPEVEN2: rst = value[8]; break; 5787141cc406Sopenharmony_ci case DCSTEPODD2: rst = value[9]; break; 5788141cc406Sopenharmony_ci case DCSTEPEVEN3: rst = value[10]; break; 5789141cc406Sopenharmony_ci case DCSTEPODD3: rst = value[11]; break; 5790141cc406Sopenharmony_ci case FIRSTDCOFFSETEVEN11: rst = value[12]; break; 5791141cc406Sopenharmony_ci case FIRSTDCOFFSETODD11: rst = value[13]; break; 5792141cc406Sopenharmony_ci case FIRSTDCOFFSETEVEN12: rst = value[14]; break; 5793141cc406Sopenharmony_ci case FIRSTDCOFFSETODD12: rst = value[15]; break; 5794141cc406Sopenharmony_ci case FIRSTDCOFFSETEVEN13: rst = value[16]; break; 5795141cc406Sopenharmony_ci case FIRSTDCOFFSETODD13: rst = value[17]; break; 5796141cc406Sopenharmony_ci case DCOFFSETEVEN11: rst = value[18]; break; 5797141cc406Sopenharmony_ci case DCOFFSETODD11: rst = value[19]; break; 5798141cc406Sopenharmony_ci case DCOFFSETEVEN12: rst = value[20]; break; 5799141cc406Sopenharmony_ci case DCOFFSETODD12: rst = value[21]; break; 5800141cc406Sopenharmony_ci case DCOFFSETEVEN13: rst = value[22]; break; 5801141cc406Sopenharmony_ci case DCOFFSETODD13: rst = value[23]; break; 5802141cc406Sopenharmony_ci } 5803141cc406Sopenharmony_ci 5804141cc406Sopenharmony_ci return rst; 5805141cc406Sopenharmony_ci} 5806141cc406Sopenharmony_ci 5807141cc406Sopenharmony_cistatic int srt_truegrayparam_get(int file, int option, int defvalue) 5808141cc406Sopenharmony_ci{ 5809141cc406Sopenharmony_ci int rst = defvalue; 5810141cc406Sopenharmony_ci /* s_rtinifile */ 5811141cc406Sopenharmony_ci int value1[] = {100, 30, 59, 11}; 5812141cc406Sopenharmony_ci /* s_usb1inifile */ 5813141cc406Sopenharmony_ci int value2[] = {100, 30, 59, 11}; 5814141cc406Sopenharmony_ci /* t_rtinifile */ 5815141cc406Sopenharmony_ci int value3[] = {100, 30, 59, 11}; 5816141cc406Sopenharmony_ci /* t_usb1inifile */ 5817141cc406Sopenharmony_ci int value4[] = {100, 30, 59, 11}; 5818141cc406Sopenharmony_ci int *value = NULL; 5819141cc406Sopenharmony_ci 5820141cc406Sopenharmony_ci switch(file) 5821141cc406Sopenharmony_ci { 5822141cc406Sopenharmony_ci case S_RTINIFILE: value = value1; break; 5823141cc406Sopenharmony_ci case S_USB1INIFILE: value = value2; break; 5824141cc406Sopenharmony_ci case T_RTINIFILE: value = value3; break; 5825141cc406Sopenharmony_ci case T_USB1INIFILE: value = value4; break; 5826141cc406Sopenharmony_ci } 5827141cc406Sopenharmony_ci 5828141cc406Sopenharmony_ci if (value != NULL) 5829141cc406Sopenharmony_ci switch(option) 5830141cc406Sopenharmony_ci { 5831141cc406Sopenharmony_ci case SHADINGBASE: rst = value[0]; break; 5832141cc406Sopenharmony_ci case SHADINGFACT1: rst = value[1]; break; 5833141cc406Sopenharmony_ci case SHADINGFACT2: rst = value[2]; break; 5834141cc406Sopenharmony_ci case SHADINGFACT3: rst = value[3]; break; 5835141cc406Sopenharmony_ci } 5836141cc406Sopenharmony_ci 5837141cc406Sopenharmony_ci return rst; 5838141cc406Sopenharmony_ci} 5839141cc406Sopenharmony_ci 5840141cc406Sopenharmony_cistatic int srt_caliparam_get(int file, int option, int defvalue) 5841141cc406Sopenharmony_ci{ 5842141cc406Sopenharmony_ci int rst = defvalue; 5843141cc406Sopenharmony_ci /* s_rtinifile */ 5844141cc406Sopenharmony_ci int value1[] = {0xffff}; 5845141cc406Sopenharmony_ci /* s_usb1inifile */ 5846141cc406Sopenharmony_ci int value2[] = {0xffff}; 5847141cc406Sopenharmony_ci /* t_rtinifile */ 5848141cc406Sopenharmony_ci int value3[] = {0xffff}; 5849141cc406Sopenharmony_ci /* t_usb1inifile */ 5850141cc406Sopenharmony_ci int value4[] = {0xffff}; 5851141cc406Sopenharmony_ci int *value = NULL; 5852141cc406Sopenharmony_ci 5853141cc406Sopenharmony_ci switch(file) 5854141cc406Sopenharmony_ci { 5855141cc406Sopenharmony_ci case S_RTINIFILE: value = value1; break; 5856141cc406Sopenharmony_ci case S_USB1INIFILE: value = value2; break; 5857141cc406Sopenharmony_ci case T_RTINIFILE: value = value3; break; 5858141cc406Sopenharmony_ci case T_USB1INIFILE: value = value4; break; 5859141cc406Sopenharmony_ci } 5860141cc406Sopenharmony_ci 5861141cc406Sopenharmony_ci if (value != NULL) 5862141cc406Sopenharmony_ci switch(option) 5863141cc406Sopenharmony_ci { 5864141cc406Sopenharmony_ci case PIXELDARKLEVEL: rst = value[0]; break; 5865141cc406Sopenharmony_ci } 5866141cc406Sopenharmony_ci 5867141cc406Sopenharmony_ci return rst; 5868141cc406Sopenharmony_ci} 5869141cc406Sopenharmony_ci 5870141cc406Sopenharmony_cistatic int srt_hp3800_platform_get(int option, int defvalue) 5871141cc406Sopenharmony_ci{ 5872141cc406Sopenharmony_ci /* s_rtinifile*/ 5873141cc406Sopenharmony_ci int value1[] = {100, 99, 1214636}; 5874141cc406Sopenharmony_ci 5875141cc406Sopenharmony_ci int *value = value1; 5876141cc406Sopenharmony_ci int rst = defvalue; 5877141cc406Sopenharmony_ci 5878141cc406Sopenharmony_ci if (value != NULL) 5879141cc406Sopenharmony_ci { 5880141cc406Sopenharmony_ci switch(option) 5881141cc406Sopenharmony_ci { 5882141cc406Sopenharmony_ci case BINARYTHRESHOLDH: rst = value[0]; break; 5883141cc406Sopenharmony_ci case BINARYTHRESHOLDL: rst = value[1]; break; 5884141cc406Sopenharmony_ci case CLOSETIME: rst = value[2]; break; 5885141cc406Sopenharmony_ci } 5886141cc406Sopenharmony_ci } 5887141cc406Sopenharmony_ci 5888141cc406Sopenharmony_ci return rst; 5889141cc406Sopenharmony_ci} 5890141cc406Sopenharmony_ci 5891141cc406Sopenharmony_cistatic int srt_hp3970_platform_get(int option, int defvalue) 5892141cc406Sopenharmony_ci{ 5893141cc406Sopenharmony_ci /* s_rtinifile*/ 5894141cc406Sopenharmony_ci int value1[] = {128, 127, 1214636}; 5895141cc406Sopenharmony_ci 5896141cc406Sopenharmony_ci int *value = value1; 5897141cc406Sopenharmony_ci int rst = defvalue; 5898141cc406Sopenharmony_ci 5899141cc406Sopenharmony_ci if (value != NULL) 5900141cc406Sopenharmony_ci { 5901141cc406Sopenharmony_ci switch(option) 5902141cc406Sopenharmony_ci { 5903141cc406Sopenharmony_ci case BINARYTHRESHOLDH: rst = value[0]; break; 5904141cc406Sopenharmony_ci case BINARYTHRESHOLDL: rst = value[1]; break; 5905141cc406Sopenharmony_ci case CLOSETIME: rst = value[2]; break; 5906141cc406Sopenharmony_ci } 5907141cc406Sopenharmony_ci } 5908141cc406Sopenharmony_ci 5909141cc406Sopenharmony_ci return rst; 5910141cc406Sopenharmony_ci} 5911141cc406Sopenharmony_ci 5912141cc406Sopenharmony_ci 5913141cc406Sopenharmony_cistatic int srt_ua4900_platform_get(int option, int defvalue) 5914141cc406Sopenharmony_ci{ 5915141cc406Sopenharmony_ci int value1[] = {128, 127, 1214636}; 5916141cc406Sopenharmony_ci int *value = value1; 5917141cc406Sopenharmony_ci int rst = defvalue; 5918141cc406Sopenharmony_ci 5919141cc406Sopenharmony_ci if (value != NULL) 5920141cc406Sopenharmony_ci { 5921141cc406Sopenharmony_ci switch(option) 5922141cc406Sopenharmony_ci { 5923141cc406Sopenharmony_ci case BINARYTHRESHOLDH: rst = value[0]; break; 5924141cc406Sopenharmony_ci case BINARYTHRESHOLDL: rst = value[1]; break; 5925141cc406Sopenharmony_ci case CLOSETIME: rst = value[2]; break; 5926141cc406Sopenharmony_ci } 5927141cc406Sopenharmony_ci } 5928141cc406Sopenharmony_ci 5929141cc406Sopenharmony_ci return rst; 5930141cc406Sopenharmony_ci} 5931141cc406Sopenharmony_ci 5932141cc406Sopenharmony_cistatic int srt_hp4370_platform_get(int option, int defvalue) 5933141cc406Sopenharmony_ci{ 5934141cc406Sopenharmony_ci /* t_rtinifile */ 5935141cc406Sopenharmony_ci int value3[] = {128, 127, 1214636}; 5936141cc406Sopenharmony_ci 5937141cc406Sopenharmony_ci int *value = value3; 5938141cc406Sopenharmony_ci int rst = defvalue; 5939141cc406Sopenharmony_ci 5940141cc406Sopenharmony_ci if (value != NULL) 5941141cc406Sopenharmony_ci { 5942141cc406Sopenharmony_ci switch(option) 5943141cc406Sopenharmony_ci { 5944141cc406Sopenharmony_ci case BINARYTHRESHOLDH: rst = value[0]; break; 5945141cc406Sopenharmony_ci case BINARYTHRESHOLDL: rst = value[1]; break; 5946141cc406Sopenharmony_ci case CLOSETIME: rst = value[2]; break; 5947141cc406Sopenharmony_ci } 5948141cc406Sopenharmony_ci } 5949141cc406Sopenharmony_ci 5950141cc406Sopenharmony_ci return rst; 5951141cc406Sopenharmony_ci} 5952141cc406Sopenharmony_ci 5953141cc406Sopenharmony_cistatic int srt_scaninfo_get(int file, int option, int defvalue) 5954141cc406Sopenharmony_ci{ 5955141cc406Sopenharmony_ci int rst = defvalue; 5956141cc406Sopenharmony_ci int value1[] = {0, 0, 0, 0}; 5957141cc406Sopenharmony_ci int value2[] = {0, 0, 0, 0}; 5958141cc406Sopenharmony_ci int value3[] = {0, 0, 0, 0}; 5959141cc406Sopenharmony_ci int value4[] = {0, 0, 0, 0}; 5960141cc406Sopenharmony_ci int *value = NULL; 5961141cc406Sopenharmony_ci 5962141cc406Sopenharmony_ci switch(file) 5963141cc406Sopenharmony_ci { 5964141cc406Sopenharmony_ci case S_RTINIFILE: value = value1; break; 5965141cc406Sopenharmony_ci case S_USB1INIFILE: value = value2; break; 5966141cc406Sopenharmony_ci case T_RTINIFILE: value = value3; break; 5967141cc406Sopenharmony_ci case T_USB1INIFILE: value = value4; break; 5968141cc406Sopenharmony_ci } 5969141cc406Sopenharmony_ci 5970141cc406Sopenharmony_ci if (value != NULL) 5971141cc406Sopenharmony_ci { 5972141cc406Sopenharmony_ci switch(option) 5973141cc406Sopenharmony_ci { 5974141cc406Sopenharmony_ci case SHADINGTIME_16BIT: rst = value[0]; break; 5975141cc406Sopenharmony_ci case SHADOWTIME_16BIT: rst = value[1]; break; 5976141cc406Sopenharmony_ci case SHADINGTIME_8BIT: rst = value[2]; break; 5977141cc406Sopenharmony_ci case SHADOWTIME_8BIT: rst = value[3]; break; 5978141cc406Sopenharmony_ci } 5979141cc406Sopenharmony_ci } 5980141cc406Sopenharmony_ci 5981141cc406Sopenharmony_ci return rst; 5982141cc406Sopenharmony_ci} 5983141cc406Sopenharmony_ci 5984141cc406Sopenharmony_cistatic int srt_sec_get(int file, int section, int option, int defvalue) 5985141cc406Sopenharmony_ci{ 5986141cc406Sopenharmony_ci int rst = defvalue; 5987141cc406Sopenharmony_ci 5988141cc406Sopenharmony_ci switch(section) 5989141cc406Sopenharmony_ci { 5990141cc406Sopenharmony_ci case SCAN_PARAM: 5991141cc406Sopenharmony_ci switch(RTS_Debug->dev_model) 5992141cc406Sopenharmony_ci { 5993141cc406Sopenharmony_ci case HPG2710: 5994141cc406Sopenharmony_ci case HP3800: rst = srt_hp3800_scanparam_get(option, defvalue); break; 5995141cc406Sopenharmony_ci case HPG3010: 5996141cc406Sopenharmony_ci case HPG3110: 5997141cc406Sopenharmony_ci case HP4370: rst = srt_hp4370_scanparam_get(file, option, defvalue); break; 5998141cc406Sopenharmony_ci default : rst = srt_hp3970_scanparam_get(file, option, defvalue); break; 5999141cc406Sopenharmony_ci } 6000141cc406Sopenharmony_ci break; 6001141cc406Sopenharmony_ci case SCAN_CALI: 6002141cc406Sopenharmony_ci rst = srt_scancali_get(file, option, defvalue); break; 6003141cc406Sopenharmony_ci case TRUE_GRAY_PARAM: 6004141cc406Sopenharmony_ci rst = srt_truegrayparam_get(file, option, defvalue); break; 6005141cc406Sopenharmony_ci case CALI_PARAM: 6006141cc406Sopenharmony_ci rst = srt_caliparam_get(file, option, defvalue); break; 6007141cc406Sopenharmony_ci case PLATFORM: 6008141cc406Sopenharmony_ci switch(RTS_Debug->dev_model) 6009141cc406Sopenharmony_ci { 6010141cc406Sopenharmony_ci case HPG2710: 6011141cc406Sopenharmony_ci case HP3800: rst = srt_hp3800_platform_get(option, defvalue); break; 6012141cc406Sopenharmony_ci case UA4900: rst = srt_ua4900_platform_get(option, defvalue); break; 6013141cc406Sopenharmony_ci case HPG3010: 6014141cc406Sopenharmony_ci case HPG3110: 6015141cc406Sopenharmony_ci case HP4370: rst = srt_hp4370_platform_get(option, defvalue); break; 6016141cc406Sopenharmony_ci default : rst = srt_hp3970_platform_get(option, defvalue); break; 6017141cc406Sopenharmony_ci } 6018141cc406Sopenharmony_ci break; 6019141cc406Sopenharmony_ci case SCANINFO: 6020141cc406Sopenharmony_ci rst = srt_scaninfo_get(file, option, defvalue); break; 6021141cc406Sopenharmony_ci } 6022141cc406Sopenharmony_ci 6023141cc406Sopenharmony_ci return rst; 6024141cc406Sopenharmony_ci} 6025141cc406Sopenharmony_ci 6026141cc406Sopenharmony_cistatic int get_value(int section, int option, int defvalue, int file) 6027141cc406Sopenharmony_ci{ 6028141cc406Sopenharmony_ci int rst = defvalue; 6029141cc406Sopenharmony_ci 6030141cc406Sopenharmony_ci switch(file) 6031141cc406Sopenharmony_ci { 6032141cc406Sopenharmony_ci case FITCALIBRATE: 6033141cc406Sopenharmony_ci rst = fitcalibrate_get(section, option, defvalue); break; 6034141cc406Sopenharmony_ci case S_RTINIFILE: 6035141cc406Sopenharmony_ci case S_USB1INIFILE: 6036141cc406Sopenharmony_ci case T_RTINIFILE: 6037141cc406Sopenharmony_ci case T_USB1INIFILE: 6038141cc406Sopenharmony_ci rst = srt_sec_get(file, section, option, defvalue); break; 6039141cc406Sopenharmony_ci } 6040141cc406Sopenharmony_ci 6041141cc406Sopenharmony_ci return rst; 6042141cc406Sopenharmony_ci} 6043