From 58912f68c2489bcee787599837447e0d64dfd61a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Wed, 24 May 2017 21:03:56 +0200 Subject: New upstream version 1.0.27 --- backend/fujitsu-scsi.h | 55 ++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 47 insertions(+), 8 deletions(-) (limited to 'backend/fujitsu-scsi.h') diff --git a/backend/fujitsu-scsi.h b/backend/fujitsu-scsi.h index de6652c..42598cb 100644 --- a/backend/fujitsu-scsi.h +++ b/backend/fujitsu-scsi.h @@ -377,6 +377,10 @@ putnbyte (unsigned char *pnt, unsigned int value, unsigned int nbytes) #define get_IN_read_size(in) getbitfield(in+0x78, 1, 6) #define get_IN_start_end_ms(in) getbitfield(in+0x78, 1, 5) +#define get_IN_battery(in) getbitfield(in+0x79, 1, 7) +#define get_IN_battery_save(in) getbitfield(in+0x79, 1, 6) +#define get_IN_op_reverse(in) getbitfield(in+0x79, 1, 1) + #define get_IN_op_halt(in) getbitfield(in+0x7a, 1, 7) /* some scanners need evpd inquiry data manipulated */ @@ -616,12 +620,13 @@ putnbyte (unsigned char *pnt, unsigned int value, unsigned int nbytes) #define SEND_len 10 #define set_S_xfer_datatype(sb, val) sb[0x02] = (unsigned char)val -/*#define S_datatype_imagedatai 0x00 #define S_datatype_halftone_mask 0x02 -#define S_datatype_gamma_function 0x03*/ +#define S_datatype_gamma_function 0x03 #define S_datatype_lut_data 0x83 +#define S_datatype_lut_dropout 0x84 #define S_datatype_jpg_q_table 0x88 #define S_datatype_endorser_data 0x90 +#define S_datatype_sendto_name 0xa0 /*#define S_EX_datatype_lut 0x01 #define S_EX_datatype_shading_data 0xa0 #define S_user_reg_gamma 0xc0 @@ -747,6 +752,8 @@ putnbyte (unsigned char *pnt, unsigned int value, unsigned int nbytes) #define GHS_data_len 12 #define get_GHS_top(in) getbitfield(in+0x02, 1, 7) +#define get_GHS_fedalm(in) getbitfield(in+0x02, 1, 5) +#define get_GHS_adjalm(in) getbitfield(in+0x02, 1, 4) #define get_GHS_A3(in) getbitfield(in+0x02, 1, 3) #define get_GHS_B4(in) getbitfield(in+0x02, 1, 2) #define get_GHS_A4(in) getbitfield(in+0x02, 1, 1) @@ -762,12 +769,14 @@ putnbyte (unsigned char *pnt, unsigned int value, unsigned int nbytes) #define get_GHS_sleep(in) getbitfield(in+0x04, 1, 7) #define get_GHS_clean(in) getbitfield(in+0x04, 1, 6) +#define get_GHS_scan_sw_long(in) getbitfield(in+0x04, 1, 5) +#define get_GHS_hpos(in) getbitfield(in+0x04, 1, 4) #define get_GHS_send_sw(in) getbitfield(in+0x04, 1, 2) #define get_GHS_manual_feed(in) getbitfield(in+0x04, 1, 1) #define get_GHS_scan_sw(in) getbitfield(in+0x04, 1, 0) #define get_GHS_picalm(in) getbitfield(in+0x05, 1, 7) -#define get_GHS_fadalm(in) getbitfield(in+0x05, 1, 6) +#define get_GHS_padalm(in) getbitfield(in+0x05, 1, 6) #define get_GHS_brkalm(in) getbitfield(in+0x05, 1, 5) #define get_GHS_sepalm(in) getbitfield(in+0x05, 1, 4) #define get_GHS_function(in) getbitfield(in+0x05, 0x0f, 0) @@ -783,10 +792,34 @@ putnbyte (unsigned char *pnt, unsigned int value, unsigned int nbytes) #define get_GHS_error_code(in) in[0x07] -#define get_GHS_skew_angle(in) getnbyte(in+0x08, 2) +#define get_GHS_skew_angle(in) in[0x09] #define get_GHS_ink_remain(in) in[0x0a] +#define get_GHS_lang_code(in) getnbyte(in+0x0c, 2) + +#define get_GHS_adjalm_fed(in) getbitfield(in+0x0e, 1, 7) +#define get_GHS_non_sep(in) getbitfield(in+0x0e, 1, 4) +#define get_GHS_ext_sendto(in) getbitfield(in+0x0e, 1, 2) +#define get_GHS_rq_hldimg(in) getbitfield(in+0x0e, 1, 1) +#define get_GHS_pacnt(in) getbitfield(in+0x0e, 1, 0) + +#define get_GHS_wifi_sw(in) getbitfield(in+0x10, 1, 7) +#define get_GHS_w_use(in) getbitfield(in+0x10, 1, 6) +#define get_GHS_w_use2(in) getbitfield(in+0x10, 1, 5) +#define get_GHS_w_use3(in) getbitfield(in+0x10, 1, 4) +#define get_GHS_w_use4(in) getbitfield(in+0x10, 1, 3) + +#define get_GHS_battery(in) getbitfield(in+0x11, 1, 7) +#define get_GHS_btr_charge(in) getbitfield(in+0x11, 1, 6) +#define get_GHS_btr_chg_tmp_stp(in) getbitfield(in+0x11, 1, 5) +#define get_GHS_ibtr_ene_sav(in) getbitfield(in+0x11, 1, 4) +#define get_GHS_fngr_caut(in) getbitfield(in+0x11, 1, 2) +#define get_GHS_trnpg_l(in) getbitfield(in+0x11, 1, 1) +#define get_GHS_trnpg_r(in) getbitfield(in+0x11, 1, 0) + +#define get_GHS_btr_power(in) in[0x12] + /* ==================================================================== */ /* SCANNER_CONTROL */ #define SCANNER_CONTROL_code 0xf1 @@ -807,6 +840,12 @@ putnbyte (unsigned char *pnt, unsigned int value, unsigned int nbytes) #define SC_function_eject_complete 0x0a #define SC_function_manual_feed 0x0c +/* used with SC_function_panel */ +#define set_SC_led_eb(icb, val) setbitfield(icb + 5, 1, 7, val) +#define set_SC_led(icb, val) setbitfield(icb + 5, 1, 6, val) +#define set_SC_fcno_eb(icb, val) setbitfield(icb + 5, 1, 4, val) +#define set_SC_fcno(icb, val) setbitfield(icb + 5, 0xf, 0, val) + #define set_SC_ric_dtq(sb, val) sb[2] = val #define set_SC_ric_len(sb, val) putnbyte(sb + 0x06, val, 3) @@ -1024,12 +1063,12 @@ putnbyte (unsigned char *pnt, unsigned int value, unsigned int nbytes) /* DTC also called Auto-I mode?*/ /*warning: filtering uses inverse logic*/ -#define set_WD_filtering(sb, val) setbitfield(sb + 0x2f, 1, 7, val) -#define get_WD_filtering(sb) getbitfield(sb + 0x2f, 1, 7) +#define set_WD_filtering(sb, val) setbitfield(sb + 0x2f, 1, 7, !val) +#define get_WD_filtering(sb) !getbitfield(sb + 0x2f, 1, 7) /*warning: smoothing uses inverse logic*/ -#define set_WD_smoothing(sb, val) setbitfield(sb + 0x2f, 3, 5, val) -#define get_WD_smoothing(sb) getbitfield(sb + 0x2f, 3, 5) +#define set_WD_smoothing(sb, val) setbitfield(sb + 0x2f, 3, 5, !val) +#define get_WD_smoothing(sb) !getbitfield(sb + 0x2f, 3, 5) #define set_WD_gamma_curve(sb, val) setbitfield(sb + 0x2f, 3, 3, val) #define get_WD_gamma_curve(sb) getbitfield(sb + 0x2f, 3, 3) -- cgit v1.2.3 From 1687222e1b9e74c89cafbb5910e72d8ec7bfd40f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Wed, 31 Jul 2019 16:59:49 +0200 Subject: New upstream version 1.0.28 --- backend/fujitsu-scsi.h | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) (limited to 'backend/fujitsu-scsi.h') diff --git a/backend/fujitsu-scsi.h b/backend/fujitsu-scsi.h index 42598cb..38425a6 100644 --- a/backend/fujitsu-scsi.h +++ b/backend/fujitsu-scsi.h @@ -1,9 +1,9 @@ #ifndef FUJITSU_SCSI_H #define FUJITSU_SCSI_H -/* +/* * Part of SANE - Scanner Access Now Easy. - * + * * Please see to opening comments in fujitsu.c */ @@ -233,7 +233,7 @@ putnbyte (unsigned char *pnt, unsigned int value, unsigned int nbytes) #define get_IN_has_cmd_sdiag(in) getbitfield(in+0x28, 1, 2) #define get_IN_has_cmd_rdiag(in) getbitfield(in+0x28, 1, 1) #define get_IN_has_cmd_scan(in) getbitfield(in+0x28, 1, 0) - + #define get_IN_has_cmd_msen6(in) getbitfield(in+0x29, 1, 7) #define get_IN_has_cmd_copy(in) getbitfield(in+0x29, 1, 6) #define get_IN_has_cmd_rel(in) getbitfield(in+0x29, 1, 5) @@ -244,7 +244,7 @@ putnbyte (unsigned char *pnt, unsigned int value, unsigned int nbytes) #define get_IN_has_cmd_tur(in) getbitfield(in+0x29, 1, 0) /* more stuff here? (vendor commands) */ -#define get_IN_has_cmd_subwindow(in) getbitfield(in+0x2b, 1, 0) +#define get_IN_has_cmd_subwindow(in) getbitfield(in+0x2b, 1, 0) #define get_IN_has_cmd_endorser(in) getbitfield(in+0x2b, 1, 1) #define get_IN_has_cmd_hw_status(in) getbitfield(in+0x2b, 1, 2) #define get_IN_has_cmd_hw_status_2(in) getbitfield(in+0x2b, 1, 3) @@ -276,7 +276,7 @@ putnbyte (unsigned char *pnt, unsigned int value, unsigned int nbytes) #define get_IN_ipc_ipc3(in) getbitfield(in+0x59, 1, 5) #define get_IN_ipc_rotation(in) getbitfield(in+0x59, 1, 4) #define get_IN_ipc_hybrid_crop_deskew(in) getbitfield(in+0x59, 1, 3) -#define get_IN_ipc_ipc2_byte67(in) getbitfield(in+0x59, 1, 0) +#define get_IN_vpd_thru_byte_6f(in) getbitfield(in+0x59, 1, 0) #define get_IN_compression_MH(in) getbitfield(in+0x5a, 1, 7) #define get_IN_compression_MR(in) getbitfield(in+0x5a, 1, 6) @@ -383,9 +383,6 @@ putnbyte (unsigned char *pnt, unsigned int value, unsigned int nbytes) #define get_IN_op_halt(in) getbitfield(in+0x7a, 1, 7) -/* some scanners need evpd inquiry data manipulated */ -#define set_IN_page_length(in,val) in[0x04]=val - /* ==================================================================== */ /* page codes used by mode_sense and mode_select */ #define MS_pc_unk 0x2c /* Used by iX500 */ @@ -413,7 +410,7 @@ putnbyte (unsigned char *pnt, unsigned int value, unsigned int nbytes) #define set_MSEL_pf(sb, val) setbitfield(sb + 1, 1, 4, val) #define set_MSEL_xferlen(sb, val) sb[0x04] = (unsigned char)val -/* MS payloads are combined 4 byte header and 8 or 10 byte page +/* MS payloads are combined 4 byte header and 8 or 10 byte page * there is also 'descriptor block' & 'vendor-specific block' * but fujitsu seems not to use these */ /* 10 byte page only used by dropout? */ @@ -439,7 +436,7 @@ putnbyte (unsigned char *pnt, unsigned int value, unsigned int nbytes) #define set_MSEL_df_thickness(sb, val) setbitfield(sb + 2, 1, 4, val) #define set_MSEL_df_length(sb, val) setbitfield(sb + 2, 1, 3, val) #define set_MSEL_df_diff(sb, val) setbitfield(sb + 2, 3, 0, val) -#define MSEL_df_diff_DEFAULT 0 +#define MSEL_df_diff_DEFAULT 0 #define MSEL_df_diff_10MM 1 #define MSEL_df_diff_15MM 2 #define MSEL_df_diff_20MM 3 @@ -940,7 +937,7 @@ putnbyte (unsigned char *pnt, unsigned int value, unsigned int nbytes) #define get_WD_contrast(sb) sb[0x18] /* 0x19 - Image Composition (color mode) - * 3091 - use 0x00 for line art, 0x01 for halftone, + * 3091 - use 0x00 for line art, 0x01 for halftone, * 0x02 for grayscale, 0x05 for color. * 3096 - same but minus color. */ @@ -961,9 +958,9 @@ putnbyte (unsigned char *pnt, unsigned int value, unsigned int nbytes) #define get_WD_bitsperpixel(sb) sb[0x1a] /* 0x1b,0x1c - Halftone Pattern - * 3091 byte 1b: 00h default(=dither), 01h dither, + * 3091 byte 1b: 00h default(=dither), 01h dither, * 02h error dispersion - * 1c: 00 dark images, 01h dark text+images, + * 1c: 00 dark images, 01h dark text+images, * 02h light images, * 03h light text+images, 80h download pattern * 3096: 1b unused; 1c bit 7=1: use downloadable pattern, @@ -983,8 +980,8 @@ putnbyte (unsigned char *pnt, unsigned int value, unsigned int nbytes) /* 0x1d - Reverse image, padding type * 3091: bit 7=1: reverse black&white * bits 0-2: padding type, must be 0 - * 3096: the same; bit 7 must be set for gray and not - * set for b/w. + * 3096: the same; bit 7 must be set for gray and not + * set for b/w. */ #define set_WD_rif(sb, val) setbitfield(sb + 0x1d, 1, 7, val) #define get_WD_rif(sb) getbitfield(sb + 0x1d, 1, 7) -- cgit v1.2.3