Lines Matching defs:chip

56 usb_mid_n600_prepare_rgb_600_dpi (ma1017 * chip)
61 RIE (usb_low_set_image_dpi (chip, SANE_TRUE, SW_P6P6));
62 RIE (usb_low_set_soft_resample (chip, 1));
63 RIE (usb_low_set_led_light_all (chip, SANE_FALSE));
69 usb_mid_n600_prepare_rgb_400_dpi (ma1017 * chip)
74 RIE (usb_low_set_image_dpi (chip, SANE_TRUE, SW_P4P6));
75 RIE (usb_low_set_soft_resample (chip, 1));
76 RIE (usb_low_set_led_light_all (chip, SANE_FALSE));
82 usb_mid_n600_prepare_rgb_300_dpi (ma1017 * chip)
87 RIE (usb_low_set_image_dpi (chip, SANE_TRUE, SW_P3P6));
88 RIE (usb_low_set_soft_resample (chip, 1));
89 RIE (usb_low_set_led_light_all (chip, SANE_FALSE));
95 usb_mid_n600_prepare_rgb_200_dpi (ma1017 * chip)
100 RIE (usb_low_set_image_dpi (chip, SANE_TRUE, SW_P2P6));
101 RIE (usb_low_set_soft_resample (chip, 1));
102 RIE (usb_low_set_led_light_all (chip, SANE_FALSE));
108 usb_mid_n600_prepare_rgb_100_dpi (ma1017 * chip)
113 RIE (usb_low_set_image_dpi (chip, SANE_TRUE, SW_P1P6));
114 RIE (usb_low_set_soft_resample (chip, 1));
115 RIE (usb_low_set_led_light_all (chip, SANE_FALSE));
121 usb_mid_n600_prepare_rgb_50_dpi (ma1017 * chip)
126 RIE (usb_low_set_image_dpi (chip, SANE_TRUE, SW_P1P6));
127 RIE (usb_low_set_soft_resample (chip, 2));
128 RIE (usb_low_set_led_light_all (chip, SANE_FALSE));
134 usb_mid_n600_prepare_mono_600_dpi (ma1017 * chip)
139 RIE (usb_low_set_image_dpi (chip, SANE_TRUE, SW_P6P6));
140 RIE (usb_low_set_soft_resample (chip, 1));
141 RIE (usb_low_set_led_light_all (chip, SANE_TRUE));
147 usb_mid_n600_prepare_mono_400_dpi (ma1017 * chip)
152 RIE (usb_low_set_image_dpi (chip, SANE_TRUE, SW_P4P6));
153 RIE (usb_low_set_soft_resample (chip, 1));
154 RIE (usb_low_set_led_light_all (chip, SANE_TRUE));
160 usb_mid_n600_prepare_mono_300_dpi (ma1017 * chip)
165 RIE (usb_low_set_image_dpi (chip, SANE_TRUE, SW_P3P6));
166 RIE (usb_low_set_soft_resample (chip, 1));
167 RIE (usb_low_set_led_light_all (chip, SANE_TRUE));
173 usb_mid_n600_prepare_mono_200_dpi (ma1017 * chip)
178 RIE (usb_low_set_image_dpi (chip, SANE_TRUE, SW_P2P6));
179 RIE (usb_low_set_soft_resample (chip, 1));
180 RIE (usb_low_set_led_light_all (chip, SANE_TRUE));
186 usb_mid_n600_prepare_mono_100_dpi (ma1017 * chip)
191 RIE (usb_low_set_image_dpi (chip, SANE_TRUE, SW_P1P6));
192 RIE (usb_low_set_soft_resample (chip, 1));
193 RIE (usb_low_set_led_light_all (chip, SANE_TRUE));
199 usb_mid_n600_prepare_mono_50_dpi (ma1017 * chip)
204 RIE (usb_low_set_image_dpi (chip, SANE_TRUE, SW_P1P6));
205 RIE (usb_low_set_soft_resample (chip, 2));
206 RIE (usb_low_set_led_light_all (chip, SANE_TRUE));
212 usb_mid_n600_prepare_rgb (ma1017 * chip, SANE_Word dpi)
218 return usb_mid_n600_prepare_rgb_50_dpi (chip);
221 return usb_mid_n600_prepare_rgb_100_dpi (chip);
224 return usb_mid_n600_prepare_rgb_200_dpi (chip);
227 return usb_mid_n600_prepare_rgb_300_dpi (chip);
230 return usb_mid_n600_prepare_rgb_400_dpi (chip);
233 return usb_mid_n600_prepare_rgb_600_dpi (chip);
245 usb_mid_n600_prepare_mono (ma1017 * chip, SANE_Word dpi)
251 return usb_mid_n600_prepare_mono_50_dpi (chip);
254 return usb_mid_n600_prepare_mono_100_dpi (chip);
257 return usb_mid_n600_prepare_mono_200_dpi (chip);
260 return usb_mid_n600_prepare_mono_300_dpi (chip);
263 return usb_mid_n600_prepare_mono_400_dpi (chip);
266 return usb_mid_n600_prepare_mono_600_dpi (chip);
282 usb_mid_c600_prepare_rgb_600_dpi (ma1017 * chip)
287 RIE (usb_low_set_image_dpi (chip, SANE_FALSE, SW_P6P6));
288 RIE (usb_low_set_soft_resample (chip, 1));
289 RIE (usb_low_set_led_light_all (chip, SANE_FALSE));
295 usb_mid_c600_prepare_rgb_400_dpi (ma1017 * chip)
300 RIE (usb_low_set_image_dpi (chip, SANE_FALSE, SW_P4P6));
301 RIE (usb_low_set_soft_resample (chip, 1));
302 RIE (usb_low_set_led_light_all (chip, SANE_FALSE));
308 usb_mid_c600_prepare_rgb_300_dpi (ma1017 * chip)
313 RIE (usb_low_set_image_dpi (chip, SANE_FALSE, SW_P3P6));
314 RIE (usb_low_set_soft_resample (chip, 1));
315 RIE (usb_low_set_led_light_all (chip, SANE_FALSE));
321 usb_mid_c600_prepare_rgb_200_dpi (ma1017 * chip)
326 RIE (usb_low_set_image_dpi (chip, SANE_FALSE, SW_P2P6));
327 RIE (usb_low_set_soft_resample (chip, 1));
328 RIE (usb_low_set_led_light_all (chip, SANE_FALSE));
334 usb_mid_c600_prepare_rgb_150_dpi (ma1017 * chip)
339 RIE (usb_low_set_image_dpi (chip, SANE_FALSE, SW_P3P6));
340 RIE (usb_low_set_soft_resample (chip, 2));
341 RIE (usb_low_set_led_light_all (chip, SANE_FALSE));
347 usb_mid_c600_prepare_rgb_100_dpi (ma1017 * chip)
352 RIE (usb_low_set_image_dpi (chip, SANE_FALSE, SW_P1P6));
353 RIE (usb_low_set_soft_resample (chip, 1));
354 RIE (usb_low_set_led_light_all (chip, SANE_FALSE));
360 usb_mid_c600_prepare_rgb_50_dpi (ma1017 * chip)
365 RIE (usb_low_set_image_dpi (chip, SANE_FALSE, SW_P1P6));
366 RIE (usb_low_set_soft_resample (chip, 2));
367 RIE (usb_low_set_led_light_all (chip, SANE_FALSE));
373 usb_mid_c600_prepare_mono_600_dpi (ma1017 * chip)
378 RIE (usb_low_set_image_dpi (chip, SANE_FALSE, SW_P6P6));
379 RIE (usb_low_set_soft_resample (chip, 1));
380 RIE (usb_low_set_led_light_all (chip, SANE_FALSE));
386 usb_mid_c600_prepare_mono_400_dpi (ma1017 * chip)
391 RIE (usb_low_set_image_dpi (chip, SANE_FALSE, SW_P4P6));
392 RIE (usb_low_set_soft_resample (chip, 1));
393 RIE (usb_low_set_led_light_all (chip, SANE_FALSE));
399 usb_mid_c600_prepare_mono_300_dpi (ma1017 * chip)
404 RIE (usb_low_set_image_dpi (chip, SANE_FALSE, SW_P3P6));
405 RIE (usb_low_set_soft_resample (chip, 1));
406 RIE (usb_low_set_led_light_all (chip, SANE_FALSE));
412 usb_mid_c600_prepare_mono_200_dpi (ma1017 * chip)
417 RIE (usb_low_set_image_dpi (chip, SANE_FALSE, SW_P2P6));
418 RIE (usb_low_set_soft_resample (chip, 1));
419 RIE (usb_low_set_led_light_all (chip, SANE_FALSE));
425 usb_mid_c600_prepare_mono_150_dpi (ma1017 * chip)
430 RIE (usb_low_set_image_dpi (chip, SANE_FALSE, SW_P3P6));
431 RIE (usb_low_set_soft_resample (chip, 2));
432 RIE (usb_low_set_led_light_all (chip, SANE_FALSE));
438 usb_mid_c600_prepare_mono_100_dpi (ma1017 * chip)
443 RIE (usb_low_set_image_dpi (chip, SANE_FALSE, SW_P1P6));
444 RIE (usb_low_set_soft_resample (chip, 1));
445 RIE (usb_low_set_led_light_all (chip, SANE_FALSE));
451 usb_mid_c600_prepare_mono_50_dpi (ma1017 * chip)
456 RIE (usb_low_set_image_dpi (chip, SANE_FALSE, SW_P1P6));
457 RIE (usb_low_set_soft_resample (chip, 2));
458 RIE (usb_low_set_led_light_all (chip, SANE_FALSE));
464 usb_mid_c600_prepare_rgb (ma1017 * chip, SANE_Word dpi)
470 return usb_mid_c600_prepare_rgb_50_dpi (chip);
473 return usb_mid_c600_prepare_rgb_100_dpi (chip);
476 return usb_mid_c600_prepare_rgb_150_dpi (chip);
479 return usb_mid_c600_prepare_rgb_200_dpi (chip);
482 return usb_mid_c600_prepare_rgb_300_dpi (chip);
485 return usb_mid_c600_prepare_rgb_400_dpi (chip);
488 return usb_mid_c600_prepare_rgb_600_dpi (chip);
500 usb_mid_c600_prepare_mono (ma1017 * chip, SANE_Word dpi)
506 return usb_mid_c600_prepare_mono_50_dpi (chip);
509 return usb_mid_c600_prepare_mono_100_dpi (chip);
512 return usb_mid_c600_prepare_mono_150_dpi (chip);
515 return usb_mid_c600_prepare_mono_200_dpi (chip);
518 return usb_mid_c600_prepare_mono_300_dpi (chip);
521 return usb_mid_c600_prepare_mono_400_dpi (chip);
524 return usb_mid_c600_prepare_mono_600_dpi (chip);
543 usb_mid_c300600_prepare_rgb_600_dpi (ma1017 * chip)
548 RIE (usb_low_set_image_dpi (chip, SANE_TRUE, SW_P6P6));
549 RIE (usb_low_set_soft_resample (chip, 1));
550 RIE (usb_low_set_led_light_all (chip, SANE_FALSE));
556 usb_mid_c300600_prepare_rgb_400_dpi (ma1017 * chip)
561 RIE (usb_low_set_image_dpi (chip, SANE_TRUE, SW_P4P6));
562 RIE (usb_low_set_soft_resample (chip, 1));
563 RIE (usb_low_set_led_light_all (chip, SANE_FALSE));
569 usb_mid_c300600_prepare_rgb_300_dpi (ma1017 * chip)
574 RIE (usb_low_set_image_dpi (chip, SANE_FALSE, SW_P6P6));
575 RIE (usb_low_set_soft_resample (chip, 1));
576 RIE (usb_low_set_led_light_all (chip, SANE_FALSE));
582 usb_mid_c300600_prepare_rgb_200_dpi (ma1017 * chip)
587 RIE (usb_low_set_image_dpi (chip, SANE_TRUE, SW_P2P6));
588 RIE (usb_low_set_soft_resample (chip, 1));
589 RIE (usb_low_set_led_light_all (chip, SANE_FALSE));
596 usb_mid_c300600_prepare_rgb_150_dpi (ma1017 * chip)
601 RIE (usb_low_set_image_dpi (chip, SANE_FALSE, SW_P3P6));
602 RIE (usb_low_set_soft_resample (chip, 1));
603 RIE (usb_low_set_led_light_all (chip, SANE_FALSE));
609 usb_mid_c300600_prepare_rgb_100_dpi (ma1017 * chip)
614 RIE (usb_low_set_image_dpi (chip, SANE_FALSE, SW_P2P6));
615 RIE (usb_low_set_soft_resample (chip, 1));
616 RIE (usb_low_set_led_light_all (chip, SANE_FALSE));
622 usb_mid_c300600_prepare_rgb_50_dpi (ma1017 * chip)
627 RIE (usb_low_set_image_dpi (chip, SANE_FALSE, SW_P1P6));
628 RIE (usb_low_set_soft_resample (chip, 1));
629 RIE (usb_low_set_led_light_all (chip, SANE_FALSE));
635 usb_mid_c300600_prepare_mono_600_dpi (ma1017 * chip)
640 RIE (usb_low_set_image_dpi (chip, SANE_TRUE, SW_P6P6));
641 RIE (usb_low_set_soft_resample (chip, 1));
642 RIE (usb_low_set_led_light_all (chip, SANE_FALSE));
648 usb_mid_c300600_prepare_mono_400_dpi (ma1017 * chip)
653 RIE (usb_low_set_image_dpi (chip, SANE_TRUE, SW_P4P6));
654 RIE (usb_low_set_soft_resample (chip, 1));
655 RIE (usb_low_set_led_light_all (chip, SANE_FALSE));
661 usb_mid_c300600_prepare_mono_300_dpi (ma1017 * chip)
666 RIE (usb_low_set_image_dpi (chip, SANE_FALSE, SW_P6P6));
667 RIE (usb_low_set_soft_resample (chip, 1));
668 RIE (usb_low_set_led_light_all (chip, SANE_FALSE));
674 usb_mid_c300600_prepare_mono_200_dpi (ma1017 * chip)
679 RIE (usb_low_set_image_dpi (chip, SANE_TRUE, SW_P2P6));
680 RIE (usb_low_set_soft_resample (chip, 1));
681 RIE (usb_low_set_led_light_all (chip, SANE_FALSE));
687 usb_mid_c300600_prepare_mono_150_dpi (ma1017 * chip)
692 RIE (usb_low_set_image_dpi (chip, SANE_FALSE, SW_P3P6));
693 RIE (usb_low_set_soft_resample (chip, 1));
694 RIE (usb_low_set_led_light_all (chip, SANE_FALSE));
700 usb_mid_c300600_prepare_mono_100_dpi (ma1017 * chip)
705 RIE (usb_low_set_image_dpi (chip, SANE_FALSE, SW_P2P6));
706 RIE (usb_low_set_soft_resample (chip, 1));
707 RIE (usb_low_set_led_light_all (chip, SANE_FALSE));
713 usb_mid_c300600_prepare_mono_50_dpi (ma1017 * chip)
718 RIE (usb_low_set_image_dpi (chip, SANE_FALSE, SW_P1P6));
719 RIE (usb_low_set_soft_resample (chip, 1));
720 RIE (usb_low_set_led_light_all (chip, SANE_FALSE));
726 usb_mid_c300600_prepare_rgb (ma1017 * chip, SANE_Word dpi)
732 return usb_mid_c300600_prepare_rgb_50_dpi (chip);
735 return usb_mid_c300600_prepare_rgb_100_dpi (chip);
738 return usb_mid_c300600_prepare_rgb_150_dpi (chip);
741 return usb_mid_c300600_prepare_rgb_200_dpi (chip);
744 return usb_mid_c300600_prepare_rgb_300_dpi (chip);
747 return usb_mid_c300600_prepare_rgb_400_dpi (chip);
750 return usb_mid_c300600_prepare_rgb_600_dpi (chip);
761 usb_mid_c300600_prepare_mono (ma1017 * chip, SANE_Word dpi)
766 return usb_mid_c300600_prepare_mono_50_dpi (chip);
769 return usb_mid_c300600_prepare_mono_100_dpi (chip);
772 return usb_mid_c300600_prepare_mono_150_dpi (chip);
775 return usb_mid_c300600_prepare_mono_200_dpi (chip);
778 return usb_mid_c300600_prepare_mono_300_dpi (chip);
781 return usb_mid_c300600_prepare_mono_400_dpi (chip);
784 return usb_mid_c300600_prepare_mono_600_dpi (chip);
799 usb_mid_c300_prepare_rgb_300_dpi (ma1017 * chip)
804 RIE (usb_low_set_image_dpi (chip, SANE_TRUE, SW_P6P6));
805 RIE (usb_low_set_led_light_all (chip, SANE_FALSE));
811 usb_mid_c300_prepare_rgb_200_dpi (ma1017 * chip)
816 RIE (usb_low_set_image_dpi (chip, SANE_TRUE, SW_P4P6));
817 RIE (usb_low_set_led_light_all (chip, SANE_FALSE));
823 usb_mid_c300_prepare_rgb_150_dpi (ma1017 * chip)
828 RIE (usb_low_set_image_dpi (chip, SANE_TRUE, SW_P3P6));
829 RIE (usb_low_set_led_light_all (chip, SANE_FALSE));
835 usb_mid_c300_prepare_rgb_100_dpi (ma1017 * chip)
840 RIE (usb_low_set_image_dpi (chip, SANE_TRUE, SW_P2P6));
841 RIE (usb_low_set_led_light_all (chip, SANE_FALSE));
847 usb_mid_c300_prepare_rgb_50_dpi (ma1017 * chip)
852 RIE (usb_low_set_image_dpi (chip, SANE_TRUE, SW_P1P6));
853 RIE (usb_low_set_led_light_all (chip, SANE_FALSE));
859 usb_mid_c300_prepare_mono_300_dpi (ma1017 * chip)
864 RIE (usb_low_set_image_dpi (chip, SANE_TRUE, SW_P6P6));
865 RIE (usb_low_set_led_light_all (chip, SANE_TRUE));
871 usb_mid_c300_prepare_mono_200_dpi (ma1017 * chip)
876 RIE (usb_low_set_image_dpi (chip, SANE_TRUE, SW_P4P6));
877 RIE (usb_low_set_led_light_all (chip, SANE_TRUE));
883 usb_mid_c300_prepare_mono_150_dpi (ma1017 * chip)
888 RIE (usb_low_set_image_dpi (chip, SANE_TRUE, SW_P3P6));
889 RIE (usb_low_set_led_light_all (chip, SANE_TRUE));
895 usb_mid_c300_prepare_mono_100_dpi (ma1017 * chip)
900 RIE (usb_low_set_image_dpi (chip, SANE_TRUE, SW_P2P6));
901 RIE (usb_low_set_led_light_all (chip, SANE_TRUE));
907 usb_mid_c300_prepare_mono_50_dpi (ma1017 * chip)
912 RIE (usb_low_set_image_dpi (chip, SANE_TRUE, SW_P1P6));
913 RIE (usb_low_set_led_light_all (chip, SANE_TRUE));
919 usb_mid_c300_prepare_rgb (ma1017 * chip, SANE_Word dpi)
925 return usb_mid_c300_prepare_rgb_50_dpi (chip);
928 return usb_mid_c300_prepare_rgb_100_dpi (chip);
931 return usb_mid_c300_prepare_rgb_150_dpi (chip);
934 return usb_mid_c300_prepare_rgb_200_dpi (chip);
937 return usb_mid_c300_prepare_rgb_300_dpi (chip);
948 usb_mid_c300_prepare_mono (ma1017 * chip, SANE_Word dpi)
954 return usb_mid_c300_prepare_mono_50_dpi (chip);
957 return usb_mid_c300_prepare_mono_100_dpi (chip);
960 return usb_mid_c300_prepare_mono_150_dpi (chip);
963 return usb_mid_c300_prepare_mono_200_dpi (chip);
966 return usb_mid_c300_prepare_mono_300_dpi (chip);
979 usb_mid_sensor_is600_mode (ma1017 * chip, SANE_Word dpi)
981 if (chip->sensor == ST_CANON300)
983 DBG (6, "usb_mid_sensor_is600_mode: chip=%p, dpi=%d, FALSE\n",
984 (void *) chip, dpi);
987 else if ((chip->sensor == ST_CANON600) || (chip->sensor == ST_NEC600))
989 DBG (6, "usb_mid_sensor_is600_mode: chip=%p, dpi=%d, TRUE\n",
990 (void *) chip, dpi);
1001 DBG (6, "usb_mid_sensor_is600_mode: chip=%p, dpi=%d, FALSE\n",
1002 (void *) chip, dpi);
1007 DBG (6, "usb_mid_sensor_is600_mode: chip=%p, dpi=%d, TRUE\n",
1008 (void *) chip, dpi);
1022 usb_mid_sensor_prepare_rgb (ma1017 * chip, SANE_Word dpi)
1024 if (chip->sensor == ST_CANON300)
1025 return usb_mid_c300_prepare_rgb (chip, dpi);
1026 else if (chip->sensor == ST_CANON600)
1027 return usb_mid_c600_prepare_rgb (chip, dpi);
1028 else if (chip->sensor == ST_NEC600)
1029 return usb_mid_n600_prepare_rgb (chip, dpi);
1031 return usb_mid_c300600_prepare_rgb (chip, dpi);
1037 usb_mid_sensor_prepare_mono (ma1017 * chip, SANE_Word dpi)
1039 if (chip->sensor == ST_CANON300)
1040 return usb_mid_c300_prepare_mono (chip, dpi);
1041 else if (chip->sensor == ST_CANON600)
1042 return usb_mid_c600_prepare_mono (chip, dpi);
1043 else if (chip->sensor == ST_NEC600)
1044 return usb_mid_n600_prepare_mono (chip, dpi);
1046 return usb_mid_c300600_prepare_mono (chip, dpi);
1052 usb_mid_sensor_get_dpi (ma1017 * chip, SANE_Word wanted_dpi, SANE_Word * dpi)
1060 DBG (5, "usb_mid_sensor_get_dpi: chip->sensor=%d\n", chip->sensor);
1062 if (chip->sensor == ST_CANON300)
1064 else if (chip->sensor == ST_CANON300600)
1066 else if (chip->sensor == ST_CANON600)
1068 else if (chip->sensor == ST_NEC600)
1093 usb_mid_motor1200_prepare_rgb_1200_dpi (ma1017 * chip)
1098 RIE (usb_low_set_cmt_table (chip, 0, CH_GREEN, SANE_FALSE, SANE_TRUE));
1099 RIE (usb_low_set_cmt_table (chip, 1, CH_BLUE, SANE_FALSE, SANE_TRUE));
1100 RIE (usb_low_set_cmt_table (chip, 2, CH_RED, SANE_TRUE, SANE_TRUE));
1101 RIE (usb_low_set_cmt_table (chip, 3, CH_GREEN, SANE_FALSE, SANE_FALSE));
1102 RIE (usb_low_set_cmt_table (chip, 4, CH_GREEN, SANE_FALSE, SANE_FALSE));
1103 RIE (usb_low_set_cmt_table_length (chip, 4));
1104 RIE (usb_low_set_cmt_second_position (chip, 0));
1105 RIE (usb_low_set_cmt_loop_count (chip, 0xefff));
1106 RIE (usb_low_set_motor_movement (chip, SANE_FALSE, SANE_TRUE, SANE_FALSE));
1107 RIE (usb_low_set_io_3 (chip, SANE_FALSE));
1114 usb_mid_motor1200_prepare_rgb_600_dpi (ma1017 * chip)
1119 RIE (usb_low_set_cmt_table (chip, 0, CH_GREEN, SANE_FALSE, SANE_TRUE));
1120 RIE (usb_low_set_cmt_table (chip, 1, CH_BLUE, SANE_FALSE, SANE_TRUE));
1121 RIE (usb_low_set_cmt_table (chip, 2, CH_RED, SANE_TRUE, SANE_TRUE));
1122 RIE (usb_low_set_cmt_table (chip, 3, CH_GREEN, SANE_FALSE, SANE_FALSE));
1123 RIE (usb_low_set_cmt_table (chip, 4, CH_GREEN, SANE_FALSE, SANE_FALSE));
1124 RIE (usb_low_set_cmt_table_length (chip, 4));
1125 RIE (usb_low_set_cmt_second_position (chip, 0));
1126 RIE (usb_low_set_cmt_loop_count (chip, 0xefff));
1127 RIE (usb_low_set_motor_movement (chip, SANE_TRUE, SANE_TRUE, SANE_FALSE));
1128 RIE (usb_low_set_io_3 (chip, SANE_FALSE));
1134 usb_mid_motor1200_prepare_rgb_400_dpi (ma1017 * chip)
1139 RIE (usb_low_set_cmt_table (chip, 0, CH_GREEN, SANE_TRUE, SANE_TRUE));
1140 RIE (usb_low_set_cmt_table (chip, 1, CH_BLUE, SANE_TRUE, SANE_TRUE));
1141 RIE (usb_low_set_cmt_table (chip, 2, CH_RED, SANE_TRUE, SANE_TRUE));
1142 RIE (usb_low_set_cmt_table (chip, 3, CH_GREEN, SANE_FALSE, SANE_FALSE));
1143 RIE (usb_low_set_cmt_table_length (chip, 3));
1144 RIE (usb_low_set_cmt_second_position (chip, 0));
1145 RIE (usb_low_set_cmt_loop_count (chip, 0xefff));
1146 RIE (usb_low_set_motor_movement (chip, SANE_FALSE, SANE_TRUE, SANE_FALSE));
1147 RIE (usb_low_set_io_3 (chip, SANE_TRUE));
1153 usb_mid_motor1200_prepare_rgb_300_dpi (ma1017 * chip)
1158 RIE (usb_low_set_cmt_table (chip, 0, CH_GREEN, SANE_TRUE, SANE_TRUE));
1159 RIE (usb_low_set_cmt_table (chip, 1, CH_BLUE, SANE_TRUE, SANE_TRUE));
1160 RIE (usb_low_set_cmt_table (chip, 2, CH_RED, SANE_TRUE, SANE_TRUE));
1161 RIE (usb_low_set_cmt_table (chip, 3, CH_GREEN, SANE_TRUE, SANE_FALSE));
1162 RIE (usb_low_set_cmt_table (chip, 4, CH_GREEN, SANE_FALSE, SANE_FALSE));
1163 RIE (usb_low_set_cmt_table_length (chip, 4));
1164 RIE (usb_low_set_cmt_second_position (chip, 0));
1165 RIE (usb_low_set_cmt_loop_count (chip, 0xefff));
1166 RIE (usb_low_set_motor_movement (chip, SANE_FALSE, SANE_TRUE, SANE_FALSE));
1167 RIE (usb_low_set_io_3 (chip, SANE_TRUE));
1173 usb_mid_motor1200_prepare_rgb_200_dpi (ma1017 * chip)
1178 RIE (usb_low_set_cmt_table (chip, 0, CH_GREEN, SANE_TRUE, SANE_TRUE));
1179 RIE (usb_low_set_cmt_table (chip, 1, CH_BLUE, SANE_TRUE, SANE_TRUE));
1180 RIE (usb_low_set_cmt_table (chip, 2, CH_RED, SANE_TRUE, SANE_TRUE));
1181 RIE (usb_low_set_cmt_table (chip, 3, CH_GREEN, SANE_FALSE, SANE_FALSE));
1182 RIE (usb_low_set_cmt_table_length (chip, 3));
1183 RIE (usb_low_set_cmt_second_position (chip, 0));
1184 RIE (usb_low_set_cmt_loop_count (chip, 0xefff));
1185 RIE (usb_low_set_motor_movement (chip, SANE_TRUE, SANE_TRUE, SANE_FALSE));
1186 RIE (usb_low_set_io_3 (chip, SANE_TRUE));
1194 usb_mid_motor1200_prepare_rgb_150_dpi (ma1017 * chip)
1199 RIE (usb_low_set_cmt_table (chip, 0, CH_GREEN, SANE_TRUE, SANE_TRUE));
1200 RIE (usb_low_set_cmt_table (chip, 1, CH_BLUE, SANE_TRUE, SANE_TRUE));
1201 RIE (usb_low_set_cmt_table (chip, 2, CH_RED, SANE_TRUE, SANE_TRUE));
1202 RIE (usb_low_set_cmt_table (chip, 3, CH_GREEN, SANE_TRUE, SANE_FALSE));
1203 RIE (usb_low_set_cmt_table (chip, 4, CH_GREEN, SANE_FALSE, SANE_FALSE));
1204 RIE (usb_low_set_cmt_table_length (chip, 4));
1205 RIE (usb_low_set_cmt_second_position (chip, 0));
1206 RIE (usb_low_set_cmt_loop_count (chip, 0xefff));
1207 RIE (usb_low_set_motor_movement (chip, SANE_TRUE, SANE_TRUE, SANE_FALSE));
1208 RIE (usb_low_set_io_3 (chip, SANE_TRUE));
1214 usb_mid_motor1200_prepare_rgb_100_dpi (ma1017 * chip)
1219 RIE (usb_low_set_cmt_table (chip, 0, CH_GREEN, SANE_TRUE, SANE_TRUE));
1220 RIE (usb_low_set_cmt_table (chip, 1, CH_BLUE, SANE_TRUE, SANE_TRUE));
1221 RIE (usb_low_set_cmt_table (chip, 2, CH_RED, SANE_TRUE, SANE_TRUE));
1222 RIE (usb_low_set_cmt_table (chip, 3, CH_GREEN, SANE_FALSE, SANE_FALSE));
1223 RIE (usb_low_set_cmt_table_length (chip, 3));
1224 RIE (usb_low_set_cmt_second_position (chip, 0));
1225 RIE (usb_low_set_cmt_loop_count (chip, 0xefff));
1226 RIE (usb_low_set_motor_movement (chip, SANE_TRUE, SANE_TRUE, SANE_TRUE));
1227 RIE (usb_low_set_io_3 (chip, SANE_TRUE));
1233 usb_mid_motor1200_prepare_rgb_50_dpi (ma1017 * chip)
1238 RIE (usb_low_set_cmt_table (chip, 0, CH_GREEN, SANE_TRUE, SANE_TRUE));
1239 RIE (usb_low_set_cmt_table (chip, 1, CH_GREEN, SANE_TRUE, SANE_FALSE));
1240 RIE (usb_low_set_cmt_table (chip, 2, CH_BLUE, SANE_TRUE, SANE_TRUE));
1241 RIE (usb_low_set_cmt_table (chip, 3, CH_BLUE, SANE_TRUE, SANE_FALSE));
1242 RIE (usb_low_set_cmt_table (chip, 4, CH_RED, SANE_TRUE, SANE_TRUE));
1243 RIE (usb_low_set_cmt_table (chip, 5, CH_RED, SANE_TRUE, SANE_FALSE));
1244 RIE (usb_low_set_cmt_table (chip, 6, CH_GREEN, SANE_FALSE, SANE_FALSE));
1245 RIE (usb_low_set_cmt_table_length (chip, 6));
1246 RIE (usb_low_set_cmt_second_position (chip, 0));
1247 RIE (usb_low_set_cmt_loop_count (chip, 0xefff));
1248 RIE (usb_low_set_motor_movement (chip, SANE_TRUE, SANE_TRUE, SANE_TRUE));
1249 RIE (usb_low_set_io_3 (chip, SANE_TRUE));
1255 usb_mid_motor1200_prepare_mono_1200_dpi (ma1017 * chip)
1260 RIE (usb_low_set_cmt_table (chip, 0, CH_GREEN, SANE_TRUE, SANE_TRUE));
1261 RIE (usb_low_set_cmt_table (chip, 1, CH_GREEN, SANE_TRUE, SANE_TRUE));
1262 RIE (usb_low_set_cmt_table (chip, 2, CH_GREEN, SANE_FALSE, SANE_FALSE));
1263 RIE (usb_low_set_cmt_table_length (chip, 2));
1264 RIE (usb_low_set_cmt_second_position (chip, 0));
1265 RIE (usb_low_set_cmt_loop_count (chip, 0xefff));
1266 RIE (usb_low_set_motor_movement (chip, SANE_FALSE, SANE_TRUE, SANE_FALSE));
1267 RIE (usb_low_set_io_3 (chip, SANE_TRUE));
1273 usb_mid_motor1200_prepare_mono_600_dpi (ma1017 * chip)
1278 RIE (usb_low_set_cmt_table (chip, 0, CH_GREEN, SANE_TRUE, SANE_TRUE));
1279 RIE (usb_low_set_cmt_table (chip, 1, CH_GREEN, SANE_FALSE, SANE_FALSE));
1280 RIE (usb_low_set_cmt_table (chip, 2, CH_GREEN, SANE_FALSE, SANE_FALSE));
1281 RIE (usb_low_set_cmt_table (chip, 3, CH_GREEN, SANE_FALSE, SANE_FALSE));
1282 RIE (usb_low_set_cmt_table (chip, 4, CH_GREEN, SANE_FALSE, SANE_FALSE));
1283 RIE (usb_low_set_cmt_table (chip, 5, CH_GREEN, SANE_FALSE, SANE_FALSE));
1284 RIE (usb_low_set_cmt_table (chip, 6, CH_GREEN, SANE_TRUE, SANE_FALSE));
1285 RIE (usb_low_set_cmt_table (chip, 7, CH_GREEN, SANE_FALSE, SANE_FALSE));
1286 RIE (usb_low_set_cmt_table (chip, 8, CH_GREEN, SANE_FALSE, SANE_FALSE));
1287 RIE (usb_low_set_cmt_table (chip, 9, CH_GREEN, SANE_FALSE, SANE_FALSE));
1288 RIE (usb_low_set_cmt_table (chip, 10, CH_GREEN, SANE_FALSE, SANE_FALSE));
1289 RIE (usb_low_set_cmt_table (chip, 11, CH_GREEN, SANE_FALSE, SANE_FALSE));
1290 RIE (usb_low_set_cmt_table (chip, 12, CH_GREEN, SANE_TRUE, SANE_TRUE));
1291 RIE (usb_low_set_cmt_table (chip, 13, CH_GREEN, SANE_FALSE, SANE_FALSE));
1292 RIE (usb_low_set_cmt_table (chip, 14, CH_GREEN, SANE_FALSE, SANE_FALSE));
1293 RIE (usb_low_set_cmt_table (chip, 15, CH_GREEN, SANE_FALSE, SANE_FALSE));
1294 RIE (usb_low_set_cmt_table (chip, 16, CH_GREEN, SANE_TRUE, SANE_FALSE));
1295 RIE (usb_low_set_cmt_table (chip, 17, CH_GREEN, SANE_FALSE, SANE_FALSE));
1296 RIE (usb_low_set_cmt_table (chip, 18, CH_GREEN, SANE_FALSE, SANE_FALSE));
1297 RIE (usb_low_set_cmt_table (chip, 19, CH_GREEN, SANE_FALSE, SANE_FALSE));
1298 RIE (usb_low_set_cmt_table (chip, 20, CH_GREEN, SANE_TRUE, SANE_TRUE));
1299 RIE (usb_low_set_cmt_table (chip, 21, CH_GREEN, SANE_FALSE, SANE_FALSE));
1300 RIE (usb_low_set_cmt_table (chip, 22, CH_GREEN, SANE_TRUE, SANE_FALSE));
1301 RIE (usb_low_set_cmt_table (chip, 23, CH_GREEN, SANE_FALSE, SANE_FALSE));
1302 RIE (usb_low_set_cmt_table (chip, 24, CH_GREEN, SANE_TRUE, SANE_TRUE));
1303 RIE (usb_low_set_cmt_table (chip, 25, CH_GREEN, SANE_TRUE, SANE_FALSE));
1304 RIE (usb_low_set_cmt_table (chip, 26, CH_GREEN, SANE_FALSE, SANE_FALSE));
1305 RIE (usb_low_set_cmt_table_length (chip, 26));
1306 RIE (usb_low_set_cmt_second_position (chip, 24));
1307 RIE (usb_low_set_cmt_loop_count (chip, 0xefff));
1308 RIE (usb_low_set_motor_movement (chip, SANE_FALSE, SANE_TRUE, SANE_FALSE));
1309 RIE (usb_low_set_io_3 (chip, SANE_TRUE));
1315 usb_mid_motor1200_prepare_mono_400_dpi (ma1017 * chip)
1320 RIE (usb_low_set_cmt_table (chip, 0, CH_GREEN, SANE_TRUE, SANE_TRUE));
1321 RIE (usb_low_set_cmt_table (chip, 1, CH_GREEN, SANE_TRUE, SANE_FALSE));
1322 RIE (usb_low_set_cmt_table (chip, 2, CH_GREEN, SANE_TRUE, SANE_FALSE));
1323 RIE (usb_low_set_cmt_table (chip, 3, CH_GREEN, SANE_FALSE, SANE_FALSE));
1324 RIE (usb_low_set_cmt_table_length (chip, 3));
1325 RIE (usb_low_set_cmt_second_position (chip, 0));
1326 RIE (usb_low_set_cmt_loop_count (chip, 0xefff));
1327 RIE (usb_low_set_motor_movement (chip, SANE_FALSE, SANE_TRUE, SANE_FALSE));
1328 RIE (usb_low_set_io_3 (chip, SANE_TRUE));
1334 usb_mid_motor1200_prepare_mono_300_dpi (ma1017 * chip)
1339 RIE (usb_low_set_cmt_table (chip, 0, CH_GREEN, SANE_TRUE, SANE_TRUE));
1340 RIE (usb_low_set_cmt_table (chip, 1, CH_GREEN, SANE_FALSE, SANE_FALSE));
1341 RIE (usb_low_set_cmt_table (chip, 2, CH_GREEN, SANE_FALSE, SANE_FALSE));
1342 RIE (usb_low_set_cmt_table (chip, 3, CH_GREEN, SANE_FALSE, SANE_FALSE));
1343 RIE (usb_low_set_cmt_table (chip, 4, CH_GREEN, SANE_FALSE, SANE_FALSE));
1344 RIE (usb_low_set_cmt_table (chip, 5, CH_GREEN, SANE_FALSE, SANE_FALSE));
1345 RIE (usb_low_set_cmt_table (chip, 6, CH_GREEN, SANE_TRUE, SANE_FALSE));
1346 RIE (usb_low_set_cmt_table (chip, 7, CH_GREEN, SANE_FALSE, SANE_FALSE));
1347 RIE (usb_low_set_cmt_table (chip, 8, CH_GREEN, SANE_FALSE, SANE_FALSE));
1348 RIE (usb_low_set_cmt_table (chip, 9, CH_GREEN, SANE_FALSE, SANE_FALSE));
1349 RIE (usb_low_set_cmt_table (chip, 10, CH_GREEN, SANE_FALSE, SANE_FALSE));
1350 RIE (usb_low_set_cmt_table (chip, 11, CH_GREEN, SANE_FALSE, SANE_FALSE));
1351 RIE (usb_low_set_cmt_table (chip, 12, CH_GREEN, SANE_TRUE, SANE_TRUE));
1352 RIE (usb_low_set_cmt_table (chip, 13, CH_GREEN, SANE_FALSE, SANE_FALSE));
1353 RIE (usb_low_set_cmt_table (chip, 14, CH_GREEN, SANE_FALSE, SANE_FALSE));
1354 RIE (usb_low_set_cmt_table (chip, 15, CH_GREEN, SANE_FALSE, SANE_FALSE));
1355 RIE (usb_low_set_cmt_table (chip, 16, CH_GREEN, SANE_TRUE, SANE_FALSE));
1356 RIE (usb_low_set_cmt_table (chip, 17, CH_GREEN, SANE_FALSE, SANE_FALSE));
1357 RIE (usb_low_set_cmt_table (chip, 18, CH_GREEN, SANE_FALSE, SANE_FALSE));
1358 RIE (usb_low_set_cmt_table (chip, 19, CH_GREEN, SANE_FALSE, SANE_FALSE));
1359 RIE (usb_low_set_cmt_table (chip, 20, CH_GREEN, SANE_TRUE, SANE_TRUE));
1360 RIE (usb_low_set_cmt_table (chip, 21, CH_GREEN, SANE_FALSE, SANE_FALSE));
1361 RIE (usb_low_set_cmt_table (chip, 22, CH_GREEN, SANE_TRUE, SANE_FALSE));
1362 RIE (usb_low_set_cmt_table (chip, 23, CH_GREEN, SANE_FALSE, SANE_FALSE));
1363 RIE (usb_low_set_cmt_table (chip, 24, CH_GREEN, SANE_TRUE, SANE_TRUE));
1364 RIE (usb_low_set_cmt_table (chip, 25, CH_GREEN, SANE_TRUE, SANE_FALSE));
1365 RIE (usb_low_set_cmt_table (chip, 26, CH_GREEN, SANE_FALSE, SANE_FALSE));
1366 RIE (usb_low_set_cmt_table_length (chip, 26));
1367 RIE (usb_low_set_cmt_second_position (chip, 24));
1368 RIE (usb_low_set_cmt_loop_count (chip, 0xefff));
1369 RIE (usb_low_set_motor_movement (chip, SANE_TRUE, SANE_TRUE, SANE_FALSE));
1370 RIE (usb_low_set_io_3 (chip, SANE_TRUE));
1376 usb_mid_motor1200_prepare_mono_200_dpi (ma1017 * chip)
1381 RIE (usb_low_set_cmt_table (chip, 0, CH_GREEN, SANE_TRUE, SANE_TRUE));
1382 RIE (usb_low_set_cmt_table (chip, 1, CH_GREEN, SANE_TRUE, SANE_FALSE));
1383 RIE (usb_low_set_cmt_table (chip, 2, CH_GREEN, SANE_TRUE, SANE_FALSE));
1384 RIE (usb_low_set_cmt_table (chip, 3, CH_GREEN, SANE_FALSE, SANE_FALSE));
1385 RIE (usb_low_set_cmt_table_length (chip, 3));
1386 RIE (usb_low_set_cmt_second_position (chip, 0));
1387 RIE (usb_low_set_cmt_loop_count (chip, 0xefff));
1388 RIE (usb_low_set_motor_movement (chip, SANE_TRUE, SANE_TRUE, SANE_FALSE));
1389 RIE (usb_low_set_io_3 (chip, SANE_TRUE));
1396 usb_mid_motor1200_prepare_mono_150_dpi (ma1017 * chip)
1401 RIE (usb_low_set_cmt_table (chip, 0, CH_GREEN, SANE_TRUE, SANE_TRUE));
1402 RIE (usb_low_set_cmt_table (chip, 1, CH_GREEN, SANE_TRUE, SANE_FALSE));
1403 RIE (usb_low_set_cmt_table (chip, 2, CH_GREEN, SANE_FALSE, SANE_FALSE));
1404 RIE (usb_low_set_cmt_table_length (chip, 2));
1405 RIE (usb_low_set_cmt_second_position (chip, 0));
1406 RIE (usb_low_set_cmt_loop_count (chip, 0xefff));
1407 RIE (usb_low_set_motor_movement (chip, SANE_TRUE, SANE_TRUE, SANE_TRUE));
1408 RIE (usb_low_set_io_3 (chip, SANE_TRUE));
1414 usb_mid_motor1200_prepare_mono_100_dpi (ma1017 * chip)
1419 RIE (usb_low_set_cmt_table (chip, 0, CH_GREEN, SANE_TRUE, SANE_TRUE));
1420 RIE (usb_low_set_cmt_table (chip, 1, CH_GREEN, SANE_TRUE, SANE_FALSE));
1421 RIE (usb_low_set_cmt_table (chip, 2, CH_GREEN, SANE_TRUE, SANE_FALSE));
1422 RIE (usb_low_set_cmt_table (chip, 3, CH_GREEN, SANE_FALSE, SANE_FALSE));
1423 RIE (usb_low_set_cmt_table_length (chip, 3));
1424 RIE (usb_low_set_cmt_second_position (chip, 0));
1425 RIE (usb_low_set_cmt_loop_count (chip, 0xefff));
1426 RIE (usb_low_set_motor_movement (chip, SANE_TRUE, SANE_TRUE, SANE_TRUE));
1427 RIE (usb_low_set_io_3 (chip, SANE_TRUE));
1433 usb_mid_motor1200_prepare_mono_50_dpi (ma1017 * chip)
1438 RIE (usb_low_set_cmt_table (chip, 0, CH_GREEN, SANE_TRUE, SANE_TRUE));
1439 RIE (usb_low_set_cmt_table (chip, 1, CH_GREEN, SANE_TRUE, SANE_FALSE));
1440 RIE (usb_low_set_cmt_table (chip, 2, CH_GREEN, SANE_TRUE, SANE_FALSE));
1441 RIE (usb_low_set_cmt_table (chip, 3, CH_GREEN, SANE_TRUE, SANE_FALSE));
1442 RIE (usb_low_set_cmt_table (chip, 4, CH_GREEN, SANE_TRUE, SANE_FALSE));
1443 RIE (usb_low_set_cmt_table (chip, 5, CH_GREEN, SANE_TRUE, SANE_FALSE));
1444 RIE (usb_low_set_cmt_table (chip, 6, CH_GREEN, SANE_FALSE, SANE_FALSE));
1445 RIE (usb_low_set_cmt_table_length (chip, 6));
1446 RIE (usb_low_set_cmt_second_position (chip, 0));
1447 RIE (usb_low_set_cmt_loop_count (chip, 0xefff));
1448 RIE (usb_low_set_motor_movement (chip, SANE_TRUE, SANE_TRUE, SANE_TRUE));
1449 RIE (usb_low_set_io_3 (chip, SANE_TRUE));
1455 usb_mid_motor1200_prepare_rgb_half_300_dpi (ma1017 * chip)
1460 RIE (usb_low_set_cmt_table (chip, 0, CH_GREEN, SANE_TRUE, SANE_TRUE));
1461 RIE (usb_low_set_cmt_table (chip, 1, CH_GREEN, SANE_FALSE, SANE_TRUE));
1462 RIE (usb_low_set_cmt_table (chip, 2, CH_BLUE, SANE_TRUE, SANE_TRUE));
1463 RIE (usb_low_set_cmt_table (chip, 3, CH_BLUE, SANE_TRUE, SANE_TRUE));
1464 RIE (usb_low_set_cmt_table (chip, 4, CH_RED, SANE_FALSE, SANE_TRUE));
1465 RIE (usb_low_set_cmt_table (chip, 5, CH_RED, SANE_TRUE, SANE_TRUE));
1466 RIE (usb_low_set_cmt_table (chip, 6, CH_GREEN, SANE_FALSE, SANE_FALSE));
1467 RIE (usb_low_set_cmt_table_length (chip, 6));
1468 RIE (usb_low_set_cmt_second_position (chip, 0));
1469 RIE (usb_low_set_cmt_loop_count (chip, 0xefff));
1470 RIE (usb_low_set_motor_movement (chip, SANE_FALSE, SANE_TRUE, SANE_FALSE));
1471 RIE (usb_low_set_io_3 (chip, SANE_TRUE));
1477 usb_mid_motor1200_prepare_rgb_bi_full_300_dpi (ma1017 * chip)
1482 RIE (usb_low_set_cmt_table (chip, 0, CH_GREEN, SANE_FALSE, SANE_TRUE));
1483 RIE (usb_low_set_cmt_table (chip, 1, CH_GREEN, SANE_TRUE, SANE_TRUE));
1484 RIE (usb_low_set_cmt_table (chip, 2, CH_BLUE, SANE_FALSE, SANE_TRUE));
1485 RIE (usb_low_set_cmt_table (chip, 3, CH_BLUE, SANE_FALSE, SANE_TRUE));
1486 RIE (usb_low_set_cmt_table (chip, 4, CH_RED, SANE_TRUE, SANE_TRUE));
1487 RIE (usb_low_set_cmt_table (chip, 5, CH_RED, SANE_FALSE, SANE_TRUE));
1488 RIE (usb_low_set_cmt_table (chip, 6, CH_GREEN, SANE_FALSE, SANE_FALSE));
1489 RIE (usb_low_set_cmt_table_length (chip, 6));
1490 RIE (usb_low_set_cmt_second_position (chip, 0));
1491 RIE (usb_low_set_cmt_loop_count (chip, 0xefff));
1492 RIE (usb_low_set_motor_movement (chip, SANE_TRUE, SANE_TRUE, SANE_FALSE));
1493 RIE (usb_low_set_io_3 (chip, SANE_FALSE));
1499 usb_mid_motor1200_prepare_rgb_bi_full_x2300_dpi (ma1017 * chip)
1504 RIE (usb_low_set_cmt_table (chip, 0, CH_GREEN, SANE_FALSE, SANE_TRUE));
1505 RIE (usb_low_set_cmt_table (chip, 1, CH_GREEN, SANE_FALSE, SANE_TRUE));
1506 RIE (usb_low_set_cmt_table (chip, 2, CH_BLUE, SANE_FALSE, SANE_TRUE));
1507 RIE (usb_low_set_cmt_table (chip, 3, CH_BLUE, SANE_FALSE, SANE_TRUE));
1508 RIE (usb_low_set_cmt_table (chip, 4, CH_RED, SANE_FALSE, SANE_TRUE));
1509 RIE (usb_low_set_cmt_table (chip, 5, CH_RED, SANE_TRUE, SANE_TRUE));
1510 RIE (usb_low_set_cmt_table (chip, 6, CH_GREEN, SANE_FALSE, SANE_FALSE));
1511 RIE (usb_low_set_cmt_table_length (chip, 6));
1512 RIE (usb_low_set_cmt_second_position (chip, 0));
1513 RIE (usb_low_set_cmt_loop_count (chip, 0xefff));
1514 RIE (usb_low_set_motor_movement (chip, SANE_TRUE, SANE_TRUE, SANE_TRUE));
1515 RIE (usb_low_set_io_3 (chip, SANE_TRUE));
1521 usb_mid_motor1200_prepare_mono_half_300_dpi (ma1017 * chip)
1526 RIE (usb_low_set_cmt_table (chip, 0, CH_GREEN, SANE_TRUE, SANE_TRUE));
1527 RIE (usb_low_set_cmt_table (chip, 1, CH_GREEN, SANE_TRUE, SANE_FALSE));
1528 RIE (usb_low_set_cmt_table (chip, 2, CH_GREEN, SANE_TRUE, SANE_FALSE));
1529 RIE (usb_low_set_cmt_table (chip, 3, CH_GREEN, SANE_TRUE, SANE_FALSE));
1530 RIE (usb_low_set_cmt_table (chip, 4, CH_GREEN, SANE_FALSE, SANE_FALSE));
1531 RIE (usb_low_set_cmt_table_length (chip, 4));
1532 RIE (usb_low_set_cmt_second_position (chip, 0));
1533 RIE (usb_low_set_cmt_loop_count (chip, 0xefff));
1534 RIE (usb_low_set_motor_movement (chip, SANE_FALSE, SANE_TRUE, SANE_FALSE));
1535 RIE (usb_low_set_io_3 (chip, SANE_TRUE));
1542 usb_mid_motor1200_prepare_mono_bi_full_300_dpi (ma1017 * chip)
1547 RIE (usb_low_set_cmt_table (chip, 0, CH_GREEN, SANE_TRUE, SANE_TRUE));
1548 RIE (usb_low_set_cmt_table (chip, 1, CH_GREEN, SANE_TRUE, SANE_FALSE));
1549 RIE (usb_low_set_cmt_table (chip, 2, CH_GREEN, SANE_FALSE, SANE_FALSE));
1550 RIE (usb_low_set_cmt_table_length (chip, 2));
1551 RIE (usb_low_set_cmt_second_position (chip, 0));
1552 RIE (usb_low_set_cmt_loop_count (chip, 0xefff));
1553 RIE (usb_low_set_motor_movement (chip, SANE_TRUE, SANE_TRUE, SANE_FALSE));
1554 RIE (usb_low_set_io_3 (chip, SANE_TRUE));
1560 usb_mid_motor1200_prepare_mono_bi_full_x2300_dpi (ma1017 * chip)
1565 RIE (usb_low_set_cmt_table (chip, 0, CH_GREEN, SANE_TRUE, SANE_TRUE));
1566 RIE (usb_low_set_cmt_table (chip, 1, CH_GREEN, SANE_TRUE, SANE_TRUE));
1567 RIE (usb_low_set_cmt_table (chip, 2, CH_GREEN, SANE_FALSE, SANE_FALSE));
1568 RIE (usb_low_set_cmt_table_length (chip, 2));
1569 RIE (usb_low_set_cmt_second_position (chip, 0));
1570 RIE (usb_low_set_cmt_loop_count (chip, 0xefff));
1571 RIE (usb_low_set_motor_movement (chip, SANE_TRUE, SANE_TRUE, SANE_TRUE));
1572 RIE (usb_low_set_io_3 (chip, SANE_TRUE));
1578 usb_mid_motor1200_prepare_rgb (ma1017 * chip, SANE_Word dpi)
1583 RIE (usb_low_move_motor_home (chip, SANE_FALSE, SANE_FALSE));
1585 RIE (usb_low_set_motor_direction (chip, SANE_FALSE));
1586 RIE (usb_low_enable_motor (chip, SANE_TRUE));
1590 return usb_mid_motor1200_prepare_rgb_1200_dpi (chip);
1593 return usb_mid_motor1200_prepare_rgb_600_dpi (chip);
1596 return usb_mid_motor1200_prepare_rgb_400_dpi (chip);
1599 return usb_mid_motor1200_prepare_rgb_300_dpi (chip);
1602 return usb_mid_motor1200_prepare_rgb_200_dpi (chip);
1605 return usb_mid_motor1200_prepare_rgb_150_dpi (chip);
1608 return usb_mid_motor1200_prepare_rgb_100_dpi (chip);
1611 return usb_mid_motor1200_prepare_rgb_50_dpi (chip);
1622 usb_mid_motor1200_prepare_mono (ma1017 * chip, SANE_Word dpi)
1627 RIE (usb_low_move_motor_home (chip, SANE_FALSE, SANE_FALSE));
1629 RIE (usb_low_set_motor_direction (chip, SANE_FALSE));
1630 RIE (usb_low_enable_motor (chip, SANE_TRUE));
1634 return usb_mid_motor1200_prepare_mono_1200_dpi (chip);
1637 return usb_mid_motor1200_prepare_mono_600_dpi (chip);
1640 return usb_mid_motor1200_prepare_mono_400_dpi (chip);
1643 return usb_mid_motor1200_prepare_mono_300_dpi (chip);
1646 return usb_mid_motor1200_prepare_mono_200_dpi (chip);
1649 return usb_mid_motor1200_prepare_mono_150_dpi (chip);
1652 return usb_mid_motor1200_prepare_mono_100_dpi (chip);
1655 return usb_mid_motor1200_prepare_mono_50_dpi (chip);
1666 usb_mid_motor1200_prepare_calibrate_rgb (ma1017 * chip, SANE_Word dpi)
1671 RIE (usb_low_move_motor_home (chip, SANE_FALSE, SANE_FALSE));
1673 RIE (usb_low_set_motor_direction (chip, SANE_FALSE));
1674 RIE (usb_low_enable_motor (chip, SANE_TRUE));
1680 return usb_mid_motor1200_prepare_rgb_half_300_dpi (chip);
1685 return usb_mid_motor1200_prepare_rgb_bi_full_300_dpi (chip);
1689 return usb_mid_motor1200_prepare_rgb_bi_full_x2300_dpi (chip);
1701 usb_mid_motor1200_prepare_calibrate_mono (ma1017 * chip, SANE_Word dpi)
1706 RIE (usb_low_move_motor_home (chip, SANE_FALSE, SANE_FALSE));
1708 RIE (usb_low_set_motor_direction (chip, SANE_FALSE));
1709 RIE (usb_low_enable_motor (chip, SANE_TRUE));
1715 return usb_mid_motor1200_prepare_mono_half_300_dpi (chip);
1719 return usb_mid_motor1200_prepare_mono_bi_full_300_dpi (chip);
1724 return usb_mid_motor1200_prepare_mono_bi_full_x2300_dpi (chip);
1736 usb_mid_motor1200_prepare_step (ma1017 * chip, SANE_Word step_count)
1741 RIE (usb_low_set_motor_movement (chip, SANE_TRUE, SANE_TRUE, SANE_FALSE));
1743 RIE (usb_low_set_io_3 (chip, SANE_TRUE)); /* (IO3) ? High power : Low power */
1744 RIE (usb_low_move_motor_home (chip, SANE_FALSE, SANE_FALSE));
1748 RIE (usb_low_set_cmt_table (chip, 0, CH_GREEN, SANE_TRUE, SANE_FALSE));
1749 RIE (usb_low_set_cmt_table (chip, 1, CH_GREEN, SANE_FALSE, SANE_FALSE));
1750 RIE (usb_low_set_cmt_table_length (chip, 1));
1751 RIE (usb_low_set_cmt_second_position (chip, 0));
1752 RIE (usb_low_set_cmt_loop_count (chip, step_count));
1756 RIE (usb_low_set_cmt_table (chip, 0, CH_GREEN, SANE_TRUE, SANE_FALSE));
1757 RIE (usb_low_set_cmt_table (chip, 1, CH_GREEN, SANE_TRUE, SANE_FALSE));
1758 RIE (usb_low_set_cmt_table (chip, 2, CH_GREEN, SANE_TRUE, SANE_FALSE));
1759 RIE (usb_low_set_cmt_table (chip, 3, CH_GREEN, SANE_FALSE, SANE_FALSE));
1760 RIE (usb_low_set_cmt_table_length (chip, 3));
1761 RIE (usb_low_set_cmt_second_position (chip, 1));
1762 RIE (usb_low_set_cmt_loop_count (chip, (step_count - 1) / 2));
1766 RIE (usb_low_set_cmt_table (chip, 0, CH_GREEN, SANE_TRUE, SANE_FALSE));
1767 RIE (usb_low_set_cmt_table (chip, 1, CH_GREEN, SANE_TRUE, SANE_FALSE));
1768 RIE (usb_low_set_cmt_table (chip, 2, CH_GREEN, SANE_FALSE, SANE_FALSE));
1769 RIE (usb_low_set_cmt_table_length (chip, 2));
1770 RIE (usb_low_set_cmt_second_position (chip, 0));
1771 RIE (usb_low_set_cmt_loop_count (chip, step_count / 2));
1773 RIE (usb_low_enable_motor (chip, SANE_TRUE));
1779 usb_mid_motor1200_prepare_home (ma1017 * chip)
1784 if (chip->sensor == ST_NEC600)
1786 (chip, SANE_FALSE, SANE_TRUE, SANE_FALSE));
1788 RIE (usb_low_set_motor_movement (chip, SANE_TRUE, SANE_TRUE, SANE_FALSE));
1790 RIE (usb_low_set_io_3 (chip, SANE_TRUE)); /* (IO3) ? High power : Low power */
1791 RIE (usb_low_move_motor_home (chip, SANE_TRUE, SANE_TRUE));
1797 usb_mid_motor1200_prepare_adjust (ma1017 * chip, Channel channel)
1802 RIE (usb_low_set_cmt_table (chip, 0, channel, SANE_FALSE, SANE_TRUE));
1803 RIE (usb_low_set_cmt_table (chip, 1, channel, SANE_FALSE, SANE_TRUE));
1804 RIE (usb_low_set_cmt_table (chip, 2, channel, SANE_FALSE, SANE_FALSE));
1805 RIE (usb_low_set_cmt_table_length (chip, 2));
1806 RIE (usb_low_set_cmt_second_position (chip, 0));
1807 RIE (usb_low_set_cmt_loop_count (chip, 0xefff));
1872 usb_mid_motor600_prepare_rgb_600_dpi (ma1017 * chip)
1877 RIE (usb_low_set_cmt_table (chip, 0, CH_GREEN, SANE_FALSE, SANE_TRUE));
1878 RIE (usb_low_set_cmt_table (chip, 1, CH_BLUE, SANE_FALSE, SANE_TRUE));
1879 RIE (usb_low_set_cmt_table (chip, 2, CH_RED, SANE_TRUE, SANE_TRUE));
1880 RIE (usb_low_set_cmt_table (chip, 3, CH_GREEN, SANE_FALSE, SANE_FALSE));
1881 RIE (usb_low_set_cmt_table (chip, 4, CH_GREEN, SANE_FALSE, SANE_FALSE));
1882 RIE (usb_low_set_cmt_table_length (chip, 4));
1883 RIE (usb_low_set_cmt_second_position (chip, 0));
1884 RIE (usb_low_set_cmt_loop_count (chip, 0xefff));
1885 RIE (usb_low_set_motor_movement (chip, SANE_FALSE, SANE_TRUE, SANE_FALSE));
1886 RIE (usb_low_set_io_3 (chip, SANE_FALSE));
1892 usb_mid_motor600_prepare_rgb_300_dpi (ma1017 * chip)
1897 RIE (usb_low_set_cmt_table (chip, 0, CH_GREEN, SANE_FALSE, SANE_TRUE));
1898 RIE (usb_low_set_cmt_table (chip, 1, CH_BLUE, SANE_FALSE, SANE_TRUE));
1899 RIE (usb_low_set_cmt_table (chip, 2, CH_RED, SANE_TRUE, SANE_TRUE));
1900 RIE (usb_low_set_cmt_table (chip, 3, CH_GREEN, SANE_FALSE, SANE_FALSE));
1901 RIE (usb_low_set_cmt_table (chip, 4, CH_GREEN, SANE_FALSE, SANE_FALSE));
1902 RIE (usb_low_set_cmt_table_length (chip, 4));
1903 RIE (usb_low_set_cmt_second_position (chip, 0));
1904 RIE (usb_low_set_cmt_loop_count (chip, 0xefff));
1905 RIE (usb_low_set_motor_movement (chip, SANE_TRUE, SANE_TRUE, SANE_FALSE));
1906 RIE (usb_low_set_io_3 (chip, SANE_FALSE));
1912 usb_mid_motor600_prepare_rgb_200_dpi (ma1017 * chip)
1917 RIE (usb_low_set_cmt_table (chip, 0, CH_GREEN, SANE_FALSE, SANE_TRUE));
1918 RIE (usb_low_set_cmt_table (chip, 1, CH_BLUE, SANE_FALSE, SANE_TRUE));
1919 RIE (usb_low_set_cmt_table (chip, 2, CH_RED, SANE_TRUE, SANE_TRUE));
1920 RIE (usb_low_set_cmt_table (chip, 3, CH_GREEN, SANE_TRUE, SANE_FALSE));
1921 RIE (usb_low_set_cmt_table (chip, 4, CH_GREEN, SANE_TRUE, SANE_FALSE));
1922 RIE (usb_low_set_cmt_table (chip, 5, CH_GREEN, SANE_FALSE, SANE_FALSE));
1923 RIE (usb_low_set_cmt_table_length (chip, 5));
1924 RIE (usb_low_set_cmt_second_position (chip, 0));
1925 RIE (usb_low_set_cmt_loop_count (chip, 0xefff));
1926 RIE (usb_low_set_motor_movement (chip, SANE_FALSE, SANE_TRUE, SANE_FALSE));
1927 RIE (usb_low_set_io_3 (chip, SANE_TRUE));
1935 usb_mid_motor600_prepare_rgb_150_dpi (ma1017 * chip)
1940 RIE (usb_low_set_cmt_table (chip, 0, CH_GREEN, SANE_FALSE, SANE_TRUE));
1941 RIE (usb_low_set_cmt_table (chip, 1, CH_BLUE, SANE_FALSE, SANE_TRUE));
1942 RIE (usb_low_set_cmt_table (chip, 2, CH_RED, SANE_TRUE, SANE_TRUE));
1943 RIE (usb_low_set_cmt_table (chip, 3, CH_GREEN, SANE_FALSE, SANE_FALSE));
1944 RIE (usb_low_set_cmt_table_length (chip, 3));
1945 RIE (usb_low_set_cmt_second_position (chip, 0));
1946 RIE (usb_low_set_cmt_loop_count (chip, 0xefff));
1947 RIE (usb_low_set_motor_movement (chip, SANE_TRUE, SANE_TRUE, SANE_TRUE));
1948 RIE (usb_low_set_io_3 (chip, SANE_TRUE));
1954 usb_mid_motor600_prepare_rgb_100_dpi (ma1017 * chip)
1959 RIE (usb_low_set_cmt_table (chip, 0, CH_GREEN, SANE_FALSE, SANE_TRUE));
1960 RIE (usb_low_set_cmt_table (chip, 1, CH_BLUE, SANE_FALSE, SANE_TRUE));
1961 RIE (usb_low_set_cmt_table (chip, 2, CH_RED, SANE_TRUE, SANE_TRUE));
1962 RIE (usb_low_set_cmt_table (chip, 3, CH_GREEN, SANE_TRUE, SANE_FALSE));
1963 RIE (usb_low_set_cmt_table (chip, 4, CH_GREEN, SANE_TRUE, SANE_FALSE));
1964 RIE (usb_low_set_cmt_table (chip, 5, CH_GREEN, SANE_FALSE, SANE_FALSE));
1965 RIE (usb_low_set_cmt_table_length (chip, 5));
1966 RIE (usb_low_set_cmt_second_position (chip, 0));
1967 RIE (usb_low_set_cmt_loop_count (chip, 0xefff));
1968 RIE (usb_low_set_motor_movement (chip, SANE_TRUE, SANE_TRUE, SANE_FALSE));
1969 RIE (usb_low_set_io_3 (chip, SANE_TRUE));
1975 usb_mid_motor600_prepare_rgb_50_dpi (ma1017 * chip)
1980 RIE (usb_low_set_cmt_table (chip, 0, CH_GREEN, SANE_TRUE, SANE_TRUE));
1981 RIE (usb_low_set_cmt_table (chip, 1, CH_BLUE, SANE_TRUE, SANE_TRUE));
1982 RIE (usb_low_set_cmt_table (chip, 2, CH_RED, SANE_TRUE, SANE_TRUE));
1983 RIE (usb_low_set_cmt_table (chip, 3, CH_GREEN, SANE_FALSE, SANE_FALSE));
1984 RIE (usb_low_set_cmt_table_length (chip, 3));
1985 RIE (usb_low_set_cmt_second_position (chip, 0));
1986 RIE (usb_low_set_cmt_loop_count (chip, 0xefff));
1987 RIE (usb_low_set_motor_movement (chip, SANE_TRUE, SANE_TRUE, SANE_TRUE));
1988 RIE (usb_low_set_io_3 (chip, SANE_TRUE));
1994 usb_mid_motor600_prepare_mono_600_dpi (ma1017 * chip)
1999 RIE (usb_low_set_cmt_table (chip, 0, CH_GREEN, SANE_TRUE, SANE_TRUE));
2000 RIE (usb_low_set_cmt_table (chip, 1, CH_GREEN, SANE_TRUE, SANE_TRUE));
2001 RIE (usb_low_set_cmt_table (chip, 2, CH_GREEN, SANE_FALSE, SANE_FALSE));
2002 RIE (usb_low_set_cmt_table_length (chip, 2));
2003 RIE (usb_low_set_cmt_second_position (chip, 0));
2004 RIE (usb_low_set_cmt_loop_count (chip, 0xefff));
2005 RIE (usb_low_set_motor_movement (chip, SANE_FALSE, SANE_TRUE, SANE_FALSE));
2006 RIE (usb_low_set_io_3 (chip, SANE_TRUE));
2012 usb_mid_motor600_prepare_mono_300_dpi (ma1017 * chip)
2017 RIE (usb_low_set_cmt_table (chip, 0, CH_GREEN, SANE_TRUE, SANE_TRUE));
2018 RIE (usb_low_set_cmt_table (chip, 1, CH_GREEN, SANE_TRUE, SANE_TRUE));
2019 RIE (usb_low_set_cmt_table (chip, 2, CH_GREEN, SANE_FALSE, SANE_FALSE));
2020 RIE (usb_low_set_cmt_table_length (chip, 2));
2021 RIE (usb_low_set_cmt_second_position (chip, 0));
2022 RIE (usb_low_set_cmt_loop_count (chip, 0xefff));
2023 RIE (usb_low_set_motor_movement (chip, SANE_TRUE, SANE_TRUE, SANE_FALSE));
2024 RIE (usb_low_set_io_3 (chip, SANE_TRUE));
2030 usb_mid_motor600_prepare_mono_200_dpi (ma1017 * chip)
2035 RIE (usb_low_set_cmt_table (chip, 0, CH_GREEN, SANE_TRUE, SANE_TRUE));
2036 RIE (usb_low_set_cmt_table (chip, 1, CH_GREEN, SANE_TRUE, SANE_FALSE));
2037 RIE (usb_low_set_cmt_table (chip, 2, CH_GREEN, SANE_TRUE, SANE_FALSE));
2038 RIE (usb_low_set_cmt_table (chip, 3, CH_GREEN, SANE_FALSE, SANE_FALSE));
2039 RIE (usb_low_set_cmt_table_length (chip, 3));
2040 RIE (usb_low_set_cmt_second_position (chip, 0));
2041 RIE (usb_low_set_cmt_loop_count (chip, 0xefff));
2042 RIE (usb_low_set_motor_movement (chip, SANE_FALSE, SANE_TRUE, SANE_FALSE));
2043 RIE (usb_low_set_io_3 (chip, SANE_TRUE));
2050 usb_mid_motor600_prepare_mono_150_dpi (ma1017 * chip)
2055 RIE (usb_low_set_cmt_table (chip, 0, CH_GREEN, SANE_TRUE, SANE_TRUE));
2056 RIE (usb_low_set_cmt_table (chip, 1, CH_GREEN, SANE_TRUE, SANE_TRUE));
2057 RIE (usb_low_set_cmt_table (chip, 2, CH_GREEN, SANE_FALSE, SANE_FALSE));
2058 RIE (usb_low_set_cmt_table_length (chip, 2));
2059 RIE (usb_low_set_cmt_second_position (chip, 0));
2060 RIE (usb_low_set_cmt_loop_count (chip, 0xefff));
2061 RIE (usb_low_set_motor_movement (chip, SANE_TRUE, SANE_TRUE, SANE_TRUE));
2062 RIE (usb_low_set_io_3 (chip, SANE_TRUE));
2068 usb_mid_motor600_prepare_mono_100_dpi (ma1017 * chip)
2073 RIE (usb_low_set_cmt_table (chip, 0, CH_GREEN, SANE_TRUE, SANE_TRUE));
2074 RIE (usb_low_set_cmt_table (chip, 1, CH_GREEN, SANE_TRUE, SANE_FALSE));
2075 RIE (usb_low_set_cmt_table (chip, 2, CH_GREEN, SANE_TRUE, SANE_FALSE));
2076 RIE (usb_low_set_cmt_table (chip, 3, CH_GREEN, SANE_FALSE, SANE_FALSE));
2077 RIE (usb_low_set_cmt_table_length (chip, 3));
2078 RIE (usb_low_set_cmt_second_position (chip, 0));
2079 RIE (usb_low_set_cmt_loop_count (chip, 0xefff));
2080 RIE (usb_low_set_motor_movement (chip, SANE_TRUE, SANE_TRUE, SANE_FALSE));
2081 RIE (usb_low_set_io_3 (chip, SANE_TRUE));
2087 usb_mid_motor600_prepare_mono_50_dpi (ma1017 * chip)
2092 RIE (usb_low_set_cmt_table (chip, 0, CH_GREEN, SANE_TRUE, SANE_TRUE));
2093 RIE (usb_low_set_cmt_table (chip, 1, CH_GREEN, SANE_TRUE, SANE_FALSE));
2094 RIE (usb_low_set_cmt_table (chip, 2, CH_GREEN, SANE_TRUE, SANE_FALSE));
2095 RIE (usb_low_set_cmt_table (chip, 3, CH_GREEN, SANE_FALSE, SANE_FALSE));
2096 RIE (usb_low_set_cmt_table_length (chip, 3));
2097 RIE (usb_low_set_cmt_second_position (chip, 0));
2098 RIE (usb_low_set_cmt_loop_count (chip, 0xefff));
2099 RIE (usb_low_set_motor_movement (chip, SANE_TRUE, SANE_TRUE, SANE_TRUE));
2100 RIE (usb_low_set_io_3 (chip, SANE_TRUE));
2106 usb_mid_motor600_prepare_rgb_half_300_dpi (ma1017 * chip)
2111 RIE (usb_low_set_cmt_table (chip, 0, CH_GREEN, SANE_TRUE, SANE_TRUE));
2112 RIE (usb_low_set_cmt_table (chip, 1, CH_GREEN, SANE_FALSE, SANE_TRUE));
2113 RIE (usb_low_set_cmt_table (chip, 2, CH_BLUE, SANE_TRUE, SANE_TRUE));
2114 RIE (usb_low_set_cmt_table (chip, 3, CH_BLUE, SANE_TRUE, SANE_TRUE));
2115 RIE (usb_low_set_cmt_table (chip, 4, CH_RED, SANE_FALSE, SANE_TRUE));
2116 RIE (usb_low_set_cmt_table (chip, 5, CH_RED, SANE_TRUE, SANE_TRUE));
2117 RIE (usb_low_set_cmt_table (chip, 6, CH_GREEN, SANE_FALSE, SANE_FALSE));
2118 RIE (usb_low_set_cmt_table_length (chip, 6));
2119 RIE (usb_low_set_cmt_second_position (chip, 0));
2120 RIE (usb_low_set_cmt_loop_count (chip, 0xefff));
2121 RIE (usb_low_set_motor_movement (chip, SANE_FALSE, SANE_TRUE, SANE_FALSE));
2122 RIE (usb_low_set_io_3 (chip, SANE_TRUE));
2128 usb_mid_motor600_prepare_rgb_bi_full_300_dpi (ma1017 * chip)
2133 RIE (usb_low_set_cmt_table (chip, 0, CH_GREEN, SANE_FALSE, SANE_TRUE));
2134 RIE (usb_low_set_cmt_table (chip, 1, CH_GREEN, SANE_TRUE, SANE_TRUE));
2135 RIE (usb_low_set_cmt_table (chip, 2, CH_BLUE, SANE_FALSE, SANE_TRUE));
2136 RIE (usb_low_set_cmt_table (chip, 3, CH_BLUE, SANE_FALSE, SANE_TRUE));
2137 RIE (usb_low_set_cmt_table (chip, 4, CH_RED, SANE_TRUE, SANE_TRUE));
2138 RIE (usb_low_set_cmt_table (chip, 5, CH_RED, SANE_FALSE, SANE_TRUE));
2139 RIE (usb_low_set_cmt_table (chip, 6, CH_GREEN, SANE_FALSE, SANE_FALSE));
2140 RIE (usb_low_set_cmt_table_length (chip, 6));
2141 RIE (usb_low_set_cmt_second_position (chip, 0));
2142 RIE (usb_low_set_cmt_loop_count (chip, 0xefff));
2143 RIE (usb_low_set_motor_movement (chip, SANE_TRUE, SANE_TRUE, SANE_FALSE));
2144 RIE (usb_low_set_io_3 (chip, SANE_FALSE));
2150 usb_mid_motor600_prepare_mono_half_300_dpi (ma1017 * chip)
2155 RIE (usb_low_set_cmt_table (chip, 0, CH_GREEN, SANE_TRUE, SANE_TRUE));
2156 RIE (usb_low_set_cmt_table (chip, 1, CH_GREEN, SANE_TRUE, SANE_FALSE));
2157 RIE (usb_low_set_cmt_table (chip, 2, CH_GREEN, SANE_FALSE, SANE_FALSE));
2158 RIE (usb_low_set_cmt_table_length (chip, 2));
2159 RIE (usb_low_set_cmt_second_position (chip, 0));
2160 RIE (usb_low_set_cmt_loop_count (chip, 0xefff));
2161 RIE (usb_low_set_motor_movement (chip, SANE_FALSE, SANE_TRUE, SANE_FALSE));
2162 RIE (usb_low_set_io_3 (chip, SANE_TRUE));
2169 usb_mid_motor600_prepare_mono_bi_full_300_dpi (ma1017 * chip)
2174 RIE (usb_low_set_cmt_table (chip, 0, CH_GREEN, SANE_TRUE, SANE_TRUE));
2175 RIE (usb_low_set_cmt_table (chip, 1, CH_GREEN, SANE_TRUE, SANE_TRUE));
2176 RIE (usb_low_set_cmt_table (chip, 2, CH_GREEN, SANE_FALSE, SANE_FALSE));
2177 RIE (usb_low_set_cmt_table_length (chip, 2));
2178 RIE (usb_low_set_cmt_second_position (chip, 0));
2179 RIE (usb_low_set_cmt_loop_count (chip, 0xefff));
2180 RIE (usb_low_set_motor_movement (chip, SANE_TRUE, SANE_TRUE, SANE_FALSE));
2181 RIE (usb_low_set_io_3 (chip, SANE_TRUE));
2188 usb_mid_motor600_prepare_rgb (ma1017 * chip, SANE_Word dpi)
2194 return usb_mid_motor600_prepare_rgb_600_dpi (chip);
2197 return usb_mid_motor600_prepare_rgb_300_dpi (chip);
2200 return usb_mid_motor600_prepare_rgb_200_dpi (chip);
2203 return usb_mid_motor600_prepare_rgb_150_dpi (chip);
2206 return usb_mid_motor600_prepare_rgb_100_dpi (chip);
2209 return usb_mid_motor600_prepare_rgb_50_dpi (chip);
2220 usb_mid_motor600_prepare_mono (ma1017 * chip, SANE_Word dpi)
2226 return usb_mid_motor600_prepare_mono_600_dpi (chip);
2229 return usb_mid_motor600_prepare_mono_300_dpi (chip);
2232 return usb_mid_motor600_prepare_mono_200_dpi (chip);
2235 return usb_mid_motor600_prepare_mono_150_dpi (chip);
2238 return usb_mid_motor600_prepare_mono_100_dpi (chip);
2241 return usb_mid_motor600_prepare_mono_50_dpi (chip);
2252 usb_mid_motor600_prepare_calibrate_rgb (ma1017 * chip, SANE_Word dpi)
2257 RIE (usb_low_move_motor_home (chip, SANE_FALSE, SANE_FALSE));
2259 RIE (usb_low_set_motor_direction (chip, SANE_FALSE));
2260 RIE (usb_low_enable_motor (chip, SANE_TRUE));
2265 return usb_mid_motor600_prepare_rgb_half_300_dpi (chip);
2271 return usb_mid_motor600_prepare_rgb_bi_full_300_dpi (chip);
2283 usb_mid_motor600_prepare_calibrate_mono (ma1017 * chip, SANE_Word dpi)
2288 RIE (usb_low_move_motor_home (chip, SANE_FALSE, SANE_FALSE));
2290 RIE (usb_low_set_motor_direction (chip, SANE_FALSE));
2291 RIE (usb_low_enable_motor (chip, SANE_TRUE));
2296 return usb_mid_motor600_prepare_mono_half_300_dpi (chip);
2302 return usb_mid_motor600_prepare_mono_bi_full_300_dpi (chip);
2314 usb_mid_motor600_prepare_step (ma1017 * chip, SANE_Word step_count)
2319 RIE (usb_low_set_motor_movement (chip, SANE_FALSE, SANE_TRUE, SANE_FALSE));
2321 RIE (usb_low_set_io_3 (chip, SANE_TRUE)); /* (IO3) ? High power : Low power */
2322 RIE (usb_low_move_motor_home (chip, SANE_FALSE, SANE_FALSE));
2326 RIE (usb_low_set_cmt_table (chip, 0, CH_GREEN, SANE_TRUE, SANE_FALSE));
2327 RIE (usb_low_set_cmt_table (chip, 1, CH_GREEN, SANE_FALSE, SANE_FALSE));
2328 RIE (usb_low_set_cmt_table_length (chip, 1));
2329 RIE (usb_low_set_cmt_second_position (chip, 0));
2330 RIE (usb_low_set_cmt_loop_count (chip, step_count));
2334 RIE (usb_low_set_cmt_table (chip, 0, CH_GREEN, SANE_TRUE, SANE_FALSE));
2335 RIE (usb_low_set_cmt_table (chip, 1, CH_GREEN, SANE_TRUE, SANE_FALSE));
2336 RIE (usb_low_set_cmt_table (chip, 2, CH_GREEN, SANE_TRUE, SANE_FALSE));
2337 RIE (usb_low_set_cmt_table (chip, 3, CH_GREEN, SANE_FALSE, SANE_FALSE));
2338 RIE (usb_low_set_cmt_table_length (chip, 3));
2339 RIE (usb_low_set_cmt_second_position (chip, 1));
2340 RIE (usb_low_set_cmt_loop_count (chip, (step_count - 1) / 2));
2344 RIE (usb_low_set_cmt_table (chip, 0, CH_GREEN, SANE_TRUE, SANE_FALSE));
2345 RIE (usb_low_set_cmt_table (chip, 1, CH_GREEN, SANE_TRUE, SANE_FALSE));
2346 RIE (usb_low_set_cmt_table (chip, 2, CH_GREEN, SANE_FALSE, SANE_FALSE));
2347 RIE (usb_low_set_cmt_table_length (chip, 2));
2348 RIE (usb_low_set_cmt_second_position (chip, 0));
2349 RIE (usb_low_set_cmt_loop_count (chip, step_count / 2));
2351 RIE (usb_low_enable_motor (chip, SANE_TRUE));
2357 usb_mid_motor600_prepare_home (ma1017 * chip)
2362 RIE (usb_low_set_motor_movement (chip, SANE_FALSE, SANE_TRUE, SANE_TRUE));
2364 RIE (usb_low_set_io_3 (chip, SANE_TRUE)); /* (IO3) ? High power : Low power */
2365 RIE (usb_low_move_motor_home (chip, SANE_TRUE, SANE_TRUE));
2371 usb_mid_motor600_prepare_adjust (ma1017 * chip, Channel channel)
2376 RIE (usb_low_set_cmt_table (chip, 0, channel, SANE_FALSE, SANE_TRUE));
2377 RIE (usb_low_set_cmt_table (chip, 1, channel, SANE_FALSE, SANE_TRUE));
2378 RIE (usb_low_set_cmt_table (chip, 2, channel, SANE_FALSE, SANE_FALSE));
2379 RIE (usb_low_set_cmt_table_length (chip, 2));
2380 RIE (usb_low_set_cmt_second_position (chip, 0));
2381 RIE (usb_low_set_cmt_loop_count (chip, 0xefff));
2431 usb_mid_motor_prepare_home (ma1017 * chip)
2433 if (chip->motor == MT_600)
2434 return usb_mid_motor600_prepare_home (chip);
2436 return usb_mid_motor1200_prepare_home (chip);
2440 usb_mid_motor_prepare_rgb (ma1017 * chip, SANE_Word dpi)
2442 if (chip->motor == MT_600)
2443 return usb_mid_motor600_prepare_rgb (chip, dpi);
2445 return usb_mid_motor1200_prepare_rgb (chip, dpi);
2449 usb_mid_motor_prepare_mono (ma1017 * chip, SANE_Word dpi)
2451 if (chip->motor == MT_600)
2452 return usb_mid_motor600_prepare_mono (chip, dpi);
2454 return usb_mid_motor1200_prepare_mono (chip, dpi);
2458 usb_mid_motor_prepare_adjust (ma1017 * chip, Channel channel)
2460 if (chip->motor == MT_600)
2461 return usb_mid_motor600_prepare_adjust (chip, channel);
2463 return usb_mid_motor1200_prepare_adjust (chip, channel);
2467 usb_mid_motor_prepare_calibrate_rgb (ma1017 * chip, SANE_Word dpi)
2469 if (chip->motor == MT_600)
2470 return usb_mid_motor600_prepare_calibrate_rgb (chip, dpi);
2472 return usb_mid_motor1200_prepare_calibrate_rgb (chip, dpi);
2476 usb_mid_motor_prepare_calibrate_mono (ma1017 * chip, SANE_Word dpi)
2478 if (chip->motor == MT_600)
2479 return usb_mid_motor600_prepare_calibrate_mono (chip, dpi);
2481 return usb_mid_motor1200_prepare_calibrate_mono (chip, dpi);
2485 usb_mid_motor_prepare_step (ma1017 * chip, SANE_Word step_count)
2487 if (chip->motor == MT_600)
2488 return usb_mid_motor600_prepare_step (chip, step_count);
2490 return usb_mid_motor1200_prepare_step (chip, step_count);
2494 usb_mid_motor_rgb_capability (ma1017 * chip, SANE_Word dpi)
2496 if (chip->motor == MT_600)
2503 usb_mid_motor_mono_capability (ma1017 * chip, SANE_Word dpi)
2505 if (chip->motor == MT_600)
2513 usb_mid_motor_get_dpi (ma1017 * chip, SANE_Word wanted_dpi, SANE_Word * dpi)
2521 if (chip->motor == MT_600)
2523 else if (chip->motor == MT_1200)
2544 usb_mid_front_set_front_end_mode (ma1017 * chip, SANE_Byte mode)
2549 RIE (usb_low_set_serial_format (chip, mode));
2555 usb_mid_front_enable (ma1017 * chip, SANE_Bool is_enable)
2560 RIE (usb_low_turn_frontend_mode (chip, is_enable));
2566 usb_mid_front_set_top_reference (ma1017 * chip, SANE_Byte top)
2571 RIE (usb_mid_front_enable (chip, SANE_TRUE));
2572 RIE (usb_low_set_serial_byte1 (chip, 0x00));
2573 RIE (usb_low_set_serial_byte2 (chip, top));
2574 RIE (usb_mid_front_enable (chip, SANE_FALSE));
2580 usb_mid_front_set_red_offset (ma1017 * chip, SANE_Byte offset)
2585 RIE (usb_mid_front_enable (chip, SANE_TRUE));
2586 RIE (usb_low_set_serial_byte1 (chip, 0x10));
2587 RIE (usb_low_set_serial_byte2 (chip, offset));
2588 RIE (usb_mid_front_enable (chip, SANE_FALSE));
2594 usb_mid_front_set_green_offset (ma1017 * chip, SANE_Byte offset)
2599 RIE (usb_mid_front_enable (chip, SANE_TRUE));
2600 RIE (usb_low_set_serial_byte1 (chip, 0x50));
2601 RIE (usb_low_set_serial_byte2 (chip, offset));
2602 RIE (usb_mid_front_enable (chip, SANE_FALSE));
2608 usb_mid_front_set_blue_offset (ma1017 * chip, SANE_Byte offset)
2613 RIE (usb_mid_front_enable (chip, SANE_TRUE));
2614 RIE (usb_low_set_serial_byte1 (chip, 0x30));
2615 RIE (usb_low_set_serial_byte2 (chip, offset));
2616 RIE (usb_mid_front_enable (chip, SANE_FALSE));
2624 usb_mid_frontend_max_offset_index (ma1017 * chip)
2626 DBG (6, "usb_mid_front_max_offset_index: start (chip = %p)\n", chip);
2634 usb_mid_front_set_red_pga (ma1017 * chip, SANE_Byte pga)
2639 RIE (usb_mid_front_enable (chip, SANE_TRUE));
2640 RIE (usb_low_set_serial_byte1 (chip, 0x40));
2641 RIE (usb_low_set_serial_byte2 (chip, pga));
2642 RIE (usb_mid_front_enable (chip, SANE_FALSE));
2648 usb_mid_front_set_green_pga (ma1017 * chip, SANE_Byte pga)
2653 RIE (usb_mid_front_enable (chip, SANE_TRUE));
2654 RIE (usb_low_set_serial_byte1 (chip, 0x20));
2655 RIE (usb_low_set_serial_byte2 (chip, pga));
2656 RIE (usb_mid_front_enable (chip, SANE_FALSE));
2662 usb_mid_front_set_blue_pga (ma1017 * chip, SANE_Byte pga)
2667 RIE (usb_mid_front_enable (chip, SANE_TRUE));
2668 RIE (usb_low_set_serial_byte1 (chip, 0x60));
2669 RIE (usb_low_set_serial_byte2 (chip, pga));
2670 RIE (usb_mid_front_enable (chip, SANE_FALSE));
2676 usb_mid_front_set_rgb_signal (ma1017 * chip)
2681 RIE (usb_low_set_red_ref (chip, 0xEF));
2682 RIE (usb_low_set_green_ref (chip, 0xF7));
2683 RIE (usb_low_set_blue_ref (chip, 0xFF));