2011-11-02 07:40:04 +00:00
|
|
|
/* sane - Scanner Access Now Easy.
|
|
|
|
|
2016-02-12 07:11:20 +00:00
|
|
|
Copyright (C) 2011-2013 Stéphane Voltz <stef.dev@free.fr>
|
2011-11-02 07:40:04 +00:00
|
|
|
|
|
|
|
This file is part of the SANE package.
|
2013-12-16 04:45:31 +00:00
|
|
|
|
2011-11-02 07:40:04 +00:00
|
|
|
This program is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU General Public License as
|
|
|
|
published by the Free Software Foundation; either version 2 of the
|
|
|
|
License, or (at your option) any later version.
|
2013-12-16 04:45:31 +00:00
|
|
|
|
2011-11-02 07:40:04 +00:00
|
|
|
This program is distributed in the hope that it will be useful, but
|
|
|
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
General Public License for more details.
|
2013-12-16 04:45:31 +00:00
|
|
|
|
2011-11-02 07:40:04 +00:00
|
|
|
You should have received a copy of the GNU General Public License
|
2021-02-12 08:41:38 +00:00
|
|
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
2011-11-02 07:40:04 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "genesys.h"
|
2020-01-12 08:57:04 +00:00
|
|
|
#include "command_set_common.h"
|
2011-11-02 07:40:04 +00:00
|
|
|
|
2019-09-16 08:36:02 +00:00
|
|
|
#ifndef BACKEND_GENESYS_GL841_H
|
|
|
|
#define BACKEND_GENESYS_GL841_H
|
|
|
|
|
2019-10-02 09:01:28 +00:00
|
|
|
namespace genesys {
|
2019-11-18 20:10:26 +00:00
|
|
|
namespace gl841 {
|
2019-10-02 09:01:28 +00:00
|
|
|
|
2020-01-12 08:57:04 +00:00
|
|
|
class CommandSetGl841 : public CommandSetCommon
|
2019-10-05 06:01:31 +00:00
|
|
|
{
|
|
|
|
public:
|
2019-10-01 05:18:44 +00:00
|
|
|
~CommandSetGl841() override = default;
|
2019-10-05 06:01:31 +00:00
|
|
|
|
|
|
|
bool needs_home_before_init_regs_for_scan(Genesys_Device* dev) const override;
|
|
|
|
|
|
|
|
void init(Genesys_Device* dev) const override;
|
|
|
|
|
|
|
|
void init_regs_for_warmup(Genesys_Device* dev, const Genesys_Sensor& sensor,
|
2020-04-09 20:57:04 +00:00
|
|
|
Genesys_Register_Set* regs) const override;
|
2019-10-05 06:01:31 +00:00
|
|
|
|
|
|
|
void init_regs_for_shading(Genesys_Device* dev, const Genesys_Sensor& sensor,
|
|
|
|
Genesys_Register_Set& regs) const override;
|
|
|
|
|
2019-11-30 17:06:51 +00:00
|
|
|
void init_regs_for_scan_session(Genesys_Device* dev, const Genesys_Sensor& sensor,
|
|
|
|
Genesys_Register_Set* reg,
|
|
|
|
const ScanSession& session) const override;
|
|
|
|
|
2021-12-26 14:09:17 +00:00
|
|
|
void set_fe(Genesys_Device* dev, const Genesys_Sensor& sensor, std::uint8_t set) const override;
|
2019-10-05 06:01:31 +00:00
|
|
|
void set_powersaving(Genesys_Device* dev, int delay) const override;
|
|
|
|
void save_power(Genesys_Device* dev, bool enable) const override;
|
|
|
|
|
|
|
|
void begin_scan(Genesys_Device* dev, const Genesys_Sensor& sensor,
|
|
|
|
Genesys_Register_Set* regs, bool start_motor) const override;
|
|
|
|
|
|
|
|
void end_scan(Genesys_Device* dev, Genesys_Register_Set* regs, bool check_stop) const override;
|
|
|
|
|
|
|
|
void send_gamma_table(Genesys_Device* dev, const Genesys_Sensor& sensor) const override;
|
|
|
|
|
|
|
|
void offset_calibration(Genesys_Device* dev, const Genesys_Sensor& sensor,
|
|
|
|
Genesys_Register_Set& regs) const override;
|
|
|
|
|
|
|
|
void coarse_gain_calibration(Genesys_Device* dev, const Genesys_Sensor& sensor,
|
|
|
|
Genesys_Register_Set& regs, int dpi) const override;
|
|
|
|
|
|
|
|
SensorExposure led_calibration(Genesys_Device* dev, const Genesys_Sensor& sensor,
|
|
|
|
Genesys_Register_Set& regs) const override;
|
|
|
|
|
|
|
|
void wait_for_motor_stop(Genesys_Device* dev) const override;
|
|
|
|
|
2019-12-14 08:20:16 +00:00
|
|
|
void move_back_home(Genesys_Device* dev, bool wait_until_home) const override;
|
2019-10-05 06:01:31 +00:00
|
|
|
|
|
|
|
void update_hardware_sensors(struct Genesys_Scanner* s) const override;
|
|
|
|
|
2020-04-19 21:35:56 +00:00
|
|
|
void update_home_sensor_gpio(Genesys_Device& dev) const override;
|
|
|
|
|
2019-10-05 06:01:31 +00:00
|
|
|
void load_document(Genesys_Device* dev) const override;
|
|
|
|
|
|
|
|
void detect_document_end(Genesys_Device* dev) const override;
|
|
|
|
|
|
|
|
void eject_document(Genesys_Device* dev) const override;
|
|
|
|
|
2021-12-26 14:09:17 +00:00
|
|
|
void send_shading_data(Genesys_Device* dev, const Genesys_Sensor& sensor, std::uint8_t* data,
|
2019-10-05 06:01:31 +00:00
|
|
|
int size) const override;
|
|
|
|
|
2019-11-10 08:32:06 +00:00
|
|
|
ScanSession calculate_scan_session(const Genesys_Device* dev,
|
|
|
|
const Genesys_Sensor& sensor,
|
|
|
|
const Genesys_Settings& settings) const override;
|
|
|
|
|
2019-10-05 06:01:31 +00:00
|
|
|
void asic_boot(Genesys_Device* dev, bool cold) const override;
|
|
|
|
};
|
|
|
|
|
2019-11-18 20:10:26 +00:00
|
|
|
} // namespace gl841
|
2019-10-02 09:01:28 +00:00
|
|
|
} // namespace genesys
|
|
|
|
|
2019-09-16 08:36:02 +00:00
|
|
|
#endif // BACKEND_GENESYS_GL841_H
|