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 24 #ifndef BACKEND_GENESYS_GL646_H 25 #define BACKEND_GENESYS_GL646_H 26 27 #include "genesys.h" 28 #include "command_set_common.h" 29 #include "motor.h" 30 31 namespace genesys { 32 namespace gl646 { 33 34 class CommandSetGl646 : public CommandSetCommon 35 { 36 public: 37 ~CommandSetGl646() override = default; 38 39 bool needs_home_before_init_regs_for_scan(Genesys_Device* dev) const override; 40 41 void init(Genesys_Device* dev) const override; 42 43 void init_regs_for_warmup(Genesys_Device* dev, const Genesys_Sensor& sensor, 44 Genesys_Register_Set* regs) const override; 45 46 void init_regs_for_shading(Genesys_Device* dev, const Genesys_Sensor& sensor, 47 Genesys_Register_Set& regs) const override; 48 49 void init_regs_for_scan_session(Genesys_Device* dev, const Genesys_Sensor& sensor, 50 Genesys_Register_Set* reg, 51 const ScanSession& session) const override; 52 53 void set_fe(Genesys_Device* dev, const Genesys_Sensor& sensor, std::uint8_t set) const override; 54 void set_powersaving(Genesys_Device* dev, int delay) const override; 55 void save_power(Genesys_Device* dev, bool enable) const override; 56 57 void begin_scan(Genesys_Device* dev, const Genesys_Sensor& sensor, 58 Genesys_Register_Set* regs, bool start_motor) const override; 59 60 void end_scan(Genesys_Device* dev, Genesys_Register_Set* regs, bool check_stop) const override; 61 62 void send_gamma_table(Genesys_Device* dev, const Genesys_Sensor& sensor) const override; 63 64 void offset_calibration(Genesys_Device* dev, const Genesys_Sensor& sensor, 65 Genesys_Register_Set& regs) const override; 66 67 void coarse_gain_calibration(Genesys_Device* dev, const Genesys_Sensor& sensor, 68 Genesys_Register_Set& regs, int dpi) const override; 69 70 SensorExposure led_calibration(Genesys_Device* dev, const Genesys_Sensor& sensor, 71 Genesys_Register_Set& regs) const override; 72 73 void wait_for_motor_stop(Genesys_Device* dev) const override; 74 75 void move_back_home(Genesys_Device* dev, bool wait_until_home) const override; 76 77 void update_hardware_sensors(struct Genesys_Scanner* s) const override; 78 79 void update_home_sensor_gpio(Genesys_Device& dev) const override; 80 81 void load_document(Genesys_Device* dev) const override; 82 83 void detect_document_end(Genesys_Device* dev) const override; 84 85 void eject_document(Genesys_Device* dev) const override; 86 87 void send_shading_data(Genesys_Device* dev, const Genesys_Sensor& sensor, std::uint8_t* data, 88 int size) const override; 89 90 bool has_send_shading_data() const override 91 { 92 return false; 93 } 94 95 ScanSession calculate_scan_session(const Genesys_Device* dev, 96 const Genesys_Sensor& sensor, 97 const Genesys_Settings& settings) const override; 98 99 void asic_boot(Genesys_Device* dev, bool cold) const override; 100 }; 101 102 } // namespace gl646 103 } // namespace genesys 104 105 #endif // BACKEND_GENESYS_GL646_H 106