diff --git a/backend/genesys.cc b/backend/genesys.cc index b8f43e3eb..6d34c72fe 100644 --- a/backend/genesys.cc +++ b/backend/genesys.cc @@ -262,7 +262,7 @@ sanei_genesys_init_structs (Genesys_Device * dev) /* initialize the GPO data stuff */ for (const auto& gpo : *s_gpo) { - if (dev->model->gpo_type == gpo.gpo_id) { + if (dev->model->gpio_id == gpo.id) { dev->gpo = gpo; gpo_ok = true; break; @@ -290,7 +290,8 @@ sanei_genesys_init_structs (Genesys_Device * dev) if (!motor_ok || !gpo_ok || !fe_ok) { throw SaneException("bad description(s) for fe/gpo/motor=%d/%d/%d\n", static_cast(dev->model->sensor_id), - dev->model->gpo_type, dev->model->motor_type); + static_cast(dev->model->gpio_id), + dev->model->motor_type); } /* set up initial line distance shift */ diff --git a/backend/genesys_device.h b/backend/genesys_device.h index 960d67e29..960258627 100644 --- a/backend/genesys_device.h +++ b/backend/genesys_device.h @@ -61,7 +61,7 @@ struct Genesys_Gpo Genesys_Gpo() = default; // Genesys_Gpo - uint8_t gpo_id = 0; + GpioId id = GpioId::UNKNOWN; /* GL646 and possibly others: - have the value registers at 0x66 and 0x67 @@ -168,7 +168,7 @@ struct Genesys_Model // Analog-Digital converter type AdcId adc_id = AdcId::UNKNOWN; // General purpose output type - SANE_Int gpo_type = 0; + GpioId gpio_id = GpioId::UNKNOWN; // stepper motor type SANE_Int motor_type = 0; diff --git a/backend/genesys_enums.h b/backend/genesys_enums.h index bc8531286..4c7772117 100644 --- a/backend/genesys_enums.h +++ b/backend/genesys_enums.h @@ -259,36 +259,37 @@ inline void serialize(std::ostream& str, AdcId& x) serialize(str, value); } -enum Genesys_Gpo_Type +enum class GpioId : unsigned { - GPO_UMAX, - GPO_ST12, - GPO_ST24, - GPO_5345, - GPO_HP2400, - GPO_HP2300, - GPO_CANONLIDE35, - GPO_XP200, - GPO_XP300, - GPO_HP3670, - GPO_DP665, - GPO_DP685, - GPO_CANONLIDE200, - GPO_KVSS080, - GPO_G4050, - GPO_CANONLIDE110, - GPO_PLUSTEK_3600, - GPO_PLUSTEK_7200I, - GPO_CANONLIDE210, - GPO_HP_N6310, - GPO_CANONLIDE700, - GPO_CS4400F, - GPO_CS8400F, - GPO_CS8600F, - GPO_IMG101, - GPO_PLUSTEK3800, - GPO_CANONLIDE80, - GPO_CANONLIDE120 + UNKNOWN = 0, + CANONLIDE110, + CANONLIDE120, + CANONLIDE200, + CANONLIDE210, + CANONLIDE35, + CANONLIDE700, + CANONLIDE80, + CS4400F, + CS8400F, + CS8600F, + DP665, + DP685, + G4050, + HP2300, + HP2400, + HP3670, + HP_N6310, + IMG101, + KVSS080, + MD_5345, + PLUSTEK3800, + PLUSTEK_3600, + PLUSTEK_7200I, + ST12, + ST24, + UMAX, + XP200, + XP300, }; enum Genesys_Motor_Type diff --git a/backend/genesys_gl124.cc b/backend/genesys_gl124.cc index f129fe494..55ca70294 100644 --- a/backend/genesys_gl124.cc +++ b/backend/genesys_gl124.cc @@ -1193,8 +1193,7 @@ static void gl124_setup_scan_gpio(Genesys_Device* dev, int resolution) uint8_t val = dev->read_register(REG32); /* LiDE 110, 210 and 220 cases */ - if(dev->model->gpo_type != GPO_CANONLIDE120) - { + if(dev->model->gpio_id != GpioId::CANONLIDE120) { if(resolution>=dev->motor.base_ydpi/2) { val &= 0xf7; @@ -2624,8 +2623,8 @@ void CommandSetGl124::update_hardware_sensors(Genesys_Scanner* s) const * add another per scanner button profile struct to avoid growing * hard-coded button mapping here. */ - if((s->dev->model->gpo_type == GPO_CANONLIDE110) - ||(s->dev->model->gpo_type == GPO_CANONLIDE120)) + if ((s->dev->model->gpio_id == GpioId::CANONLIDE110) || + (s->dev->model->gpio_id == GpioId::CANONLIDE120)) { s->buttons[BUTTON_SCAN_SW].write((val & 0x01) == 0); s->buttons[BUTTON_FILE_SW].write((val & 0x08) == 0); diff --git a/backend/genesys_gl646.cc b/backend/genesys_gl646.cc index a600b2cc3..d8c3899c9 100644 --- a/backend/genesys_gl646.cc +++ b/backend/genesys_gl646.cc @@ -3080,8 +3080,8 @@ void CommandSetGl646::init(Genesys_Device* dev) const /* MD6471/G2410 and XP200 read/write data from an undocumented memory area which * is after the second slope table */ - if (dev->model->gpo_type != GPO_HP3670 - && dev->model->gpo_type != GPO_HP2400) + if (dev->model->gpio_id != GpioId::HP3670 && + dev->model->gpio_id != GpioId::HP2400) { switch (sensor.optical_res) { @@ -3379,73 +3379,73 @@ void CommandSetGl646::update_hardware_sensors(Genesys_Scanner* session) const // scan button if (dev->model->buttons & GENESYS_HAS_SCAN_SW) { - switch (dev->model->gpo_type) { - case GPO_XP200: + switch (dev->model->gpio_id) { + case GpioId::XP200: session->buttons[BUTTON_SCAN_SW].write((value & 0x02) != 0); break; - case GPO_5345: + case GpioId::MD_5345: session->buttons[BUTTON_SCAN_SW].write(value == 0x16); break; - case GPO_HP2300: + case GpioId::HP2300: session->buttons[BUTTON_SCAN_SW].write(value == 0x6c); break; - case GPO_HP3670: - case GPO_HP2400: + case GpioId::HP3670: + case GpioId::HP2400: session->buttons[BUTTON_SCAN_SW].write((value & 0x20) == 0); break; - default: + default: throw SaneException(SANE_STATUS_UNSUPPORTED, "unknown gpo type"); } } // email button if (dev->model->buttons & GENESYS_HAS_EMAIL_SW) { - switch (dev->model->gpo_type) { - case GPO_5345: + switch (dev->model->gpio_id) { + case GpioId::MD_5345: session->buttons[BUTTON_EMAIL_SW].write(value == 0x12); break; - case GPO_HP3670: - case GPO_HP2400: + case GpioId::HP3670: + case GpioId::HP2400: session->buttons[BUTTON_EMAIL_SW].write((value & 0x08) == 0); break; - default: + default: throw SaneException(SANE_STATUS_UNSUPPORTED, "unknown gpo type"); } } // copy button if (dev->model->buttons & GENESYS_HAS_COPY_SW) { - switch (dev->model->gpo_type) { - case GPO_5345: + switch (dev->model->gpio_id) { + case GpioId::MD_5345: session->buttons[BUTTON_COPY_SW].write(value == 0x11); break; - case GPO_HP2300: + case GpioId::HP2300: session->buttons[BUTTON_COPY_SW].write(value == 0x5c); break; - case GPO_HP3670: - case GPO_HP2400: + case GpioId::HP3670: + case GpioId::HP2400: session->buttons[BUTTON_COPY_SW].write((value & 0x10) == 0); break; - default: + default: throw SaneException(SANE_STATUS_UNSUPPORTED, "unknown gpo type"); } } // power button if (dev->model->buttons & GENESYS_HAS_POWER_SW) { - switch (dev->model->gpo_type) { - case GPO_5345: + switch (dev->model->gpio_id) { + case GpioId::MD_5345: session->buttons[BUTTON_POWER_SW].write(value == 0x14); break; - default: + default: throw SaneException(SANE_STATUS_UNSUPPORTED, "unknown gpo type"); } } // ocr button if (dev->model->buttons & GENESYS_HAS_OCR_SW) { - switch (dev->model->gpo_type) { - case GPO_5345: + switch (dev->model->gpio_id) { + case GpioId::MD_5345: session->buttons[BUTTON_OCR_SW].write(value == 0x13); break; default: @@ -3455,11 +3455,11 @@ void CommandSetGl646::update_hardware_sensors(Genesys_Scanner* session) const // document detection if (dev->model->buttons & GENESYS_HAS_PAGE_LOADED_SW) { - switch (dev->model->gpo_type) { - case GPO_XP200: + switch (dev->model->gpio_id) { + case GpioId::XP200: session->buttons[BUTTON_PAGE_LOADED_SW].write((value & 0x04) != 0); break; - default: + default: throw SaneException(SANE_STATUS_UNSUPPORTED, "unknown gpo type"); } } @@ -3467,10 +3467,9 @@ void CommandSetGl646::update_hardware_sensors(Genesys_Scanner* session) const /* XPA detection */ if (dev->model->flags & GENESYS_FLAG_XPA) { - switch (dev->model->gpo_type) - { - case GPO_HP3670: - case GPO_HP2400: + switch (dev->model->gpio_id) { + case GpioId::HP3670: + case GpioId::HP2400: /* test if XPA is plugged-in */ if ((value & 0x40) == 0) { @@ -3482,8 +3481,8 @@ void CommandSetGl646::update_hardware_sensors(Genesys_Scanner* session) const DBG(DBG_io, "%s: disabling XPA\n", __func__); session->opt[OPT_SOURCE].cap |= SANE_CAP_INACTIVE; } - break; - default: + break; + default: throw SaneException(SANE_STATUS_UNSUPPORTED, "unknown gpo type"); } } diff --git a/backend/genesys_gl841.cc b/backend/genesys_gl841.cc index 68120232b..d1a99d220 100644 --- a/backend/genesys_gl841.cc +++ b/backend/genesys_gl841.cc @@ -651,19 +651,16 @@ gl841_init_registers (Genesys_Device * dev) } /* TODO there is a switch calling to be written here */ - if (dev->model->gpo_type == GPO_CANONLIDE35) - { + if (dev->model->gpio_id == GpioId::CANONLIDE35) { dev->reg.find_reg(0x6b).value |= REG6B_GPO18; dev->reg.find_reg(0x6b).value &= ~REG6B_GPO17; } - if (dev->model->gpo_type == GPO_XP300) - { + if (dev->model->gpio_id == GpioId::XP300) { dev->reg.find_reg(0x6b).value |= REG6B_GPO17; } - if (dev->model->gpo_type == GPO_DP685) - { + if (dev->model->gpio_id == GpioId::DP685) { /* REG6B_GPO18 lights on green led */ dev->reg.find_reg(0x6b).value |= REG6B_GPO17|REG6B_GPO18; } @@ -1218,8 +1215,8 @@ static void gl841_init_motor_regs_scan(Genesys_Device* dev, const Genesys_Sensor &fast_exposure); /* fast fed special cases handling */ - if (dev->model->gpo_type == GPO_XP300 - || dev->model->gpo_type == GPO_DP685) + if (dev->model->gpio_id == GpioId::XP300 + || dev->model->gpio_id == GpioId::DP685) { /* quirk: looks like at least this scanner is unable to use 2-feed mode */ @@ -1455,7 +1452,7 @@ static void gl841_init_optical_regs_scan(Genesys_Device* dev, const Genesys_Sens dev->cmd_set->set_fe(dev, sensor, AFE_SET); /* gpio part.*/ - if (dev->model->gpo_type == GPO_CANONLIDE35) + if (dev->model->gpio_id == GpioId::CANONLIDE35) { r = sanei_genesys_get_address (reg, REG6C); if (session.ccd_size_divisor > 1) { @@ -1464,7 +1461,7 @@ static void gl841_init_optical_regs_scan(Genesys_Device* dev, const Genesys_Sens r->value |= 0x80; } } - if (dev->model->gpo_type == GPO_CANONLIDE80) + if (dev->model->gpio_id == GpioId::CANONLIDE80) { r = sanei_genesys_get_address (reg, REG6C); if (session.ccd_size_divisor > 1) { @@ -1960,7 +1957,7 @@ void CommandSetGl841::save_power(Genesys_Device* dev, bool enable) const if (enable) { - if (dev->model->gpo_type == GPO_CANONLIDE35) + if (dev->model->gpio_id == GpioId::CANONLIDE35) { /* expect GPIO17 to be enabled, and GPIO9 to be disabled, while GPIO8 is disabled*/ @@ -1990,7 +1987,7 @@ void CommandSetGl841::save_power(Genesys_Device* dev, bool enable) const dev->write_register(REG6D, val & ~0x80); } - if (dev->model->gpo_type == GPO_DP685) + if (dev->model->gpio_id == GpioId::DP685) { uint8_t val = dev->read_register(REG6B); dev->write_register(REG6B, val & ~REG6B_GPO17); @@ -2003,7 +2000,7 @@ void CommandSetGl841::save_power(Genesys_Device* dev, bool enable) const } else { - if (dev->model->gpo_type == GPO_CANONLIDE35) + if (dev->model->gpio_id == GpioId::CANONLIDE35) { /* expect GPIO17 to be enabled, and GPIO9 to be disabled, while GPIO8 is disabled*/ @@ -2036,8 +2033,8 @@ void CommandSetGl841::save_power(Genesys_Device* dev, bool enable) const dev->calib_reg.find_reg(0x6b).value |= REG6B_GPO18; } - if (dev->model->gpo_type == GPO_DP665 - || dev->model->gpo_type == GPO_DP685) + if (dev->model->gpio_id == GpioId::DP665 + || dev->model->gpio_id == GpioId::DP685) { uint8_t val = dev->read_register(REG6B); dev->write_register(REG6B, val | REG6B_GPO17); @@ -2402,7 +2399,7 @@ void CommandSetGl841::begin_scan(Genesys_Device* dev, const Genesys_Sensor& sens Genesys_Register_Set local_reg(Genesys_Register_Set::SEQUENTIAL); uint8_t val; - if (dev->model->gpo_type == GPO_CANONLIDE80) { + if (dev->model->gpio_id == GpioId::CANONLIDE80) { val = dev->read_register(REG6B); val = REG6B_GPO18; dev->write_register(REG6B, val); @@ -2511,12 +2508,12 @@ void CommandSetGl841::slow_back_home(Genesys_Device* dev, bool wait_until_home) // reset gpio pin uint8_t val; - if (dev->model->gpo_type == GPO_CANONLIDE35) { + if (dev->model->gpio_id == GpioId::CANONLIDE35) { val = dev->read_register(REG6C); val = dev->gpo.regs.get_value(0x6c); dev->write_register(REG6C, val); } - if (dev->model->gpo_type == GPO_CANONLIDE80) { + if (dev->model->gpio_id == GpioId::CANONLIDE80) { val = dev->read_register(REG6B); val = REG6B_GPO18 | REG6B_GPO17; dev->write_register(REG6B, val); @@ -4004,8 +4001,8 @@ void CommandSetGl841::update_hardware_sensors(Genesys_Scanner* s) const */ uint8_t val; - if (s->dev->model->gpo_type == GPO_CANONLIDE35 - || s->dev->model->gpo_type == GPO_CANONLIDE80) + if (s->dev->model->gpio_id == GpioId::CANONLIDE35 + || s->dev->model->gpio_id == GpioId::CANONLIDE80) { val = s->dev->read_register(REG6D); s->buttons[BUTTON_SCAN_SW].write((val & 0x01) == 0); @@ -4014,9 +4011,9 @@ void CommandSetGl841::update_hardware_sensors(Genesys_Scanner* s) const s->buttons[BUTTON_COPY_SW].write((val & 0x08) == 0); } - if (s->dev->model->gpo_type == GPO_XP300 || - s->dev->model->gpo_type == GPO_DP665 || - s->dev->model->gpo_type == GPO_DP685) + if (s->dev->model->gpio_id == GpioId::XP300 || + s->dev->model->gpio_id == GpioId::DP665 || + s->dev->model->gpio_id == GpioId::DP685) { val = s->dev->read_register(REG6D); diff --git a/backend/genesys_gl843.cc b/backend/genesys_gl843.cc index 7dbdfd7c5..20a30ff11 100644 --- a/backend/genesys_gl843.cc +++ b/backend/genesys_gl843.cc @@ -1436,7 +1436,7 @@ void CommandSetGl843::save_power(Genesys_Device* dev, bool enable) const DBG_HELPER_ARGS(dbg, "enable = %d", enable); // switch KV-SS080 lamp off - if (dev->model->gpo_type == GPO_KVSS080) { + if (dev->model->gpio_id == GpioId::KVSS080) { uint8_t val = dev->read_register(REG6C); if (enable) { val &= 0xef; @@ -1785,16 +1785,15 @@ void CommandSetGl843::begin_scan(Genesys_Device* dev, const Genesys_Sensor& sens (void) sensor; /* set up GPIO for scan */ - switch(dev->model->gpo_type) - { + switch(dev->model->gpio_id) { /* KV case */ - case GPO_KVSS080: + case GpioId::KVSS080: dev->write_register(REGA9, 0x00); dev->write_register(REGA6, 0xf6); // blinking led dev->write_register(0x7e, 0x04); break; - case GPO_G4050: + case GpioId::G4050: dev->write_register(REGA7, 0xfe); dev->write_register(REGA8, 0x3e); dev->write_register(REGA9, 0x06); @@ -1817,9 +1816,9 @@ void CommandSetGl843::begin_scan(Genesys_Device* dev, const Genesys_Sensor& sens // blinking led dev->write_register(REG7E, 0x01); - break; - case GPO_CS8400F: - case GPO_CS8600F: + break; + case GpioId::CS8400F: + case GpioId::CS8600F: if (reg->state.is_xpa_on && reg->state.is_lamp_on) { gl843_set_xpa_lamp_power(dev, true); } @@ -1827,16 +1826,16 @@ void CommandSetGl843::begin_scan(Genesys_Device* dev, const Genesys_Sensor& sens dev->needs_home_ta = SANE_TRUE; gl843_set_xpa_motor_power(dev, true); } - break; - case GPO_PLUSTEK_7200I: { + break; + case GpioId::PLUSTEK_7200I: { if (reg->state.is_xpa_on && reg->state.is_lamp_on) { gl843_set_xpa_lamp_power(dev, true); } break; } - case GPO_CS4400F: - default: - break; + case GpioId::CS4400F: + default: + break; } // clear scan and feed count @@ -3196,19 +3195,19 @@ void CommandSetGl843::update_hardware_sensors(Genesys_Scanner* s) const uint8_t val = s->dev->read_register(REG6D); - switch (s->dev->model->gpo_type) + switch (s->dev->model->gpio_id) { - case GPO_KVSS080: + case GpioId::KVSS080: s->buttons[BUTTON_SCAN_SW].write((val & 0x04) == 0); break; - case GPO_G4050: + case GpioId::G4050: s->buttons[BUTTON_SCAN_SW].write((val & 0x01) == 0); s->buttons[BUTTON_FILE_SW].write((val & 0x02) == 0); s->buttons[BUTTON_EMAIL_SW].write((val & 0x04) == 0); s->buttons[BUTTON_COPY_SW].write((val & 0x08) == 0); break; - case GPO_CS4400F: - case GPO_CS8400F: + case GpioId::CS4400F: + case GpioId::CS8400F: default: break; } diff --git a/backend/genesys_gl846.cc b/backend/genesys_gl846.cc index 26d365e75..1ded6b233 100644 --- a/backend/genesys_gl846.cc +++ b/backend/genesys_gl846.cc @@ -594,8 +594,7 @@ static void gl846_init_motor_regs_scan(Genesys_Device* dev, dev->write_register(REG6C, val); */ - if(dev->model->gpo_type==GPO_IMG101) - { + if(dev->model->gpio_id == GpioId::IMG101) { if (scan_yres == sensor.get_register_hwdpi(scan_yres)) { val=1; } @@ -1807,11 +1806,10 @@ static void gl846_init_gpio(Genesys_Device* dev) int idx=0; /* search GPIO profile */ - while(gpios[idx].sensor_id!=0 && dev->model->gpo_type!=gpios[idx].sensor_id) - { + while (gpios[idx].gpio_id != GpioId::UNKNOWN && dev->model->gpio_id != gpios[idx].gpio_id) { idx++; } - if(gpios[idx].sensor_id==0) + if (gpios[idx].gpio_id == GpioId::UNKNOWN) { throw SaneException("failed to find GPIO profile for sensor_id=%d", static_cast(dev->model->sensor_id)); @@ -1950,7 +1948,7 @@ void CommandSetGl846::update_hardware_sensors(Genesys_Scanner* s) const */ uint8_t val; uint8_t scan, file, email, copy; - switch(s->dev->model->gpo_type) + switch(s->dev->model->gpio_id) { default: scan=0x01; diff --git a/backend/genesys_gl846.h b/backend/genesys_gl846.h index 11f644fbd..89d885227 100644 --- a/backend/genesys_gl846.h +++ b/backend/genesys_gl846.h @@ -59,7 +59,7 @@ static void gl846_stop_action(Genesys_Device* dev); typedef struct { - uint8_t sensor_id; + GpioId gpio_id; uint8_t r6b; uint8_t r6c; uint8_t r6d; @@ -72,9 +72,9 @@ typedef struct } Gpio_Profile; static Gpio_Profile gpios[]={ - { GPO_IMG101, 0x72, 0x1f, 0xa4, 0x13, 0xa7, 0x11, 0xff, 0x19, 0x05}, - { GPO_PLUSTEK3800, 0x30, 0x01, 0x80, 0x2d, 0x80, 0x0c, 0x8f, 0x08, 0x04}, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { GpioId::IMG101, 0x72, 0x1f, 0xa4, 0x13, 0xa7, 0x11, 0xff, 0x19, 0x05}, + { GpioId::PLUSTEK3800, 0x30, 0x01, 0x80, 0x2d, 0x80, 0x0c, 0x8f, 0x08, 0x04}, + { GpioId::UNKNOWN, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, }; typedef struct diff --git a/backend/genesys_gl847.cc b/backend/genesys_gl847.cc index 972ea5e28..8f36723ce 100644 --- a/backend/genesys_gl847.cc +++ b/backend/genesys_gl847.cc @@ -423,7 +423,7 @@ static void gl847_homsnr_gpio(Genesys_Device* dev) DBG_HELPER(dbg); uint8_t val; - if (dev->model->gpo_type == GPO_CANONLIDE700) { + if (dev->model->gpio_id == GpioId::CANONLIDE700) { val = dev->read_register(REG6C); val &= ~REG6C_GPIO10; dev->write_register(REG6C, val); @@ -1073,7 +1073,7 @@ void CommandSetGl847::begin_scan(Genesys_Device* dev, const Genesys_Sensor& sens GenesysRegister *r; // clear GPIO 10 - if (dev->model->gpo_type != GPO_CANONLIDE700) { + if (dev->model->gpio_id != GpioId::CANONLIDE700) { val = dev->read_register(REG6C); val &= ~REG6C_GPIO10; dev->write_register(REG6C, val); @@ -1853,12 +1853,10 @@ static void gl847_init_gpio(Genesys_Device* dev) int idx=0; /* search GPIO profile */ - while(gpios[idx].sensor_id!=0 && dev->model->gpo_type!=gpios[idx].sensor_id) - { + while(gpios[idx].gpio_id != GpioId::UNKNOWN && dev->model->gpio_id != gpios[idx].gpio_id) { idx++; } - if(gpios[idx].sensor_id==0) - { + if (gpios[idx].gpio_id == GpioId::UNKNOWN) { throw SaneException("failed to find GPIO profile for sensor_id=%d", static_cast(dev->model->sensor_id)); } @@ -2028,15 +2026,14 @@ void CommandSetGl847::update_hardware_sensors(Genesys_Scanner* s) const */ uint8_t val; uint8_t scan, file, email, copy; - switch(s->dev->model->gpo_type) - { - case GPO_CANONLIDE700: + switch(s->dev->model->gpio_id) { + case GpioId::CANONLIDE700: scan=0x04; file=0x02; email=0x01; copy=0x08; break; - default: + default: scan=0x01; file=0x02; email=0x04; diff --git a/backend/genesys_gl847.h b/backend/genesys_gl847.h index b0ea743ab..565ba59d6 100644 --- a/backend/genesys_gl847.h +++ b/backend/genesys_gl847.h @@ -55,7 +55,7 @@ static void gl847_feed(Genesys_Device* dev, unsigned int steps); typedef struct { - uint8_t sensor_id; + GpioId gpio_id; uint8_t r6b; uint8_t r6c; uint8_t r6d; @@ -68,9 +68,9 @@ typedef struct } Gpio_Profile; static Gpio_Profile gpios[]={ - { GPO_CANONLIDE200, 0x02, 0xf9, 0x20, 0xff, 0x00, 0x04, 0x04, 0x00, 0x00}, - { GPO_CANONLIDE700, 0x06, 0xdb, 0xff, 0xff, 0x80, 0x15, 0x07, 0x20, 0x10}, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { GpioId::CANONLIDE200, 0x02, 0xf9, 0x20, 0xff, 0x00, 0x04, 0x04, 0x00, 0x00}, + { GpioId::CANONLIDE700, 0x06, 0xdb, 0xff, 0xff, 0x80, 0x15, 0x07, 0x20, 0x10}, + { GpioId::UNKNOWN, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, }; typedef struct diff --git a/backend/genesys_tables_gpo.cc b/backend/genesys_tables_gpo.cc index dfbfdbd17..29f7ca932 100644 --- a/backend/genesys_tables_gpo.cc +++ b/backend/genesys_tables_gpo.cc @@ -52,7 +52,7 @@ void genesys_init_gpo_tables() s_gpo.init(); Genesys_Gpo gpo; - gpo.gpo_id = GPO_UMAX; + gpo.id = GpioId::UMAX; gpo.regs = { { 0x66, 0x11 }, { 0x67, 0x00 }, @@ -63,7 +63,7 @@ void genesys_init_gpo_tables() gpo = Genesys_Gpo(); - gpo.gpo_id = GPO_ST12; + gpo.id = GpioId::ST12; gpo.regs = { { 0x66, 0x11 }, { 0x67, 0x00 }, @@ -74,7 +74,7 @@ void genesys_init_gpo_tables() gpo = Genesys_Gpo(); - gpo.gpo_id = GPO_ST24; + gpo.id = GpioId::ST24; gpo.regs = { { 0x66, 0x00 }, { 0x67, 0x00 }, @@ -85,7 +85,7 @@ void genesys_init_gpo_tables() gpo = Genesys_Gpo(); - gpo.gpo_id = GPO_5345; // bits 11-12 are for bipolar V-ref input voltage + gpo.id = GpioId::MD_5345; // bits 11-12 are for bipolar V-ref input voltage gpo.regs = { { 0x66, 0x30 }, { 0x67, 0x18 }, @@ -96,7 +96,7 @@ void genesys_init_gpo_tables() gpo = Genesys_Gpo(); - gpo.gpo_id = GPO_HP2400; + gpo.id = GpioId::HP2400; gpo.regs = { { 0x66, 0x30 }, { 0x67, 0x00 }, @@ -107,7 +107,7 @@ void genesys_init_gpo_tables() gpo = Genesys_Gpo(); - gpo.gpo_id = GPO_HP2300; + gpo.id = GpioId::HP2300; gpo.regs = { { 0x66, 0x00 }, { 0x67, 0x00 }, @@ -118,7 +118,7 @@ void genesys_init_gpo_tables() gpo = Genesys_Gpo(); - gpo.gpo_id = GPO_CANONLIDE35; + gpo.id = GpioId::CANONLIDE35; gpo.regs = { { 0x6c, 0x02 }, { 0x6d, 0x80 }, @@ -129,7 +129,7 @@ void genesys_init_gpo_tables() gpo = Genesys_Gpo(); - gpo.gpo_id = GPO_XP200; + gpo.id = GpioId::XP200; gpo.regs = { { 0x66, 0x30 }, { 0x67, 0x00 }, @@ -140,7 +140,7 @@ void genesys_init_gpo_tables() gpo = Genesys_Gpo(); - gpo.gpo_id = GPO_HP3670; + gpo.id = GpioId::HP3670; gpo.regs = { { 0x66, 0x00 }, { 0x67, 0x00 }, @@ -151,7 +151,7 @@ void genesys_init_gpo_tables() gpo = Genesys_Gpo(); - gpo.gpo_id = GPO_XP300; + gpo.id = GpioId::XP300; gpo.regs = { { 0x6c, 0x09 }, { 0x6d, 0xc6 }, @@ -162,7 +162,7 @@ void genesys_init_gpo_tables() gpo = Genesys_Gpo(); - gpo.gpo_id = GPO_DP665; + gpo.id = GpioId::DP665; gpo.regs = { { 0x6c, 0x18 }, { 0x6d, 0x00 }, @@ -173,7 +173,7 @@ void genesys_init_gpo_tables() gpo = Genesys_Gpo(); - gpo.gpo_id = GPO_DP685; + gpo.id = GpioId::DP685; gpo.regs = { { 0x6c, 0x3f }, { 0x6d, 0x46 }, @@ -184,7 +184,7 @@ void genesys_init_gpo_tables() gpo = Genesys_Gpo(); - gpo.gpo_id = GPO_CANONLIDE200; + gpo.id = GpioId::CANONLIDE200; gpo.regs = { { 0x6c, 0xfb }, // 0xfb when idle , 0xf9/0xe9 (1200) when scanning { 0x6d, 0x20 }, @@ -195,7 +195,7 @@ void genesys_init_gpo_tables() gpo = Genesys_Gpo(); - gpo.gpo_id = GPO_CANONLIDE700; + gpo.id = GpioId::CANONLIDE700; gpo.regs = { { 0x6c, 0xdb }, { 0x6d, 0xff }, @@ -206,7 +206,7 @@ void genesys_init_gpo_tables() gpo = Genesys_Gpo(); - gpo.gpo_id = GPO_KVSS080; + gpo.id = GpioId::KVSS080; gpo.regs = { { 0x6c, 0xf5 }, { 0x6d, 0x20 }, @@ -221,7 +221,7 @@ void genesys_init_gpo_tables() gpo = Genesys_Gpo(); - gpo.gpo_id = GPO_G4050; + gpo.id = GpioId::G4050; gpo.regs = { { 0x6c, 0x20 }, { 0x6d, 0x00 }, @@ -236,7 +236,7 @@ void genesys_init_gpo_tables() gpo = Genesys_Gpo(); - gpo.gpo_id = GPO_HP_N6310; + gpo.id = GpioId::HP_N6310; gpo.regs = { { 0x6c, 0xa3 }, { 0x6d, 0x00 }, @@ -247,7 +247,7 @@ void genesys_init_gpo_tables() gpo = Genesys_Gpo(); - gpo.gpo_id = GPO_CANONLIDE110; + gpo.id = GpioId::CANONLIDE110; gpo.regs = { { 0x6c, 0xfb }, { 0x6d, 0x20 }, @@ -258,7 +258,7 @@ void genesys_init_gpo_tables() gpo = Genesys_Gpo(); - gpo.gpo_id = GPO_CANONLIDE120; + gpo.id = GpioId::CANONLIDE120; gpo.regs = { { 0x6c, 0xfb }, { 0x6d, 0x20 }, @@ -269,7 +269,7 @@ void genesys_init_gpo_tables() gpo = Genesys_Gpo(); - gpo.gpo_id = GPO_CANONLIDE210; + gpo.id = GpioId::CANONLIDE210; gpo.regs = { { 0x6c, 0xfb }, { 0x6d, 0x20 }, @@ -280,7 +280,7 @@ void genesys_init_gpo_tables() gpo = Genesys_Gpo(); - gpo.gpo_id = GPO_PLUSTEK_3600; + gpo.id = GpioId::PLUSTEK_3600; gpo.regs = { { 0x6c, 0x02 }, { 0x6d, 0x00 }, @@ -291,7 +291,7 @@ void genesys_init_gpo_tables() gpo = Genesys_Gpo(); - gpo.gpo_id = GPO_PLUSTEK_7200I; + gpo.id = GpioId::PLUSTEK_7200I; gpo.regs = { { 0x6c, 0x4c }, { 0x6d, 0x80 }, @@ -306,7 +306,7 @@ void genesys_init_gpo_tables() gpo = Genesys_Gpo(); - gpo.gpo_id = GPO_CS4400F; + gpo.id = GpioId::CS4400F; gpo.regs = { { 0x6c, 0x01 }, { 0x6d, 0x7f }, @@ -321,7 +321,7 @@ void genesys_init_gpo_tables() gpo = Genesys_Gpo(); - gpo.gpo_id = GPO_CS8400F; + gpo.id = GpioId::CS8400F; gpo.regs = { { 0x6c, 0x9a }, { 0x6d, 0xdf }, @@ -336,7 +336,7 @@ void genesys_init_gpo_tables() gpo = Genesys_Gpo(); - gpo.gpo_id = GPO_CS8600F; + gpo.id = GpioId::CS8600F; gpo.regs = { { 0x6c, 0x20 }, { 0x6d, 0x7c }, @@ -351,7 +351,7 @@ void genesys_init_gpo_tables() gpo = Genesys_Gpo(); - gpo.gpo_id = GPO_IMG101; + gpo.id = GpioId::IMG101; gpo.regs = { { 0x6c, 0x41 }, { 0x6d, 0xa4 }, @@ -362,7 +362,7 @@ void genesys_init_gpo_tables() gpo = Genesys_Gpo(); - gpo.gpo_id = GPO_PLUSTEK3800; + gpo.id = GpioId::PLUSTEK3800; gpo.regs = { { 0x6c, 0x41 }, { 0x6d, 0xa4 }, @@ -373,7 +373,7 @@ void genesys_init_gpo_tables() gpo = Genesys_Gpo(); - gpo.gpo_id = GPO_CANONLIDE80; + gpo.id = GpioId::CANONLIDE80; gpo.regs = { { 0x6c, 0x28 }, { 0x6d, 0x90 }, diff --git a/backend/genesys_tables_model.cc b/backend/genesys_tables_model.cc index d5a0cd816..2e9bda6bb 100644 --- a/backend/genesys_tables_model.cc +++ b/backend/genesys_tables_model.cc @@ -103,7 +103,7 @@ void genesys_init_usb_device_tables() model.is_sheetfed = SANE_FALSE; model.sensor_id = SensorId::CCD_UMAX; model.adc_id = AdcId::WOLFSON_UMAX; - model.gpo_type = GPO_UMAX; + model.gpio_id = GpioId::UMAX; model.motor_type = MOTOR_UMAX; model.flags = GENESYS_FLAG_UNTESTED; model.buttons = GENESYS_HAS_NO_BUTTONS; @@ -155,7 +155,7 @@ void genesys_init_usb_device_tables() model.is_sheetfed = SANE_FALSE; model.sensor_id = SensorId::CCD_CANONLIDE35; model.adc_id = AdcId::CANONLIDE35; - model.gpo_type = GPO_CANONLIDE35; + model.gpio_id = GpioId::CANONLIDE35; model.motor_type = MOTOR_CANONLIDE35; model.flags = GENESYS_FLAG_SKIP_WARMUP | GENESYS_FLAG_OFFSET_CALIBRATION | @@ -213,7 +213,7 @@ void genesys_init_usb_device_tables() model.is_sheetfed = SANE_FALSE; model.sensor_id = SensorId::CCD_KVSS080; model.adc_id = AdcId::KVSS080; - model.gpo_type = GPO_KVSS080; + model.gpio_id = GpioId::KVSS080; model.motor_type = MOTOR_KVSS080; model.flags = GENESYS_FLAG_SKIP_WARMUP | GENESYS_FLAG_OFFSET_CALIBRATION | @@ -267,7 +267,7 @@ void genesys_init_usb_device_tables() model.is_sheetfed = SANE_FALSE; model.sensor_id = SensorId::CCD_G4050; model.adc_id = AdcId::G4050; - model.gpo_type = GPO_G4050; + model.gpio_id = GpioId::G4050; model.motor_type = MOTOR_G4050; model.flags = GENESYS_FLAG_OFFSET_CALIBRATION | GENESYS_FLAG_STAGGERED_LINE | @@ -321,7 +321,7 @@ void genesys_init_usb_device_tables() model.is_sheetfed = SANE_FALSE; model.sensor_id = SensorId::CCD_G4050; model.adc_id = AdcId::G4050; - model.gpo_type = GPO_G4050; + model.gpio_id = GpioId::G4050; model.motor_type = MOTOR_G4050; model.flags = GENESYS_FLAG_OFFSET_CALIBRATION | GENESYS_FLAG_STAGGERED_LINE | @@ -377,7 +377,7 @@ void genesys_init_usb_device_tables() model.is_sheetfed = SANE_FALSE; model.sensor_id = SensorId::CCD_G4050; model.adc_id = AdcId::G4050; - model.gpo_type = GPO_G4050; + model.gpio_id = GpioId::G4050; model.motor_type = MOTOR_G4050; model.flags = GENESYS_FLAG_OFFSET_CALIBRATION | GENESYS_FLAG_STAGGERED_LINE | @@ -433,7 +433,7 @@ void genesys_init_usb_device_tables() model.is_sheetfed = SANE_FALSE; model.sensor_id = SensorId::CCD_CS4400F; model.adc_id = AdcId::G4050; - model.gpo_type = GPO_CS4400F; + model.gpio_id = GpioId::CS4400F; model.motor_type = MOTOR_G4050; model.flags = GENESYS_FLAG_NO_CALIBRATION | GENESYS_FLAG_OFFSET_CALIBRATION | @@ -491,7 +491,7 @@ void genesys_init_usb_device_tables() model.is_sheetfed = SANE_FALSE; model.sensor_id = SensorId::CCD_CS8400F; model.adc_id = AdcId::CS8400F; - model.gpo_type = GPO_CS8400F; + model.gpio_id = GpioId::CS8400F; model.motor_type = MOTOR_CS8400F; model.flags = GENESYS_FLAG_HAS_UTA | GENESYS_FLAG_HAS_UTA_INFRARED | @@ -551,7 +551,7 @@ void genesys_init_usb_device_tables() model.is_sheetfed = SANE_FALSE; model.sensor_id = SensorId::CCD_CS8600F; model.adc_id = AdcId::CS8600F; - model.gpo_type = GPO_CS8600F; + model.gpio_id = GpioId::CS8600F; model.motor_type = MOTOR_CS8600F; model.flags = GENESYS_FLAG_HAS_UTA | GENESYS_FLAG_HAS_UTA_INFRARED | @@ -611,7 +611,7 @@ void genesys_init_usb_device_tables() model.is_sheetfed = SANE_FALSE; model.sensor_id = SensorId::CIS_CANONLIDE100; model.adc_id = AdcId::CANONLIDE200; - model.gpo_type = GPO_CANONLIDE200; + model.gpio_id = GpioId::CANONLIDE200; model.motor_type = MOTOR_CANONLIDE100; model.flags = GENESYS_FLAG_SKIP_WARMUP | GENESYS_FLAG_SIS_SENSOR | @@ -670,7 +670,7 @@ void genesys_init_usb_device_tables() model.is_sheetfed = SANE_FALSE; model.sensor_id = SensorId::CIS_CANONLIDE110; model.adc_id = AdcId::CANONLIDE110; - model.gpo_type = GPO_CANONLIDE110; + model.gpio_id = GpioId::CANONLIDE110; model.motor_type = MOTOR_CANONLIDE110; model.flags = GENESYS_FLAG_SKIP_WARMUP | GENESYS_FLAG_OFFSET_CALIBRATION | @@ -727,7 +727,7 @@ void genesys_init_usb_device_tables() model.is_sheetfed = SANE_FALSE; model.sensor_id = SensorId::CIS_CANONLIDE120; model.adc_id = AdcId::CANONLIDE120; - model.gpo_type = GPO_CANONLIDE120; + model.gpio_id = GpioId::CANONLIDE120; model.motor_type = MOTOR_CANONLIDE120; model.flags = GENESYS_FLAG_SKIP_WARMUP | GENESYS_FLAG_OFFSET_CALIBRATION | @@ -786,7 +786,7 @@ void genesys_init_usb_device_tables() model.is_sheetfed = SANE_FALSE; model.sensor_id = SensorId::CIS_CANONLIDE210; model.adc_id = AdcId::CANONLIDE110; - model.gpo_type = GPO_CANONLIDE210; + model.gpio_id = GpioId::CANONLIDE210; model.motor_type = MOTOR_CANONLIDE210; model.flags = GENESYS_FLAG_SKIP_WARMUP | GENESYS_FLAG_OFFSET_CALIBRATION | @@ -845,7 +845,7 @@ void genesys_init_usb_device_tables() model.is_sheetfed = SANE_FALSE; model.sensor_id = SensorId::CIS_CANONLIDE220; model.adc_id = AdcId::CANONLIDE110; - model.gpo_type = GPO_CANONLIDE210; + model.gpio_id = GpioId::CANONLIDE210; model.motor_type = MOTOR_CANONLIDE210; model.flags = GENESYS_FLAG_SKIP_WARMUP | GENESYS_FLAG_OFFSET_CALIBRATION | @@ -905,7 +905,7 @@ void genesys_init_usb_device_tables() model.is_sheetfed = SANE_FALSE; model.sensor_id = SensorId::CIS_CANONLIDE200; model.adc_id = AdcId::CANONLIDE200; - model.gpo_type = GPO_CANONLIDE200; + model.gpio_id = GpioId::CANONLIDE200; model.motor_type = MOTOR_CANONLIDE200; model.flags = GENESYS_FLAG_UNTESTED | GENESYS_FLAG_SKIP_WARMUP | @@ -964,7 +964,7 @@ void genesys_init_usb_device_tables() model.is_sheetfed = SANE_FALSE; model.sensor_id = SensorId::CIS_CANONLIDE700; model.adc_id = AdcId::CANONLIDE700; - model.gpo_type = GPO_CANONLIDE700; + model.gpio_id = GpioId::CANONLIDE700; model.motor_type = MOTOR_CANONLIDE700; model.flags = GENESYS_FLAG_SKIP_WARMUP | GENESYS_FLAG_SIS_SENSOR | @@ -1023,7 +1023,7 @@ void genesys_init_usb_device_tables() model.is_sheetfed = SANE_FALSE; model.sensor_id = SensorId::CIS_CANONLIDE200; model.adc_id = AdcId::CANONLIDE200; - model.gpo_type = GPO_CANONLIDE200; + model.gpio_id = GpioId::CANONLIDE200; model.motor_type = MOTOR_CANONLIDE200; model.flags = GENESYS_FLAG_SKIP_WARMUP | GENESYS_FLAG_SIS_SENSOR | @@ -1082,7 +1082,7 @@ void genesys_init_usb_device_tables() model.is_sheetfed = SANE_FALSE; model.sensor_id = SensorId::CCD_CANONLIDE35; model.adc_id = AdcId::CANONLIDE35; - model.gpo_type = GPO_CANONLIDE35; + model.gpio_id = GpioId::CANONLIDE35; model.motor_type = MOTOR_CANONLIDE35; model.flags = GENESYS_FLAG_SKIP_WARMUP | GENESYS_FLAG_OFFSET_CALIBRATION | @@ -1140,7 +1140,7 @@ void genesys_init_usb_device_tables() model.is_sheetfed = SANE_FALSE; model.sensor_id = SensorId::CIS_CANONLIDE80; model.adc_id = AdcId::CANONLIDE80; - model.gpo_type = GPO_CANONLIDE80; + model.gpio_id = GpioId::CANONLIDE80; model.motor_type = MOTOR_CANONLIDE80; model.flags = GENESYS_FLAG_SKIP_WARMUP | GENESYS_FLAG_OFFSET_CALIBRATION | @@ -1200,7 +1200,7 @@ void genesys_init_usb_device_tables() model.is_sheetfed = SANE_FALSE; model.sensor_id = SensorId::CCD_HP2300; model.adc_id = AdcId::WOLFSON_HP2300; - model.gpo_type = GPO_HP2300; + model.gpio_id = GpioId::HP2300; model.motor_type = MOTOR_HP2300; model.flags = GENESYS_FLAG_14BIT_GAMMA | GENESYS_FLAG_SKIP_WARMUP | @@ -1257,7 +1257,7 @@ void genesys_init_usb_device_tables() model.is_sheetfed = SANE_FALSE; model.sensor_id = SensorId::CCD_HP2400; model.adc_id = AdcId::WOLFSON_HP2400; - model.gpo_type = GPO_HP2400; + model.gpio_id = GpioId::HP2400; model.motor_type = MOTOR_HP2400; model.flags = GENESYS_FLAG_14BIT_GAMMA | GENESYS_FLAG_DARK_CALIBRATION | @@ -1314,7 +1314,7 @@ void genesys_init_usb_device_tables() model.is_sheetfed = SANE_TRUE; model.sensor_id = SensorId::CIS_XP200; model.adc_id = AdcId::AD_XP200; - model.gpo_type = GPO_XP200; + model.gpio_id = GpioId::XP200; model.motor_type = MOTOR_XP200; model.flags = GENESYS_FLAG_14BIT_GAMMA | GENESYS_FLAG_CUSTOM_GAMMA | @@ -1370,7 +1370,7 @@ void genesys_init_usb_device_tables() model.is_sheetfed = SANE_FALSE; model.sensor_id = SensorId::CCD_HP3670; model.adc_id = AdcId::WOLFSON_HP3670; - model.gpo_type = GPO_HP3670; + model.gpio_id = GpioId::HP3670; model.motor_type = MOTOR_HP3670; model.flags = GENESYS_FLAG_14BIT_GAMMA | GENESYS_FLAG_XPA | @@ -1427,7 +1427,7 @@ void genesys_init_usb_device_tables() model.is_sheetfed = SANE_FALSE; model.sensor_id = SensorId::CCD_ST12; model.adc_id = AdcId::WOLFSON_ST12; - model.gpo_type = GPO_ST12; + model.gpio_id = GpioId::ST12; model.motor_type = MOTOR_UMAX; model.flags = GENESYS_FLAG_UNTESTED | GENESYS_FLAG_14BIT_GAMMA; model.buttons = GENESYS_HAS_NO_BUTTONS, @@ -1478,7 +1478,7 @@ void genesys_init_usb_device_tables() model.is_sheetfed = SANE_FALSE; model.sensor_id = SensorId::CCD_ST24; model.adc_id = AdcId::WOLFSON_ST24; - model.gpo_type = GPO_ST24; + model.gpio_id = GpioId::ST24; model.motor_type = MOTOR_ST24; model.flags = GENESYS_FLAG_UNTESTED | GENESYS_FLAG_14BIT_GAMMA | @@ -1532,7 +1532,7 @@ void genesys_init_usb_device_tables() model.is_sheetfed = SANE_FALSE; model.sensor_id = SensorId::CCD_5345; model.adc_id = AdcId::WOLFSON_5345; - model.gpo_type = GPO_5345; + model.gpio_id = GpioId::MD_5345; model.motor_type = MOTOR_5345; model.flags = GENESYS_FLAG_14BIT_GAMMA | GENESYS_FLAG_SEARCH_START | @@ -1593,7 +1593,7 @@ void genesys_init_usb_device_tables() model.is_sheetfed = SANE_TRUE; model.sensor_id = SensorId::CCD_XP300; model.adc_id = AdcId::WOLFSON_XP300; - model.gpo_type = GPO_XP300; + model.gpio_id = GpioId::XP300; model.motor_type = MOTOR_XP300; model.flags = GENESYS_FLAG_SKIP_WARMUP | GENESYS_FLAG_OFFSET_CALIBRATION | @@ -1647,7 +1647,7 @@ void genesys_init_usb_device_tables() model.is_sheetfed = SANE_TRUE; model.sensor_id = SensorId::CCD_DP665; model.adc_id = AdcId::WOLFSON_XP300; - model.gpo_type = GPO_DP665; + model.gpio_id = GpioId::DP665; model.motor_type = MOTOR_DP665; model.flags = GENESYS_FLAG_SKIP_WARMUP | GENESYS_FLAG_OFFSET_CALIBRATION | @@ -1701,7 +1701,7 @@ void genesys_init_usb_device_tables() model.is_sheetfed = SANE_TRUE; model.sensor_id = SensorId::CCD_ROADWARRIOR; model.adc_id = AdcId::WOLFSON_XP300; - model.gpo_type = GPO_DP665; + model.gpio_id = GpioId::DP665; model.motor_type = MOTOR_ROADWARRIOR; model.flags = GENESYS_FLAG_SKIP_WARMUP | GENESYS_FLAG_OFFSET_CALIBRATION | @@ -1755,7 +1755,7 @@ void genesys_init_usb_device_tables() model.is_sheetfed = SANE_TRUE; model.sensor_id = SensorId::CCD_ROADWARRIOR; model.adc_id = AdcId::WOLFSON_XP300; - model.gpo_type = GPO_DP665; + model.gpio_id = GpioId::DP665; model.motor_type = MOTOR_ROADWARRIOR; model.flags = GENESYS_FLAG_SKIP_WARMUP | GENESYS_FLAG_NO_CALIBRATION | @@ -1810,7 +1810,7 @@ void genesys_init_usb_device_tables() model.is_sheetfed = SANE_TRUE; model.sensor_id = SensorId::CCD_ROADWARRIOR; model.adc_id = AdcId::WOLFSON_XP300; - model.gpo_type = GPO_DP665; + model.gpio_id = GpioId::DP665; model.motor_type = MOTOR_ROADWARRIOR; model.flags = GENESYS_FLAG_SKIP_WARMUP | GENESYS_FLAG_OFFSET_CALIBRATION | @@ -1864,7 +1864,7 @@ void genesys_init_usb_device_tables() model.is_sheetfed = SANE_TRUE; model.sensor_id = SensorId::CCD_DSMOBILE600; model.adc_id = AdcId::WOLFSON_DSM600; - model.gpo_type = GPO_DP665; + model.gpio_id = GpioId::DP665; model.motor_type = MOTOR_DSMOBILE_600; model.flags = GENESYS_FLAG_SKIP_WARMUP | GENESYS_FLAG_OFFSET_CALIBRATION | @@ -1919,7 +1919,7 @@ void genesys_init_usb_device_tables() model.is_sheetfed = SANE_TRUE; model.sensor_id = SensorId::CCD_DSMOBILE600; model.adc_id = AdcId::WOLFSON_DSM600; - model.gpo_type = GPO_DP665; + model.gpio_id = GpioId::DP665; model.motor_type = MOTOR_DSMOBILE_600; model.flags = GENESYS_FLAG_SKIP_WARMUP | GENESYS_FLAG_OFFSET_CALIBRATION | @@ -1973,7 +1973,7 @@ void genesys_init_usb_device_tables() model.is_sheetfed = SANE_TRUE; model.sensor_id = SensorId::CCD_DP685; model.adc_id = AdcId::WOLFSON_DSM600; - model.gpo_type = GPO_DP685; + model.gpio_id = GpioId::DP685; model.motor_type = MOTOR_XP300; model.flags = GENESYS_FLAG_SKIP_WARMUP | GENESYS_FLAG_OFFSET_CALIBRATION | @@ -2029,7 +2029,7 @@ void genesys_init_usb_device_tables() model.is_sheetfed = SANE_TRUE; model.sensor_id = SensorId::CCD_XP300; model.adc_id = AdcId::WOLFSON_XP300; - model.gpo_type = GPO_XP300; + model.gpio_id = GpioId::XP300; model.motor_type = MOTOR_XP300; model.flags = GENESYS_FLAG_SKIP_WARMUP | GENESYS_FLAG_OFFSET_CALIBRATION | @@ -2084,7 +2084,7 @@ void genesys_init_usb_device_tables() model.is_sheetfed = SANE_TRUE; model.sensor_id = SensorId::CCD_XP300; model.adc_id = AdcId::WOLFSON_XP300; - model.gpo_type = GPO_XP300; + model.gpio_id = GpioId::XP300; model.motor_type = MOTOR_XP300; model.flags = GENESYS_FLAG_SKIP_WARMUP | GENESYS_FLAG_OFFSET_CALIBRATION | @@ -2139,7 +2139,7 @@ void genesys_init_usb_device_tables() model.is_sheetfed = SANE_FALSE; model.sensor_id = SensorId::CCD_5345; model.adc_id = AdcId::WOLFSON_5345; - model.gpo_type = GPO_5345; + model.gpio_id = GpioId::MD_5345; model.motor_type = MOTOR_5345; model.flags = GENESYS_FLAG_14BIT_GAMMA | GENESYS_FLAG_SEARCH_START | @@ -2199,7 +2199,7 @@ void genesys_init_usb_device_tables() model.is_sheetfed = SANE_FALSE; model.sensor_id = SensorId::CCD_5345; model.adc_id = AdcId::WOLFSON_5345; - model.gpo_type = GPO_5345; + model.gpio_id = GpioId::MD_5345; model.motor_type = MOTOR_5345; model.flags = GENESYS_FLAG_14BIT_GAMMA | GENESYS_FLAG_SEARCH_START | @@ -2260,7 +2260,7 @@ void genesys_init_usb_device_tables() model.is_sheetfed = SANE_TRUE; model.sensor_id = SensorId::CCD_ROADWARRIOR; model.adc_id = AdcId::WOLFSON_XP300; - model.gpo_type = GPO_DP665; + model.gpio_id = GpioId::DP665; model.motor_type = MOTOR_ROADWARRIOR; model.flags = GENESYS_FLAG_SKIP_WARMUP | GENESYS_FLAG_OFFSET_CALIBRATION | @@ -2314,7 +2314,7 @@ void genesys_init_usb_device_tables() model.is_sheetfed = SANE_FALSE; model.sensor_id = SensorId::CCD_PLUSTEK_3600; model.adc_id = AdcId::PLUSTEK_3600; - model.gpo_type = GPO_PLUSTEK_3600; + model.gpio_id = GpioId::PLUSTEK_3600; model.motor_type = MOTOR_PLUSTEK_3600; model.flags = GENESYS_FLAG_UNTESTED | // not fully working yet GENESYS_FLAG_CUSTOM_GAMMA | @@ -2369,7 +2369,7 @@ void genesys_init_usb_device_tables() model.sensor_id = SensorId::CCD_PLUSTEK_7200I; model.adc_id = AdcId::PLUSTEK_7200I; - model.gpo_type = GPO_PLUSTEK_7200I; + model.gpio_id = GpioId::PLUSTEK_7200I; model.motor_type = MOTOR_PLUSTEK_7200I; model.flags = GENESYS_FLAG_HAS_UTA | @@ -2431,7 +2431,7 @@ void genesys_init_usb_device_tables() model.is_sheetfed = SANE_FALSE; model.sensor_id = SensorId::CCD_HP_N6310; model.adc_id = AdcId::CANONLIDE200; // Not defined yet for N6310 - model.gpo_type = GPO_HP_N6310; + model.gpio_id = GpioId::HP_N6310; model.motor_type = MOTOR_CANONLIDE200, // Not defined yet for N6310 model.flags = GENESYS_FLAG_UNTESTED | GENESYS_FLAG_14BIT_GAMMA | @@ -2490,7 +2490,7 @@ void genesys_init_usb_device_tables() model.is_sheetfed = SANE_FALSE; model.sensor_id = SensorId::CCD_PLUSTEK3800; model.adc_id = AdcId::PLUSTEK3800; - model.gpo_type = GPO_PLUSTEK3800; + model.gpio_id = GpioId::PLUSTEK3800; model.motor_type = MOTOR_PLUSTEK3800; model.flags = GENESYS_FLAG_SKIP_WARMUP | GENESYS_FLAG_OFFSET_CALIBRATION | @@ -2544,7 +2544,7 @@ void genesys_init_usb_device_tables() model.is_sheetfed = SANE_FALSE; model.sensor_id = SensorId::CCD_IMG101; model.adc_id = AdcId::IMG101; - model.gpo_type = GPO_IMG101; + model.gpio_id = GpioId::IMG101; model.motor_type = MOTOR_IMG101; model.flags = GENESYS_FLAG_SKIP_WARMUP | GENESYS_FLAG_OFFSET_CALIBRATION |