summaryrefslogtreecommitdiff
path: root/backend/genesys/gl846.h
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2020-09-10 19:11:27 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2020-09-10 19:11:27 +0200
commit7e9455b3b15671ff99ed168638c405e2acedb6df (patch)
tree444e59ece236e09dc153f665e42160aeb0208c24 /backend/genesys/gl846.h
parentbc8a517abd2e11e1435f4ef042cfcc8648b62ef7 (diff)
parentbce41b3c37c2a68e7dab234ce0247755a61ceb40 (diff)
Merge branch 'release/debian/1.0.31-1_experimental1' into masterdebian/1.0.31-1_experimental1
Diffstat (limited to 'backend/genesys/gl846.h')
-rw-r--r--backend/genesys/gl846.h96
1 files changed, 3 insertions, 93 deletions
diff --git a/backend/genesys/gl846.h b/backend/genesys/gl846.h
index 258015a..f794a01 100644
--- a/backend/genesys/gl846.h
+++ b/backend/genesys/gl846.h
@@ -42,7 +42,7 @@
*/
#include "genesys.h"
-#include "command_set.h"
+#include "command_set_common.h"
#ifndef BACKEND_GENESYS_GL846_H
#define BACKEND_GENESYS_GL846_H
@@ -50,82 +50,7 @@
namespace genesys {
namespace gl846 {
-typedef struct
-{
- GpioId gpio_id;
- uint8_t r6b;
- uint8_t r6c;
- uint8_t r6d;
- uint8_t r6e;
- uint8_t r6f;
- uint8_t ra6;
- uint8_t ra7;
- uint8_t ra8;
- uint8_t ra9;
-} Gpio_Profile;
-
-static Gpio_Profile gpios[]={
- { GpioId::IMG101, 0x72, 0x1f, 0xa4, 0x13, 0xa7, 0x11, 0xff, 0x19, 0x05},
- { GpioId::PLUSTEK_OPTICBOOK_3800, 0x30, 0x01, 0x80, 0x2d, 0x80, 0x0c, 0x8f, 0x08, 0x04},
- { GpioId::UNKNOWN, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
-};
-
-typedef struct
-{
- const char *model;
- uint8_t dramsel;
- /* shading data address */
- uint8_t rd0;
- uint8_t rd1;
- uint8_t rd2;
- /* scanned data address */
- uint8_t rx[24];
-} Memory_layout;
-
-static Memory_layout layouts[]={
- /* Image formula 101 */
- {
- "canon-image-formula-101",
- 0x8b,
- 0x0a, 0x1b, 0x00,
- { /* RED ODD START / RED ODD END */
- 0x00, 0xb0, 0x05, 0xe7, /* [0x00b0, 0x05e7] 1336*4000w */
- /* RED EVEN START / RED EVEN END */
- 0x05, 0xe8, 0x0b, 0x1f, /* [0x05e8, 0x0b1f] */
- /* GREEN ODD START / GREEN ODD END */
- 0x0b, 0x20, 0x10, 0x57, /* [0x0b20, 0x1057] */
- /* GREEN EVEN START / GREEN EVEN END */
- 0x10, 0x58, 0x15, 0x8f, /* [0x1058, 0x158f] */
- /* BLUE ODD START / BLUE ODD END */
- 0x15, 0x90, 0x1a, 0xc7, /* [0x1590,0x1ac7] */
- /* BLUE EVEN START / BLUE EVEN END */
- 0x1a, 0xc8, 0x1f, 0xff /* [0x1ac8,0x1fff] */
- }
- },
- /* OpticBook 3800 */
- {
- "plustek-opticbook-3800",
- 0x2a,
- 0x0a, 0x0a, 0x0a,
- { /* RED ODD START / RED ODD END */
- 0x00, 0x68, 0x03, 0x00,
- /* RED EVEN START / RED EVEN END */
- 0x03, 0x01, 0x05, 0x99,
- /* GREEN ODD START / GREEN ODD END */
- 0x05, 0x9a, 0x08, 0x32,
- /* GREEN EVEN START / GREEN EVEN END */
- 0x08, 0x33, 0x0a, 0xcb,
- /* BLUE ODD START / BLUE ODD END */
- 0x0a, 0xcc, 0x0d, 0x64,
- /* BLUE EVEN START / BLUE EVEN END */
- 0x0d, 0x65, 0x0f, 0xfd
- }
- },
- /* list terminating entry */
- { nullptr, 0, 0, 0, 0, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} }
-};
-
-class CommandSetGl846 : public CommandSet
+class CommandSetGl846 : public CommandSetCommon
{
public:
~CommandSetGl846() override = default;
@@ -135,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;
@@ -161,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;
@@ -178,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;
@@ -188,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;