summaryrefslogtreecommitdiff
path: root/backend/canon_dr-cmd.h
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2020-03-30 21:30:45 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2020-03-30 21:30:45 +0200
commitee770c2346eb37e0dcb8b6cf3eaacf3d8efd6bbc (patch)
tree58f05092be1a17a939e861f8cadcda1b6ca2ecef /backend/canon_dr-cmd.h
parent0da9e21872802cfc6e975b1ebaf9efb9e5934d84 (diff)
parentfef76e17ed4c607ea73b81279f9ef1d7121be900 (diff)
Merge branch 'release/experimental/1.0.29-1_experimental1'experimental/1.0.29-1_experimental1
Diffstat (limited to 'backend/canon_dr-cmd.h')
-rw-r--r--backend/canon_dr-cmd.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/backend/canon_dr-cmd.h b/backend/canon_dr-cmd.h
index b969c3b..51f2a06 100644
--- a/backend/canon_dr-cmd.h
+++ b/backend/canon_dr-cmd.h
@@ -1,7 +1,7 @@
#ifndef CANON_DR_CMD_H
#define CANON_DR_CMD_H
-/*
+/*
* Part of SANE - Scanner Access Now Easy.
* Please see opening comments in canon_dr.c
*/
@@ -258,6 +258,11 @@ putnbyte (unsigned char *pnt, unsigned int value, unsigned int nbytes)
#define R_FINE_uid_blue 0x09
#define R_FINE_uid_unknown 0x14
+/* get pixel size */
+#define R_PSIZE_len 16
+#define get_R_PSIZE_width(in) getnbyte(in + 0x08, 4)
+#define get_R_PSIZE_length(in) getnbyte(in + 0x0c, 4)
+
/* ==================================================================== */
/* SEND */
#define SEND_code 0x2a
@@ -431,6 +436,7 @@ putnbyte (unsigned char *pnt, unsigned int value, unsigned int nbytes)
#define SM2_pc_df 0x00
#define SM2_pc_ultra 0x01
#define SM2_pc_buffer 0x02
+#define SM2_pc_hw_enhancement 0x03
#define SM2_pc_dropout 0x06
/* ==================================================================== */
@@ -447,6 +453,7 @@ putnbyte (unsigned char *pnt, unsigned int value, unsigned int nbytes)
/* for DF (0x00) page */
#define set_SSM2_DF_thick(sb, val) setbitfield(sb+3, 1, 2, val)
#define set_SSM2_DF_len(sb, val) setbitfield(sb+3, 1, 0, val)
+#define set_SSM2_DF_staple(sb, val) setbitfield(sb+3, 1, 4, val)
/* for ULTRA (0x01) page */
#define set_SSM2_ULTRA_top(sb, val) putnbyte(sb + 0x07, val, 2)
@@ -457,9 +464,14 @@ putnbyte (unsigned char *pnt, unsigned int value, unsigned int nbytes)
#define set_SSM2_BUFF_unk2(sb, val) sb[0x06] = val
#define set_SSM2_BUFF_sync(sb, val) sb[0x09] = val
+/* for HARDWARE ENHANCEMENT (0x03) */
+#define set_SSM2_roller_deskew(sb, val) setbitfield(sb+6, 1, 3, val)
+#define set_SSM2_hw_crop(sb, val) setbitfield(sb+6, 1, 5, val)
+
/* for DROPOUT (0x06) page */
#define set_SSM2_DO_do(sb, val) sb[0x09] = val
#define set_SSM2_DO_en(sb, val) sb[0x0a] = val
+#define set_SSM2_DO_side(sb, val) sb[0x05] = val
/* ==================================================================== */
/* window descriptor macros for SET_WINDOW and GET_WINDOW */
@@ -571,7 +583,7 @@ putnbyte (unsigned char *pnt, unsigned int value, unsigned int nbytes)
/* FIXME: more params here? */
#define set_WD_reserved2(sb, val) sb[0x2a] = val
#define get_WD_reserved2(sb) sb[0x2a]
-
+
/* ==================================================================== */