summaryrefslogtreecommitdiff
path: root/backend/canon_dr-cmd.h
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2019-07-31 16:59:49 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2019-07-31 16:59:49 +0200
commit1687222e1b9e74c89cafbb5910e72d8ec7bfd40f (patch)
treed78102ce30207c63e7608eeba743efd680c888dc /backend/canon_dr-cmd.h
parent58912f68c2489bcee787599837447e0d64dfd61a (diff)
New upstream version 1.0.28upstream/1.0.28
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]
-
+
/* ==================================================================== */