1 /* sane - Scanner Access Now Easy. 2 3 Copyright (C) 2003-2004 Henning Meier-Geinitz <henning@meier-geinitz.de> 4 Copyright (C) 2004-2005 Gerhard Jaeger <gerhard@gjaeger.de> 5 Copyright (C) 2004-2013 Stéphane Voltz <stef.dev@free.fr> 6 Copyright (C) 2005-2009 Pierre Willenbrock <pierre@pirsoft.dnsalias.org> 7 8 This file is part of the SANE package. 9 10 This program is free software; you can redistribute it and/or 11 modify it under the terms of the GNU General Public License as 12 published by the Free Software Foundation; either version 2 of the 13 License, or (at your option) any later version. 14 15 This program is distributed in the hope that it will be useful, but 16 WITHOUT ANY WARRANTY; without even the implied warranty of 17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 General Public License for more details. 19 20 You should have received a copy of the GNU General Public License 21 along with this program. If not, see <https://www.gnu.org/licenses/>. 22 23 As a special exception, the authors of SANE give permission for 24 additional uses of the libraries contained in this release of SANE. 25 26 The exception is that, if you link a SANE library with other files 27 to produce an executable, this does not by itself cause the 28 resulting executable to be covered by the GNU General Public 29 License. Your use of that executable is in no way restricted on 30 account of linking the SANE library code into it. 31 32 This exception does not, however, invalidate any other reasons why 33 the executable file might be covered by the GNU General Public 34 License. 35 36 If you submit changes to SANE to the maintainers to be included in 37 a subsequent release, you agree by submitting the changes that 38 those changes may be distributed with this exception intact. 39 40 If you write modifications of your own for SANE, it is your choice 41 whether to permit this exception to apply to your modifications. 42 If you do not wish that, delete this exception notice. 43 */ 44 45 #ifndef BACKEND_GENESYS_GL646_H 46 #define BACKEND_GENESYS_GL646_H 47 48 #include "genesys.h" 49 #include "command_set_common.h" 50 #include "motor.h" 51 52 namespace genesys { 53 namespace gl646 { 54 55 class CommandSetGl646 : public CommandSetCommon 56 { 57 public: 58 ~CommandSetGl646() override = default; 59 60 bool needs_home_before_init_regs_for_scan(Genesys_Device* dev) const override; 61 62 void init(Genesys_Device* dev) const override; 63 64 void init_regs_for_warmup(Genesys_Device* dev, const Genesys_Sensor& sensor, 65 Genesys_Register_Set* regs) const override; 66 67 void init_regs_for_shading(Genesys_Device* dev, const Genesys_Sensor& sensor, 68 Genesys_Register_Set& regs) const override; 69 70 void init_regs_for_scan_session(Genesys_Device* dev, const Genesys_Sensor& sensor, 71 Genesys_Register_Set* reg, 72 const ScanSession& session) const override; 73 74 void set_fe(Genesys_Device* dev, const Genesys_Sensor& sensor, uint8_t set) const override; 75 void set_powersaving(Genesys_Device* dev, int delay) const override; 76 void save_power(Genesys_Device* dev, bool enable) const override; 77 78 void begin_scan(Genesys_Device* dev, const Genesys_Sensor& sensor, 79 Genesys_Register_Set* regs, bool start_motor) const override; 80 81 void end_scan(Genesys_Device* dev, Genesys_Register_Set* regs, bool check_stop) const override; 82 83 void send_gamma_table(Genesys_Device* dev, const Genesys_Sensor& sensor) const override; 84 85 void offset_calibration(Genesys_Device* dev, const Genesys_Sensor& sensor, 86 Genesys_Register_Set& regs) const override; 87 88 void coarse_gain_calibration(Genesys_Device* dev, const Genesys_Sensor& sensor, 89 Genesys_Register_Set& regs, int dpi) const override; 90 91 SensorExposure led_calibration(Genesys_Device* dev, const Genesys_Sensor& sensor, 92 Genesys_Register_Set& regs) const override; 93 94 void wait_for_motor_stop(Genesys_Device* dev) const override; 95 96 void move_back_home(Genesys_Device* dev, bool wait_until_home) const override; 97 98 void update_hardware_sensors(struct Genesys_Scanner* s) const override; 99 100 void update_home_sensor_gpio(Genesys_Device& dev) const override; 101 102 void load_document(Genesys_Device* dev) const override; 103 104 void detect_document_end(Genesys_Device* dev) const override; 105 106 void eject_document(Genesys_Device* dev) const override; 107 108 void send_shading_data(Genesys_Device* dev, const Genesys_Sensor& sensor, uint8_t* data, 109 int size) const override; 110 has_send_shading_data()111 bool has_send_shading_data() const override 112 { 113 return false; 114 } 115 116 ScanSession calculate_scan_session(const Genesys_Device* dev, 117 const Genesys_Sensor& sensor, 118 const Genesys_Settings& settings) const override; 119 120 void asic_boot(Genesys_Device* dev, bool cold) const override; 121 }; 122 123 } // namespace gl646 124 } // namespace genesys 125 126 #endif // BACKEND_GENESYS_GL646_H 127