summaryrefslogtreecommitdiff
path: root/backend/lm9830.h
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2014-10-06 14:00:40 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2014-10-06 14:00:40 +0200
commit6e9c41a892ed0e0da326e0278b3221ce3f5713b8 (patch)
tree2e301d871bbeeb44aa57ff9cc070fcf3be484487 /backend/lm9830.h
Initial import of sane-backends version 1.0.24-1.2
Diffstat (limited to 'backend/lm9830.h')
-rw-r--r--backend/lm9830.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/backend/lm9830.h b/backend/lm9830.h
new file mode 100644
index 0000000..cd6a4d1
--- /dev/null
+++ b/backend/lm9830.h
@@ -0,0 +1,58 @@
+/*
+ (c) 2001 Nathan Rutman nathan@gordian.com 11/13/01
+
+ National Semi LM9830 scanner-on-a-chip register defs
+*/
+
+#ifndef LM9830_H
+#define LM9830_H
+
+
+/* LM9830 registers (see lm9830 datasheet for a full description */
+#define IMAGE_DATA_AVAIL 0x01
+#define STATUS 0x02
+#define DATAPORT_TARGET 0x03
+#define DATAPORT_ADDR 0x04
+#define DATAPORT 0x06
+#define COMMAND 0x07
+#define CLOCK_DIV 0x08 /* Master clock divider */
+#define ACTIVE_PX_START 0x1e /* Active pixel start */
+#define LINE_END 0x20
+#define DATA_PX_START 0x22
+#define DATA_PX_END 0x24
+#define COLOR_MODE 0x26
+#define LAMP_R_ON 0x2c
+#define LAMP_R_OFF 0x2e
+#define LAMP_G_ON 0x30
+#define LAMP_G_OFF 0x32
+#define LAMP_B_ON 0x34
+#define LAMP_B_OFF 0x36
+#define PARALLEL_PORT 0x42 /* Parallel port settings */
+#define MICROSTEP 0x45
+#define STEP_SIZE 0x46
+#define FAST_STEP 0x48
+#define SKIP_STEPS 0x4a
+#define BUFFER_LIMIT 0x4e /* Pause scanning when buffer is this full */
+#define BUFFER_RESUME 0x4f
+#define REVERSE_STEPS 0x50
+#define STEP_PWM 0x57
+#define PAPER_SENSOR 0x58
+
+/* Register 02 flags */
+#define STATUS_HOME 0x02
+#define STATUS_PAUSE 0x10
+#define STATUS_POWER 0x20
+
+/* Register 03 flags */
+#define DP_GAMMA 0x00
+#define DP_OFFSET 0x01
+#define DP_R 0x00
+#define DP_G 0x02
+#define DP_B 0x04
+
+/* Register 04 flags */
+#define DP_WRITE 0x0000
+#define DP_READ 0x2000
+
+
+#endif /* LM9830_H */