kopia lustrzana https://gitlab.com/sane-project/backends
genesys: Add a class to move common command set functions to
rodzic
8b129b32ff
commit
3753716e04
|
@ -504,6 +504,7 @@ libgenesys_la_SOURCES = genesys/genesys.cpp genesys/genesys.h \
|
||||||
genesys/buffer.h genesys/buffer.cpp \
|
genesys/buffer.h genesys/buffer.cpp \
|
||||||
genesys/calibration.h \
|
genesys/calibration.h \
|
||||||
genesys/command_set.h \
|
genesys/command_set.h \
|
||||||
|
genesys/command_set_common.h genesys/command_set_common.cpp \
|
||||||
genesys/conv.h genesys/conv.cpp \
|
genesys/conv.h genesys/conv.cpp \
|
||||||
genesys/device.h genesys/device.cpp \
|
genesys/device.h genesys/device.cpp \
|
||||||
genesys/enums.h genesys/enums.cpp \
|
genesys/enums.h genesys/enums.cpp \
|
||||||
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
/* sane - Scanner Access Now Easy.
|
||||||
|
|
||||||
|
Copyright (C) 2019 Povilas Kanapickas <povilas@radix.lt>
|
||||||
|
|
||||||
|
This file is part of the SANE package.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
||||||
|
MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define DEBUG_DECLARE_ONLY
|
||||||
|
|
||||||
|
#include "command_set_common.h"
|
||||||
|
|
||||||
|
namespace genesys {
|
||||||
|
|
||||||
|
CommandSetCommon::~CommandSetCommon() = default;
|
||||||
|
|
||||||
|
} // namespace genesys
|
|
@ -0,0 +1,41 @@
|
||||||
|
/* sane - Scanner Access Now Easy.
|
||||||
|
|
||||||
|
Copyright (C) 2019 Povilas Kanapickas <povilas@radix.lt>
|
||||||
|
|
||||||
|
This file is part of the SANE package.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
||||||
|
MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef BACKEND_GENESYS_COMMAND_SET_COMMON_H
|
||||||
|
#define BACKEND_GENESYS_COMMAND_SET_COMMON_H
|
||||||
|
|
||||||
|
#include "command_set.h"
|
||||||
|
|
||||||
|
namespace genesys {
|
||||||
|
|
||||||
|
|
||||||
|
/** Common command set functionality
|
||||||
|
*/
|
||||||
|
class CommandSetCommon : public CommandSet
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
~CommandSetCommon() override;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace genesys
|
||||||
|
|
||||||
|
#endif // BACKEND_GENESYS_COMMAND_SET_COMMON_H
|
|
@ -45,7 +45,7 @@
|
||||||
#define BACKEND_GENESYS_GL124_H
|
#define BACKEND_GENESYS_GL124_H
|
||||||
|
|
||||||
#include "genesys.h"
|
#include "genesys.h"
|
||||||
#include "command_set.h"
|
#include "command_set_common.h"
|
||||||
|
|
||||||
namespace genesys {
|
namespace genesys {
|
||||||
namespace gl124 {
|
namespace gl124 {
|
||||||
|
@ -112,7 +112,7 @@ static Memory_layout layouts[]={
|
||||||
static void gl124_send_slope_table(Genesys_Device* dev, int table_nr,
|
static void gl124_send_slope_table(Genesys_Device* dev, int table_nr,
|
||||||
const std::vector<uint16_t>& slope_table, int steps);
|
const std::vector<uint16_t>& slope_table, int steps);
|
||||||
|
|
||||||
class CommandSetGl124 : public CommandSet
|
class CommandSetGl124 : public CommandSetCommon
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
~CommandSetGl124() override = default;
|
~CommandSetGl124() override = default;
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
#define BACKEND_GENESYS_GL646_H
|
#define BACKEND_GENESYS_GL646_H
|
||||||
|
|
||||||
#include "genesys.h"
|
#include "genesys.h"
|
||||||
#include "command_set.h"
|
#include "command_set_common.h"
|
||||||
#include "motor.h"
|
#include "motor.h"
|
||||||
|
|
||||||
namespace genesys {
|
namespace genesys {
|
||||||
|
@ -436,7 +436,7 @@ static Motor_Master motor_master[] = {
|
||||||
MotorSlope::create_from_steps(2000, 300, 255), 146}, /* 5500 guessed */
|
MotorSlope::create_from_steps(2000, 300, 255), 146}, /* 5500 guessed */
|
||||||
};
|
};
|
||||||
|
|
||||||
class CommandSetGl646 : public CommandSet
|
class CommandSetGl646 : public CommandSetCommon
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
~CommandSetGl646() override = default;
|
~CommandSetGl646() override = default;
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "genesys.h"
|
#include "genesys.h"
|
||||||
#include "command_set.h"
|
#include "command_set_common.h"
|
||||||
|
|
||||||
#ifndef BACKEND_GENESYS_GL841_H
|
#ifndef BACKEND_GENESYS_GL841_H
|
||||||
#define BACKEND_GENESYS_GL841_H
|
#define BACKEND_GENESYS_GL841_H
|
||||||
|
@ -50,7 +50,7 @@
|
||||||
namespace genesys {
|
namespace genesys {
|
||||||
namespace gl841 {
|
namespace gl841 {
|
||||||
|
|
||||||
class CommandSetGl841 : public CommandSet
|
class CommandSetGl841 : public CommandSetCommon
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
~CommandSetGl841() override = default;
|
~CommandSetGl841() override = default;
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "genesys.h"
|
#include "genesys.h"
|
||||||
#include "command_set.h"
|
#include "command_set_common.h"
|
||||||
|
|
||||||
#ifndef BACKEND_GENESYS_GL843_H
|
#ifndef BACKEND_GENESYS_GL843_H
|
||||||
#define BACKEND_GENESYS_GL843_H
|
#define BACKEND_GENESYS_GL843_H
|
||||||
|
@ -50,7 +50,7 @@
|
||||||
namespace genesys {
|
namespace genesys {
|
||||||
namespace gl843 {
|
namespace gl843 {
|
||||||
|
|
||||||
class CommandSetGl843 : public CommandSet
|
class CommandSetGl843 : public CommandSetCommon
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
~CommandSetGl843() override = default;
|
~CommandSetGl843() override = default;
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "genesys.h"
|
#include "genesys.h"
|
||||||
#include "command_set.h"
|
#include "command_set_common.h"
|
||||||
|
|
||||||
#ifndef BACKEND_GENESYS_GL846_H
|
#ifndef BACKEND_GENESYS_GL846_H
|
||||||
#define BACKEND_GENESYS_GL846_H
|
#define BACKEND_GENESYS_GL846_H
|
||||||
|
@ -125,7 +125,7 @@ static Memory_layout layouts[]={
|
||||||
{ 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} }
|
{ 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:
|
public:
|
||||||
~CommandSetGl846() override = default;
|
~CommandSetGl846() override = default;
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
#define BACKEND_GENESYS_GL847_H
|
#define BACKEND_GENESYS_GL847_H
|
||||||
|
|
||||||
#include "genesys.h"
|
#include "genesys.h"
|
||||||
#include "command_set.h"
|
#include "command_set_common.h"
|
||||||
|
|
||||||
namespace genesys {
|
namespace genesys {
|
||||||
namespace gl847 {
|
namespace gl847 {
|
||||||
|
@ -113,7 +113,7 @@ static Memory_layout layouts[]={
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class CommandSetGl847 : public CommandSet
|
class CommandSetGl847 : public CommandSetCommon
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
~CommandSetGl847() override = default;
|
~CommandSetGl847() override = default;
|
||||||
|
|
Ładowanie…
Reference in New Issue