genesys: Prefer enums to #defines

merge-requests/47/head
Povilas Kanapickas 2019-03-22 14:50:03 +02:00
rodzic 13350ba4ba
commit 265f4a96ea
1 zmienionych plików z 115 dodań i 105 usunięć

Wyświetl plik

@ -331,114 +331,124 @@ Genesys_Color_Order;
#define GENESYS_MAX_REGS 256
#define DAC_WOLFSON_UMAX 0
#define DAC_WOLFSON_ST12 1
#define DAC_WOLFSON_ST24 2
#define DAC_WOLFSON_5345 3
#define DAC_WOLFSON_HP2400 4
#define DAC_WOLFSON_HP2300 5
#define DAC_CANONLIDE35 6
#define DAC_AD_XP200 7 /* Analog Device frontend */
#define DAC_WOLFSON_XP300 8
#define DAC_WOLFSON_HP3670 9
#define DAC_WOLFSON_DSM600 10
#define DAC_CANONLIDE200 11
#define DAC_KVSS080 12
#define DAC_G4050 13
#define DAC_CANONLIDE110 14
#define DAC_PLUSTEK_3600 15
#define DAC_CANONLIDE700 16
#define DAC_CS8400F 17
#define DAC_IMG101 18
#define DAC_PLUSTEK3800 19
#define DAC_CANONLIDE80 20
#define DAC_CANONLIDE120 21
enum Genesys_Dac_Type
{
DAC_WOLFSON_UMAX = 0,
DAC_WOLFSON_ST12,
DAC_WOLFSON_ST24,
DAC_WOLFSON_5345,
DAC_WOLFSON_HP2400,
DAC_WOLFSON_HP2300,
DAC_CANONLIDE35,
DAC_AD_XP200,
DAC_WOLFSON_XP300,
DAC_WOLFSON_HP3670,
DAC_WOLFSON_DSM600,
DAC_CANONLIDE200,
DAC_KVSS080,
DAC_G4050,
DAC_CANONLIDE110,
DAC_PLUSTEK_3600,
DAC_CANONLIDE700,
DAC_CS8400F,
DAC_IMG101,
DAC_PLUSTEK3800,
DAC_CANONLIDE80,
DAC_CANONLIDE120
};
#define CCD_UMAX 0
#define CCD_ST12 1 /* SONY ILX548: 5340 Pixel ??? */
#define CCD_ST24 2 /* SONY ILX569: 10680 Pixel ??? */
#define CCD_5345 3
#define CCD_HP2400 4
#define CCD_HP2300 5
#define CCD_CANONLIDE35 6
#define CIS_XP200 7 /* CIS sensor for Strobe XP200 */
/* 8 is unused currently */
#define CCD_HP3670 9
#define CCD_DP665 10
#define CCD_ROADWARRIOR 11
#define CCD_DSMOBILE600 12
#define CCD_XP300 13
#define CCD_DP685 14
#define CIS_CANONLIDE200 15
#define CIS_CANONLIDE100 16
#define CCD_KVSS080 17
#define CCD_G4050 18
#define CIS_CANONLIDE110 19
#define CCD_PLUSTEK_3600 20
#define CCD_HP_N6310 21
#define CIS_CANONLIDE700 22
#define CCD_CS4400F 23
#define CCD_CS8400F 24
#define CCD_IMG101 25
#define CCD_PLUSTEK3800 26
#define CIS_CANONLIDE210 27
#define CIS_CANONLIDE80 28
#define CIS_CANONLIDE220 29
#define CIS_CANONLIDE120 30
enum Genesys_Sensor_Type
{
CCD_UMAX = 0,
CCD_ST12, // SONY ILX548: 5340 Pixel ???
CCD_ST24, // SONY ILX569: 10680 Pixel ???
CCD_5345,
CCD_HP2400,
CCD_HP2300,
CCD_CANONLIDE35,
CIS_XP200, // CIS sensor for Strobe XP200,
CCD_HP3670,
CCD_DP665,
CCD_ROADWARRIOR,
CCD_DSMOBILE600,
CCD_XP300,
CCD_DP685,
CIS_CANONLIDE200,
CIS_CANONLIDE100,
CCD_KVSS080,
CCD_G4050,
CIS_CANONLIDE110,
CCD_PLUSTEK_3600,
CCD_HP_N6310,
CIS_CANONLIDE700,
CCD_CS4400F,
CCD_CS8400F,
CCD_IMG101,
CCD_PLUSTEK3800,
CIS_CANONLIDE210,
CIS_CANONLIDE80,
CIS_CANONLIDE220,
CIS_CANONLIDE120,
};
#define GPO_UMAX 0
#define GPO_ST12 1
#define GPO_ST24 2
#define GPO_5345 3
#define GPO_HP2400 4
#define GPO_HP2300 5
#define GPO_CANONLIDE35 6
#define GPO_XP200 7
#define GPO_XP300 8
#define GPO_HP3670 9
#define GPO_DP665 10
#define GPO_DP685 11
#define GPO_CANONLIDE200 12
#define GPO_KVSS080 13
#define GPO_G4050 14
#define GPO_CANONLIDE110 15
#define GPO_PLUSTEK_3600 16
#define GPO_CANONLIDE210 17
#define GPO_HP_N6310 18
#define GPO_CANONLIDE700 19
#define GPO_CS4400F 20
#define GPO_CS8400F 21
#define GPO_IMG101 22
#define GPO_PLUSTEK3800 23
#define GPO_CANONLIDE80 24
#define GPO_CANONLIDE120 25
#define MOTOR_UMAX 0
#define MOTOR_5345 1
#define MOTOR_ST24 2
#define MOTOR_HP2400 3
#define MOTOR_HP2300 4
#define MOTOR_CANONLIDE35 5
#define MOTOR_XP200 6
#define MOTOR_XP300 7
#define MOTOR_HP3670 9
#define MOTOR_DP665 10
#define MOTOR_ROADWARRIOR 11
#define MOTOR_DSMOBILE_600 12
#define MOTOR_CANONLIDE200 13
#define MOTOR_CANONLIDE100 14
#define MOTOR_KVSS080 15
#define MOTOR_G4050 16
#define MOTOR_CANONLIDE110 17
#define MOTOR_PLUSTEK_3600 18
#define MOTOR_CANONLIDE700 19
#define MOTOR_CS8400F 20
#define MOTOR_IMG101 21
#define MOTOR_PLUSTEK3800 22
#define MOTOR_CANONLIDE210 23
#define MOTOR_CANONLIDE80 24
#define MOTOR_CANONLIDE120 25
enum Genesys_Gpo_Type
{
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_CANONLIDE210,
GPO_HP_N6310,
GPO_CANONLIDE700,
GPO_CS4400F,
GPO_CS8400F,
GPO_IMG101,
GPO_PLUSTEK3800,
GPO_CANONLIDE80,
GPO_CANONLIDE120
};
enum Genesys_Motor_Type
{
MOTOR_UMAX = 0,
MOTOR_5345,
MOTOR_ST24,
MOTOR_HP2400,
MOTOR_HP2300,
MOTOR_CANONLIDE35,
MOTOR_XP200,
MOTOR_XP300,
MOTOR_HP3670,
MOTOR_DP665,
MOTOR_ROADWARRIOR,
MOTOR_DSMOBILE_600,
MOTOR_CANONLIDE200,
MOTOR_CANONLIDE100,
MOTOR_KVSS080,
MOTOR_G4050,
MOTOR_CANONLIDE110,
MOTOR_PLUSTEK_3600,
MOTOR_CANONLIDE700,
MOTOR_CS8400F,
MOTOR_IMG101,
MOTOR_PLUSTEK3800,
MOTOR_CANONLIDE210,
MOTOR_CANONLIDE80,
MOTOR_CANONLIDE120
};
/* Forward typedefs */
typedef struct Genesys_Device Genesys_Device;