1/* 2 (c) 2001 Nathan Rutman nathan@gordian.com 11/13/01 3 4 National Semi LM9830 scanner-on-a-chip register defs 5*/ 6 7#ifndef LM9830_H 8#define LM9830_H 9 10 11/* LM9830 registers (see lm9830 datasheet for a full description */ 12#define IMAGE_DATA_AVAIL 0x01 13#define STATUS 0x02 14#define DATAPORT_TARGET 0x03 15#define DATAPORT_ADDR 0x04 16#define DATAPORT 0x06 17#define COMMAND 0x07 18#define CLOCK_DIV 0x08 /* Master clock divider */ 19#define ACTIVE_PX_START 0x1e /* Active pixel start */ 20#define LINE_END 0x20 21#define DATA_PX_START 0x22 22#define DATA_PX_END 0x24 23#define COLOR_MODE 0x26 24#define LAMP_R_ON 0x2c 25#define LAMP_R_OFF 0x2e 26#define LAMP_G_ON 0x30 27#define LAMP_G_OFF 0x32 28#define LAMP_B_ON 0x34 29#define LAMP_B_OFF 0x36 30#define PARALLEL_PORT 0x42 /* Parallel port settings */ 31#define MICROSTEP 0x45 32#define STEP_SIZE 0x46 33#define FAST_STEP 0x48 34#define SKIP_STEPS 0x4a 35#define BUFFER_LIMIT 0x4e /* Pause scanning when buffer is this full */ 36#define BUFFER_RESUME 0x4f 37#define REVERSE_STEPS 0x50 38#define STEP_PWM 0x57 39#define PAPER_SENSOR 0x58 40 41/* Register 02 flags */ 42#define STATUS_HOME 0x02 43#define STATUS_PAUSE 0x10 44#define STATUS_POWER 0x20 45 46/* Register 03 flags */ 47#define DP_GAMMA 0x00 48#define DP_OFFSET 0x01 49#define DP_R 0x00 50#define DP_G 0x02 51#define DP_B 0x04 52 53/* Register 04 flags */ 54#define DP_WRITE 0x0000 55#define DP_READ 0x2000 56 57 58#endif /* LM9830_H */ 59