From: Bastian Dehn Date: Tue, 24 Mar 2026 17:57:58 +0000 (+0100) Subject: add bit option positions X-Git-Tag: v1.1.25^2~3^2~13 X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=3a37a7408240402e96036297f42ad96c6735ed29;p=sane-kds-s2000w-net.git add bit option positions --- diff --git a/src/kds_s2000w_option_descriptors.h b/src/kds_s2000w_option_descriptors.h index 615ebb0..189db29 100644 --- a/src/kds_s2000w_option_descriptors.h +++ b/src/kds_s2000w_option_descriptors.h @@ -3,6 +3,63 @@ #include #include +/******************************************************************************* + * option bitmasks + ******************************************************************************/ + +#define EXISTS_OPTION (group, option_bit) group >> option_bit & 1 + +#define BIT_SCAN_SOURCE 0 +#define BIT_COLOR_MODE 1 +#define BIT_DPI 2 +#define BIT_SCAN_SIDE 3 + +#define BIT_CROPPING_MODE 0 +#define BIT_CROPPING_IMAGE 1 +#define BIT_IMAGE_OFFSET_X 2 +#define BIT_IMAGE_OFFSET_Y 3 +#define BIT_IMAGE_WIDTH 4 +#define BIT_IMAGE_HEIGHT 5 + +#define BIT_FOREGROUND_BOLDNESS_MODE 0 +#define BIT_FOREGROUND_BOLDNESS_AGGRESSIVENESS 1 +#define BIT_BACKGROUND_SMOOTHING_MODE 2 +#define BIT_BACKGROUND_SMOOTHING_AGGRESSIVENESS 3 + +#define BIT_COLOR_DROP_OUT 0 +#define BIT_COLOR_DROP_OUT_AGGRESSIVENESS 1 +#define BIT_COLOR_AUTO_BRIGHTNESS_MODE 2 +#define BIT_COLOR_BRIGHTNESS 3 +#define BIT_COLOR_CONTRAST 4 +#define BIT_COLOR_BALANCE_MODE 5 +#define BIT_COLOR_BALANCE_AGGRESSIVENESS 6 +#define BIT_COLOR_BALANCE_RED 7 +#define BIT_COLOR_BALANCE_GREEN 8 +#define BIT_COLOR_BALANCE_BLUE 9 +#define BIT_COLOR_SHARPEN 10 +#define BIT_BINARIZATION_CONTRAST 11 +#define BIT_RESET 12 + +#define BIT_SKIP_BLANK_PAGES 0 +#define BIT_SKIP_BLANK_PAGES_CONTENT 1 +#define BIT_HOLE_FILL 2 +#define BIT_POST_SCAN_ROTATION 3 +#define BIT_EDGE_FILL 4 +#define BIT_IMAGE_BORDER 5 +#define BIT_JPEG_QUALITY 6 + +#define BIT_AUTOSTART 0 +#define BIT_MAX_DOCUMENT_LENGTH 1 +#define BIT_TRANSPORT_HANDLING 2 +#define BIT_MULTIFEED_SENSITIVITY 3 +#define BIT_MULTIFEED_RESPONSE 4 +#define BIT_DOCUMENT_FEEDER_TIMEOUT 5 +#define BIT_DOCUMENT_FEEDER_TIMEOUT_RESPONSE 6 + +/******************************************************************************* + * option names + ******************************************************************************/ + #define OPTION_COUNT "OptionCount" #define STANDARD_GROUP "StandardGroup" @@ -58,6 +115,10 @@ #define DOCUMENT_FEEDER_TIMEOUT "DocumentFeederTimeout" #define DOCUMENT_FEEDER_TIMEOUT_RESPONSE "DocumentFeederTimeoutResponse" +/******************************************************************************* + * methods + ******************************************************************************/ + typedef enum { PROFILE_MIN, PROFILE_230802_V1_0_36,