summaryrefslogtreecommitdiff
path: root/backend/genesys_gl841.h
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2019-07-31 17:00:20 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2019-07-31 17:00:20 +0200
commit3759ce55ba79b8d3b9d8ed247a252273ee7dade3 (patch)
treed69692a274dd1c7d0672e6bb7155a0fc106f9d49 /backend/genesys_gl841.h
parentc8bd2513ecba169cff44c09c8058c36987357b18 (diff)
parent1687222e1b9e74c89cafbb5910e72d8ec7bfd40f (diff)
Update upstream source from tag 'upstream/1.0.28'
Update to upstream version '1.0.28' with Debian dir ec5bb298266630fc3801ff6dc0c258f6df7ba979
Diffstat (limited to 'backend/genesys_gl841.h')
-rw-r--r--backend/genesys_gl841.h199
1 files changed, 4 insertions, 195 deletions
diff --git a/backend/genesys_gl841.h b/backend/genesys_gl841.h
index d1bd07e..3dbfc80 100644
--- a/backend/genesys_gl841.h
+++ b/backend/genesys_gl841.h
@@ -250,205 +250,14 @@
#define REG87_LEDADD 0x04
-enum
-{
- reg_0x01 = 0,
- reg_0x02,
- reg_0x03,
- reg_0x04,
- reg_0x05,
- reg_0x06,
- reg_0x07,
- reg_0x08,
- reg_0x09,
- reg_0x0a,
-
- reg_0x10,
- reg_0x11,
- reg_0x12,
- reg_0x13,
- reg_0x14,
- reg_0x15,
- reg_0x16,
- reg_0x17,
- reg_0x18,
- reg_0x19,
- reg_0x1a,
- reg_0x1b,
- reg_0x1c,
- reg_0x1d,
- reg_0x1e,
- reg_0x1f,
- reg_0x20,
- reg_0x21,
- reg_0x22,
- reg_0x23,
- reg_0x24,
- reg_0x25,
- reg_0x26,
- reg_0x27,
-
- reg_0x29,
-
- reg_0x2c,
- reg_0x2d,
- reg_0x2e,
- reg_0x2f,
- reg_0x30,
- reg_0x31,
- reg_0x32,
- reg_0x33,
- reg_0x34,
- reg_0x35,
- reg_0x36,
- reg_0x37,
- reg_0x38,
- reg_0x39,
-
- reg_0x3d,
- reg_0x3e,
- reg_0x3f,
-
- reg_0x52,
- reg_0x53,
- reg_0x54,
- reg_0x55,
- reg_0x56,
- reg_0x57,
- reg_0x58,
- reg_0x59,
- reg_0x5a,
-
- reg_0x5d,
- reg_0x5e,
- reg_0x5f,
- reg_0x60,
- reg_0x61,
- reg_0x62,
- reg_0x63,
- reg_0x64,
- reg_0x65,
- reg_0x66,
- reg_0x67,
- reg_0x68,
- reg_0x69,
- reg_0x6a,
- reg_0x6b,
- reg_0x6c,
- reg_0x6d,
- reg_0x6e,
- reg_0x6f,
- reg_0x70,
- reg_0x71,
- reg_0x72,
- reg_0x73,
- reg_0x74,
- reg_0x75,
- reg_0x76,
- reg_0x77,
- reg_0x78,
- reg_0x79,
- reg_0x7a,
- reg_0x7b,
- reg_0x7c,
- reg_0x7d,
- reg_0x7e,
- reg_0x7f,
- reg_0x80,
- reg_0x81,
- reg_0x82,
- reg_0x83,
- reg_0x84,
- reg_0x85,
- reg_0x86,
- reg_0x87,
- reg_0x88,
- reg_0x89,
- GENESYS_GL841_MAX_REGS
-};
-
-#define INITREG(adr,val) {dev->reg[index].address=adr;dev->reg[index].value=val;index++;}
+#define INITREG(adr,val) {dev->reg.init_reg(adr, val); }
/**
* prototypes declaration in case of unit testing
*/
-#ifdef UNIT_TESTING
-SANE_Status
-gl841_init_scan_regs (Genesys_Device * dev,
- Genesys_Register_Set * reg,
- float xres,
- float yres,
- float startx,
- float starty,
- float pixels,
- float lines,
- unsigned int depth,
- unsigned int channels,
- int color_filter,
- unsigned int flags);
-
-SANE_Status
-gl841_begin_scan (Genesys_Device * dev,
- Genesys_Register_Set * reg,
- SANE_Bool start_motor);
-
-SANE_Status
-gl841_end_scan (Genesys_Device * dev,
- Genesys_Register_Set __sane_unused__ * reg,
- SANE_Bool check_stop);
-
-SANE_Status
-gl841_slow_back_home (Genesys_Device * dev, SANE_Bool wait_until_home);
-
-SANE_Status
-sanei_gl841_repark_head (Genesys_Device * dev);
-
-SANE_Status
-gl841_feed (Genesys_Device * dev, int steps);
-
-SANE_Status
-gl841_init_motor_regs_scan(Genesys_Device * dev,
- Genesys_Register_Set * reg,
- unsigned int scan_exposure_time,
- float scan_yres,
- int scan_step_type,
- unsigned int scan_lines,
- unsigned int scan_dummy,
- unsigned int feed_steps,
- int scan_power_mode,
- unsigned int flags) ;
-
-SANE_Status
-gl841_stop_action (Genesys_Device * dev);
-
-SANE_Status
-gl841_start_action (Genesys_Device * dev);
-
-SANE_Status
-gl841_init_motor_regs(Genesys_Device * dev,
- Genesys_Register_Set * reg,
- unsigned int feed_steps,
- unsigned int action,
- unsigned int flags);
-
-SANE_Status gl841_send_slope_table (Genesys_Device * dev, int table_nr, uint16_t * slope_table, int steps);
-
-SANE_Status gl841_bulk_write_data_gamma (Genesys_Device * dev, uint8_t addr, uint8_t * data, size_t len);
-
-SANE_Status gl841_offset_calibration (Genesys_Device * dev);
-
-SANE_Status gl841_coarse_gain_calibration (Genesys_Device * dev, int dpi);
-
-SANE_Status gl841_led_calibration (Genesys_Device * dev);
-
-SANE_Status gl841_send_shading_data (Genesys_Device * dev, uint8_t * data, int size);
-
-int gl841_scan_step_type(Genesys_Device *dev, int yres);
-SANE_Status gl841_write_freq(Genesys_Device *dev, unsigned int ydpi);
-#endif
-
-GENESYS_STATIC
-int gl841_exposure_time(Genesys_Device *dev,
+
+static
+int gl841_exposure_time(Genesys_Device *dev, const Genesys_Sensor& sensor,
float slope_dpi,
int scan_step_type,
int start,