summaryrefslogtreecommitdiff
path: root/backend/genesys/gl124.h
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2020-08-24 18:44:51 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2020-08-24 18:44:51 +0200
commitad38bc6ecb80ddeb562841b33258dd53659b1da6 (patch)
treee02e9c3ff760554fd87f70df0e18b88594091a48 /backend/genesys/gl124.h
parent9c23ed018d72eed2554f4f9cff1ae6e6bb0cd479 (diff)
New upstream version 1.0.31upstream/1.0.31
Diffstat (limited to 'backend/genesys/gl124.h')
-rw-r--r--backend/genesys/gl124.h83
1 files changed, 3 insertions, 80 deletions
diff --git a/backend/genesys/gl124.h b/backend/genesys/gl124.h
index cdf8faf..ea7041e 100644
--- a/backend/genesys/gl124.h
+++ b/backend/genesys/gl124.h
@@ -45,74 +45,12 @@
#define BACKEND_GENESYS_GL124_H
#include "genesys.h"
-#include "command_set.h"
+#include "command_set_common.h"
namespace genesys {
namespace gl124 {
-typedef struct
-{
- uint8_t r31;
- uint8_t r32;
- uint8_t r33;
- uint8_t r34;
- uint8_t r35;
- uint8_t r36;
- uint8_t r38;
-} Gpio_layout;
-
-/** @brief gpio layout
- * describes initial gpio settings for a given model
- * registers 0x31 to 0x38
- */
-static Gpio_layout gpios[]={
- /* LiDE 110 */
- { /* 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x38 */
- 0x9f, 0x59, 0x01, 0x80, 0x5f, 0x01, 0x00
- },
- /* LiDE 210 */
- {
- 0x9f, 0x59, 0x01, 0x80, 0x5f, 0x01, 0x00
- },
- /* LiDE 120 */
- {
- 0x9f, 0x53, 0x01, 0x80, 0x5f, 0x01, 0x00
- },
-};
-
-typedef struct
-{
- uint8_t rd0;
- uint8_t rd1;
- uint8_t rd2;
- uint8_t re0;
- uint8_t re1;
- uint8_t re2;
- uint8_t re3;
- uint8_t re4;
- uint8_t re5;
- uint8_t re6;
- uint8_t re7;
-} Memory_layout;
-
-static Memory_layout layouts[]={
- /* LIDE 110, 120 */
- { /* 0xd0 0xd1 0xd2 */
- 0x0a, 0x15, 0x20,
- /* 0xe0 0xe1 0xe2 0xe3 0xe4 0xe5 0xe6 0xe7 */
- 0x00, 0xac, 0x08, 0x55, 0x08, 0x56, 0x0f, 0xff
- },
- /* LIDE 210, 220 */
- {
- 0x0a, 0x1f, 0x34,
- 0x01, 0x24, 0x08, 0x91, 0x08, 0x92, 0x0f, 0xff
- }
-};
-
-static void gl124_send_slope_table(Genesys_Device* dev, int table_nr,
- const std::vector<uint16_t>& slope_table, int steps);
-
-class CommandSetGl124 : public CommandSet
+class CommandSetGl124 : public CommandSetCommon
{
public:
~CommandSetGl124() override = default;
@@ -122,17 +60,11 @@ public:
void init(Genesys_Device* dev) const override;
void init_regs_for_warmup(Genesys_Device* dev, const Genesys_Sensor& sensor,
- Genesys_Register_Set* regs, int* channels,
- int* total_size) const override;
-
- void init_regs_for_coarse_calibration(Genesys_Device* dev, const Genesys_Sensor& sensor,
- Genesys_Register_Set& regs) const override;
+ Genesys_Register_Set* regs) const override;
void init_regs_for_shading(Genesys_Device* dev, const Genesys_Sensor& sensor,
Genesys_Register_Set& regs) const override;
- void init_regs_for_scan(Genesys_Device* dev, const Genesys_Sensor& sensor) const override;
-
void init_regs_for_scan_session(Genesys_Device* dev, const Genesys_Sensor& sensor,
Genesys_Register_Set* reg,
const ScanSession& session) const override;
@@ -148,8 +80,6 @@ public:
void send_gamma_table(Genesys_Device* dev, const Genesys_Sensor& sensor) const override;
- void search_start_position(Genesys_Device* dev) const override;
-
void offset_calibration(Genesys_Device* dev, const Genesys_Sensor& sensor,
Genesys_Register_Set& regs) const override;
@@ -165,8 +95,6 @@ public:
void update_hardware_sensors(struct Genesys_Scanner* s) const override;
- bool needs_update_home_sensor_gpio() const override { return true; }
-
void update_home_sensor_gpio(Genesys_Device& dev) const override;
void load_document(Genesys_Device* dev) const override;
@@ -175,11 +103,6 @@ public:
void eject_document(Genesys_Device* dev) const override;
- void search_strip(Genesys_Device* dev, const Genesys_Sensor& sensor,
- bool forward, bool black) const override;
-
- void move_to_ta(Genesys_Device* dev) const override;
-
void send_shading_data(Genesys_Device* dev, const Genesys_Sensor& sensor, uint8_t* data,
int size) const override;